Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an unlocking method provided in an embodiment of the present invention, and is applied to a mobile terminal having a camera. As shown in fig. 1, the method comprises the following steps:
step 101, controlling the camera to detect the face image under the condition that the mobile terminal is in a screen-off state and the camera is in a low-power-consumption running state, wherein the low-power-consumption running state is a state when the running power of the camera is smaller than a preset power value.
Instep 101, when the mobile terminal is turned off and the camera is in a low power consumption operation state, the camera may be controlled to detect a face image. The low-power-consumption running state is a state when the running power of the camera is smaller than a preset power value.
And 102, if the face image is detected, unlocking the mobile terminal under the condition that the face image is matched with a preset face image.
Instep 102, if the camera detects a face image, the mobile terminal may compare the detected face image with a preset face image. And under the condition that the detected face image is matched with the preset face image, the mobile terminal can be unlocked.
It should be noted that, in the prior art, the face recognition function can be started only by triggering by the user, so that the mobile terminal can be unlocked. However, the situation of false triggering often occurs, so that the camera of the mobile terminal is frequently started, more electric quantity is consumed, and the endurance time of the mobile terminal is reduced.
In the invention, the camera can be controlled to detect the face image under the condition that the mobile terminal is turned off and the camera is in a low-power-consumption running state. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
In an embodiment of the present invention, the Mobile terminal may be a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
The unlocking method provided by the embodiment of the invention is applied to the mobile terminal with the camera. Under the condition that the mobile terminal is in a screen-off state and the camera is in a low-power-consumption running state, controlling the camera to detect a face image, wherein the low-power-consumption running state is a state when the running power of the camera is smaller than a preset power value; and if the face image is detected, unlocking the mobile terminal under the condition that the face image is matched with a preset face image. Therefore, when the mobile terminal is turned off and the camera is in a low-power-consumption running state, the camera can be controlled to detect the face image. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
Referring to fig. 2, fig. 2 is a flowchart of another unlocking method provided in an embodiment of the present invention, and the method is applied to a mobile terminal having a camera. The main difference between this embodiment and the previous embodiment is that the process of performing face recognition and then unlocking the mobile terminal is elaborated when the spatial posture of the mobile terminal changes within a preset time period and the camera detects a face image of the user. As shown in fig. 2, the method comprises the following steps:
step 201, detecting whether the space attitude of the mobile terminal changes within a preset time period.
Instep 201, it may be detected whether a spatial posture of the mobile terminal changes within a preset time period.
Step 202, when the mobile terminal is in a screen-off state, the spatial posture of the mobile terminal changes within a preset time period, and the camera is in a low-power-consumption running state, controlling the camera to detect a face image, wherein the low-power-consumption running state is a state when the running power of the camera is smaller than a preset power value.
Instep 202, under the condition that the mobile terminal is in a screen-off state, the spatial posture of the mobile terminal changes within a preset time period, and the camera is in a low-power-consumption operation state, the camera may be controlled to detect a face image. The low-power-consumption running state is a state when the running power of the camera is smaller than a preset power value. Therefore, when the space posture of the mobile terminal changes within a preset time period, the camera is controlled to detect the face image, the condition is stricter, the occurrence of the situation that the camera is frequently opened for face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
And 203, if the face image is detected, unlocking the mobile terminal under the condition that the face image is matched with a preset face image.
Instep 203, if the camera detects a face image, the mobile terminal may compare the detected face image with a preset face image. And under the condition that the detected face image is matched with the preset face image, the mobile terminal can be unlocked.
Optionally, the mobile terminal is in a screen-off state, and the camera is controlled to detect the face image under the condition that the camera is in a low power consumption running state, including:
under the conditions that the mobile terminal is in a screen-off state, unread messages exist in the mobile terminal, and the camera is in a low-power-consumption running state, controlling the camera to detect a face image;
after the step of unlocking the mobile terminal, the method further comprises:
and displaying the unread message.
And under the conditions that the mobile terminal is turned off, unread messages exist in the mobile terminal and the camera is in a low-power-consumption running state, the camera can be controlled to detect the face image. If the camera detects the face image, the mobile terminal can compare the detected face image with a preset face image. And under the condition that the detected face image is matched with the preset face image, the mobile terminal can be unlocked, and unread messages can be displayed. Therefore, when the mobile terminal is inconvenient to operate by both hands, if unread messages exist in the mobile terminal, the camera can be controlled to detect the face image. If the face image is detected and the detected face image is matched with the preset face image, the mobile terminal can be unlocked and the unread message can be displayed. Is convenient and quick.
Optionally, after the step of controlling the camera to detect the face image, the method further includes:
and if the face image is detected and the face image is not matched with the preset face image, sending alarm information when the screen of the mobile terminal is in a screen-off state.
If the camera in the low-power-consumption running state detects the face image and the detected face image is not matched with the preset face image, alarm information can be sent when the screen of the mobile terminal is in a screen-off state. At this time, other people may try to unlock the mobile terminal, so that the mobile terminal can be locked in a screen-off state, other people are not allowed to perform any operation on the mobile terminal, and alarm information can be sent to a preset mailbox. Therefore, other people can be prevented from stealing information in the mobile terminal, and privacy is guaranteed not to be leaked out.
Optionally, after the step of unlocking the mobile terminal, the method further includes:
and if the camera detects at least two face images, outputting privacy protection prompt information.
After the mobile terminal is unlocked, if the camera detects at least two face images, privacy protection prompt information can be output. For example, when the user is outdoors, if there are many people outdoors, when the user uses the mobile terminal, the content displayed on the screen of the mobile terminal is likely to be seen by others. Therefore, if the camera in the low-power-consumption running state detects at least two face images, the mobile terminal can output privacy protection prompt information to remind a user of privacy protection. The risk of privacy leakage can be effectively reduced.
The unlocking method provided by the embodiment of the invention is applied to the mobile terminal with the camera. If the space posture of the mobile terminal changes within a preset time period, the camera can be controlled to detect the face image under the conditions that the mobile terminal is turned off and the camera is in a low-power-consumption running state. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
Referring to fig. 3, fig. 3 is a block diagram of a mobile terminal having a camera provided in the implementation of the present invention. As shown in fig. 3, themobile terminal 300 includes afirst detection module 301 and an unlockingmodule 302, wherein:
thefirst detection module 301 is configured to control the camera to detect a face image when the mobile terminal is in a screen-off state and the camera is in a low-power-consumption operation state, where the low-power-consumption operation state is a state in which the operation power of the camera is smaller than a preset power value;
an unlockingmodule 302, configured to unlock the mobile terminal if a face image is detected, if the face image is matched with a preset face image.
Optionally, as shown in fig. 4, the mobile terminal further includes:
a second detectingmodule 303, configured to detect whether a spatial posture of the mobile terminal changes within a preset time period;
thefirst detection module 301 is specifically configured to control the camera to detect a face image when the mobile terminal is in a screen-off state, a spatial posture of the mobile terminal changes within a preset time period, and the camera is in a low-power-consumption operation state.
Optionally, as shown in fig. 5, thefirst detection module 301 is specifically configured to control the camera to detect a face image when the mobile terminal is in a screen-off state, an unread message exists in the mobile terminal, and the camera is in a low-power-consumption operating state;
the mobile terminal further includes:
adisplay module 304, configured to display the unread message.
Optionally, as shown in fig. 6, the mobile terminal further includes:
the sendingmodule 305 is configured to send alarm information when the screen of the mobile terminal is in a screen-off state if a face image is detected and the face image is not matched with the preset face image.
Optionally, as shown in fig. 7, the mobile terminal further includes:
anoutput module 306, configured to output privacy protection prompt information if the camera detects at least two face images.
Themobile terminal 300 can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 and fig. 2, and is not described herein again to avoid repetition. And themobile terminal 300 may control the camera to detect the face image if the spatial posture of the mobile terminal changes within a preset time period when the mobile terminal is turned off and the camera is in a low power consumption operation state. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
Fig. 8 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Themobile terminal 800 includes, but is not limited to: aradio frequency unit 801, anetwork module 802, anaudio output unit 803, aninput unit 804, asensor 805, adisplay unit 806, auser input unit 807, aninterface unit 808, amemory 809, aprocessor 810, and apower supply 811. Those skilled in the art will appreciate that the mobile terminal architecture illustrated in fig. 8 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Theprocessor 810 is configured to control the camera to detect a face image when the mobile terminal is in a screen-off state and the camera is in a low-power-consumption operating state, where the low-power-consumption operating state is a state in which operating power of the camera is less than a preset power value;
and if the face image is detected, unlocking the mobile terminal under the condition that the face image is matched with a preset face image.
If the space posture of the mobile terminal changes within a preset time period, the camera can be controlled to detect the face image under the conditions that the mobile terminal is turned off and the camera is in a low-power-consumption running state. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
It should be understood that, in the embodiment of the present invention, theradio frequency unit 801 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to theprocessor 810; in addition, the uplink data is transmitted to the base station. In general,radio frequency unit 801 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, theradio frequency unit 801 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through thenetwork module 802, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
Theaudio output unit 803 may convert audio data received by theradio frequency unit 801 or thenetwork module 802 or stored in thememory 809 into an audio signal and output as sound. Also, theaudio output unit 803 may also provide audio output related to a specific function performed by the mobile terminal 800 (e.g., a call signal reception sound, a message reception sound, etc.). Theaudio output unit 803 includes a speaker, a buzzer, a receiver, and the like.
Theinput unit 804 is used for receiving an audio or video signal. Theinput Unit 804 may include a Graphics Processing Unit (GPU) 8041 and amicrophone 8042, and theGraphics processor 8041 processes image data of a still picture or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on thedisplay unit 806. The image frames processed by thegraphics processor 8041 may be stored in the memory 809 (or other storage medium) or transmitted via theradio frequency unit 801 or thenetwork module 802. Themicrophone 8042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via theradio frequency unit 801 in case of a phone call mode.
Themobile terminal 800 also includes at least onesensor 805, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of thedisplay panel 8061 according to the brightness of ambient light, and a proximity sensor that can turn off thedisplay panel 8061 and/or the backlight when themobile terminal 800 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); thesensors 805 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
Thedisplay unit 806 is used to display information input by the user or information provided to the user. TheDisplay unit 806 may include aDisplay panel 8061, and theDisplay panel 8061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Theuser input unit 807 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, theuser input unit 807 includes atouch panel 8071 andother input devices 8072. Thetouch panel 8071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 8071 (e.g., operations by a user on or near thetouch panel 8071 using a finger, a stylus, or any other suitable object or accessory). Thetouch panel 8071 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 810, receives a command from theprocessor 810, and executes the command. In addition, thetouch panel 8071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to thetouch panel 8071, theuser input unit 807 can includeother input devices 8072. In particular,other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, thetouch panel 8071 can be overlaid on thedisplay panel 8061, and when thetouch panel 8071 detects a touch operation on or near thetouch panel 8071, the touch operation is transmitted to theprocessor 810 to determine the type of the touch event, and then theprocessor 810 provides a corresponding visual output on thedisplay panel 8061 according to the type of the touch event. Although in fig. 8, thetouch panel 8071 and thedisplay panel 8061 are two independent components to implement the input and output functions of the mobile terminal, in some embodiments, thetouch panel 8071 and thedisplay panel 8061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
Theinterface unit 808 is an interface through which an external device is connected to themobile terminal 800. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Theinterface unit 808 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within themobile terminal 800 or may be used to transmit data between themobile terminal 800 and external devices.
Thememory 809 may be used to store software programs as well as various data. Thememory 809 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, thememory 809 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Theprocessor 810 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in thememory 809 and calling data stored in thememory 809, thereby integrally monitoring the mobile terminal.Processor 810 may include one or more processing units; preferably, theprocessor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated intoprocessor 810.
Themobile terminal 800 may also include a power supply 811 (e.g., a battery) for powering the various components, and thepower supply 811 may be logically coupled to theprocessor 810 via a power management system that may be used to manage charging, discharging, and power consumption.
In addition, themobile terminal 800 includes some functional modules that are not shown, and thus, are not described in detail herein.
Optionally, theprocessor 810 is further configured to:
detecting whether the space attitude of the mobile terminal changes within a preset time period;
and under the conditions that the mobile terminal is in a screen-off state, the space posture of the mobile terminal is changed within a preset time period, and the camera is in a low-power-consumption running state, controlling the camera to detect the face image.
Optionally, theprocessor 810 is further configured to:
under the conditions that the mobile terminal is in a screen-off state, unread messages exist in the mobile terminal, and the camera is in a low-power-consumption running state, controlling the camera to detect a face image;
and displaying the unread message.
Optionally, theprocessor 810 is further configured to:
and if the face image is detected and the face image is not matched with the preset face image, sending alarm information when the screen of the mobile terminal is in a screen-off state.
Optionally, theprocessor 810 is further configured to:
and if the camera detects at least two face images, outputting privacy protection prompt information.
Themobile terminal 800 can implement each process implemented by the mobile terminal in the foregoing embodiments, and details are not repeated here to avoid repetition. And themobile terminal 800 can control the camera to detect the face image when the mobile terminal is turned off and the camera is in a low power consumption running state if the spatial posture of the mobile terminal changes within a preset time period. If the camera detects the face image, and the detected face image is matched with the preset face image, the mobile terminal can be unlocked. The situation that the camera is frequently started to perform face recognition due to false triggering can be effectively reduced, and the power consumption of the mobile terminal is reduced.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes aprocessor 810, amemory 809, and a computer program stored in thememory 809 and capable of running on theprocessor 810, where the computer program, when executed by theprocessor 810, implements each process of the above-mentioned unlocking method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned unlocking method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a mobile terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.