Screen unlocking method and related equipment
By adjusting the screen brightness in a dark light environment and adjusting the fill-up brightness using the previous face unlocking results, the problem of excessive brightness and dazzling screen is solved, and the success rate and user experience of face unlocking in a dark light environment is improved.
Patent Information
- Application Number
- CN202410052389.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2025-07-18
AI Technical Summary
In dark light environments, when electronic devices increase the screen brightness and fill the face with the screen, it may cause the screen to be too bright and dazzling, affecting the user experience.
By adjusting the screen brightness, using the results of the previous face unlock to adjust the fill light brightness of the current face unlock, we learn the accurate fill light brightness required by the lock screen interface when the face unlocks, reducing the dazzling problems caused by excessive screen brightness.
It effectively reduces the dazzling problems caused by excessive screen brightness, and improves the success rate and user experience of face unlocking in dark light environments.
Smart Images

Figure CN120335647A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technologies, and in particular, to a screen unlocking method and related devices. Background Art
[0002] To enhance the security of information in an electronic device, the electronic device supports a screen locking function. Correspondingly, the electronic device can support multiple screen unlocking methods. For example, the screen unlocking methods can include: password unlocking, fingerprint unlocking, face unlocking, gesture unlocking, and Bluetooth device unlocking, etc.
[0003] A user can enter a face in the electronic device, and the electronic device enables the face unlocking function. When the electronic device is in the locked screen state, the electronic device can unlock the screen after recognizing the user's face information. However, in a low-light environment, the electronic device may not be able to collect face information.
[0004] In a possible implementation, when unlocking, the electronic device can supplement light to the user's face by increasing the screen brightness, so that the electronic device can capture clear face information. However, since the environment where the user is located is dark, after the electronic device increases the screen brightness, the screen may be too dazzling, affecting the user experience. Summary of the Invention
[0005] Embodiments of this application provide a screen unlocking method and related devices, which are applied to the field of terminal technologies; a face unlocking method in a low-light environment is provided. During the unlocking process, the screen brightness is moderate, which is more friendly to the user's eyes, reduces the dazzling problem caused by too high screen brightness, and improves the user experience.
[0006] In a first aspect, embodiments of this application propose a screen unlocking method. The method includes: in the screen-off state, in response to an operation that triggers the screen to light up for the first time, display a first locked screen interface, and the brightness of the first locked screen interface changes from a first brightness to a second brightness; in the case of successful unlocking based on first unlocking information, display an unlocking interface; the first unlocking information includes information collected by the camera of the electronic device during the process in which the brightness of the first locked screen interface changes from the first brightness to the second brightness; in the screen-off state, in response to an operation that triggers the screen to light up for the second time, display the first locked screen interface, and the brightness of the first locked screen interface changes from the first brightness to a third brightness; the third brightness is less than the second brightness. In this way, the electronic device can adjust the supplementary light brightness according to the result of the previous face unlocking, so as to learn the relatively accurate supplementary light brightness required for face unlocking on the current locked screen interface, thereby effectively reducing the dazzling problem caused by too high screen brightness.
[0007] Optionally, it further includes: if the unlocking fails based on the second unlocking information during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness, then in the screen-off state, in response to the operation of triggering the screen on for the third time, the first lock screen interface is displayed, and the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, where the fourth brightness is greater than the third brightness, and the second brightness is greater than the fourth brightness; wherein, the second unlocking information includes the information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness. In this way, the electronic device can adjust the fill light brightness according to the result of the previous face unlocking, so as to learn the relatively accurate fill light brightness required for face unlocking on the current lock screen interface, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0008] Optionally, before the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, it further includes: within a preset duration after the unlocking fails based on the second unlocking information and when the unlocking is successful based on the third unlocking information, the unlocking interface is displayed; the third unlocking information includes password information and / or fingerprint information. In this way, the scenario of face unlocking failure caused by the user's accidental trigger can be recognized, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.
[0009] Optionally, it further includes: if the unlocking is successful based on the fourth unlocking information during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness, then in the screen-off state, in response to the operation of triggering the screen on for the fourth time, the first lock screen interface is displayed, and the brightness of the first lock screen interface changes from the first brightness to the fourth brightness; wherein, the fourth unlocking information includes the information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness. In this way, after multiple learnings, the electronic device can learn the relatively accurate fill light brightness required for face unlocking on the current lock screen interface, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0010] Optionally, the lock screen wallpaper of the first lock screen interface includes the first lock screen wallpaper, and the lock screen wallpaper of the second lock screen interface includes the second lock screen wallpaper. It further includes: in the screen-off state, in response to the operation of triggering the screen on for the fifth time, the second lock screen interface is displayed, and the brightness of the second lock screen interface changes from the first brightness to the fifth brightness, where the second lock screen wallpaper is different from the first lock screen wallpaper; the fifth brightness is different from the fourth brightness. In this way, the electronic device can learn the fill light brightness corresponding to different lock screen wallpapers and perform fill light on the lock screen wallpapers based on this fill light brightness, thereby improving the unlocking rate under each lock screen wallpaper.
[0011] Optionally, it further includes: in the screen-off state, in response to the operation of triggering the screen on for the sixth time, displaying a second lock screen interface, and the brightness of the second lock screen interface is the first brightness; the ambient light brightness when triggering the screen on for the sixth time is greater than the ambient light threshold. In this way, the electronic device can learn the correspondence between the color level and / or gray level and the fill light brightness in a low-light environment, and in a bright-light environment, it does not learn the correspondence between the color level and / or gray level and the fill light brightness, improving the accuracy of the fill light brightness; at the same time, it can also reduce the power consumption caused by increasing the screen brightness in a bright-light environment.
[0012] Optionally, the electronic device includes a first array, and the first array records the correspondence between the color level and / or gray level and the target screen brightness; before the brightness of the first lock screen interface changes from the first brightness to the second brightness, it includes: obtaining the ambient light brightness and the color level and / or gray level of the first lock screen wallpaper; in the case where the ambient light brightness is less than the ambient light threshold, searching for the color level and / or gray level of the first lock screen wallpaper in the first array; the brightness of the first lock screen interface changes from the first brightness to the second brightness, including: in the case where the first array includes the color level and / or gray level of the first lock screen wallpaper, controlling the brightness of the first lock screen interface to change from the first brightness to the second brightness; the second brightness is the target screen brightness corresponding to the color level and / or gray level of the first lock screen wallpaper in the first array. In this way, in a low-light environment, before the electronic device uses face unlocking, it can obtain a relatively accurate fill light brightness corresponding to the current lock screen wallpaper, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the screen being too bright.
[0013] Optionally, the brightness of the first lock screen interface changes from the first brightness to the second brightness, and it further includes: the brightness of the first lock screen interface instantaneously changes from the first brightness to the second brightness; or, the brightness of the first lock screen interface gradually changes from the first brightness to the second brightness based on a brightness step. In this way, the electronic device can fill light for the face in multiple ways. Among them, when the electronic device uses a progressive fill light method, it can reduce the discomfort of the human eye caused by the sudden brightening of the screen and can better improve the user experience.
[0014] Optionally, after successfully unlocking based on the first unlocking information, it further includes: in the first array, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the second brightness to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness. In this way, the electronic device can adjust the fill light brightness according to the result of the previous face unlocking, so as to learn a relatively accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by the screen brightness being too high.
[0015] Optionally, after failing to unlock successfully based on the second unlocking information, it further includes: in the first array, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness. In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, so as to learn the relatively accurate fill light brightness required when unlocking the screen with the current lock screen interface, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0016] Optionally, updating the correspondence between the color level and gray level of the first lock screen wallpaper and the fourth brightness in the first array includes: when the first information is obtained, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness in the first array; the first information is used to represent that the unlocking fails due to the dim face brightness and the screen is unlocked through the third unlocking information within the preset time. In this way, the scenarios of face unlocking failure caused by user misoperation and the scenarios of face unlocking failure caused by non-fill light scenarios can be excluded, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.
[0017] Optionally, when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the first time, the difference between the target screen brightness before and after the update is x; when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the i-th (i is a positive integer greater than 1) time, the difference between the target screen brightness before and after the update is x - i + 1; when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the j-th (j is a positive integer greater than i) time, and the difference between the target screen brightness before and after the update is less than 1, the electronic device will no longer update the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper. In this way, the electronic device can converge the fill light brightness to a value suitable for face unlocking of the current lock screen wallpaper through a learning gradient that decreases with the number of updates, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0018] In a second aspect, embodiments of the present application provide an electronic device, which may also be referred to as a terminal device, a terminal, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, and so on.
[0019] The electronic device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the method according to the first aspect.
[0020] In a third aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method according to the first aspect is implemented.
[0021] In a fourth aspect, embodiments of the present application provide a computer program product including a computer program. When the computer program is run, the computer is made to execute the method according to the first aspect.
[0022] Embodiments of the present application provide a chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line, and the at least one processor is configured to run a computer program or instruction to execute the method according to the first aspect.
[0023] It should be understood that the second to fifth aspects of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible embodiments are similar and will not be elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1A FIG. is a schematic diagram of an interface for face unlocking provided by an embodiment of the present application;
[0025] Figure 1B These are two interface schematic diagrams for entering the lock screen interface provided by the embodiments of the present application;
[0026] Figure 2 This is a graph showing the relationship between the fill light brightness and time of two fill light methods in a possible implementation;
[0027] Figure 3 This is a flowchart of a screen unlocking method provided by the embodiments of the present application;
[0028] Figure 4 This is a graph showing the relationship between the fill light brightness and time of the fill light method provided by the embodiments of the present application;
[0029] Figure 5 This is a graph showing the relationship between multiple lock screen wallpapers with the same gray level and the lock screen rate provided by the embodiments of the present application;
[0030] Figure 6 This is a flowchart of a screen unlocking method provided by the embodiments of the present application;
[0031] Figure 7 This is a flowchart of a screen unlocking method provided by the embodiments of the present application;
[0032] Figure 8 This is an internal interaction flowchart of the electronic device provided by the embodiments of the present application;
[0033] Figure 9 This is a schematic diagram of the structure of the electronic device 100 provided by the embodiments of the present application;
[0034] Figure 10 This is a schematic diagram of the structure of the screen unlocking device provided by the embodiments of the present application. Detailed implementation manners
[0035] To facilitate a clear description of the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:
[0036] 1) Lock screen and unlocking
[0037] The lock screen can be understood as the state where the electronic device displays the lock screen interface. In the lock screen state, the programs in the electronic device remain running. Among them, the display of the lock screen interface can ensure the data security of the electronic device. In some embodiments, the lock screen interface can correspond to the screen unlocking method. For example, when the electronic device is set with a password, the lock screen interface can display an area for entering the password; when the electronic device is set with fingerprint unlocking, the lock screen interface can display an area for fingerprint entry; when the electronic device is set with face unlocking, the lock screen interface can display an identifier for indicating face unlocking.
[0038] Take face unlock as an example. Figure 1A This is a schematic diagram of a face unlocking interface in a dark environment provided by an embodiment of the present application. In a dark environment, an electronic device may display Figure 1A The lock screen shown in a. Figure 1A The interface shown in a in the figure may display time and date, lock screen prompt information 101 and face unlock prompt information 102; wherein the lock screen prompt information 101 is used to prompt the user that the electronic device is in a lock screen state and can only be used after being unlocked; the face unlock prompt information 102 is used to prompt the user that the electronic device can be unlocked based on face information.
[0039] When the surrounding scene is dark, the user can perform the following operations: Figure 1A The operation shown in b in the figure is to place the electronic device in front of the face so that the screen can illuminate the face and collect facial information.
[0040] Unlocking can be understood as unlocking the display screen of an electronic device. When the electronic device collects the user's facial information and successfully verifies the facial information, the electronic device unlocks the screen and enters the unlocking interface, such as Figure 1A The interface shown in c in . For example, Figure 1A The interface shown in c may be the desktop.
[0041] 2) Screen off, always on display (AOD), and screen on
[0042] Screen off is also called screen rest, which can be understood as the display screen of the electronic device is powered off. When the screen is off, the brightness of the display screen of the electronic device is lower than the preset brightness. Screen on can be understood as the display screen of the electronic device is powered on. When the screen is on, the brightness of the display screen of the electronic device is higher than the preset brightness.
[0043] AOD can also be understood as always-on display. It means that when the electronic device is in the off-screen state, part of the screen of the electronic device is off and part of the screen remains on; in the on-screen area, the electronic device can display information, such as time, date, and unread messages. The AOD mode can save the battery power of the electronic device and also make it convenient for users to check information at any time.
[0044] In some embodiments, the electronic device can enter the screen-on state from the screen-off state. Figure 1B In the interface shown in a of FIG, the electronic device may be in a screen-off state. When a trigger operation for the power button is received, the electronic device may enter a screen-on state. In the case where the electronic device is provided with a lock screen function, after the screen is on, the electronic device may display the following Figure 1B The lock screen interface shown in b in the figure, and refer to Figure 1A The steps shown implement face unlocking.
[0045] In some other embodiments, the electronic device may also enter the screen-on state from the always-on display (AOD) interface. For example, in the interface shown in c of Figure 1B , the electronic device may be in the AOD state. When a trigger operation on the power button is received, the electronic device may enter the screen-on state. When the electronic device is set with a lock screen function, after the screen is turned on, the electronic device may display the lock screen interface as shown in b of Figure 1B and implement face unlocking with reference to the steps shown in Figure 1A .
[0046] 3) Electronic device
[0047] The terminal device in the embodiments of the present application may also be any form of electronic device. For example, the electronic device may include a handheld device with image processing functions, a vehicle-mounted device, etc. For example, some electronic devices are: mobile phones, tablet computers, handheld computers, laptop computers, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to a wireless modem, vehicle-mounted devices, wearable devices, terminal devices in 5G networks, or terminal devices in future evolved public land mobile networks (PLMNs), etc. The embodiments of the present application are not limited thereto.
[0048] By way of example and not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. A wearable device, also known as a wearable intelligent device, is a general term for devices developed by applying wearable technologies to the intelligent design of daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is either directly worn on the body or integrated into the user's clothing or accessories. A wearable device is not just a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable intelligent devices include those with complete functions and large sizes that can achieve complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to cooperate with other devices such as smart phones, such as various smart bracelets and smart jewelry for physical sign monitoring.
[0049] In addition, in the embodiments of the present application, the electronic device may also be a terminal device in an Internet of Things (IoT) system. The IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technologies, thereby realizing an intelligent network of human-machine interconnection and object-object interconnection.
[0050] The electronic device in the embodiments of the present application may also be referred to as: a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal, a user unit, a user station, a mobile station, a mobile platform, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user device, etc.
[0051] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory (also known as the main memory). The operating system can be any one or more computer operating systems that implement service processing through processes, such as the Linux operating system, the Unix operating system, the Android operating system, the iOS operating system, or the Windows operating system, etc. The application layer contains applications such as a browser, an address book, a word processing software, and an instant messaging software.
[0052] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner.
[0053] In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single items or plural items. For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.
[0054] It should be noted that "when..." in the embodiments of the present application may be at the instant when a certain situation occurs or within a period of time after a certain situation occurs. The embodiments of the present application do not make specific limitations on this. In addition, the display interface provided in the embodiments of the present application is only an example, and the display interface may also include more or less content.
[0055] The electronic device can enable the face unlock function. After the face unlock function is enabled, the electronic device can execute the face unlock process as Figure 1A shown. However, in a possible implementation, after using the screen to supplement light for the face, the screen may become too bright, and it is relatively dazzling for the user to view the screen.
[0056] The reason for this is that: in a possible implementation, when the electronic device is in a low - light environment and the locked - screen state, the electronic device raises the screen to a fixed brightness. To ensure that the screen brightness can illuminate the face and the electronic device can capture clear face information, this brightness value is often set too high. This results in the screen being too bright when the electronic device uses the screen to supplement light. For example, in the fixed - light - supplement method, the brightness change can be as shown in Figure 2 Figure a in, during the face unlock period, the screen brightness is always a fixed value.
[0057] Alternatively, in a possible implementation, when the electronic device is in a low-light environment and the screen is locked, the electronic device increases the screen brightness by means of progressive light compensation. The progressive light compensation method can be a method of gradually increasing the screen brightness over time. For example, in the method of fixed light compensation, the brightness change can be as shown in Figure 2 Figure b in. It can be seen that in the initial stage, the screen brightness is low and the electronic device cannot recognize the face information. As the screen brightness increases, the brightness of the face also increases, and the electronic device can continuously attempt face unlocking until the unlocking is successful; or when the screen brightness increases to the maximum value, the electronic device no longer increases the screen brightness and prompts that the face unlocking fails.
[0058] The progressive light compensation method can, to a certain extent, alleviate the problem of glare caused by the screen being too bright. However, since the maximum light compensation value in a possible implementation is also a preset fixed value, and this fixed value is often set too high, when the electronic device increases the screen brightness to the maximum value, there will still be a problem of screen glare.
[0059] In view of this, the embodiment of the present application provides a screen unlocking method. In a low-light environment, the screen brightness used for the current face unlocking is adjusted according to the result of the previous face unlocking and the screen brightness of the previous face unlocking. For example, if the screen brightness of the previous face unlocking can successfully unlock the screen, the screen brightness used for the current unlocking is reduced; if the screen brightness of the previous face unlocking fails to unlock the screen, the screen brightness used for the current unlocking is increased. However, in some scenarios, the electronic device may display different lock screen wallpapers during the previous and current face unlockings. Different lock screen wallpapers have different abilities to supplement light for the user's face at the same screen brightness. After considering this factor, the lock screen wallpapers can be classified by gray scale and / or color scale. At the same gray scale and / or color scale, the result of the previous face unlocking and the screen brightness are used to adjust the screen brightness for the next time. In this way, at any gray scale and / or color scale, the electronic device can, through a self-learning method, learn the lowest or relatively low screen brightness corresponding to this gray scale and / or color scale that can achieve face unlocking, so as to reduce the screen brightness during face unlocking in a low-light environment while ensuring the screen unlocking rate, reduce the problem scenarios of screen glare, and improve the user experience.
[0060] Next, in combination with Figure 3 the conditions for entering the screen unlocking method provided by the embodiment of the present application will be described first. As shown in Figure 3 :
[0061] S301. The electronic device receives an operation to trigger the screen to turn on.
[0062] Among them, the operation to trigger the screen to turn on can be an operation used to control the electronic device to switch from the screen-off state to the screen-on state. After the electronic device turns on the screen, it can display as shown in Figure 1AThe lock screen interface shown; alternatively, the operation to trigger the screen to turn on can also be an operation for controlling the electronic device to enter the screen-on state from the screen-off display state. After the electronic device turns on the screen, the lock screen interface shown in Figure 1A can be displayed. The operation to trigger the screen to turn on can also be other operations, and the embodiments of the present application do not limit this.
[0063] S302. The electronic device obtains the ambient light brightness.
[0064] S303. When the ambient light brightness is greater than or equal to the ambient light threshold, the electronic device can set the screen brightness to the first preset brightness.
[0065] The first preset brightness can be the system preset brightness in the current bright light environment. For example, the first preset brightness can be the brightness value set by the user by sliding the brightness bar in the control center interface, the first preset brightness can also be the brightness value set by the user by sliding the brightness bar in the settings interface, and the first preset brightness can also be the brightness value adaptively adjusted by the electronic device based on the ambient light brightness after the automatic brightness function is turned on.
[0066] It can be understood that in a bright light environment, the electronic device can collect clear face information, and there is no need for the screen to perform a face fill light operation on the user's face. The electronic device can not adjust the screen brightness, and the electronic device displays the screen with the first preset brightness.
[0067] Or, S304. When the ambient light brightness is less than the ambient light threshold, the electronic device can adjust the screen brightness from the second preset brightness to the first target brightness.
[0068] The second preset brightness can be the system preset brightness in the current low light environment. For example, the second preset brightness can be the brightness value set by the user by sliding the brightness bar in the control center interface, the second preset brightness can also be the brightness value set by the user by sliding the brightness bar in the settings interface, and the second preset brightness can also be the brightness value adaptively adjusted by the electronic device based on the ambient light brightness after the automatic brightness function is turned on. The second preset brightness can be the same as or different from the first preset brightness. The first target brightness can be the brightness value for the electronic device to perform face fill light in a low light environment. In the embodiments of the present application, the first target brightness can be the brightness value obtained based on the correspondence between the gray scale and / or color scale and the fill light brightness. In the embodiments of the present application, the fill light brightness can be understood as the maximum screen brightness that can be displayed when using a certain lock screen wallpaper to perform face fill light. The first target brightness can also be the default screen brightness. The following embodiments of the present application will describe these two scenarios in detail and will not elaborate too much here.
[0069] When the electronic device is in the screen-off state and receives an operation to trigger the screen to turn on, in response to this operation, the electronic device can display asFigure 1A The lock screen interface shown as a in ; the initial brightness of this lock screen interface can be the system - preset brightness. Subsequently, the electronic device can fill light for the face by increasing the screen brightness; for example, adjusting the screen brightness from the second preset brightness to the first target brightness.
[0070] It can be understood that in a low - light environment, the ambient light cannot illuminate the face, and the electronic device needs to fill light for the face through the screen brightness so that the electronic device can collect relatively clear face information. When the conditions of step S304 are met, the electronic device can activate the screen unlocking method provided in this embodiment of the application. In a bright - light environment, after the screen brightness is increased to the first target brightness, the electronic device can also achieve face unlocking; however, it will increase the computing pressure of the electronic device, and the first preset brightness may be greater than the first target brightness, or the first preset brightness may be less than the first target brightness. In the bright - light environment, the screen brightness may suddenly become brighter or darker after unlocking, which will affect the user experience. Therefore, this embodiment of the application is positioned for the scenario of face unlocking in a low - light environment.
[0071] During the process of brightness adjustment in step S303 or S304, it further includes:
[0072] S305. The electronic device performs screen unlocking based on the face information.
[0073] It can be understood that in a bright - light environment, the ambient light can be used to illuminate the face, and the electronic device can perform screen unlocking based on the face information collected by the camera; in a low - light environment, the screen brightness can be used to illuminate the face, and the electronic device can perform screen unlocking based on the face information collected by the camera.
[0074] In this embodiment of the application, the electronic device can fill light for the face to improve the success rate of face unlocking in a low - light environment. Among them, a self - learning record table can be set in the electronic device, and the self - learning record table includes the corresponding relationship between the gray scale and / or color scale and the fill - light brightness. For example, taking the gray scale as an example, Table 1 shows the corresponding relationship between the gray scale and the fill - light brightness in this embodiment of the application, as shown in Table 1:
[0075] Table 1 Corresponding relationship table between gray scale and fill - light brightness
[0076] Gray scale 1 Fill light brightness 1 Gray scale 2 Fill light brightness 2 … … Gray scale N Fill light brightness N
[0077] When the electronic device displays the lock screen interface, it will display the lock screen wallpaper. The electronic device can obtain the gray scale corresponding to the lock screen wallpaper and query the corresponding fill - light brightness according to the gray scale. For example, if the gray scale of the currently set lock screen wallpaper of the electronic device is gray scale 2, the electronic device will adjust the lock screen interface to the fill - light brightness 2.
[0078] Among them, gray level 1 to gray level N can be specific gray level values or N gray level intervals. For example, when gray level 1 to gray level N are N specific gray level values, the electronic device can compare the gray level of the current lock screen wallpaper with the N gray level values to obtain the gray level value closest to the current lock screen wallpaper, and set the screen brightness to the fill light brightness corresponding to this gray level value. Another example is that when gray level 1 to gray level N are N gray level intervals, the electronic device can obtain the fill light brightness corresponding to the gray level interval according to the gray level interval where the gray level of the current lock screen wallpaper is located, and set the screen brightness to the fill light brightness corresponding to this gray level interval. The embodiments of the present application do not limit this.
[0079] In some embodiments, after determining that the current environment is a low-light environment, the electronic device can instantaneously increase the screen brightness to the first target brightness. For example, when the electronic device determines that the ambient light brightness is less than the ambient light threshold, the electronic device can query the gray level of the current lock screen wallpaper. For example, if the gray level of the current lock screen wallpaper is gray level 2, the electronic device will set the screen brightness to fill light brightness 2.
[0080] In other embodiments, the electronic device can gradually increase the screen brightness to the fill light brightness in a progressive fill light manner to reduce the discomfort of the human eye caused by sudden brightness changes.
[0081] Exemplarily, taking the gray level of the lock screen wallpaper as gray level 2 when unlocking with face recognition as an example, the process of the electronic device adjusting the screen brightness can be as shown by the solid line in Figure 4 as follows.
[0082] When detecting an operation that triggers the screen to light up, the electronic device can start the face unlocking process and the process of increasing the screen brightness.
[0083] For example, during the process of retrying face unlocking 0 times: At moment A, the electronic device collects face information, and the face information at moment A is related to the screen brightness at moment A. The electronic device attempts to match the face information at moment A with the preset face information. If the match is successful, the electronic device unlocks the screen and no longer increases the screen brightness. For example, at moment B, the face unlocking is successful, and the screen brightness is increased to the brightness value corresponding to moment B.
[0084] In some scenarios, the brightness at moment A is relatively low, and the electronic device may not be able to collect clear face information, causing the electronic device to attempt face unlocking again.
[0085] During the process of face unlocking for retry1 times: At moment C, the electronic device captures face information, and the face information at moment C is related to the screen brightness at moment C; the screen brightness at moment C is higher than the screen brightness at moment A. The electronic device attempts to match the face information at moment C with the preset face information. If the match is successful, the electronic device unlocks the screen and no longer increases the screen brightness. For example, at moment D, the face unlocking is successful, and the screen brightness is increased to the brightness value corresponding to moment D.
[0086] Or, the brightness at moment C is still low, and the electronic device still cannot capture clear face information. The electronic device attempts face unlocking again. For example, the process of face unlocking for retry2 times is similar to the processes of retry0 and retry1, and will not be elaborated here.
[0087] The electronic device can gradually increase the screen brightness to the fill light brightness 2 through the above progressive fill light method to achieve fill light for the face and improve the success rate of face unlocking.
[0088] It can be understood that in the embodiments of the present application, the process of face unlocking and the process of controlling the change of screen brightness can be controlled by two processes respectively. During the process of face retry, when unlocking occurs during a certain retry process, the process controlling face unlocking will issue an instruction to indicate to stop fill light, and the screen brightness will no longer increase. There will be a time delay in the interaction between the two processes, resulting in a scenario where face unlocking starts at moment A and is successful at moment G, but the fill light stops based on the instruction only at moment B.
[0089] In the embodiments of the present application, the fill light brightness in the self-learning record table can be the maximum screen brightness that can be increased under the current gray scale and / or color scale. The electronic device can reduce the screen brightness through the fill light brightness in the self-learning record table to reduce the dazzling problem caused by the screen being too bright. For example, in Figure 4 In the case where face unlocking for retry2 times is successful, in the embodiments of the present application, since the fill light brightness is the maximum screen brightness that can be increased under the current gray scale and / or color scale, after reaching the fill light brightness, the electronic device no longer increases the brightness. At moment F, the screen brightness of the electronic device in the embodiments of the present application is brightness a. In a possible implementation, since the maximum screen brightness in the possible implementation is greater than the fill light brightness in the embodiments of the present application, at moment F, the screen brightness may be increased to brightness b due to time delay. It can be seen that brightness a is less than brightness b. Therefore, the screen brightness during face unlocking in the embodiments of the present application is smaller, thereby reducing the screen brightness and the dazzling problem caused by the screen being too bright.
[0090] In addition, in a possible implementation, since the electronic device cannot obtain the screen brightness for specific face unlocking implementation, the face unlocking process takes a long time. However, in the embodiments of the present application, the electronic device can obtain a corresponding fill light brightness according to the grayscale and / or color scale. Therefore, the electronic device can quickly increase the screen brightness to the fill light brightness corresponding to the current grayscale and / or color scale by increasing the brightness step, thereby improving the speed of face unlocking. The brightness step can be the value of the screen brightness change within the same time.
[0091] It has been found that when the grayscales of multiple lock screen wallpapers are the same, the electronic device uses the same fill light brightness for face unlocking, and the obtained unlocking rates are different, as Figure 5 shown.
[0092] Figure 5 shows 4 lock screen wallpapers in different forms. Among them, in the first lock screen wallpaper, the area with a grayscale of 136 accounts for 100%, and the equivalent grayscale is 136; in the second lock screen wallpaper, the area with a grayscale of 0 accounts for 40%, the area with a grayscale of 136 accounts for 100%, and the area with a grayscale of 255 accounts for 10%, and the equivalent grayscale is 136; in the third lock screen wallpaper, the area with a grayscale of 0 accounts for 75%, and the area with a grayscale of 255 accounts for 25%, and the equivalent grayscale is 136; in the fourth lock screen wallpaper, the area with a grayscale of 0 accounts for 75%, and the area with a grayscale of 255 accounts for 25%, and the equivalent grayscale is 136. Among them, the equivalent grayscale is calculated based on the pixel values of all pixel points in the lock screen wallpaper, and the calculation method of the equivalent grayscale will be introduced later.
[0093] It can be seen that the equivalent grayscales of the 4 lock screen wallpapers are the same, and the fill light brightness used by the electronic device is also the same, but the unlocking rates of the electronic device when using lock screen wallpaper 1 - lock screen wallpaper 4 for fill light are different.
[0094] This may be because when the lock screen wallpaper is uneven, the fill light effects at different positions are different. For example, in lock screen wallpaper 1, the grayscale distribution is relatively uniform. When the electronic device uses lock screen wallpaper 1 to fill light the face, the overall brightness of the face is roughly the same, and the electronic device can capture relatively clear face information. However, when the electronic device uses lock screen wallpaper 4 to fill light the face, the brightness of the eyes is relatively high, and the brightness of the mouth is relatively low. The electronic device may not be able to extract the feature points of the mouth, resulting in face unlocking failure.
[0095] To further improve the success rate of face unlocking in low-light environments, the embodiments of the present application can mark the lock screen wallpaper through the color scale. For example, lock screen wallpaper 1 - lock screen wallpaper 4 can correspond to 4 color scales, and a corresponding relationship with the fill light brightness can be established by combining the color scale and the grayscale, further refining the corresponding relationship of the fill light brightness and improving the accuracy of the fill light brightness.
[0096] Exemplarily, Table 2 shows the corresponding relationship between the gray scale, color scale, and fill light brightness in the embodiments of the present application, as shown in Table 2:
[0097] Table 2 Corresponding Relationship Table of Gray Scale, Color Scale, and Fill Light Brightness
[0098] Color scale 1 Gray scale 1 Fill light brightness 1 Color scale 2 Gray scale 2 Fill light brightness 2 … … … Color scale N Gray scale N Fill light brightness N
[0099] When the electronic device displays the lock screen interface, it will display the lock screen wallpaper. The electronic device can obtain the gray scale and color scale corresponding to the lock screen wallpaper, and query the corresponding fill light brightness according to the gray scale and color scale. For example, if the color scale of the currently set lock screen wallpaper of the electronic device is color scale 2 and the gray scale is gray scale 2, the electronic device will adjust the lock screen interface to the fill light brightness 2.
[0100] It can be understood that in the case of different color scales and the same gray scale, the fill light brightness is different. The embodiments of the present application can distinguish multiple lock screen wallpapers with the same gray scale through the color scale, thereby improving the accuracy of the fill light brightness.
[0101] Among them, color scale 1 to color scale N can be specific color scale values or N color scale intervals. For example, when color scale 1 to color scale N are N specific color scale values, the electronic device can compare the color scale of the current lock screen wallpaper with the N color scale values to obtain the color scale value closest to the current lock screen wallpaper. Another example is when color scale 1 to color scale N are N color scale intervals, the electronic device can obtain the interval where the color scale is located according to the color scale of the current lock screen wallpaper.
[0102] In some embodiments, after determining that the current environment is a low-light environment, the electronic device can directly increase the screen brightness to the fill light brightness.
[0103] In other embodiments, the electronic device can gradually increase the screen brightness to the fill light brightness in a progressive fill light manner to reduce the discomfort of the human eye caused by sudden brightness changes. This process can Figure 4 The relevant descriptions in the illustrated embodiments are not repeated here.
[0104] In this way, the electronic device can distinguish lock screen wallpapers through the color scale and gray scale, thereby learning the relatively accurate fill light brightness required for different lock screen wallpapers during face unlocking, effectively preventing the problem of dazzling caused by too high screen brightness.
[0105] Next, the process of face unlocking in the embodiments of the present application will be described.
[0106] Exemplarily, in the case where the ambient light brightness is less than the ambient light threshold, the process of face unlocking after fill light by the electronic device is as shown in steps S601 - S605:
[0107] S601. The electronic device displays the lock screen interface, and the brightness of the lock screen interface is the second preset brightness.
[0108] It can be understood that when the electronic device enters the lock screen interface from the screen-off state or from the always-on display state, the electronic device can display the screen with the system preset brightness. For example, in the current low-light environment, the system preset brightness of the electronic device is the second preset brightness.
[0109] S602. The electronic device obtains a first target brightness based on the grayscale and / or color scale of the lock screen interface.
[0110] In the embodiments of the present application, the grayscale mentioned can be understood as the equivalent grayscale of the lock screen wallpaper. The electronic device can obtain the color scale of the lock screen interface and convert the color scale into an equivalent grayscale. Among them, the color scale can be (R, G, B), where the R value, G value, and B value can all be represented by values between 0 and 255.
[0111] Equivalent grayscale Satisfies the following formula:
[0112]
[0113] Among them, the color scale of any pixel point in the lock screen wallpaper is (R i , G i , B i ,), α is the R value weight, β is the G value weight, γ is the B value weight, and n is the number of pixel points. The value 2.2 in this formula can also be other values.
[0114] After the electronic device obtains the color scale and / or grayscale, it can query the fill light brightness corresponding to the color scale and / or grayscale based on the self-learning record table; the first target brightness can be the fill light brightness corresponding to the color scale and / or grayscale.
[0115] For example, in some embodiments, the self-learning record table can be as shown in Table 1; the electronic device can use the grayscale to query the fill light brightness corresponding to the grayscale in Table 1. In other embodiments, the self-learning record table can be as shown in Table 2; the electronic device can use the color scale and grayscale to query the fill light brightness corresponding to the color scale and grayscale in Table 2. The embodiments of the present application will not elaborate on this.
[0116] In the embodiments of the present application, the first target brightness can be the fill light brightness corresponding to the current color scale and / or grayscale queried based on the self-learning record table, or it can be the default screen brightness. The embodiments of the present application do not limit this.
[0117] S603. The electronic device raises the screen brightness to the first target brightness.
[0118] In the embodiments of the present application, the electronic device can control the screen brightness to be raised from the second preset brightness to the first target brightness. During the process of brightness increase, the electronic device can continuously attempt face unlocking. This process can be as Figure 4The relevant descriptions in the illustrated embodiments are not elaborated herein.
[0119] Specifically, during the process of the electronic device adjusting the screen brightness to the first target brightness, it includes:
[0120] S604. The electronic device collects face information and unlocks based on the face information.
[0121] S605. When the face unlock is successful, the electronic device ends the fill-lighting process.
[0122] Take Figure 4 as an example. For example, when performing face unlock for retry0 times, the electronic device raises the screen brightness to the screen brightness corresponding to moment A - moment B. After successful unlock, the electronic device ends the fill-lighting process, gradually reduces the screen brightness corresponding to moment B to the second preset brightness, and displays the interface after unlock.
[0123] Or, after S604, it further includes:
[0124] S606. When the face unlock fails, the electronic device attempts face unlock again until the face unlock is successful or the number of face unlock attempts reaches the number threshold.
[0125] Take Figure 4 as an example. For example, when the face unlock fails for retry0 times, the electronic device attempts face unlock for retry1 time. When performing face unlock for retry0 times, the electronic device raises the screen brightness to the screen brightness corresponding to moment C - moment D. After successful unlock, the electronic device ends the fill-lighting process, reduces the screen brightness corresponding to moment D to the second preset brightness, and displays the interface after unlock.
[0126] And so on. The electronic device can stop raising the screen brightness after the screen brightness reaches the first target brightness; and terminate face unlock when the number of face unlock attempts reaches the number threshold. For example, after multiple face unlock failures, the electronic device can display a prompt message indicating face unlock failure and remind the user to unlock using other methods.
[0127] It should be noted that in the embodiments of the present application, the process of face unlock and the process of raising the screen brightness are executed synchronously. After the face unlock is successful, the electronic device can stop raising the screen brightness; if the face unlock fails, the electronic device does not process the process of raising the screen brightness until the number of face unlock attempts reaches the number threshold. In some embodiments, the screen brightness can be raised to the first target brightness before the number of face unlock attempts reaches the number threshold.
[0128] In this way, the electronic device can perform fill-lighting on the face based on the first target brightness. The first target brightness is lower than the fixed brightness in possible implementations, so the problem of the screen being too bright during face unlock can be reduced.
[0129] In the embodiments of the present application, the electronic device can learn the fill light brightness in the next scene with the same color level and / or gray level based on the result of the previous face unlocking. Taking the recording of the corresponding relationship between the color level, gray level, and fill light brightness in the self-learning record table as an example, the following will be combined with Figure 7 to illustrate the usage process and update process of the self-learning record table. As Figure 7 shown:
[0130] After step S601, it includes:
[0131] S701. The electronic device obtains the gray level and color level of the current lock screen wallpaper.
[0132] S702. The electronic device queries in the self-learning record table whether it includes the fill light brightness corresponding to the current gray level and color level.
[0133] In the embodiments of the present application, the electronic device may use a fixed lock screen wallpaper for a period of time; the electronic device can learn the corresponding fill light brightness using the color level and gray level of the lock screen wallpaper. Subsequently, when the electronic device displays the lock screen wallpaper again or displays a lock screen wallpaper with the same color level and the same gray level, the electronic device can find the corresponding fill light brightness in the self-learning record table. The electronic device can execute step S703.
[0134] Alternatively, the electronic device may change to a new lock screen wallpaper, and the electronic device does not find the relevant fill light brightness in the self-learning record table. There is also a default list set in the electronic device, and the default list includes the default screen brightness corresponding to any color level and / or gray level; the electronic device can execute step S704, and based on the default screen brightness as the initial fill light brightness, establish and learn the corresponding relationship between the color level, gray level, and fill light brightness of the new lock screen wallpaper.
[0135] S703. When the self-learning record table includes the fill light brightness corresponding to the current gray level and color level, the electronic device increases the screen brightness based on the fill light brightness.
[0136] The first target brightness includes the fill light brightness corresponding to the current gray level and color level. The electronic device performs the face unlocking process while the screen brightness gradually increases from the second preset brightness to the first target brightness.
[0137] During the process of increasing the screen brightness, the electronic device can periodically collect face information. In the embodiments of the present application, the screen brightness can be adjusted at the same frequency, so that the screen brightness corresponding to each face unlocking retry process is increased.
[0138] For example, the electronic device collects face information every 75 ms and performs face unlocking. The electronic device may issue an instruction for adjusting the screen brightness every 75 ms, and the instruction for adjusting the screen brightness may include the screen brightness to be increased. Among them, the screen brightness to be increased is related to the first target brightness and the second preset brightness.
[0139] Specifically, the electronic device presets a threshold for the number of face unlocks. Before the number of face unlocks reaches the threshold, the electronic device can increase the screen brightness from the second preset brightness to the first target brightness in brightness steps. The step size can be greater than or equal to the ratio of the brightness difference between the second preset brightness and the first target brightness to the threshold for the number of times.
[0140] Alternatively, in the case where the fill light brightness corresponding to the current gray scale and color scale is not included in the self-learning record table, the electronic device increases the screen brightness based on the default screen brightness.
[0141] The first target brightness includes the default screen brightness, and the default screen brightness can be the initial fill light brightness corresponding to the color scale and gray scale of the new lock screen wallpaper. In the embodiments of the present application, a default list is set in the electronic device, and the default list includes the corresponding relationships between various color scales, gray scales, and default screen brightness. The default screen brightness can be based on a preset color scale, a preset gray scale, and a preset fill light brightness. Among them, the preset color scale can be the maximum color scale that the lock screen wallpaper can reach, the preset gray scale can be the maximum gray scale that the lock screen wallpaper can reach, and the preset screen brightness can be the maximum screen brightness that can be reached when using the lock screen wallpaper for fill light; the color scale of any lock screen wallpaper is less than or equal to the preset color scale, the gray scale of any lock screen wallpaper is less than or equal to the preset gray scale, and the fill light brightness of any lock screen wallpaper is less than or equal to the preset screen brightness. When the fill light brightness corresponding to the current color scale and gray scale cannot be found in the self-learning record table, the default screen brightness can be used as the initial fill light brightness corresponding to the current color scale and gray scale, and the fill light brightness corresponding to the current color scale and gray scale can be learned.
[0142] The default screen brightness can be the fill light brightness calculated based on the preset gray scale, preset color scale, and / or preset screen brightness. For example, the default screen brightness can satisfy the following formula:
[0143]
[0144] Or:
[0145]
[0146] The electronic device can perform the face unlocking process during the process of gradually increasing the screen brightness from the second preset brightness to the first target brightness.
[0147] In step S704, for the process of increasing the screen brightness, reference can be made to the relevant description in step S703, which will not be elaborated here.
[0148] The electronic device can update the corresponding relationship in the self-learning record table based on the face recognition result. This process can be, for example:
[0149] S705. The electronic device activates face unlocking.
[0150] S706. When face unlocking is successful, the electronic device updates the corresponding relationship between the current color level and gray level and the second target brightness in the self-learning record table; the second target brightness is less than the first target brightness.
[0151] The second target brightness can be the fill light brightness corresponding to the updated current color level and gray level. For example, before the update, in the self-learning record table, the fill light brightness corresponding to the current color level and gray level is the first target brightness. After the update, in the self-learning record table, the fill light brightness corresponding to the current color level and gray level is the second target brightness.
[0152] It can be understood that during the process of the electronic device increasing the screen brightness from the second preset brightness to the first target brightness, if the electronic device can achieve face unlocking, it can indicate that the first target brightness is greater than the accurate fill light brightness corresponding to the current color level and gray level. After the electronic device receives the feedback of successful face unlocking, it can reduce the fill light brightness corresponding to the current color level and gray level in the self-learning record table. For example, the fill light brightness is reduced from the first target brightness to the second target brightness. Subsequently, when the electronic device uses the current lock screen wallpaper to fill light the face again, it can adjust the screen brightness based on the second target brightness.
[0153] In the embodiments of the present application, the difference between the first target brightness and the second target brightness can be a preset value. After the electronic device confirms successful face unlocking, it can reduce the preset value on the basis of the first target brightness to obtain the second target brightness. The preset value can be a fixed value, and the preset value can also be a learning gradient. The learning gradient can be a value that decreases with the number of update times of the fill light brightness corresponding to the current color level and gray level. For example, as the number of update times of the current color level and gray level in the self-learning record table increases, the difference between the target brightness before and after the update can gradually decrease. The embodiments of the present application do not limit this.
[0154] Or, after step S704, it further includes:
[0155] S707. When face unlocking fails, the electronic device obtains the reason for the failure of face unlocking.
[0156] In an actual scenario, the electronic device may fail to unlock the face due to reasons such as low-light environment, overexposure, insufficient lighting area, off-target, and backlight. In the embodiments of the present application, the reason for the face unlock failure can be indicated by the value of failed reason. When the failed reason indicates that the face unlock fails due to a low-light environment, the electronic device can use the screen unlock method provided in the embodiments of the present application to supplement light to the face, thereby improving the face unlock rate.
[0157] In some embodiments, there may be scenarios where face unlock is accidentally triggered, and the user accidentally triggers face unlock. To reduce the impact of these scenarios on the accuracy of the self-learning record table, the embodiments of the present application can obtain whether the user intends to use face unlock. For example, if the electronic device receives the user using other screen unlock methods except face unlock within a preset time after the face unlock fails, it can be considered that the data of this face unlock failure is accurate, and the electronic device can use the data of this face unlock to learn the self-learning record table. Otherwise, it can be considered that this is a face unlock process accidentally triggered by the user, and the electronic device does not learn the data of this time. The preset time can be, for example, 10s.
[0158] Specifically, the value of failed reason may include a first value, a second value, and a third value. Among them, the first value can be used to indicate that the reason for the face unlock failure is a low-light environment and the screen has been unlocked within the preset time; the second value can be used to indicate that the reason for the face unlock failure is a low-light environment and the screen has not been unlocked within the preset time; the third value can be used to indicate that the reason for the face unlock failure is not a low-light environment. For example, the first value can be 0, the second value can be 1, and the third value can be 2. In the embodiments of the present application, the first value - the third value can also be in other forms or other numerical values, and the embodiments of the present application do not limit this.
[0159] When the value of failed reason is the first value, the electronic device can execute step S709; otherwise, the electronic device terminates the light supplement process.
[0160] It should be noted that the face unlock process shown in steps S604 - S606 can be understood as a process of multiple retries in a single face unlock process. The face unlock processes shown in steps S706 and S707 are the final results of multiple face unlock retries. The face unlock process in step S706 can correspond to the process of the electronic device successfully unlocking the face screen from the off state in a single time, and the face unlock process in step S707 can correspond to the process of the electronic device failing to unlock the face screen with the retry times reaching the threshold number of times from the off state in a single time. The embodiments of the present application explain this.
[0161] S708. In a scenario where the reason for the failure of face unlocking is a low-light environment and the screen has been unlocked within a preset time, the electronic device updates the correspondence between the color level and the gray level and the third target brightness in the self-learning record table; the third target brightness is greater than the first target brightness.
[0162] It can be understood that during the process of the electronic device increasing the screen brightness from the second preset brightness to the first target brightness, if the electronic device fails to perform face unlocking, it can be explained that the first target brightness is less than the accurate fill light brightness corresponding to the current color level and gray level. After the electronic device receives the feedback of face unlocking failure at the first target brightness, it can increase the fill light brightness corresponding to the current color level and gray level in the self-learning record table. For example, it increases the fill light brightness from the first target brightness to the third target brightness. Subsequently, when the electronic device uses the current lock screen wallpaper again, it can adjust the screen brightness based on the third target brightness.
[0163] In the embodiments of the present application, the difference between the first target brightness and the second target brightness can be a preset value. After the electronic device confirms the face unlocking failure, it can increase a preset value on the basis of the first target brightness to obtain the third target brightness. The preset value can be a fixed value, and the preset value can also be a learning gradient. The embodiments of the present application do not limit this.
[0164] In this way, the electronic device can adjust the correspondence in the self-learning record table according to the results of multiple face unlockings, improve the accuracy of the correspondence between the color level, the gray level, and the fill light brightness, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the over-bright screen.
[0165] In a possible implementation manner, the self-learning record table may include information on multiple color levels and gray levels. The information of any color level and gray level includes the color level, the gray level, the default screen brightness, the learned fill light brightness, the learning gradient, and whether to terminate learning. For example, the self-learning record table can be in the form of an array, array[N] = {{RGB_L1, gray level 1, default screen brightness 1, learned fill light brightness 1, whether to terminate learning, learning gradient 1}, {RGB_L2, gray level 2, default screen brightness 2, learned fill light brightness 2, whether to terminate learning, learning gradient 2}... {RGB_LN, gray level N, default screen brightness N, learned fill light brightness N, whether to terminate learning, learning gradient N}}.
[0166] Among them, the color scale can be used to distinguish different lock screen wallpapers with the same gray scale; the learned fill light brightness can be understood as the fill light brightness used during the next face unlock, and the learned fill light brightness can be the fill light brightness shown in Table 1 and / or Table 2. The default screen brightness can be the initial fill light brightness corresponding to the new lock screen wallpaper calculated based on the preset color scale, preset gray scale, and preset screen brightness when displaying the new lock screen wallpaper and the learned fill light brightness is not included in the self-learning record table; the learning gradient can be used to specify the difference in fill light brightness between two adjacent times under the same color scale and gray scale. For example, in step S707, the first target brightness is greater than the second target brightness, and the difference between the two brightness values is the learning gradient; for another example, in step S710, the first target brightness is less than the third target brightness, and the difference between the two brightness values is the learning gradient.
[0167] It can be understood that in the embodiments of the present application, the electronic device can record the default list and the self-learning record table in an array. As shown above, the array includes the default screen brightness corresponding to any color scale and / or gray scale in the default list. However, for some color scales and / or gray scales in the array, the corresponding learned fill light brightness is available, and for another part of the color scales and / or gray scales, the electronic device has not learned the corresponding fill light brightness. Then, the learned fill light brightness corresponding to the other part of the color scales and / or gray scales in the array can be 0 or a null value.
[0168] In the embodiments of the present application, the electronic device can also use different arrays to record the default list and the self-learning record table respectively. For example, the first array stores the self-learning record table, and the first array[N] = { {RGB_L1, gray scale 1, learned fill light brightness 1, whether to terminate learning, learning gradient 1}, {RGB_L2, gray scale 2, learned fill light brightness 2, whether to terminate learning, learning gradient 2}... {RGB_LN, gray scale N, learned fill light brightness N, whether to terminate learning, learning gradient N}}. The second array stores the default list, and the second array[N] = { {RGB_L1, gray scale 1, default screen brightness 1}, {RGB_L2, gray scale 2, default screen brightness 2}... {RGB_LN, gray scale N, default screen brightness N}}. The embodiments of the present application do not limit the storage forms of the default list and the self-learning record table.
[0169] In the embodiments of the present application, the learning gradient decreases with the number of learning times. For example, the initial learning gradient is x. After the first learning of the fill light brightness after learning, the fill light brightness corresponding to the current color level and gray level can be learned again. For example, during the second learning process, update the correspondence between the current color level, gray level, and fill light brightness in the self-learning record table. The difference between the fill light brightness before update and the fill light brightness after update is x. During the third learning process, update the correspondence between the current color level, gray level, and fill light brightness in the self-learning record table. The difference between the fill light brightness before update and the fill light brightness after update is x - 1. When the learning gradient is less than the preset learning gradient, terminate the learning. For example, the preset learning gradient is 1.
[0170] Exemplarily, taking x as 5 and the initial fill light brightness as 300 nit as an example, in a low-light environment, during the first face unlock, the electronic device uses a fill light brightness of 300 nit for face unlock and fails to unlock successfully. The electronic device can update the learned fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 305 nit.
[0171] During the second face unlock, the electronic device can use a fill light brightness of 305 nit for face unlock and unlock successfully. The electronic device can update the learned fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 301 nit.
[0172] During the third face unlock, the electronic device can use a fill light brightness of 301 nit for face unlock and fail to unlock successfully. The electronic device can update the learned fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 304 nit.
[0173] During the fourth face unlock, the electronic device can use a fill light brightness of 304 nit for face unlock and unlock successfully. The electronic device can update the learned fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 302 nit.
[0174] During the fifth face unlock, the electronic device can use a fill light brightness of 302 nit for face unlock and fail to unlock successfully. The electronic device can update the learned fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 303 nit. The difference in fill light brightness between the two times is less than 1, and the electronic device stops training and uses a fill light brightness of 303 nit during the sixth and subsequent face unlock processes.
[0175] The following combines Figure 8 to describe the internal interaction process of the electronic device in the embodiments of the present application, as Figure 8 shown:
[0176] In an embodiment of the present application, the electronic device may include an application layer, an application framework layer, a hardware abstraction layer, a kernel layer, and a hardware layer.
[0177] Among them, the application layer may include a face application and a keyguard application; the keyguard application can be used to handle services related to the lock screen interface, unlock the screen (fingerprint unlock, pattern unlock, PIN unlock, etc.), display lock screen notifications, quickly start the camera application, quickly dial, display the date / time, etc.; the face application can be used to handle face-related services, such as face unlock, face recognition, and face detection.
[0178] The application framework layer may include a brightness management module, and the brightness management module is used to manage the screen brightness. For example, the brightness management module may include a fill light control module and a learning engine. Among them, the fill light control module can be used to obtain and issue a first target brightness. The learning engine can be used to query and learn the correspondence between color levels, gray levels, and fill light brightness; the learning engine may include a learning module and an array; the array stores a self-learning record table and a default list; the learning module can be used to update the correspondence between color levels, gray levels, and fill light brightness according to the result of face unlock.
[0179] The hardware abstraction layer may include a face recognition module and a backlight control module. The face recognition module can be used to match face information with preset face information to identify a face. The backlight control module is used to adjust the current screen brightness according to the first target brightness.
[0180] The kernel layer may include: a camera driver and a display driver. Among them, the camera driver is used to interact with the camera hardware to obtain a face image; the display driver is used to display the lock screen wallpaper at a set screen brightness.
[0181] Exemplarily, the process may include:
[0182] S801. The keyguard application receives an operation to trigger the screen to turn on.
[0183] S802. The keyguard application starts the face application.
[0184] S803. The keyguard application issues the color level and gray level of the lock screen wallpaper to the fill light control module.
[0185] The keyguard application can obtain the color level and gray level of the current lock screen wallpaper and call the updatewall paper gray function to issue the color level and gray level.
[0186] S804. When the ambient light brightness is less than the ambient light threshold, the face application instructs the fill light control module to start filling light.
[0187] In some embodiments, after the face application is launched, the ambient light brightness uploaded by the ambient light sensor can be obtained. The face application can determine whether the current scene is a low-light scene based on the ambient light brightness. For example, in a low-light environment, the face application can instruct to use the screen brightness to supplement the light for the face.
[0188] Among them, the face application can send an instruction for instructing to turn on the supplementary light to the supplementary light control module; for example, the instruction for instructing to turn on the supplementary light can be get Face Max Brightness do Lighter.
[0189] In the embodiments of the present application, after step S802, the process in which the face application is located can execute the face unlocking process; after step S804, the process in which the supplementary light control module is located can execute the process of adjusting the screen brightness; the two processes can execute their respective corresponding processes simultaneously.
[0190] The process of adjusting the supplementary light will be described first below, as Figure 8 shown, after step S804, it includes:
[0191] S805. The supplementary light control module queries an array from the learning engine based on the color level and gray level.
[0192] The supplementary light control module can send an instruction for querying the supplementary light brightness. For example, the instruction for querying the supplementary light brightness can be get Brightness After Map. After the learning engine receives the instruction for querying the supplementary light brightness, it can parse the instruction to obtain the color level and gray level of the current lock screen wallpaper. The learning engine queries the corresponding supplementary light brightness in the self-learning record table of the array according to the color level and gray level.
[0193] S806. When the self-learning record table includes the supplementary light brightness corresponding to the current color level and gray level, the supplementary light control module sends an instruction for adjusting the screen brightness to the backlight control module according to the system preset brightness and the supplementary light brightness corresponding to the current color level and gray level.
[0194] The instruction for adjusting the screen brightness can include the screen brightness to be adjusted. For example, the instruction for adjusting the screen brightness can be set Display Brightness.
[0195] This step can refer to the relevant description in step S703. The frequency at which the supplementary light control module sends the instruction for adjusting the screen brightness can be the same as the frequency at which the face application executes retry. For example, the supplementary light control module instructs the backlight control module to adjust the screen brightness once every 75 ms. The difference between two adjacent screen brightnesses can be the ratio of the difference between the supplementary light brightness corresponding to the color level and gray level and the system preset brightness to the number threshold.
[0196] S807. The backlight control module adjusts the screen brightness according to the instruction for adjusting the screen brightness.
[0197] In some embodiments, the backlight control module can interact with the display driver and set the brightness of the display panel through the display driver. For example, the backlight control module sends an instruction (setpanel brightness) for setting the brightness of the display panel to the display driver; the display driver writes the screen brightness to be adjusted into the register to control the display screen to reach the screen brightness to be adjusted.
[0198] Optionally, after step S805, it may further include:
[0199] S808. When the fill light brightness corresponding to the current color level and gray level is not included in the self-learning record table, the fill light control module sends an instruction for adjusting the screen brightness to the backlight control module according to the system preset brightness and the default screen brightness.
[0200] This step can refer to step S806. Among them, the fill light control module instructs the backlight control module to adjust the screen brightness every 75 ms. The difference between the adjacent two screen brightnesses can be the ratio of the difference between the default screen brightness and the system preset brightness to the number threshold.
[0201] Subsequently, the electronic device can execute step S807. The embodiments of the present application do not limit this.
[0202] S809. The face application instructs the face recognition module to start face recognition.
[0203] S810. The face recognition module obtains the face information reported by the camera driver.
[0204] In some embodiments, the face recognition module can instruct the camera driver to control the camera to collect face information. The face recognition module obtains the face information returned by the camera driver.
[0205] S811. The face recognition module matches the face information with the preset face information.
[0206] The face recognition module can extract the feature points of the face information and compare the feature points of the face information with the feature points of the preset face information. When the similarity is greater than the similarity threshold, it can be confirmed that the current face information is the preset face information. The embodiments of the present application can also use other methods to verify the face information, and the embodiments of the present application do not make specific limitations on this.
[0207] S812. The face recognition module reports the face recognition result to the face application.
[0208] The face recognition result can be used to indicate whether face unlocking is successful or failed. For example, in the case of successful face unlocking, the face recognition result may include an instruction for indicating successful unlocking and the maximum fill light brightness at the time of successful unlocking. The instruction for indicating successful unlocking can be, for example, that the value of is Success is the fourth value; the maximum fill light brightness at the time of successful unlocking can be, for example, max brightness.
[0209] In the case of failed face unlocking, the face recognition result may include an instruction for indicating unlocking failure and the reason for failed face unlocking. The instruction for indicating successful unlocking can be, for example, that the value of is Success is the fifth value; the value of the reason for failed face unlocking can be the first value, the second value, or the third value.
[0210] S813. The face application transfers the face recognition result to the lock screen application.
[0211] The lock screen application can perform the screen unlocking process according to the face recognition result. For example, when the face recognition result includes an instruction for indicating successful unlocking, the lock screen application unlocks the screen; when the face recognition result includes an instruction for indicating unlocking failure, the lock screen application can prompt the user that face unlocking has failed, and the user can try face unlocking again or change the unlocking method.
[0212] S814. The face application sends the face recognition result to the learning engine.
[0213] S815. The learning engine updates the self-learning record table according to the face recognition result.
[0214] When the face recognition result indicates successful face unlocking, the electronic device can reduce the fill light brightness corresponding to the current color level and gray level. For specific reference, please refer to the relevant description in step S707, which will not be elaborated here.
[0215] When the face recognition result indicates failed face unlocking, the electronic device can increase the fill light brightness corresponding to the current color level and gray level. For specific reference, please refer to the relevant description in step S710, which will not be elaborated here.
[0216] It should be noted that Figure 7 and Figure 8 In the embodiments shown, the corresponding relationship between the color level, gray level, and fill light brightness in the self-learning record table is taken as an example to illustrate the screen unlocking method of the embodiments of the present application. The embodiments of the present application can also use the corresponding relationship between the gray level and fill light brightness alone to implement the self-learning process, as shown in Table 4 for example. The embodiments of the present application do not limit this.
[0217] Based on the above embodiments, the embodiments of the present application provide a screen unlocking method. Exemplarily, the screen unlocking method may include the following steps:
[0218] S901. In the screen-off state, in response to the operation of triggering the screen to turn on for the first time, display the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the second brightness.
[0219] The screen-off state may include the AOD state. For example, the screen-off state may correspond to the interface shown in a of Figure 1B and the screen-off state may also correspond to the interface shown in c of Figure 1B The operation of triggering the screen to turn on can be an operation that triggers the electronic device to enter the screen-on state from the screen-off state or the AOD state. For example, the operation of triggering the screen to turn on is, for example Figure 1B the triggering operation for the power button in the interface shown in a of Figure 1B the triggering operation for the power button in the interface shown in c of
[0220] The first lock screen interface can be, for example Figure 1A the interface shown in a of
[0221] In the embodiments of the present application, when the electronic device receives the operation of triggering the screen to turn on, the electronic device can supplement light to the user's face by increasing the screen brightness to achieve face unlocking in a low-light environment. Specifically, after the screen is turned on, the electronic device displays the first lock screen interface, and the initial brightness of the first lock screen interface is the system preset brightness when the screen is turned on. For example, the initial brightness is the first brightness. After that, the electronic device can increase the screen brightness to the second brightness.
[0222] It can be understood that the second brightness can be understood as the maximum screen brightness that can be achieved during the light supplement process; during the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness, the electronic device may no longer continue to increase the screen brightness to the second brightness after successful unlocking.
[0223] S902. In the case of successful unlocking based on the first unlocking information, display the unlocking interface; the first unlocking information includes the information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness.
[0224] The first unlocking information can be, for example, the face information, gesture information, etc. collected by the camera after the screen is first woken up. The unlocking interface can be, for example, Figure 1A the interface shown in c in
[0225] During the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness, the camera of the electronic device can collect the first unlocking information and execute the face unlocking process based on the first unlocking information. When the first lock screen wallpaper with the second brightness can illuminate the user's face, the electronic device can collect relatively clear face information and achieve face unlocking.
[0226] S903. In the screen-off state, in response to the operation of triggering the screen to wake up for the second time, display the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the third brightness; the third brightness is less than the second brightness.
[0227] The third brightness can be, for example, the second target brightness. For example, the third brightness can be the fill light brightness corresponding to the color level and / or gray level of the lock screen wallpaper of the updated first lock screen interface.
[0228] Between step S902 and step S903, the electronic device can perform the screen-off operation. For example, after step S902, when the unlocking interface is displayed, a screen-off trigger operation is received; in response to the screen-off trigger operation, the electronic device turns off the screen; when the screen is off, a screen-wake-up trigger operation is received; step S903 is executed. Another example is that after step S902, when the unlocking interface is displayed and the screen-off time is reached, the electronic device turns off the screen; when the screen is off, a screen-wake-up trigger operation is received; step S903 is executed.
[0229] When the screen is off, the electronic device can receive the operation of triggering the screen to wake up for the second time. Since the electronic device successfully unlocked based on the face before, the second brightness in the self-learning record table is updated to the third brightness. Therefore, the electronic device changes from the first brightness to the third brightness during the fill light process.
[0230] Among them, the third brightness is less than the second brightness. Since the second brightness can achieve face unlocking, the second brightness can be reduced to the third brightness, thereby gradually reducing the fill light brightness corresponding to the first lock screen interface. The above steps can refer to Figure 7 the description related to step S706 in the shown embodiment, and the embodiments of the present application will not repeat it here.
[0231] In the embodiments of the present application, when the face unlocking is successful or the number of face unlocking times reaches the threshold, the electronic device will control the brightness of the first lock screen interface to gradually change from the third brightness to the first brightness.
[0232] In this way, the electronic device can adjust the fill light brightness according to the result of the previous face unlock, so as to learn the relatively accurate fill light brightness required for face unlock on the current lock screen interface, thereby effectively reducing the glare problem caused by too high screen brightness.
[0233] Optionally, it further includes: if the unlock fails based on the second unlock information during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness, in the screen-off state, in response to the operation of triggering the screen on for the third time, the first lock screen interface is displayed, and the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, the fourth brightness is greater than the third brightness, and the second brightness is greater than the fourth brightness; wherein, the second unlock information includes the information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness.
[0234] Among them, the second unlock information can be the face information, gesture information, etc. collected by the camera after the second screen-on trigger. The second unlock information is different from the first unlock information. It can be understood that for the same user during two face unlock processes, the face information of the user captured by the electronic device will also be different. The unlock interface can be, for example Figure 1A the interface shown in c of
[0235] The fourth brightness can be the third target brightness
[0236] It should be noted that in the case of unsuccessful unlocking, the electronic device can learn and update the corresponding relationship between the current color level and / or gray level and the fill light brightness based on the unlocking result. Since the electronic device successfully unlocked based on the face before, the third brightness in the self-learning record table is updated to the fourth brightness. Therefore, the electronic device changes from the first brightness to the fourth brightness during the fill light process.
[0237] The fourth brightness is greater than the third brightness, which can be understood as the third brightness cannot achieve face unlock, so it is necessary to increase the third brightness to the fourth brightness to ensure that the current brightness can achieve face unlock. The second brightness is greater than the fourth brightness, which can be understood as although the electronic device will appropriately increase the value of the fill light brightness, it will not increase the fill light brightness to be greater than the fill light brightness before learning; thus achieving the effect that the fill light brightness gradually converges to an intermediate value (such as 303 nit in the above embodiment) as the number of learning times increases.
[0238] The above steps can refer to Figure 7 the description related to steps S707 - S708 in the shown embodiment, and the embodiments of the present application will not repeat it here.
[0239] In this way, the electronic device can adjust the fill light brightness according to the result of the previous face unlock, so as to learn the relatively accurate fill light brightness required for face unlock on the current lock screen interface, thereby effectively reducing the glare problem caused by too high screen brightness.
[0240] Optionally, before the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, it further includes: within a preset duration after unsuccessful unlocking based on the second unlocking information and when unlocking is successfully performed based on the third unlocking information, displaying an unlocking interface; the third unlocking information includes password information and / or fingerprint information.
[0241] The preset duration can be, for example, 10s. It can be understood that the failure of face unlocking may be caused by various reasons. For example, the user accidentally triggers the unlocking process. At this time, the condition that the electronic device unlocks by other means within the preset duration can be used to determine that the current face unlocking failure is not accidentally triggered by the user.
[0242] This step can refer to Figure 7 the description related to step S708 in the illustrated embodiment, and this application embodiment will not elaborate on it here.
[0243] In this way, the scenario of face unlocking failure caused by the user accidentally triggering can be recognized, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.
[0244] Optionally, it further includes: if unlocking is successfully performed based on the fourth unlocking information during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness, then in the screen-off state, in response to the operation of triggering the screen to turn on for the fourth time, displaying the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the fourth brightness; where the fourth unlocking information includes the information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness.
[0245] In the embodiment of the present application, when the self-learning record table has learned to a certain extent, the electronic device can stop learning. For example, after learning the lock screen wallpaper of the first lock screen interface multiple times, if the learning gradient is less than 1, the learning process is terminated.
[0246] In this step, when the electronic device learns that the fill light brightness corresponding to the color level and / or gray level of the lock screen wallpaper of the first lock screen interface is the fourth brightness, although the previous unlocking based on the fourth unlocking information was successful, the electronic device will no longer update the fill light brightness corresponding to the color level and / or gray level of the lock screen wallpaper of the first lock screen interface. Therefore, when receiving the operation of triggering the screen to turn on for the fourth time, the electronic device still obtains the fill light brightness as the fourth brightness and controls the brightness of the first lock screen interface to change from the first brightness to the fourth brightness.
[0247] In this way, after multiple learnings, the electronic device can learn the relatively accurate fill light brightness required for face unlocking of the current lock screen interface, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0248] Optionally, the lock screen wallpaper of the first lock screen interface includes a first lock screen wallpaper, and the lock screen wallpaper of the second lock screen interface includes a second lock screen wallpaper. It further includes: in the screen-off state, in response to the operation of triggering the screen to turn on for the fifth time, the second lock screen interface is displayed, and the brightness of the second lock screen interface changes from the first brightness to the fifth brightness. The second lock screen wallpaper is different from the first lock screen wallpaper; the fifth brightness is different from the fourth brightness.
[0249] The first lock screen wallpaper can be the lock screen wallpaper displayed on the first lock screen interface; the second lock screen wallpaper can be the lock screen wallpaper displayed on the second lock screen interface; the second lock screen wallpaper and the first lock screen wallpaper can be understood as: the image style of the second lock screen wallpaper and the image style of the first lock screen wallpaper, which can be specifically embodied as the color scale and / or gray scale of the second lock screen wallpaper being different from the color scale and / or gray scale of the first lock screen wallpaper.
[0250] It can be understood that during the process of triggering the screen to turn on for the fourth time, the electronic device has trained the fill light brightness corresponding to the color scale and / or gray scale of the first lock screen wallpaper, for example, the fourth brightness. However, when the electronic device changes the lock screen wallpaper, this fill light brightness is no longer applicable, and the electronic device can re-learn the fill light brightness of the new lock screen wallpaper. For example, the new lock screen wallpaper is the second lock screen wallpaper, and the fill light brightness corresponding to the color scale and / or gray scale of the second lock screen wallpaper is the fifth brightness. The electronic device will control the brightness of the second lock screen interface to change from the first brightness to the fifth brightness during the face unlocking process.
[0251] In Figure 5 In the illustrated embodiment, different color scales can affect the success rate of face unlocking. Therefore, in the embodiments of the present application, by refining the relationship between the color scale, gray scale, and fill light brightness, the effect of improving the face unlocking rate is achieved.
[0252] In this way, the electronic device can learn the fill light brightness corresponding to different lock screen wallpapers and perform fill light on the lock screen wallpaper based on this fill light brightness, thereby improving the unlocking rate under each lock screen wallpaper.
[0253] Optionally, it further includes: in the screen-off state, in response to the operation of triggering the screen to turn on for the sixth time, the second lock screen interface is displayed, and the brightness of the second lock screen interface is the first brightness; the ambient light brightness when triggering the screen to turn on for the sixth time is greater than the ambient light threshold.
[0254] The ambient light threshold can be a threshold for distinguishing between a dark light environment and a bright light environment. For example, the ambient light threshold can be a value between 0 - 2.5 lux. For example, the ambient light threshold can be 1 lux. When the ambient light brightness is greater than the ambient light threshold, it can be determined that the current is in a bright light environment, and the electronic device does not need to use the screen brightness to fill light the face. Therefore, in a bright light environment, after triggering the screen to turn on for the sixth time, the brightness of the second lock screen interface will not change and will always be the first brightness.
[0255] In this way, the electronic device can learn the correspondence between the color level and / or grayscale level and the fill light brightness in a low-light environment, and in a bright-light environment, it does not learn the correspondence between the color level and / or grayscale level and the fill light brightness, thereby improving the accuracy of the fill light brightness; at the same time, it can also reduce the power consumption caused by increasing the screen brightness in a bright-light environment.
[0256] Optionally, the electronic device includes a first array, and the first array records the correspondence between the color level and / or grayscale level and the target screen brightness; before the brightness of the first lock screen interface changes from the first brightness to the second brightness, it includes: obtaining the ambient light brightness and the color level and / or grayscale level of the first lock screen wallpaper; in the case where the ambient light brightness is less than the ambient light threshold, searching for the color level and / or grayscale level of the first lock screen wallpaper in the first array; the brightness of the first lock screen interface changes from the first brightness to the second brightness, including: in the case where the first array includes the color level and / or grayscale level of the first lock screen wallpaper, controlling the brightness of the first lock screen interface to change from the first brightness to the second brightness; the second brightness is the target screen brightness corresponding to the color level and / or grayscale level of the first lock screen wallpaper in the first array.
[0257] The first array records a self-learning record table, and the self-learning record table includes the correspondence between the color level and / or grayscale level and the fill light brightness. The target screen brightness can correspond to the fill light brightness corresponding to the color level and / or grayscale level in the embodiments of the present application. The first array can be an array that stores the self-learning record table and the default list at the same time, or an array that only stores the self-learning record table. The embodiments of the present application do not limit this.
[0258] This process can refer to Figure 3 、 Figure 6 and Figure 7 the relevant descriptions in the embodiments shown, and will not be elaborated here.
[0259] In this way, in a low-light environment, before the electronic device uses face unlocking, it can obtain a relatively accurate fill light brightness corresponding to the current lock screen wallpaper, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the screen being too bright.
[0260] Optionally, the brightness of the first lock screen interface changes from the first brightness to the second brightness, and further includes: the brightness of the first lock screen interface instantaneously changes from the first brightness to the second brightness; or, the brightness of the first lock screen interface gradually changes from the first brightness to the second brightness based on a brightness step.
[0261] Among them, instantaneous can be understood as a relatively small time magnitude, for example, it takes a few milliseconds to increase from the first brightness to the second brightness. Gradually changing from the first brightness to the second brightness can be understood as increasing the screen brightness once every 75 ms as described in the above embodiments.
[0262] In this way, the electronic device can supplement light to the human face in various ways. Among them, when the electronic device adopts the progressive light supplement method, it can reduce the discomfort of the human eye caused by the sudden brightening of the screen and can better improve the user experience.
[0263] Optionally, after successfully unlocking based on the first unlocking information, it further includes: in the first array, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the second brightness to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness.
[0264] After the screen is lit for the first time, the face unlock is successful. After receiving the feedback of successful face unlock, the electronic device can adjust the self-learning record table according to the face unlock result. This process can refer to Figure 6 or Figure 7 the relevant descriptions in the embodiments shown, which will not be elaborated here.
[0265] In this way, the electronic device can adjust the light supplement brightness according to the result of the previous face unlock, so as to learn the relatively accurate light supplement brightness required for the current lock screen interface during face unlock, thereby effectively reducing the dazzling problem caused by too high screen brightness.
[0266] Optionally, after failing to unlock based on the second unlocking information, it further includes: in the first array, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness.
[0267] After the screen is lit for the first time, the face unlock is successful. After receiving the feedback of failed face unlock, the electronic device can adjust the self-learning record table according to the face unlock result. This process can refer to Figure 6 or Figure 7 the relevant descriptions in the embodiments shown, which will not be elaborated here.
[0268] In this way, the electronic device can adjust the light supplement brightness according to the result of the previous face unlock, so as to learn the relatively accurate light supplement brightness required for the current lock screen interface during face unlock, thereby effectively reducing the dazzling problem caused by too high screen brightness.
[0269] Optionally, updating the correspondence between the color level and gray level of the first lock screen wallpaper and the fourth brightness in the first array includes: when the first information is obtained, updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness in the first array; the first information is used to represent that the face brightness is too dark resulting in unlocking failure and unlocking the screen through the third unlocking information within a preset time.
[0270] The first information can be that the failed reason in the above embodiment is the first value.
[0271] In this way, scenarios of face unlocking failure caused by accidental triggering by the user and scenarios of face unlocking failure caused by non-supplementary lighting scenarios can be excluded, thereby improving the accuracy of the learning process and the accuracy of the supplementary lighting brightness in the self-learning record table.
[0272] Optionally, when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the first time, the difference in the target screen brightness before and after the update is x; when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the i-th (i is a positive integer greater than 1) time, the difference in the target screen brightness before and after the update is x - i + 1; when the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper is updated for the j-th (j is a positive integer greater than i) time, and the difference in the target screen brightness before and after the update is less than 1, the electronic device will no longer update the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper.
[0273] This process can correspond to the relevant descriptions of the array part in the above embodiments. Among them, the i-th update can correspond to the second face unlocking to the fourth face unlocking, and the j-th update can correspond to the fifth face unlocking.
[0274] In this way, the electronic device can converge the supplementary lighting brightness to a value suitable for face unlocking of the current lock screen wallpaper through a learning gradient that decreases with the number of updates, thereby effectively reducing the problem of glare caused by too high screen brightness.
[0275] In order to better understand the embodiments of the present application, the structure of the electronic device 100 in the embodiments of the present application will be introduced below:
[0276] Figure 9The structural schematic diagram of the electronic device 100 is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, and an embedded secure element (eSE) 196, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0277] It can be understood that the structure schematically shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0278] The processor 110 may include one or more processing units. For example: the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. In the embodiments of the present application, the processor 110 may be used for the steps related to information processing in the screen unlocking method provided in the embodiments of the present application.
[0279] The electronic device 100 implements the display function through a GPU, a display screen 194, an application processor, etc. The display screen 194 is used to display images, videos, etc. In the embodiments of the present application, the display screen 194 can be used to display a first lock screen interface, a second lock screen interface, an unlock interface, etc.
[0280] The electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, etc. Among them, the camera 193 is used to capture still images or videos. In the embodiments of the present application, the electronic device can use the camera to collect face information to implement the face unlock process.
[0281] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor. In the embodiments of the present application, the electronic device can use the internal memory 121 to store a self-learning record table and a default list.
[0282] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photographing. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch. In the embodiments of the present application, the electronic device can detect whether the current environment is a low-light environment according to the ambient light brightness, and in a low-light environment, execute the screen unlock process provided in the embodiments of the present application.
[0283] The screen unlocking method of the embodiments of the present application has been described above. Next, the device for executing the above screen unlocking method provided in the embodiments of the present application will be described. Those skilled in the art can understand that the method and the device can be combined and cited with each other, and the related device provided in the embodiments of the present application can execute the steps in the above screen unlocking method.
[0284] As Figure 10As shown, the screen unlocking device 1100 can be used in a communication device, a circuit, a hardware component or a chip. The screen unlocking device includes: a display unit 1101 and a processing unit 1102. Among them, the display unit 1101 is used to support the display steps executed by the screen unlocking device 1100; the processing unit 1102 is used to support the information processing steps executed by the screen unlocking device 1100.
[0285] In a possible implementation, the screen unlocking device 1100 may also include a communication unit 1103. Specifically, the communication unit is used to support the steps of data sending and data receiving executed by the screen unlocking device 1100. Among them, the communication unit 1103 may be an input or output interface, a pin or a circuit, etc.
[0286] In a possible embodiment, the screen unlocking device may further include: a storage unit 1104. The processing unit 1102 and the storage unit 1104 are connected by a line. The storage unit 1104 may include one or more memories, and the memory may be a device or a component in one or more devices or circuits for storing programs or data. The storage unit 1104 may exist independently and be connected to the processing unit 1102 of the screen unlocking device through a communication line. The storage unit 1104 may also be integrated with the processing unit 1102.
[0287] The storage unit 1104 may store computer-executable instructions of the method in the electronic device, so that the processing unit 1102 executes the method in the above embodiments. The storage unit 1104 may be a register, a cache or a RAM, etc. The storage unit 1104 may be integrated with the processing unit 1102. The storage unit 1104 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1104 may be independent of the processing unit 1102.
[0288] The screen unlocking method provided by the embodiments of the present application can be applied to an electronic device with communication functions. The electronic device includes an electronic device, and the specific device form of the electronic device and the like can refer to the above relevant descriptions, which will not be elaborated here.
[0289] The embodiments of the present application provide an electronic device, which includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the above method.
[0290] An embodiment of the present application provides a chip system, which includes at least one processor and a communication interface. The communication interface and the at least one processor are interconnected by a line. The at least one processor is used to run a computer program or instruction to execute the above method. The implementation principle and technical effect are similar to those of the above related embodiments, and will not be elaborated here.
[0291] An embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the above method is implemented. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium. The computer-readable medium can include a computer storage medium and a communication medium, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.
[0292] In a possible implementation, the computer-readable medium can include RAM, ROM, a compact disc read-only memory (CD-ROM), or other optical disc memories, magnetic disk memories, or other magnetic storage devices, or any other medium targeted at carrying or storing the required program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is properly referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. As used herein, magnetic disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where magnetic disks typically reproduce data magnetically, while optical discs use lasers to optically reproduce data. The above combinations should also be included within the scope of the computer-readable medium.
[0293] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, the computer is caused to execute the above method.
[0294] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable devices to generate a machine, such that the instructions executed by the processing unit of the computer or other programmable data processing device generate a device for implementing the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram.
[0295] The above specific embodiments further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention shall be included in the protection scope of the present invention.
Claims
1. A screen unlocking method, characterized in that, Applied to an electronic device, the method includes: In the screen-off state, in response to the first operation to trigger the screen to turn on, display a first lock screen interface, and the brightness of the first lock screen interface changes from a first brightness to a second brightness; In the case of successful unlocking based on the first unlocking information, display an unlocking interface; the first unlocking information includes information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness; In the screen-off state, in response to the second operation to trigger the screen to turn on, display the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to a third brightness; the third brightness is less than the second brightness.
2. The method according to claim 1, wherein It further includes: If unlocking fails based on the second unlocking information during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness, then in the screen-off state, in response to the third operation to trigger the screen to turn on, display the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to a fourth brightness, the fourth brightness is greater than the third brightness, and the second brightness is greater than the fourth brightness; wherein, the second unlocking information includes information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness.
3. The method according to claim 2, wherein Before the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, it further includes: Within a preset duration after unlocking fails based on the second unlocking information, and in the case of successful unlocking based on the third unlocking information, display the unlocking interface; the third unlocking information includes password information and / or fingerprint information.
4. The method according to claim 2 or 3, characterized in that, It further includes: If unlocking is successful based on the fourth unlocking information during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness, then in the screen-off state, in response to the fourth operation to trigger the screen to turn on, display the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the fourth brightness; wherein, the fourth unlocking information includes information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness.
5. The method according to any one of claims 1-4, characterized in that The lock screen wallpaper of the first lock screen interface includes a first lock screen wallpaper, the lock screen wallpaper of the second lock screen interface includes a second lock screen wallpaper, and it further includes: In the screen-off state, in response to the fifth operation to trigger the screen to turn on, display a second lock screen interface, and the brightness of the second lock screen interface changes from the first brightness to a fifth brightness, the second lock screen wallpaper is different from the first lock screen wallpaper; the fifth brightness is different from the fourth brightness.
6. The method according to any one of claims 1-5, characterized in that, It further includes: In the screen-off state, in response to the sixth operation to trigger the screen to turn on, display the second lock screen interface, and the brightness of the second lock screen interface is the first brightness; The ambient light brightness at the time of the sixth operation to trigger the screen to turn on is greater than the ambient light threshold.
7. The method according to claim 5 or 6, characterized in that, The electronic device includes a first array, and the first array records the corresponding relationship between color levels and / or gray levels and the target screen brightness; Before the brightness of the first lock screen interface changes from a first brightness to a second brightness, it includes: Obtain the ambient light brightness and the color scale and / or gray scale of the first lock screen wallpaper; When the ambient light brightness is less than the ambient light threshold, search for the color scale and / or gray scale of the first lock screen wallpaper in the first array; The change in the brightness of the first lock screen interface from the first brightness to the second brightness includes: When the first array includes the color scale and / or gray scale of the first lock screen wallpaper, control the brightness of the first lock screen interface to change from the first brightness to the second brightness; the second brightness is the target screen brightness corresponding to the color scale and / or gray scale of the first lock screen wallpaper in the first array.
8. The method according to claim 7, wherein The change in the brightness of the first lock screen interface from the first brightness to the second brightness further includes: The brightness of the first lock screen interface instantaneously changes from the first brightness to the second brightness; Or, the brightness of the first lock screen interface gradually changes from the first brightness to the second brightness based on a brightness step size.
9. The method according to any one of claims 1 - 8, characterized in that, After successfully unlocking based on the first unlock information, it further includes: In the first array, update the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the second brightness to the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the third brightness.
10. The method according to any one of claims 2-9, characterized in that After failing to unlock based on the second unlock information, it further includes: In the first array, update the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the third brightness to the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the fourth brightness.
11. The method according to claim 10, wherein Updating the correspondence between the color scale and gray scale of the first lock screen wallpaper and the fourth brightness in the first array includes: When the first information is obtained, update the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the fourth brightness in the first array; the first information is used to represent that the unlocking fails due to the dim face brightness and the screen is unlocked by the third unlock information within a preset time.
12. The method according to any one of claims 7-11, characterized in that, In the case of the first update of the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper, the difference in the target screen brightness before and after the update is x; in the case of the i-th (i is a positive integer greater than 1) update of the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper, the difference in the target screen brightness before and after the update is x - i + 1; in the case of the j-th (j is a positive integer greater than i) update of the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper, if the difference in the target screen brightness before and after the update is less than 1, the electronic device will no longer update the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper.
13. An electronic device, characterized in that, It includes: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1-12.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the method according to any one of claims 1-12.
15. A chip system, characterized in that, Comprising at least one processor and a communication interface, the communication interface and the at least one processor are interconnected by a line, and the at least one processor is configured to run a computer program or instructions to execute the method according to any one of claims 1-12.
16. A computer program product, characterized in that, Comprising a computer program, when the computer program is run, causing the computer to execute the method according to any one of claims 1-12.