Terminal unlocking method and terminal
By switching the face recognition mode in the mobile device according to the ambient brightness and switching from visible light to infrared light recognition mode, the problem of unlocking failure in low-light environments in the existing technology is solved, and a fast and effective unlocking experience is achieved.
Patent Information
- Application Number
- CN201910155139.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-02-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-02-25
AI Technical Summary
The existing unlocking methods for mobile devices are cumbersome and cannot be effectively unlocked especially in low-light environments, resulting in poor user experience.
By receiving the ambient brightness information from the brightness sensor, it determines whether it is lower than the preset brightness. If it is lower, it automatically switches the face recognition mode from visible light recognition mode to infrared light recognition mode, reducing energy consumption and improving unlocking efficiency.
The accuracy and efficiency of face recognition are improved in low-light environments, ensuring that the terminal can be unlocked quickly and effectively, improving user experience.
Smart Images

Figure CN109857238B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal unlocking, and in particular to a terminal unlocking method and a terminal. Background Art
[0002] As people's demands for privacy on mobile devices become higher and higher, more and more users are using tools such as app locks to protect private information.
[0003] In the prior art, all mobile device application locks use cumbersome unlocking methods, such as sliding unlock, fingerprint unlock, and 2D face recognition. However, sliding unlock is not fast enough, fingerprint unlock affects the appearance design in the full-screen solution, and when the user has wet hands or sweat, sliding unlock and fingerprint unlock cannot unlock the mobile device, reducing the user experience. When the ambient light does not meet the brightness requirement, 2D face recognition cannot recognize the face, resulting in unlocking failure, causing a poor unlocking experience.
[0004] In view of the above problems, those skilled in the art have been seeking solutions. Summary of the invention
[0005] In view of this, the present invention provides a terminal unlocking method and a terminal, which can reduce the energy consumption of the terminal when performing face recognition, save electricity, and can effectively realize the face recognition of the user to quickly and effectively unlock the terminal, thereby improving the user experience.
[0006] The present invention provides a terminal unlocking method, which is applied to a terminal and comprises: receiving ambient brightness information sent by a brightness sensor; judging whether the brightness of the environment where the terminal is located is lower than a preset brightness according to the ambient brightness information; and when the brightness of the environment where the terminal is located is lower than the preset brightness, controlling the face recognition mode of the terminal to automatically switch from a visible light recognition mode to an infrared light recognition mode.
[0007] Specifically, after the step of judging whether the brightness of the environment where the terminal is located is lower than the preset brightness according to the ambient brightness information, it also includes: when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, controlling the face recognition mode of the terminal to remain in the visible light recognition mode.
[0008] Specifically, when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode includes: when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, obtaining the image information corresponding to the user; performing recognition processing on the image information to obtain a first brightness of the position corresponding to the user's face in the image information; determining whether the first brightness is higher than the first preset brightness; when the first brightness is higher than the first preset brightness, controlling the face recognition mode of the terminal to remain in the visible light recognition mode.
[0009] Specifically, after the step of determining whether the first brightness is higher than the first preset brightness, the step also includes: when the first brightness is lower than or equal to the first preset brightness, controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0010] Specifically, when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode includes: receiving user image information sent by a visible light camera; performing recognition processing on the user image information to obtain a recognition result; verifying the recognition result with a face model in a pre-stored face database; and when the verification passes, controlling the terminal to automatically unlock.
[0011] Specifically, after the step of verifying the recognition result with the face model in the pre-stored face database, the method further includes: generating prompt information when the verification fails; and displaying the prompt information on the user interface of the terminal.
[0012] Specifically, when the brightness of the environment where the terminal is located is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode includes: when the brightness of the environment where the terminal is located is lower than the preset brightness, generating an infrared start signal; starting the infrared camera in the terminal according to the infrared start signal, and turning off the visible light camera in the terminal, so that the face recognition mode of the terminal automatically switches from the visible light recognition mode to the infrared light recognition mode.
[0013] Specifically, when the brightness of the environment where the terminal is located is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode also includes: starting the infrared camera to control the infrared camera to collect user image information; identifying and processing the user image information to obtain a recognition result; verifying the recognition result with a face model in a pre-stored face database; and when the verification passes, controlling the terminal to automatically unlock.
[0014] Specifically, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode when the brightness of the environment where the terminal is located is lower than the preset brightness includes: when the brightness of the environment where the terminal is located is lower than the preset brightness, judging whether the user's facial image information is obtained; when the user's facial image information is obtained, controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode; when the user's facial image information is not obtained, returning to the step of judging whether the user's facial image information is obtained when the brightness of the environment where the terminal is located is lower than the preset brightness.
[0015] The present invention also provides a terminal, comprising: a memory for storing executable program codes; and a processor for calling the executable program codes in the memory to implement the terminal unlocking method as described above.
[0016] Specifically, the terminal unlocking method and terminal provided in this embodiment receive ambient brightness information sent by a brightness sensor, and determine whether the brightness of the environment where the terminal is located is lower than a preset brightness based on the ambient brightness information, so as to control the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode when the brightness of the environment where the terminal is located is lower than the preset brightness, thereby reducing the energy consumption of the terminal when performing face recognition, saving electric energy, and effectively realizing face recognition of the user, so as to quickly and effectively unlock the terminal, thereby improving the user experience.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of a process flow of a terminal unlocking method according to a first embodiment of the present invention;
[0019] Figure 2 A schematic diagram of a flow chart of a terminal unlocking method according to a second embodiment of the present invention;
[0020] Figure 3 A schematic diagram of a process flow of a terminal unlocking method according to a third embodiment of the present invention;
[0021] Figure 4 A schematic diagram of a process flow of a terminal unlocking method according to a fourth embodiment of the present invention;
[0022] Figure 5 A schematic diagram of a process flow of a terminal unlocking method according to a fifth embodiment of the present invention;
[0023] Figure 6 A schematic diagram of a process flow of a terminal unlocking method according to a sixth embodiment of the present invention;
[0024] Figure 7 Schematic diagram of the process of a terminal unlocking method according to a seventh embodiment of the present invention;
[0025] Figure 8 Schematic diagram of the process of a terminal unlocking method according to an eighth embodiment of the present invention;
[0026] Fig. 9 A schematic diagram of a process flow of a terminal unlocking method according to a ninth embodiment of the present invention;
[0027] Fig.10 FIG. 1 is a structural block diagram of a terminal according to a tenth embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the present invention is described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0029] Figure 1 FIG. 1 is a flow chart of a terminal unlocking method according to a first embodiment of the present invention. This embodiment is a terminal unlocking method executed by a terminal. Figure 1 As shown, the terminal unlocking method of this embodiment may include the following steps:
[0030] Step S11: receiving ambient brightness information sent by a brightness sensor.
[0031] Specifically, in one embodiment, a brightness sensor is provided in the terminal, and the brightness sensor collects the ambient brightness around the terminal in real time to generate ambient brightness information according to the ambient brightness. Specifically, the brightness sensor transmits the ambient brightness information obtained in real time to the processor of the terminal.
[0032] Step S12: determining whether the brightness of the environment where the terminal is located is lower than a preset brightness according to the environment brightness information.
[0033] Specifically, in one embodiment, after receiving the ambient brightness information sent by the brightness sensor, the processor in the terminal processes the ambient brightness information to obtain the ambient brightness corresponding to the current environment. Specifically, the processor in the terminal determines whether the ambient brightness of the terminal is lower than a preset brightness.
[0034] Specifically, in one embodiment, the preset brightness may be, but is not limited to, a brightness value corresponding to a user image captured by a visible light camera and cannot be recognized by a processor in the terminal.
[0035] Step S13: Control the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0036] Specifically, in one embodiment, when the brightness of the environment in which the terminal is located is lower than a preset brightness, for example, when the terminal is in a dark environment or in a weak-light environment, the image information collected by the visible light camera of the terminal is unclear, resulting in the terminal processor failing to effectively recognize the image collected by the visible light camera. The processor in the terminal controls the terminal's face recognition mode to automatically switch from the visible light recognition mode to the infrared light recognition mode, thereby enabling more accurate and effective face recognition to unlock the terminal, thereby improving the user's unlocking experience.
[0037] Figure 2 FIG. 2 is a flow chart of a terminal unlocking method according to a second embodiment of the present invention. This embodiment is a terminal unlocking method executed by a terminal. Figure 2 As shown, the terminal unlocking method of this embodiment may include the following steps:
[0038] Step S21: receiving ambient brightness information sent by a brightness sensor.
[0039] Specifically, in one embodiment, a brightness sensor is provided in the terminal, and the brightness sensor collects the ambient brightness around the terminal in real time to generate ambient brightness information according to the ambient brightness. Specifically, the brightness sensor transmits the ambient brightness information obtained in real time to the processor of the terminal.
[0040] Step S22: determining whether the brightness of the environment where the terminal is located is lower than a preset brightness according to the environment brightness information.
[0041] Specifically, in one embodiment, after receiving the ambient brightness information sent by the brightness sensor, the processor in the terminal processes the ambient brightness information to obtain the ambient brightness corresponding to the current environment. Specifically, the processor in the terminal determines whether the ambient brightness of the terminal is lower than a preset brightness.
[0042] Specifically, in one embodiment, the preset brightness may be, but is not limited to, a brightness value corresponding to a user image captured by a visible light camera and cannot be recognized by a processor in the terminal.
[0043] Specifically, when the brightness of the environment where the terminal is located is lower than the preset brightness, step S23 is executed. When the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, step S24 is executed.
[0044] Step S23: Control the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0045] Specifically, in one embodiment, when the brightness of the environment in which the terminal is located is lower than a preset brightness, for example, when the terminal is in a dark environment or in a weak-light environment, the image information collected by the visible light camera of the terminal is unclear, resulting in the terminal processor failing to effectively recognize the image collected by the visible light camera. The processor in the terminal controls the terminal's face recognition mode to automatically switch from the visible light recognition mode to the infrared light recognition mode, thereby enabling more accurate and effective face recognition to unlock the terminal, thereby improving the user's unlocking experience.
[0046] Step S24: Control the face recognition mode of the terminal to remain in the visible light recognition mode.
[0047] Specifically, in one embodiment, when the brightness of the environment in which the terminal is located is higher than or equal to the preset brightness, for example, the environment in which the terminal is located is bright, the image information collected by the visible light camera of the terminal is clear, and the processor in the terminal can clearly recognize the recognition result. At this time, the processor in the terminal controls the face recognition mode of the terminal to remain in the visible light recognition mode, thereby reducing the energy consumption of the terminal when performing face recognition, saving electricity, and effectively realizing face recognition of the user, so as to quickly and effectively unlock the terminal, thereby improving the user experience.
[0048] Please refer to Figure 3 , Figure 3 FIG. 2 is a flow chart of a terminal unlocking method according to a third embodiment of the present invention. Figure 2 and Figure 3 As shown, the terminal unlocking method provided in this embodiment, when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode specifically includes the following steps:
[0049] Step S31: when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, image information corresponding to the user is obtained.
[0050] Specifically, in one embodiment, when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the environment where the terminal is located is bright, and the terminal controls the visible light camera to collect image information corresponding to the user. Specifically, the visible light camera sends the collected image information to the processor in the terminal.
[0051] Step S32: performing recognition processing on the image information to obtain a first brightness of a position corresponding to the user's face in the image information.
[0052] Specifically, in one embodiment, the processor in the terminal preprocesses the image information using image recognition technology to obtain a first brightness corresponding to the position of the user's face in the image information, for example, the brightness of the user's face position in the image.
[0053] Step S33: determining whether the first brightness is higher than the first preset brightness.
[0054] Specifically, in one embodiment, the processor in the terminal compares the first brightness with a pre-set first preset brightness to determine whether the first brightness is higher than the first preset brightness.
[0055] Specifically, in one implementation, the first preset brightness may be, but is not limited to, a brightness value corresponding to a user image captured by a visible light camera and cannot be recognized by a processor in the terminal.
[0056] Specifically, when the first brightness is higher than the first preset brightness, step S34 is performed. When the first brightness is lower than or equal to the first preset brightness, step S35 is performed.
[0057] Step S34: Control the face recognition mode of the terminal to remain in the visible light recognition mode.
[0058] Specifically, in one embodiment, when the first brightness is higher than the first preset brightness, for example, at the first brightness, the processor in the terminal can clearly identify the feature information of the user's face, and can effectively extract the corresponding feature information to obtain the recognition result based on the extracted feature information. At this time, the face recognition mode of the terminal remains in the visible light recognition mode, thereby reducing the energy consumption of the terminal during face recognition, saving electricity, and effectively realizing face recognition of the user, so as to quickly and effectively unlock the terminal, thereby improving the user experience.
[0059] Step S35: Control the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0060] Specifically, in one embodiment, when the first brightness is lower than or equal to the first preset brightness, for example, when the user is in backlight, the facial information in the image information corresponding to the user collected by the visible light camera is darker, which affects the recognition of the image information by the processor in the terminal. At this time, the processor in the terminal controls the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode, thereby realizing face recognition more accurately and effectively, so as to unlock the terminal and improve the user's unlocking experience.
[0061] Please refer to Figure 4 , Figure 4 FIG. 4 is a flow chart of a terminal unlocking method according to a fourth embodiment of the present invention. Figure 2 and Figure 4 As shown, the terminal unlocking method provided in this embodiment further includes the following steps after the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness:
[0062] Step S41: receiving user image information sent by a visible light camera.
[0063] Specifically, in one embodiment, the terminal controls the visible light camera to collect user image information in real time. Specifically, the visible light camera sends the collected user image information to the processor of the terminal.
[0064] Step S42: Perform recognition processing on the user image information to obtain a recognition result.
[0065] Specifically, in one embodiment, the processor in the terminal uses image recognition technology to perform recognition processing on the user image information, such as image preprocessing, image segmentation, facial recognition, etc., to obtain a corresponding recognition result.
[0066] Step S43: verifying the recognition result with the face model in the pre-stored face database.
[0067] Specifically, in one embodiment, the processor in the terminal compares the recognition result with the face model in the pre-stored face database to verify whether the recognition result is consistent with the face model. Specifically, when the recognition result is consistent with the face model, the verification is passed, and when the recognition result is inconsistent with the face model, the verification is failed.
[0068] Step S44: When the verification is passed, the control terminal is automatically unlocked.
[0069] Specifically, in one embodiment, when the verification is passed, the processor in the terminal generates an unlocking signal to control the terminal to automatically unlock according to the unlocking signal, thereby improving the user's unlocking experience.
[0070] Please refer to Figure 5 , Figure 5 FIG. 5 is a flow chart of a terminal unlocking method according to a fifth embodiment of the present invention. Figure 4 and Figure 5 As shown, the terminal unlocking method provided in this embodiment further includes the following steps after the step of verifying the recognition result with the face model in the pre-stored face database:
[0071] Step S51: When the verification fails, a prompt message is generated.
[0072] Specifically, in one embodiment, when the verification fails, the processor in the terminal generates a prompt message. Specifically, in one implementation, the prompt message may be, but is not limited to, that the terminal unlocking fails.
[0073] Step S52: Display prompt information on the user interface of the terminal.
[0074] Specifically, in one embodiment, the processor in the terminal sends the prompt information to the display screen of the terminal, so as to display the prompt information on the user interface of the terminal display screen.
[0075] Please refer to Figure 6 , Figure 6 FIG. 6 is a flow chart of a terminal unlocking method according to a sixth embodiment of the present invention. Figure 1 and Figure 6 As shown, the terminal unlocking method provided in this embodiment, when the brightness of the environment where the terminal is located is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode specifically includes the following steps:
[0076] Step S61: when the brightness of the environment where the terminal is located is lower than a preset brightness, an infrared start signal is generated.
[0077] Specifically, in one embodiment, when the brightness of the environment in which the terminal is located is lower than a preset brightness, for example, when the terminal is in a dark environment or in an environment with low light, the image information collected by the visible light camera of the terminal is unclear, resulting in the terminal's processor failing to effectively recognize the image collected by the visible light camera. The processor in the terminal generates an infrared start signal and sends the infrared start signal to the infrared camera to control the start of the infrared camera.
[0078] Step S62: activating the infrared camera in the terminal according to the infrared activation signal, and deactivating the visible light camera in the terminal, so that the face recognition mode of the terminal is automatically switched from the visible light recognition mode to the infrared light recognition mode.
[0079] Specifically, in one embodiment, the processor in the terminal starts the infrared camera in the terminal according to the infrared start signal, and turns off the visible light camera in the terminal while starting the infrared camera, so as to save energy consumption of the terminal's recognition process, so that the face recognition mode of the terminal is automatically switched from the visible light recognition mode to the infrared light recognition mode, and the infrared camera is started only when the terminal needs to switch to the infrared light recognition mode, thereby realizing face recognition more accurately and effectively, thereby unlocking the terminal and improving the user's unlocking experience.
[0080] Please refer to Figure 7, Figure 7 FIG. 8 is a flow chart of a terminal unlocking method according to a seventh embodiment of the present invention. Figure 1 and Figure 7 As shown, the terminal unlocking method provided in this embodiment further includes the following steps after the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode when the brightness of the environment where the terminal is located is lower than the preset brightness:
[0081] Step S71: Start the infrared camera to control the infrared camera to collect user image information.
[0082] Specifically, in one embodiment, after the terminal automatically starts the infrared camera, it controls the infrared camera to collect user image information. Specifically, the infrared camera sends the collected user image information to the processor in the terminal.
[0083] Step S72: Perform recognition processing on the user image information to obtain a recognition result.
[0084] Specifically, in one embodiment, the processor in the terminal uses image recognition technology to perform recognition processing on the user image information, such as image preprocessing, image segmentation, facial recognition, etc., to obtain a corresponding recognition result.
[0085] Step S73: Verify the recognition result with the face model in the pre-stored face database.
[0086] Specifically, in one embodiment, the processor in the terminal compares the recognition result with the face model in the pre-stored face database to verify whether the recognition result is consistent with the face model. Specifically, when the recognition result is consistent with the face model, the verification is passed, and when the recognition result is inconsistent with the face model, the verification is failed.
[0087] Step S74: When the verification is passed, the control terminal is automatically unlocked.
[0088] Specifically, in one embodiment, when the verification is passed, the processor in the terminal generates an unlocking signal to control the terminal to automatically unlock according to the unlocking signal, thereby improving the user's unlocking experience.
[0089] Please refer to Figure 8 , Figure 8 FIG. 8 is a flow chart of a terminal unlocking method according to an eighth embodiment of the present invention. Figure 7 and Figure 8 As shown, the terminal unlocking method provided in this embodiment further includes the following steps after the step of verifying the recognition result with the face model in the pre-stored face database:
[0090] Step S81: When the verification fails, a prompt message is generated.
[0091] Specifically, in one embodiment, when the verification fails, the processor in the terminal generates a prompt message. Specifically, in one implementation, the prompt message may be, but is not limited to, that the terminal unlocking fails.
[0092] Step S82: Display prompt information on the user interface of the terminal.
[0093] Specifically, in one embodiment, the processor in the terminal sends the prompt information to the display screen of the terminal, so as to display the prompt information on the user interface of the terminal display screen.
[0094] Please refer to Fig. 9 , Fig. 9 FIG. 8 is a flow chart of a terminal unlocking method according to an eighth embodiment of the present invention. Figure 1 and Fig. 9 As shown, the terminal unlocking method provided in this embodiment, when the brightness of the environment where the terminal is located is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode specifically includes the following steps:
[0095] Step S91: When the brightness of the environment where the terminal is located is lower than a preset brightness, it is determined whether the user's facial image information is obtained.
[0096] Specifically, in one embodiment, when the brightness of the environment in which the terminal is located is lower than a preset brightness, for example, when the terminal is in a dark environment or in an environment with low light, the image information collected by the visible light camera of the terminal is not clear, resulting in the terminal's processor failing to effectively recognize the image collected by the visible light camera. The processor in the terminal also determines in real time whether the user's facial image information is obtained.
[0097] Specifically, when the user's facial image information is obtained, step S92 is executed. When the user's facial image information is not obtained, the process returns to step S91.
[0098] Step S92: Control the terminal's face recognition mode to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0099] Specifically, in one embodiment, when the user's facial image information is obtained, for example, the visible light camera sends the collected image information to the processor of the terminal, and the processor generates an infrared start signal when it recognizes the user's facial contour, so as to control the terminal's face recognition mode to automatically switch from the visible light recognition mode to the infrared light recognition mode according to the infrared start signal, so as to avoid starting the infrared camera when the terminal is placed in a dark environment such as a pocket, thereby saving energy consumption of the terminal, so that the face recognition mode can be switched when the user's facial contour is obtained, thereby realizing face recognition more accurately and effectively, so as to unlock the terminal and improve the user's unlocking experience.
[0100] Fig.10 FIG. 1 is a block diagram of the terminal 100 according to the tenth embodiment of the present invention. Fig.10 As shown, the terminal 100 provided in this embodiment is used to execute the terminal unlocking method. The terminal 100 provided in this embodiment includes a memory 110 and a processor 120.
[0101] Specifically, in this embodiment, the memory 110 is used to store executable program codes. The processor 120 is used to call the executable program codes in the memory to implement the steps executed by the terminal unlocking method, including: receiving the ambient brightness information sent by the brightness sensor; judging whether the brightness of the environment where the terminal is located is lower than the preset brightness according to the ambient brightness information; when the brightness of the environment where the terminal is located is lower than the preset brightness, controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode.
[0102] Specifically, in one embodiment, the processor 120, after executing the step of determining whether the brightness of the environment where the terminal is located is lower than the preset brightness based on the ambient brightness information, further executes the following steps: when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the face recognition mode of the terminal is controlled to remain in the visible light recognition mode.
[0103] Specifically, in one embodiment, the processor 120 executes the steps of controlling the face recognition mode of the terminal to remain in the visible light recognition mode when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness. The specific steps include: when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, obtaining image information corresponding to the user; performing recognition processing on the image information to obtain a first brightness of the position corresponding to the user's face in the image information; determining whether the first brightness is higher than the first preset brightness; when the first brightness is higher than the first preset brightness, controlling the face recognition mode of the terminal to remain in the visible light recognition mode.
[0104] Specifically, in one embodiment, the processor 120, after executing the step of determining whether the first brightness is higher than the first preset brightness, further executes the following steps: when the first brightness is lower than or equal to the first preset brightness, the face recognition mode of the control terminal is automatically switched from the visible light recognition mode to the infrared light recognition mode.
[0105] Specifically, in one embodiment, the processor 120, after executing the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, further executes the following steps: receiving user image information sent by the visible light camera; performing recognition processing on the user image information to obtain a recognition result; verifying the recognition result with a face model in a pre-stored face database; and when the verification passes, controlling the terminal to automatically unlock.
[0106] Specifically, in one embodiment, the processor 120, after executing the step of verifying the recognition result with the face model in the pre-stored face database, further executes the steps including: generating a prompt message when the verification fails; and displaying the prompt message on the user interface of the terminal.
[0107] Specifically, in one embodiment, the processor 120 executes the step of controlling the terminal's face recognition mode to automatically switch from a visible light recognition mode to an infrared light recognition mode when the brightness of the terminal's environment is lower than a preset brightness. The specific steps include: generating an infrared start signal when the brightness of the terminal's environment is lower than a preset brightness; starting the infrared camera in the terminal according to the infrared start signal, and turning off the visible light camera in the terminal, so that the terminal's face recognition mode automatically switches from the visible light recognition mode to the infrared light recognition mode.
[0108] Specifically, in one embodiment, the processor 120, after executing the step of controlling the terminal's face recognition mode to automatically switch from a visible light recognition mode to an infrared light recognition mode when the brightness of the environment in which the terminal is located is lower than a preset brightness, further executes the following steps: starting the infrared camera to control the infrared camera to collect user image information; performing recognition processing on the user image information to obtain a recognition result; verifying the recognition result with a face model in a pre-stored face database; and when the verification passes, controlling the terminal to automatically unlock.
[0109] Specifically, in one embodiment, the processor 120, after executing the step of verifying the recognition result with the face model in the pre-stored face database, further executes the steps including: generating a prompt message when the verification fails; and displaying the prompt message on the user interface of the terminal.
[0110] For the specific process of each functional unit of the terminal 100 realizing its respective functions in this embodiment, please refer to the above Figures 1 to 9The specific contents described in the illustrated embodiments will not be repeated here.
[0111] Specifically, the terminal unlocking method and terminal provided in this embodiment receive ambient brightness information sent by a brightness sensor, and determine whether the brightness of the environment where the terminal is located is lower than a preset brightness based on the ambient brightness information, so as to control the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode when the brightness of the environment where the terminal is located is lower than the preset brightness, and control the face recognition mode of the terminal to remain in the visible light recognition mode when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, thereby reducing the energy consumption of the terminal when performing face recognition, saving electric energy, and effectively realizing face recognition of the user, so as to quickly and effectively unlock the terminal, thereby improving the user experience.
[0112] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-readable storage medium is, for example, a non-volatile memory such as an optical disk, a hard disk, or a flash memory. The computer-executable instructions are used to enable a computer or a similar computing device to complete various operations in the terminal unlocking method.
[0113] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the terminal type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
Claims
1. A terminal unlocking method, characterized in that: The terminal unlocking method is applied to a terminal, and the terminal unlocking method includes: Receive ambient brightness information sent by a brightness sensor; Determining whether the brightness of the environment in which the terminal is located is lower than a preset brightness according to the ambient brightness information; When the brightness of the environment where the terminal is located is lower than the preset brightness and the user's facial contour is recognized, an infrared start signal is generated, and the face recognition mode of the terminal is controlled to automatically switch from the visible light recognition mode to the infrared light recognition mode according to the infrared start signal; Wherein, when the brightness of the environment is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode includes: activating the infrared camera in the terminal according to the infrared activation signal, and shutting down the visible light camera in the terminal, so that the face recognition mode of the terminal is automatically switched from the visible light recognition mode to the infrared light recognition mode; Wherein, when the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, image information corresponding to the user is obtained; Performing recognition processing on the image information to obtain a first brightness of a position corresponding to a user's face in the image information; Determining whether the first brightness is higher than a first preset brightness; When the first brightness is higher than the first preset brightness, controlling the face recognition mode of the terminal to remain in the visible light recognition mode; When the first brightness is lower than or equal to the first preset brightness, the face recognition mode of the terminal is controlled to automatically switch from the visible light recognition mode to the infrared light recognition mode.
2. The terminal unlocking method according to claim 1, characterized in that: When the brightness of the environment where the terminal is located is higher than or equal to the preset brightness, the step of controlling the face recognition mode of the terminal to remain in the visible light recognition mode includes: Receive user image information sent by a visible light camera; Performing recognition processing on the user image information to obtain a recognition result; Verifying the recognition result with a face model in a pre-stored face database; When the verification is passed, the terminal is controlled to automatically unlock.
3. The terminal unlocking method according to claim 2, characterized in that: After the step of verifying the recognition result with the face model in the pre-stored face database, the following step is further included: When the verification fails, a prompt message is generated; The prompt information is displayed on the user interface of the terminal.
4. The terminal unlocking method according to claim 1, characterized in that: After the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode when the brightness of the environment where the terminal is located is lower than the preset brightness, the method further includes: Starting the infrared camera to control the infrared camera to collect user image information; Performing recognition processing on the user image information to obtain a recognition result; Verifying the recognition result with a face model in a pre-stored face database; When the verification is passed, the terminal is controlled to automatically unlock.
5. The terminal unlocking method according to claim 1, characterized in that: When the brightness of the environment where the terminal is located is lower than the preset brightness, the step of controlling the face recognition mode of the terminal to automatically switch from the visible light recognition mode to the infrared light recognition mode comprises: When the brightness of the environment where the terminal is located is lower than the preset brightness, determining whether the user's facial image information is obtained; When the user's facial image information is acquired, the face recognition mode of the terminal is controlled to automatically switch from the visible light recognition mode to the infrared light recognition mode; When the user facial image information is not obtained, the process returns to the step of determining whether the user facial image information is obtained when the brightness of the environment where the terminal is located is lower than the preset brightness.
6. A terminal, characterized in that: The terminal comprises: A memory for storing executable program code; and A processor, configured to call the executable program code in the memory to implement the terminal unlocking method according to any one of claims 1 to 5.
