Screen unlocking method and related device

By adjusting the screen brightness and grayscale and color levels of the lock screen wallpaper, combined with the previous unlocking result, the problem of excessive brightness and dazzling screen in dark light environments is solved, and the success rate and user experience of face unlocking are improved.

WO2025149062A1PCT designated stage expired Publication Date: 2025-07-17HONOR DEVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/071901
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-11
Filing Date
2025-01-10
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

In dark light environments, when electronic devices increase the screen brightness and fill the face with the screen, it may lead to excessive brightness and dazzling screen, affecting the user experience.

Method used

Adjust the fill-up brightness through the result of the previous face unlock, and learn the accurate fill-up brightness required by the current lock screen interface when the face unlocks. Adjust the screen brightness in progressively or instantaneously, and combine grayscale and color scale classification lock screen wallpaper to reduce the problem of excessive brightness and glaring screen.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025071901_17072025_PF_FP_ABST
    Figure CN2025071901_17072025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of terminals, and provide a screen unlocking method and a related device. The present application is suitable for face unlock in a dark light environment, and a specific method comprises: in a screen-off state, in response to the operation of triggering turning on of a screen for the first time, displaying a first lock screen interface, and the brightness of the first lock screen interface changing from first brightness to second brightness; when unlocking succeeds on the basis of first unlocking information, displaying an unlock interface, the first unlocking information comprising information collected by a camera of an electronic device during the change of the brightness of the first lock screen interface from the first brightness to the second brightness; and in the screen-off state, in response to the operation of triggering the turning on of the screen for the second time, displaying the first lock screen interface, and the brightness of the first lock screen interface changing from the first brightness to third brightness, the third brightness being less than the second brightness. In this way, the light supplementing brightness can be adjusted by means of the previous face unlock result, and the correspondence between a lock screen interface and the light supplementing brightness is learned, thereby effectively reducing the dazzling problem caused by excessive brightness of a screen.
Need to check novelty before this filing date? Find Prior Art

Description

Screen unlocking method and related equipment

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 11, 2024, with application number 202410052389.8 and application name “Screen Unlocking Method and Related Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a screen unlocking method and related equipment. Background Art

[0003] In order to improve the security of information in electronic devices, electronic devices support a lock screen function. Accordingly, electronic devices can support multiple screen unlocking methods. For example, the screen unlocking methods may include: password unlocking, fingerprint unlocking, face unlocking, gesture unlocking, and Bluetooth device unlocking, etc.

[0004] Users can record their faces on their electronic devices and enable the face unlock feature. When the screen is locked, the device can unlock the screen after recognizing the user's face. However, in low-light environments, the device may not be able to capture facial information.

[0005] In a possible implementation, the electronic device can increase the screen brightness to supplement the user's face when unlocking the device, allowing the electronic device to capture clear facial information. However, due to the dark environment in which the user is located, increasing the screen brightness may cause the screen to be glaring, affecting the user's experience. Summary of the Invention

[0006] The embodiments of the present application provide a screen unlocking method and related equipment, which are applied to the field of terminal technology; a method of face unlocking in a dark environment is provided. During the unlocking process, the screen brightness is moderate, which is more friendly to the user's eyes, reduces the glare problem caused by excessive screen brightness, and improves the user experience.

[0007] In a first aspect, an embodiment of the present application proposes a screen unlocking method. The method includes: in the screen-off state, in response to the first screen-on triggering operation, displaying 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, displaying the 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 screen-on triggering operation, displaying 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 lower than the second brightness. In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required by the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0008] Optionally, the system further includes: if the first lock screen interface is not successfully unlocked based on the second unlock information during the process of the brightness changing from the first brightness to the third brightness, then in the screen-off state, in response to the third triggering operation to light up the screen, the first lock screen interface is displayed, 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 unlock 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. In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlock, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlock, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0009] Optionally, before the brightness of the first lock screen changes from the first brightness to the fourth brightness, the system further includes: displaying an unlock screen within a preset time period after an unsuccessful unlock based on the second unlock information, and if the unlock is successful based on the third unlock information; the third unlock information includes password information and / or fingerprint information. This can identify scenarios where face unlock fails due to user mis-triggering, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.

[0010] Optionally, the device may also include: if the first lock screen is successfully unlocked based on the fourth unlock information during the process of the brightness of the first lock screen changing from the first brightness to the fourth brightness, then in the screen-off state, in response to the fourth triggering of the screen-on operation, the first lock screen is displayed, and the brightness of the first lock screen changes from the first brightness to the fourth brightness; wherein the fourth unlock information includes information collected by the electronic device's camera during the process of the brightness of the first lock screen changing from the first brightness to the fourth brightness. In this way, after multiple learning, the electronic device can learn the more accurate fill light brightness required for the current lock screen during face unlocking, thereby effectively reducing the glare caused by excessive screen brightness.

[0011] 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, further comprising: in the screen-off state, in response to the fifth screen-on triggering operation, displaying the second lock screen interface, 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; and 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 fill light the lock screen wallpaper based on the fill light brightness, thereby improving the unlock rate under each lock screen wallpaper.

[0012] Optionally, the method further includes: in the screen-off state, in response to a sixth screen-lighting trigger, displaying a second lock screen interface, and the brightness of the second lock screen interface is the first brightness; and the ambient light brightness when the screen is lighted for the sixth time is greater than the ambient light threshold. In this way, the electronic device can learn the correspondence between color scales and / or gray scales and fill light brightness in a dark environment, and not learn the correspondence between color scales and / or gray scales and fill light brightness in a bright environment, 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 environment.

[0013] Optionally, the electronic device includes a first array, in which the correspondence between color scales and / or gray scales and target screen brightness is recorded; before the brightness of the first lock screen interface changes from the first brightness to the second brightness, the process includes: obtaining the ambient light brightness and the color scales and / or gray scales of the first lock screen wallpaper; when the ambient light brightness is less than the ambient light threshold, searching the first lock screen wallpaper's color scales and / or gray scales in the first array; the brightness of the first lock screen interface changes from the first brightness to the second brightness, including: when the first array includes the color scales and / or gray scales 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 scales and / or gray scales of the first lock screen wallpaper in the first array. In this way, in a dark environment, before the electronic device uses face unlocking, it can obtain a more 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.

[0014] Optionally, the brightness of the first lock screen interface changes from the first brightness to the second brightness, further comprising: the brightness of the first lock screen interface changes instantaneously from the first brightness to the second brightness; or the brightness of the first lock screen interface changes gradually from the first brightness to the second brightness based on a brightness step size. In this way, the electronic device can provide fill light for the face in a variety of ways. Specifically, when the electronic device uses a progressive fill light method, it can reduce eye discomfort caused by sudden screen brightness changes, thereby better improving the user experience.

[0015] Optionally, after successfully unlocking the device based on the first unlock information, the method further includes: updating, in the first array, 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. In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlock, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlock, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0016] Optionally, after the unlocking is unsuccessful based on the second unlocking information, the method further includes: updating, in the first array, 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. In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0017] Optionally, 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: upon obtaining the first information, updating 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 indicate that the unlocking failed due to low facial brightness, and the screen is unlocked by the third unlocking information within a preset time. This can eliminate scenarios where face unlocking fails due to user error triggering, as well as scenarios where face unlocking fails due to non-fill light conditions, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.

[0018] Optionally, when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the first time, the difference in target screen brightness before and after the update is x; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the i-th (i is a positive integer greater than 1) time, the difference in target screen brightness before and after the update is x-i+1; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the j-th (j is a positive integer greater than i) time, if the difference in 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. In this way, the electronic device can converge the fill light brightness to a value suitable for face unlocking with the current lock screen wallpaper through a learning gradient that decreases with the number of updates, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0019] In a second aspect, an embodiment of the present application provides an electronic device, which may also be referred to as a terminal device, terminal, user equipment (UE), mobile station (MS), 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 a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.

[0020] The electronic device comprises: 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 performs the method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run, it enables the computer to execute the method of the first aspect.

[0023] 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 through a line, and the at least one processor is used to run a computer program or instruction to execute the method of the first aspect.

[0024] 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 achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1A is a schematic diagram of a face unlocking interface provided by an embodiment of the present application;

[0026] FIG1B is a schematic diagram of two interfaces for entering the lock screen interface provided in an embodiment of the present application;

[0027] FIG2 is a graph showing the relationship between fill light brightness and time for two fill light methods in possible implementations;

[0028] FIG3 is a flow chart of a screen unlocking method provided in an embodiment of the present application;

[0029] FIG4 is a diagram showing the relationship between fill light brightness and time in a fill light method provided in an embodiment of the present application;

[0030] FIG5 is a diagram showing the relationship between multiple lock screen wallpapers of the same grayscale and the lock screen rate provided by an embodiment of the present application;

[0031] FIG6 is a flow chart of a screen unlocking method provided in an embodiment of the present application;

[0032] FIG7 is a flow chart of a screen unlocking method provided in an embodiment of the present application;

[0033] FIG8 is a flowchart of internal interaction of an electronic device provided in an embodiment of the present application;

[0034] FIG9 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application;

[0035] FIG10 is a schematic diagram of the structure of the screen unlocking device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0037] 1) Lock and unlock the screen

[0038] The lock screen can be understood as the state in which 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 may correspond to the screen unlocking method. For example, when the electronic device is set with a password, the lock screen interface may display an area for entering the password; when the electronic device is set with fingerprint unlocking, the lock screen interface may display an area for entering fingerprints; when the electronic device is set with face unlocking, the lock screen interface may display an indicator for indicating face unlocking.

[0039] Taking face unlock as an example, FIG1A is a schematic diagram of a face unlock interface in a dark environment provided by an embodiment of the present application. In a dark environment, the electronic device may display a lock screen interface as shown in FIG1A a. In the interface shown in FIG1A a, the lock screen interface may display the time and date, lock screen prompt information 101, and face unlock prompt information 102; wherein, the lock screen prompt information 101 is used to remind the user that the electronic device is in a locked state and can only be used after unlocking; the face unlock prompt information 102 is used to remind the user that the electronic device can be unlocked based on facial information.

[0040] When the surrounding scene is dark, the user can perform the operation shown in b in Figure 1A, placing the electronic device in front of the face so that the screen can illuminate the face and collect facial information.

[0041] 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 unlock interface, such as the interface shown in Figure 1A, c. For example, the interface shown in Figure 1A, c, can be the desktop.

[0042] 2) Screen off, always on display (AOD), and screen on

[0043] Screen off, also known as screen off, refers to powering off the display of an electronic device. When the screen is off, the brightness of the display is lower than the preset brightness. Screen on, also known as screen on, refers to powering on the display of an electronic device. When the screen is on, the brightness of the display is higher than the preset brightness.

[0044] AOD, also known as always-on display, refers to a mode whereby a portion of an electronic device's screen remains off while another portion remains lit. In the lit area, the device displays information such as the time, date, and unread messages. AOD conserves battery life while allowing users to easily access information at any time.

[0045] In some embodiments, the electronic device can enter the screen-on state from the screen-off state. For example, in the interface shown in a of Figure 1B, the electronic device can be in the screen-off state. When a trigger operation for the power button is received, the electronic device can enter the screen-on state. If the electronic device is equipped with a lock screen function, after the screen is turned on, the electronic device can display the lock screen interface shown in b of Figure 1B and implement face unlocking according to the steps shown in Figure 1A.

[0046] In 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 in Figure 1B, the electronic device may be in the AOD state. When a trigger operation for the power button is received, the electronic device may enter the screen-on state. If the electronic device is provided with a lock screen function, after the screen is turned on, the electronic device may display the lock screen interface shown in b in Figure 1B and implement face unlocking according to the steps shown in Figure 1A.

[0047] 3) Electronic devices

[0048] The terminal device of the embodiment 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 function, a vehicle-mounted device, etc. For example, some electronic devices include: mobile phones, tablet computers, PDAs, 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 cars, 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 capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks. The terminal equipment in the network (PLMN), etc., is not limited to this in the embodiments of the present application.

[0049] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0050] In addition, in the embodiments of the present application, the electronic device can also be a terminal device in the Internet of Things (IoT) system. 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 technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0051] The electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0052] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business 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. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0053] To facilitate a clear description of the technical solutions of the embodiments of this application, the words "exemplary" or "for example" are used in the embodiments of this application to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0054] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0055] It should be noted that the "at..." in the embodiments of the present application can be the instant when a certain situation occurs, or it can be a period of time after the situation occurs, and the embodiments of the present application do not specifically limit this. In addition, the display interface provided in the embodiments of the present application is only an example, and the display interface can also include more or less content.

[0056] The electronic device can enable the face unlock function. After the face unlock function is enabled, the electronic device can perform the face unlock process shown in Figure 1A. However, in a possible implementation, after using the screen to fill in the light for the face, the screen may be too bright, making it glaring to the user.

[0057] This is because: in a possible implementation, when the electronic device is in a dark environment and in 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 facial information, the brightness value is often set high. This causes the screen brightness to be too high when the electronic device uses screen fill light. For example, in the fixed fill light method, the brightness change can be shown as Figure a in Figure 2. During face unlocking, the screen brightness remains at a fixed value.

[0058] Alternatively, in a possible implementation, when the electronic device is in a dark environment and in a locked screen state, the electronic device increases the screen brightness by progressive fill light. The progressive fill light method can be a method of gradually increasing the screen brightness over time. For example, in the fixed fill light method, the brightness change can be shown in Figure b in Figure 2. It can be seen that in the initial stage, the screen brightness is low and the electronic device cannot recognize facial 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 is increased to the maximum value, the electronic device no longer increases the screen brightness and prompts that the face unlocking failed.

[0059] Progressive fill light can alleviate the glare problem caused by an overly bright screen to a certain extent. However, because the maximum fill light value in a possible implementation is also a preset fixed value, this fixed value is often set too high. As a result, when the electronic device increases the screen brightness to the maximum, the screen glare problem will still occur.

[0060] In view of this, an embodiment of the present application provides a screen unlocking method, which adjusts the screen brightness used for the current face unlock in a dark environment based on the result of the previous face unlock and the screen brightness of the previous face unlock. For example, if the screen brightness of the previous face unlock can successfully unlock the screen, the screen brightness used for the current unlock is reduced; if the screen brightness of the previous face unlock fails to unlock the screen, the screen brightness used for the current unlock is increased. However, in some scenarios, the electronic device may display different lock screen wallpapers during the previous and current face unlocks, and different lock screen wallpapers have different abilities to fill in the light for the user's face at the same screen brightness. After considering this factor, the lock screen wallpapers can be classified by grayscale and / or color scale, and at the same grayscale and / or color scale, the next screen brightness can be adjusted based on the result of the previous face unlock and the screen brightness. In this way, at any grayscale and / or color scale, the electronic device can learn the minimum or lower screen brightness corresponding to the grayscale and / or color scale that can achieve face unlocking through self-learning, thereby reducing the screen brightness during face unlocking in dark environments while ensuring the screen unlocking rate, reducing the problem scenarios of screen glare, and improving the user experience.

[0061] The following describes the conditions for entering the screen unlocking method provided by the embodiment of the present application in conjunction with FIG3. As shown in FIG3:

[0062] S301: The electronic device receives an operation to trigger the screen to light up.

[0063] The operation for triggering the screen to light up can be an operation for controlling the electronic device to switch from a screen-off state to a screen-on state. After the electronic device lights up the screen, the lock screen interface shown in FIG1A can be displayed. Alternatively, the operation for triggering the screen to light up can be an operation for controlling the electronic device to switch from a screen-off state to a screen-on state. After the electronic device lights up the screen, the lock screen interface shown in FIG1A can be displayed. The operation for triggering the screen to light up can also be other operations, which are not limited in the embodiments of the present application.

[0064] S302: The electronic device obtains the ambient light brightness.

[0065] S303: When the ambient light brightness is greater than or equal to the ambient light threshold, the electronic device may set the screen brightness to a first preset brightness.

[0066] The first preset brightness can be a system preset brightness in the current bright light environment. For example, the first preset brightness can be a brightness value set by the user by sliding a brightness bar on the control center interface, the first preset brightness can also be a brightness value set by the user by sliding a brightness bar on the settings interface, or the first preset brightness can also be a brightness value adaptively adjusted by the electronic device based on the ambient light brightness after the automatic brightness function is turned on.

[0067] It is understandable that in a bright light environment, the electronic device can collect clear facial information, the screen does not need to perform fill light operations on the user's face, the electronic device does not need to adjust the screen brightness, and the electronic device displays the screen with the first preset brightness.

[0068] Alternatively, in S304, when the ambient light brightness is less than the ambient light threshold, the electronic device may adjust the screen brightness from the second preset brightness to the first target brightness.

[0069] The second preset brightness can be the system preset brightness in the current dark 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 the first preset brightness, or it can be different from the first preset brightness. The first target brightness can be the brightness value of the electronic device for fill light to the face in a dark environment. In the embodiment of the present application, the first target brightness can be a brightness value obtained based on the correspondence between grayscale and / or color scale and fill light brightness. In the embodiment of the present application, the fill light brightness can be understood as the maximum screen brightness that can be displayed by the electronic device when using a certain lock screen wallpaper to fill light the face. The first target brightness can also be the default screen brightness. The embodiments of this application will later explain these two scenarios in detail, so we will not go into details here.

[0070] When the electronic device receives an operation to trigger the screen to turn on while the screen is off, the electronic device may display the lock screen interface shown in a of Figure 1A in response to the operation; the initial brightness of the lock screen interface may be a system preset brightness. The electronic device may then increase the screen brightness to provide fill light for the face; for example, the screen brightness may be adjusted from the second preset brightness to the first target brightness.

[0071] It is understandable that in a dark environment, the ambient light cannot illuminate the face, and the electronic device needs to fill the face with light through the screen brightness so that the electronic device can collect clearer facial information. When the conditions of step S304 are met, the electronic device can start the screen unlocking method provided in the embodiment of the present application. In a bright environment, after the screen brightness is increased to the first target brightness, the electronic device can also achieve face unlocking; but it will increase the computing pressure of the electronic device, and the first preset brightness may be greater than the first target brightness, and the first preset brightness may also be less than the first target brightness. When used in a bright environment, the screen brightness may suddenly become brighter or darker after being unlocked, which will affect the user experience. Therefore, the embodiment of the present application can be positioned in the scenario of face unlocking in a dark environment.

[0072] During the brightness adjustment process of step S303 or S304, the following steps are also included:

[0073] S305: The electronic device unlocks the screen based on the facial information.

[0074] 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 unlock the screen based on the facial information collected by the camera; in a dark light environment, the screen brightness can be used to illuminate the face, and the electronic device can unlock the screen based on the facial information collected by the camera.

[0075] In an embodiment of the present application, the electronic device can improve the success rate of face unlocking in a dark environment by adding fill light to the face. Among them, the electronic device can be set with a self-learning record table, which includes the correspondence between grayscale and / or color scale and fill light brightness. For example, taking grayscale as an example, Table 1 shows the correspondence between grayscale and fill light brightness in an embodiment of the present application, as shown in Table 1:

[0076] Table 1 Correspondence between grayscale and fill light brightness

[0077] When the electronic device displays the lock screen, it also displays the lock screen wallpaper. The electronic device can obtain the grayscale corresponding to the lock screen wallpaper and query the corresponding fill light brightness based on the grayscale. For example, if the grayscale of the lock screen wallpaper currently set by the electronic device is grayscale 2, the electronic device will adjust the lock screen interface to fill light brightness 2.

[0078] Among them, Grayscale 1 to Grayscale N can be specific grayscale values ​​or N grayscale intervals. For example, when Grayscale 1 to Grayscale N are N specific grayscale values, the electronic device can compare the grayscale of the current lock screen wallpaper with the N grayscale values ​​to obtain the closest grayscale value of the current lock screen wallpaper, and set the screen brightness to the fill light brightness corresponding to the grayscale value. For another example, when Grayscale 1 to Grayscale N are N grayscale intervals, the electronic device can obtain the fill light brightness corresponding to the grayscale interval according to the interval where the grayscale of the current lock screen wallpaper is located, and set the screen brightness to the fill light brightness corresponding to the grayscale interval. The embodiments of the present application are not limited to this.

[0079] In some embodiments, the electronic device may instantaneously increase the screen brightness to a first target brightness after determining that the current environment is a low-light environment. For example, if the electronic device determines that the ambient light brightness is less than an ambient light threshold, the electronic device may query the grayscale of the current lock screen wallpaper. For example, if the grayscale of the current lock screen wallpaper is grayscale 2, the electronic device may set the screen brightness to fill light brightness 2.

[0080] In other embodiments, the electronic device may use a progressive fill light method to gradually increase the brightness of the screen to the fill light brightness, so as to reduce eye discomfort caused by sudden changes in brightness.

[0081] For example, taking the grayscale of the lock screen wallpaper as grayscale 2 during face unlocking as an example, the process of the electronic device adjusting the screen brightness can be shown as the solid line in Figure 4.

[0082] When an operation that triggers the screen to light up is detected, the electronic device can start the face unlocking process and the process of increasing the screen brightness.

[0083] For example, during a face unlock attempt with 0 retry attempts: At time A, the electronic device captures facial information. This information is related to the screen brightness at that time. The electronic device attempts to match the facial information at time A with the preset facial information. If the match is successful, the electronic device unlocks the screen and does not increase the screen brightness. For example, at time B, face unlock is successful, and the screen brightness increases to the brightness value corresponding to time B.

[0084] In some scenarios, the brightness at moment A is low, and the electronic device may not be able to collect clear facial information, causing the electronic device to try face unlocking again.

[0085] During a face unlock retry, at time C, the electronic device captures facial information. This information is related to the screen brightness at that time, which is higher than the screen brightness at time A. The electronic device attempts to match the facial information at time C with the preset facial information. If the match is successful, the electronic device unlocks the screen and does not increase the screen brightness. For example, at time D, face unlock is successful, and the screen brightness increases to the brightness value corresponding to time D.

[0086] Alternatively, the brightness at moment C is still low and the electronic device still cannot collect clear facial information. The electronic device tries face unlocking again, for example, the retry2 face unlocking process is similar to the retry0 and retry1 processes and will not be repeated here.

[0087] The electronic device can gradually increase the screen brightness to fill light brightness 2 through the above-mentioned progressive fill light method to achieve fill light for the face and improve the success rate of face unlocking.

[0088] It is understandable that in the embodiment of the present application, two processes can be used to control the face unlock process and the screen brightness change process respectively. During the face retry process, when the face is unlocked during a retry process, the process controlling the face unlock will issue an instruction to stop the fill light and the screen brightness will no longer increase. The interaction between the two processes will cause a delay, resulting in a scenario such as face unlock starting at time A, face unlocking is successful at time G, but fill light is stopped based on the instruction at time B.

[0089] In the embodiment 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 grayscale and / or color scale. The electronic device can reduce the screen brightness by the fill light brightness in the self-learning record table to reduce the glare problem caused by the screen being too bright. For example, in Figure 4, the face unlock is successful after retry2. In the embodiment of the present application, since the fill light brightness is the maximum screen brightness that can be increased under the current grayscale and / or color scale, the electronic device no longer increases the brightness after reaching the fill light brightness. At moment F, the screen brightness of the electronic device in the embodiment 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 embodiment of the present application, at moment F, the screen brightness may be increased to brightness b due to the time delay. It can be seen that brightness a is less than brightness b. Therefore, in the embodiment of the present application, the screen brightness is smaller during face unlocking, thereby reducing the screen brightness and reducing the glare 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, the face unlocking process takes a long time; in the embodiment of the present application, the electronic device can obtain a corresponding fill light brightness based on the grayscale and / or color scale, so the electronic device can increase the brightness step to quickly increase the screen brightness to the fill light brightness corresponding to the current grayscale and / or color scale, 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 multiple lock screen wallpapers have the same grayscale, the unlocking rates obtained when the electronic device uses the same fill light brightness for face unlocking are different, as shown in Figure 5.

[0092] Figure 5 shows four different lock screen wallpapers. In the first lock screen wallpaper, the grayscale 136 area accounts for 100%, and the equivalent grayscale is 136. In the second lock screen wallpaper, the grayscale 0 area accounts for 40%, the grayscale 136 area accounts for 100%, and the grayscale 255 area accounts for 10%, and the equivalent grayscale is 136. In the third lock screen wallpaper, the grayscale 0 area accounts for 75%, and the grayscale 255 area accounts for 25%, and the equivalent grayscale is 136. In the fourth lock screen wallpaper, the grayscale 0 area accounts for 75%, and the grayscale 255 area accounts for 25%, and the equivalent grayscale is 136. The equivalent grayscale is calculated based on the pixel values ​​of all pixels in the lock screen wallpaper. The calculation method of the equivalent grayscale will be described later.

[0093] It can be seen that the equivalent grayscale of the four lock screen wallpapers is 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 wallpapers 1 to 4 for fill light are different.

[0094] This may be because when the lock screen wallpaper is uneven, the fill light effect in different positions is different. For example, the grayscale distribution in lock screen wallpaper 1 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 clearer facial information; while when the electronic device uses lock screen wallpaper 4 to fill light the face, the brightness of the eyes is higher and the brightness of the mouth is darker. The electronic device may not be able to extract the feature points of the mouth, resulting in face unlocking failure.

[0095] In order to further improve the success rate of face unlocking in low-light environments, the embodiment of the present application can mark the lock screen wallpaper by color scale. For example, lock screen wallpaper 1 to lock screen wallpaper 4 can correspond to 4 color scales, and a correspondence can be established with the fill light brightness by adding color scale to gray scale, further refining the correspondence of the fill light brightness and improving the accuracy of the fill light brightness.

[0096] For example, Table 2 shows the corresponding relationship between grayscale, color scale and fill light brightness in the embodiment of the present application, as shown in Table 2:

[0097] Table 2 Correspondence between grayscale, color scale and fill light brightness

[0098] When the electronic device displays the lock screen, it also displays the lock screen wallpaper. The electronic device can obtain the grayscale and color scale corresponding to the lock screen wallpaper and query the corresponding fill light brightness based on the grayscale and color scale. For example, if the lock screen wallpaper currently set by the electronic device has a color scale of color level 2 and a grayscale of gray level 2, the electronic device will adjust the lock screen interface to a fill light brightness of 2.

[0099] It is understandable that the fill light brightness is different in different color levels and the same gray level. The embodiment of the present application can distinguish multiple lock screen wallpapers in the same gray level by color level, thereby improving the accuracy of the fill light brightness.

[0100] Among them, color level 1 to color level N can be specific color level values ​​or N color level intervals. For example, when color level 1 to color level N are N specific color level values, the electronic device can compare the color level of the current lock screen wallpaper with the N color level values ​​to obtain the color level value closest to the current lock screen wallpaper. For another example, when color level 1 to color level N are N color level intervals, the electronic device can obtain the interval in which the color level is located based on the color level of the current lock screen wallpaper.

[0101] In some embodiments, the electronic device may directly increase the screen brightness to the fill light brightness after determining that the current environment is a dark environment.

[0102] In other embodiments, the electronic device can use a progressive fill light method to gradually increase the screen brightness to the fill light brightness to reduce eye discomfort caused by sudden brightness changes. This process can be described in the embodiment shown in Figure 4 and will not be repeated here.

[0103] In this way, electronic devices can distinguish lock screen wallpapers by color and grayscale, and thus learn the more accurate fill light brightness required for different lock screen wallpapers when unlocking the face, thereby effectively preventing the glare problem caused by excessive screen brightness.

[0104] The following describes the face unlocking process in the embodiment of the present application.

[0105] For example, when the ambient light brightness is less than the ambient light threshold, the electronic device performs the face unlocking process after fill light as shown in steps S601-S605:

[0106] S601: The electronic device displays a lock screen interface, and the brightness of the lock screen interface is a second preset brightness.

[0107] It can be understood that when the electronic device enters the lock screen interface from the screen-off state or enters the lock screen interface from the screen-off display state, the electronic device can display the screen with the system preset brightness. For example, in the current dark environment, the system preset brightness of the electronic device is the second preset brightness.

[0108] S602: The electronic device obtains a first target brightness based on the grayscale and / or color scale of the lock screen interface.

[0109] The grayscale mentioned in the embodiments of the present application 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. The color scale can be (R, G, B), where the R value, G value, and B value can all be represented by a value between 0 and 255.

[0110] Equivalent grayscale The following formula can be satisfied:

[0111] Among them, the color level of any pixel 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 pixels. 2.2 in this formula can also be other values.

[0112] After obtaining the color scale and / or gray scale, the electronic device can query the fill light brightness corresponding to the color scale and / or gray scale based on the self-learning record table; the first target brightness can be the fill light brightness corresponding to the color scale and / or gray scale.

[0113] For example, in some embodiments, the self-learning record table may be shown in Table 1; the electronic device may use grayscale to query the fill light brightness corresponding to the grayscale in Table 1. In other embodiments, the self-learning record table may be shown in Table 2; the electronic device may use color scale and grayscale to query the fill light brightness corresponding to the color scale and grayscale in Table 2. This embodiment of the present application will not be described in detail.

[0114] In the embodiment of the present application, the first target brightness may be the fill light brightness corresponding to the current color scale and / or gray scale obtained by querying the self-learning record table, or may be the default screen brightness. The embodiment of the present application does not impose any limitation on this.

[0115] S603: The electronic device increases the screen brightness to a first target brightness.

[0116] In this embodiment of the present application, the electronic device can control the screen brightness from the second preset brightness to the first target brightness. During the brightness increase process, the electronic device can continuously attempt face unlocking. This process can be described in the embodiment shown in Figure 4 and will not be repeated here.

[0117] Specifically, the process of adjusting the screen brightness of the electronic device to the first target brightness includes:

[0118] S604: The electronic device collects facial information and unlocks the device based on the facial information.

[0119] S605: When face unlocking is successful, the electronic device ends the fill light process.

[0120] Taking Figure 4 as an example, for example, when retrying face unlocking for 0 times, the electronic device increases the screen brightness to the screen brightness corresponding to time A - time B. After the unlock is successful, the electronic device ends the fill light process, gradually reduces the screen brightness corresponding to time B to the second preset brightness, and displays the unlocked interface.

[0121] Or, after S604, further including:

[0122] S606. If face unlocking fails, the electronic device attempts face unlocking again until face unlocking succeeds or the number of face unlocking attempts reaches a threshold.

[0123] Taking Figure 4 as an example, if face unlock fails after retry 0, the electronic device attempts face unlock after retry 1. During retry 0, the electronic device increases the screen brightness to the screen brightness corresponding to time C - time D. After successful unlocking, the electronic device ends the fill light process, reduces the screen brightness corresponding to time D to the second preset brightness, and displays the unlocked interface.

[0124] Similarly, the electronic device can stop increasing the screen brightness after the screen brightness reaches the first target brightness, and terminate face unlocking when the number of face unlock attempts reaches a threshold. For example, after multiple face unlock attempts fail, the electronic device can display a message indicating face unlock failure and remind the user to use other methods to unlock the device.

[0125] It should be noted that in the embodiments of this application, the face unlock process and the screen brightness increase process are performed simultaneously. After the face unlock is successful, the electronic device can stop increasing the screen brightness. If the face unlock fails, the electronic device will not process the screen brightness increase process until the number of face unlock attempts reaches the threshold. In some embodiments, before the number of face unlock attempts reaches the threshold, the screen brightness can be increased to the first target brightness.

[0126] In this way, the electronic device can fill in the light of 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 when the face is unlocked can be reduced.

[0127] In an embodiment of the present application, the electronic device can learn the fill light brightness for the next scene with the same color scale and / or gray scale based on the result of the previous face unlock. Taking the correspondence between color scale, gray scale and fill light brightness recorded in the self-learning record table as an example, the use and update process of the self-learning record table will be described in conjunction with Figure 7. As shown in Figure 7:

[0128] After step S601, the following steps are included:

[0129] S701. The electronic device obtains the grayscale and color scale of the current lock screen wallpaper.

[0130] S702: The electronic device queries the self-learning record table to see whether the fill light brightness corresponding to the current grayscale and color scale is included.

[0131] In an embodiment of the present application, an electronic device may use a fixed lock screen wallpaper for a period of time. The electronic device may use the color scale and gray scale of the lock screen wallpaper to learn the corresponding fill light brightness. Subsequently, when the electronic device displays the lock screen wallpaper again or displays a lock screen wallpaper with the same color scale and gray scale, the electronic device may search the self-learning record table for the corresponding fill light brightness. The electronic device may then execute step S703.

[0132] Alternatively, the electronic device may have a new lock screen wallpaper, and the electronic device may not find the corresponding fill light brightness in the self-learning record table. The electronic device is also provided with a default list, which includes the default screen brightness corresponding to any color scale and / or gray scale; the electronic device may execute step S704 to establish and learn the corresponding relationship between the color scale, gray scale, and fill light brightness of the new lock screen wallpaper based on the default screen brightness as the initial fill light brightness.

[0133] S703: When the self-learning record table includes the fill light brightness corresponding to the current grayscale and color scale, the electronic device increases the screen brightness based on the fill light brightness.

[0134] The first target brightness includes the fill light brightness corresponding to the current grayscale and color scale. The electronic device performs the face unlocking process while the screen brightness gradually increases from the second preset brightness to the first target brightness.

[0135] In the process of increasing the screen brightness, the electronic device can periodically collect facial information. The embodiment of the present application can adjust the screen brightness at the same frequency, so that the screen brightness corresponding to each face unlocking retry process is improved.

[0136] For example, an electronic device may collect facial information and perform face unlocking every 75ms. The electronic device may issue a screen brightness adjustment instruction every 75ms, and the screen brightness adjustment instruction may include the screen brightness to be increased. The screen brightness to be increased is related to a first target brightness and a second preset brightness.

[0137] Specifically, the electronic device has a preset face unlock attempt threshold. Before the face unlock attempt threshold is reached, the electronic device may increase the screen brightness from a second preset brightness to a first target brightness in a brightness step size. The step size may be greater than or equal to the ratio of the brightness difference between the second preset brightness and the first target brightness and the number of attempts threshold.

[0138] Alternatively, in S704, when the self-learning record table does not include the fill light brightness corresponding to the current grayscale and color scale, the electronic device increases the screen brightness based on the default screen brightness.

[0139] The first target brightness includes the default screen brightness, which can be the initial fill light brightness corresponding to the color scale and gray scale of the new lock screen wallpaper. In an embodiment of the present application, a default list is provided in the electronic device, and the default list includes the correspondence between each color scale, gray scale 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, wherein 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 is the maximum screen brightness that can be reached when the lock screen wallpaper is used 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 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.

[0140] The default screen brightness may be a fill light brightness calculated based on a preset grayscale, a preset color scale, and / or a preset screen brightness. For example, the default screen brightness may satisfy the following formula:

[0141] or:

[0142] The electronic device can perform a face unlocking process while the screen brightness gradually increases from the second preset brightness to the first target brightness.

[0143] In step S704, the process of increasing the screen brightness can refer to the relevant description in step S703 and will not be repeated here.

[0144] 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:

[0145] S705. The electronic device starts face unlocking.

[0146] S706. When face unlocking is successful, the electronic device updates the correspondence between the current color scale and gray scale and the second target brightness in the self-learning record table; the second target brightness is less than the first target brightness.

[0147] The second target brightness may be the fill light brightness corresponding to the updated current color and grayscale. For example, before the update, the fill light brightness corresponding to the current color and grayscale in the self-learning record table is the first target brightness. After the update, the fill light brightness corresponding to the current color and grayscale in the self-learning record table is the second target brightness.

[0148] It is understandable that if the electronic device is able to achieve face unlocking during the process of increasing the screen brightness from the second preset brightness to the first target brightness, it can be said that the first target brightness is greater than the accurate fill light brightness corresponding to the current color scale and gray scale. After the electronic device receives feedback that the face unlock is successful, it can reduce the fill light brightness corresponding to the current color scale and gray scale in the self-learning record table, for example, reducing the fill light brightness 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.

[0149] In an embodiment 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 that face unlocking is successful, the preset value can be reduced based on the first target brightness to obtain the second target brightness. The preset value can be a fixed value, or the preset value can be a learning gradient. The learning gradient can be a value that decreases with the number of updates to the fill light brightness corresponding to the current color scale and gray scale. For example, as the number of updates to the current color scale and gray scale in the self-learning record table increases, the difference between the target brightness before and after the update can gradually decrease. This embodiment of the present application does not impose any restrictions on this.

[0150] Alternatively, after step S704, the method further includes:

[0151] S707. When face unlocking fails, the electronic device obtains the reason for the face unlocking failure.

[0152] In real-world scenarios, face unlocking failures may occur in electronic devices due to factors such as low light conditions, overexposure, insufficient lighting, off-target effects, and backlighting. In this embodiment, the reason for the face unlock failure can be indicated by the value of "failed reason." When "failed reason" indicates that face unlocking failed due to low light conditions, the electronic device can use the screen unlocking method provided in this embodiment to fill in the light on the face, thereby improving the face unlocking rate.

[0153] In some embodiments, there may be scenarios where face unlock is falsely triggered, where the user unintentionally triggers face unlock. To reduce the impact of these scenarios on the accuracy of the self-learning record table, embodiments of the present application can obtain information about whether the user intends to use face unlock. For example, if the electronic device receives a message from the user using a screen unlock method other than face unlock within a preset time after face unlock fails, the data indicating this face unlock failure can be considered accurate, and the electronic device can use the data from this face unlock to learn from the self-learning record table. Otherwise, it can be considered that this was a face unlock process falsely triggered by the user, and the electronic device will not learn this data. The preset time can be, for example, 10 seconds.

[0154] Specifically, the value of "failed reason" may include a first value, a second value, and a third value. The first value may be used to indicate that the reason for the face unlock failure was a low-light environment and the screen was unlocked within a preset time. The second value may be used to indicate that the reason for the face unlock failure was a low-light environment and the screen was not unlocked within a preset time. The third value may be used to indicate that the reason for the face unlock failure was not a low-light environment. For example, the first value may be 0, the second value may be 1, and the third value may be 2. In the embodiment of the present application, the first value-third value may also be other forms or other values, and the embodiment of the present application is not limited to this.

[0155] In a case where the value of failed reason is the first value, the electronic device may execute step S709; otherwise, the electronic device terminates the fill light process.

[0156] It should be noted that the face unlocking process shown in steps S604-S606 can be understood as a process of multiple retry in a single face unlocking process. The face unlocking process shown in steps S706 and S707 is the final result of multiple face unlocking retry. The face unlocking process in step S706 can correspond to the process of the electronic device going from screen off to face unlocking the screen successfully in a single attempt. The face unlocking process in step S707 can correspond to the process of the electronic device going from screen off to face unlocking the screen failing after the number of retry times reaches the threshold. This is explained in the embodiments of the present application.

[0157] S708. In a scenario where the face unlocking fails due to a dark environment and the screen has been unlocked within a preset time, the electronic device updates the correspondence between the color scale and gray scale and the third target brightness in the self-learning record table; the third target brightness is greater than the first target brightness.

[0158] It is understandable that if the electronic device fails to perform face unlocking during the process of increasing the screen brightness from the second preset brightness to the first target brightness, it may indicate that the first target brightness is less than the accurate fill light brightness corresponding to the current color scale and gray scale. After the electronic device receives feedback that face unlocking failed at the first target brightness, it may increase the fill light brightness corresponding to the current color scale and gray scale in the self-learning record table, for example, by increasing 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 may adjust the screen brightness based on the third target brightness.

[0159] In this embodiment 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 that face unlocking has failed, the preset value can be increased based on the first target brightness to obtain a third target brightness. The preset value can be a fixed value or a learning gradient, which is not limited in this embodiment of the present application.

[0160] In this way, the electronic device can adjust the correspondence in the self-learning record table according to the results of multiple face unlocking, improve the accuracy of the correspondence between color scale, gray scale and fill light brightness, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the screen being too bright.

[0161] In one possible implementation, the self-learning record table may include information on multiple color levels and gray levels. The information on any color level and gray level includes the color level, gray level, default screen brightness, fill light brightness after learning, learning gradient, and whether to terminate learning. For example, the self-learning record table may be in the form of an array, array [N] = {{RGB_L1, gray level 1, default screen brightness 1, fill light brightness 1 after learning, whether to terminate learning, learning gradient 1}, {RGB_L2, gray level 2, default screen brightness 2, fill light brightness 2 after learning, whether to terminate learning, learning gradient 2}...{RGB_LN, gray level N, default screen brightness N, fill light brightness N after learning, whether to terminate learning, learning gradient N}}.

[0162] Among them, the color scale can be used to distinguish different lock screen wallpapers of the same gray scale; the fill light brightness after learning can be understood as the fill light brightness used when the face is unlocked next time, and the fill light brightness after learning 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 a new lock screen wallpaper is displayed and the fill light brightness after learning is not included in the self-learning record table; the learning gradient can be used to specify the difference between two adjacent fill light brightnesses at 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.

[0163] It can be understood that in an embodiment of the present application, the electronic device may 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 level and / or gray level in the default list, but some of the color levels and / or gray levels in the array correspond to the learned fill light brightness, and the electronic device has not yet learned the fill light brightness corresponding to another part of the color levels and / or gray levels. In this case, the learned fill light brightness corresponding to the other part of the color levels and / or gray levels in the array can be 0 or an empty value.

[0164] In an embodiment of the present application, the electronic device may 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, grayscale 1, fill light brightness 1 after learning, whether to terminate learning, learning gradient 1}, {RGB_L2, grayscale 2, fill light brightness 2 after learning, whether to terminate learning, learning gradient 2}...{RGB_LN, grayscale N, fill light brightness N after learning, whether to terminate learning, learning gradient N}}. The second array stores the default list, and the second array [N] = {{RGB_L1, grayscale 1, default screen brightness 1}, {RGB_L2, grayscale 2, default screen brightness 2}...{RGB_LN, grayscale N, default screen brightness N}}. The embodiment of the present application does not limit the storage form of the default list and the self-learning record table.

[0165] In an embodiment of the present application, the learning gradient decreases with the number of learning times. For example, the initial learning gradient is x. After learning the fill light brightness after learning for the first time, the fill light brightness corresponding to the current color level and gray level can be learned again. For example, during the second learning process, the corresponding relationship between the current color level, gray level, and fill light brightness in the self-learning record table is updated, and the fill light brightness before the update differs from the fill light brightness after the update by x; during the third learning process, the corresponding relationship between the current color level, gray level, and fill light brightness in the self-learning record table is updated, and the fill light brightness before the update differs from the fill light brightness after the update by x-1. When the learning gradient is less than the preset learning gradient, the learning is terminated. For example, the preset learning gradient is 1.

[0166] For example, taking x as 5 and the initial fill light brightness as 300nit, in a dark environment, during the first face unlocking, the electronic device uses a fill light brightness of 300nit for face unlocking, and the unlocking is unsuccessful. The electronic device can update the learned fill light brightness corresponding to the color scale and / or gray scale of the current lock screen wallpaper to 305nit.

[0167] During the second face unlocking, the electronic device can use a fill light brightness of 305nit for face unlocking, and if the unlocking is successful, the electronic device can update the learned fill light brightness corresponding to the color scale and / or gray scale of the current lock screen wallpaper to 301nit.

[0168] During the third face unlocking, the electronic device may use a fill light brightness of 301 nit for face unlocking, and if the unlocking is unsuccessful, the electronic device may update the learned fill light brightness corresponding to the color scale and / or gray scale of the current lock screen wallpaper to 304 nit.

[0169] During the fourth face unlocking, the electronic device can use a fill light brightness of 304 nit for face unlocking, and if the unlocking is successful, the electronic device can update the learned fill light brightness corresponding to the color scale and / or gray scale of the current lock screen wallpaper to 302 nit.

[0170] During the fifth face unlock attempt, the electronic device may use a fill light brightness of 302 nits. If unlocking is unsuccessful, the electronic device may update the learned fill light brightness corresponding to the color scale and / or grayscale of the current lock screen wallpaper to 303 nits. If the difference between the two fill light brightness values ​​is less than 1, the electronic device stops training and uses a fill light brightness of 303 nits for the sixth and subsequent face unlock attempts.

[0171] The following describes the internal interaction process of the electronic device in the embodiment of the present application with reference to FIG8 , as shown in FIG8 :

[0172] 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.

[0173] Among them, the application layer may include face applications and lock screen applications (keyguard); the lock screen application can be used to handle lock screen interface related services, unlock the screen (fingerprint unlocking, pattern unlocking, PIN unlocking, etc.), lock screen notification display, quick launch camera application, speed dialing, display date / time, etc.; the face application can be used to handle face-related services, such as face unlocking, face recognition and face detection.

[0174] The application framework layer may include a brightness management module, which is used to manage screen brightness. For example, the brightness management module may include a fill light control module and a learning engine. The fill light control module may be used to obtain and issue a first target brightness. The learning engine may be used to query and learn the correspondence between color scales, grayscales, and fill light brightness. The learning engine may include a learning module and an array; the array may store a self-learning record table and a default list. The learning module may be used to update the correspondence between color scales, grayscales, and fill light brightness based on the results of face unlocking.

[0175] The hardware abstraction layer may include a face recognition module and a backlight control module. The face recognition module may be used to match face information with preset face information to identify the face. The backlight control module may be used to adjust the current screen brightness according to the first target brightness.

[0176] The kernel layer may include: a camera driver and a display driver, wherein 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.

[0177] Exemplarily, the process may include:

[0178] S801: The lock screen application receives an operation to trigger the screen to light up.

[0179] S802: The lock screen application starts the face recognition application.

[0180] S803: The lock screen application sends the color scale and gray scale of the lock screen wallpaper to the fill light control module.

[0181] The lock screen application can obtain the color and grayscale of the current lock screen wallpaper and call the update wall paper grayscale function to send the color and grayscale.

[0182] S804: When the ambient light brightness is less than the ambient light threshold, the face application instructs the fill light control module to start fill light.

[0183] In some embodiments, after the face recognition application is launched, it can obtain the ambient light brightness uploaded by the ambient light sensor. The face recognition 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 recognition application can instruct the screen brightness to be used to fill in the light for the face.

[0184] The face recognition application may send an instruction to the fill light control module to instruct it to turn on the fill light; for example, the instruction to instruct it to turn on the fill light may be get Face Max Brightness do Lighter.

[0185] In an embodiment 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 fill light control module is located can execute the process of adjusting the screen brightness; the two processes can execute their respective corresponding processes at the same time.

[0186] The following first describes the process of adjusting the fill light. As shown in FIG8 , after step S804, the following steps are included:

[0187] S805. The fill light control module queries the learning engine for an array based on the color scale and gray scale.

[0188] The fill light control module can issue a command to query fill light brightness. For example, the command can be "get Brightness After Map." Upon receiving the command, the learning engine can parse it to obtain the color and grayscale of the current lock screen wallpaper. Based on the color and grayscale, the learning engine searches the self-learning record table in the array for the corresponding fill light brightness.

[0189] S806. When the self-learning record table includes the fill light brightness corresponding to the current color scale and gray scale, 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 fill light brightness corresponding to the current color scale and gray scale.

[0190] The instruction for adjusting the screen brightness may include the screen brightness to be adjusted. For example, the instruction for adjusting the screen brightness may be set Display Brightness.

[0191] For this step, refer to the relevant description in step S703. The frequency at which the fill light control module issues instructions for adjusting the screen brightness can be the same as the frequency at which the face recognition application executes retry. For example, the fill light control module instructs the backlight control module to adjust the screen brightness once every 75ms. The difference in screen brightness between two consecutive times can be the ratio of the difference between the fill light brightness corresponding to the color scale and grayscale and the system preset brightness to the number threshold.

[0192] S807: The backlight control module adjusts the screen brightness according to the instruction for adjusting the screen brightness.

[0193] In some embodiments, the backlight control module can interact with a display driver to set the brightness of the display panel through the display driver. For example, the backlight control module sends a command to the display driver to set the brightness of the display panel (set panel brightness); the display driver writes the screen brightness to be adjusted into a register, thereby controlling the display screen to achieve the screen brightness to be adjusted.

[0194] Optionally, after step S805, the following steps may be further included:

[0195] S808: When the self-learning record table does not include the fill light brightness corresponding to the current color scale and gray scale, 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.

[0196] This step may refer to step S806. The fill light control module instructs the backlight control module to adjust the screen brightness every 75ms. The difference between two adjacent screen brightnesses may be the ratio of the difference between the default screen brightness and the system preset brightness to the number threshold.

[0197] Subsequently, the electronic device may execute step S807, which is not limited in this embodiment of the present application.

[0198] S809: The face application instructs the face recognition module to start face recognition.

[0199] S810: The face recognition module obtains face information reported by the camera driver.

[0200] In some embodiments, the face recognition module may 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.

[0201] S811. The face recognition module matches the face information with the preset face information.

[0202] 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, the current face information is confirmed to be the preset face information. The embodiment of the present application can also use other methods to verify the face information, and the embodiment of the present application does not specifically limit this.

[0203] S812. The face recognition module reports the face recognition result to the face application.

[0204] The face recognition result can be used to indicate whether face unlock was successful or failed. For example, if face unlock is successful, the face recognition result may include an instruction indicating the unlock was successful and the maximum fill light brightness at the time of successful unlock. The instruction indicating the unlock was successful may, for example, be the fourth value of "is Success"; the maximum fill light brightness at the time of successful unlock may, for example, be max brightness.

[0205] If face unlock fails, the face recognition result may include an instruction indicating unlock failure and the reason for face unlock failure. The instruction indicating unlock success may be, for example, the value of "is Success" with the fifth value; the value of the reason for face unlock failure may be the first value, the second value, or the third value.

[0206] S813. The face application transmits the face recognition result to the lock screen application.

[0207] The lock screen app can perform the screen unlock process based on the facial recognition results. For example, if the facial recognition results include an instruction indicating a successful unlock, the lock screen app will unlock the screen. If the facial recognition results include an instruction indicating an unlock failure, the lock screen app may notify the user that the face unlock failed, and the user can try face unlock again or change the unlock method.

[0208] S814. The face application sends the face recognition result to the learning engine.

[0209] S815. The learning engine updates the self-learning record table according to the face recognition result.

[0210] When the face recognition result indicates that the face unlocking is successful, the electronic device can reduce the fill light brightness corresponding to the current color level and gray level. For details, please refer to the relevant description in step S707, which will not be repeated here.

[0211] When the face recognition result indicates that face unlocking has failed, the electronic device may increase the fill light brightness corresponding to the current color level and gray level. For details, please refer to the relevant description in step S710, which will not be repeated here.

[0212] It should be noted that the embodiments shown in Figures 7 and 8 use the correspondence between color scale, gray scale, and fill light brightness in the self-learning record table as an example to illustrate the screen unlocking method of the present embodiment. The present embodiment can also use the correspondence between gray scale and fill light brightness alone to implement the self-learning process, such as shown in Table 4. The present embodiment does not limit this.

[0213] Based on the above embodiment, the present invention provides a method for unlocking a screen. Exemplarily, the method may include the following steps:

[0214] S901. In the screen-off state, in response to the first operation of triggering the screen-on, a first lock screen interface is displayed, and the brightness of the first lock screen interface changes from a first brightness to a second brightness.

[0215] The screen-off state may include the AOD state. For example, the screen-off state may correspond to the interface shown in a in FIG. 1B , and the screen-off state may also correspond to the interface shown in c in FIG. 1B . The operation of triggering the screen to light up may 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 light up may be a trigger operation for the power button in the interface shown in a in FIG. 1B ; the operation of triggering the screen to light up may be a trigger operation for the power button in the interface shown in c in FIG. 1B ; in the embodiment of the present application, the operation of triggering the screen to light up may also be other operations, for example, when a notification message is received, the screen is switched from the screen-off state to the screen-on state, etc. The embodiment of the present application does not impose any limitation on this.

[0216] The first lock screen interface can be, for example, the interface shown in a of Figure 1A. The first brightness can be the system preset brightness for turning on the screen; the second brightness can correspond to the first target brightness. For example, the second brightness can be the fill light brightness found in the self-learning record table based on the color scale and / or grayscale of the lock screen wallpaper of the first lock screen interface. The second brightness can also be the default screen brightness found in the default list based on the color scale and / or grayscale of the lock screen wallpaper of the first lock screen interface.

[0217] In an embodiment of the present application, when an electronic device receives an operation to trigger the screen to light up, the electronic device can increase the screen brightness to provide fill light for the user's face, thereby enabling face unlocking in a low-light environment. Specifically, after the screen is turned on, the electronic device displays a first lock screen interface, the initial brightness of which is a system-preset brightness, for example, the initial brightness is the first brightness. The electronic device can then increase the screen brightness to a second brightness.

[0218] It can be understood that the second brightness can be understood as the maximum screen brightness that can be achieved during the fill light process; in 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.

[0219] S902. When the lock is successfully unlocked based on the first unlock information, an unlock interface is displayed; the first unlock 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 a first brightness to a second brightness.

[0220] The first unlocking information may be, for example, facial information, gesture information, etc. collected by the camera after the screen is first triggered. The unlocking interface may be, for example, the interface shown in c in FIG. 1A .

[0221] As the brightness of the first lock screen changes from a first brightness to a second brightness, the electronic device's camera can capture the first unlock information and perform face unlock based on the first unlock information. When the first lock screen wallpaper at the second brightness is able to illuminate the user's face, the electronic device can capture clearer facial information and perform face unlock.

[0222] S903. In the screen-off state, in response to the second screen-on triggering operation, the first lock screen interface is displayed, 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.

[0223] The third brightness may be, for example, the second target brightness. For example, the third brightness may be the fill light brightness corresponding to the color scale and / or gray scale of the lock screen wallpaper of the updated first lock screen interface.

[0224] Between steps S902 and S903, the electronic device may perform a screen-off operation. For example, after step S902, while the unlock interface is displayed, an operation is received to trigger screen-off; in response to the screen-off operation, the electronic device turns off the screen; while the screen is off, an operation is received to trigger screen-on; and step S903 is executed. For another example, after step S902, while the unlock interface is displayed and the screen-off time has expired, the electronic device turns off the screen; while the screen is off, an operation is received to trigger screen-on; and step S903 is executed.

[0225] When the screen is off, the electronic device may receive a second trigger to turn the screen on. Because the electronic device was previously successfully unlocked based on the face, 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.

[0226] The third brightness is lower than the second brightness, and face unlocking can be achieved at the second brightness. Therefore, 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 be referred to the description related to step S706 in the embodiment shown in Figure 7, and will not be repeated in this embodiment of the application.

[0227] In an embodiment of the present application, when face unlocking is successful or the number of face unlocking attempts reaches a 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.

[0228] In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0229] Optionally, it also includes: if the brightness of the first lock screen interface changes from the first brightness to the third brightness and the unlocking is not successfully performed based on the second unlocking information, then in the screen-off state, in response to the operation of triggering the screen to light up 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 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.

[0230] The second unlock information can be the face information, gesture information, etc. collected by the camera after the screen is triggered for the second time. The second unlock information is different from the first unlock information. It is understandable that for the same user, the user's face information captured by the electronic device during the two face unlocking processes will also be different. The unlock interface can be, for example, the interface shown in c in Figure 1A. The fourth brightness can be the third target brightness.

[0231] It should be noted that if the unlocking process fails, the electronic device can learn and update the correspondence between the current color scale and / or gray scale and the fill light brightness based on the unlocking result. Because the electronic device successfully unlocked based on the face, the third brightness in the self-learning record table was updated to the fourth brightness. Therefore, the electronic device changes from the first brightness to the fourth brightness during the fill light process.

[0232] If the fourth brightness is greater than the third brightness, it can be understood that the third brightness cannot achieve face unlock, so the third brightness needs to be increased to the fourth brightness to ensure that the current brightness can achieve face unlock. If the second brightness is greater than the fourth brightness, it can be understood that although the electronic device will appropriately increase the fill light brightness value, it will not increase the fill light brightness to a value greater than the fill light brightness before learning; thus, as the number of learning times increases, the fill light brightness gradually converges to an intermediate value (for example, 303 nit in the above embodiment).

[0233] The above steps can refer to the description related to steps S707-S708 in the embodiment shown in Figure 7, and this embodiment of the application will not go into details.

[0234] In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0235] Optionally, before the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, it also includes: displaying the unlocking interface within a preset time period after unsuccessful unlocking based on the second unlocking information and when successfully unlocked based on the third unlocking information; the third unlocking information includes password information and / or fingerprint information.

[0236] The preset time length can be, for example, 10s. It is understandable that the failure of face unlocking may be caused by a variety of reasons, for example, the user mistakenly triggers the unlocking process. At this time, it can be determined that the current face unlocking failure is not caused by a user's mistake through the conditions of unlocking the electronic device based on other methods within the preset time length.

[0237] This step can refer to the description related to step S708 in the embodiment shown in Figure 7, and will not be described in detail in this embodiment of the present application.

[0238] In this way, scenarios where face unlocking fails due to user mis-triggering can be identified, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.

[0239] Optionally, it also includes: if the brightness of the first lock screen interface changes from the first brightness to the fourth brightness and is successfully unlocked based on the fourth unlock information, then in the screen-off state, in response to the fourth triggering of the screen-on operation, 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 unlock 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.

[0240] In an embodiment of the present application, when the self-learning record table has learned to a certain extent, the electronic device may 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.

[0241] In this step, the electronic device learns that the fill light brightness corresponding to the color scale and / or gray scale 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 scale and / or gray scale of the lock screen wallpaper of the first lock screen interface. Therefore, when the fourth triggering operation to light up the screen is received, 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.

[0242] In this way, after multiple learnings, the electronic device can learn the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0243] 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, and also includes: in the screen off state, in response to the fifth operation of triggering the screen to light up, 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.

[0244] 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 can be specifically reflected in that the color scale and / or gray scale of the second lock screen wallpaper is different from the color scale and / or gray scale of the first lock screen wallpaper.

[0245] It is understandable that during the fourth screen-lighting triggering process, 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, the fill light brightness is no longer applicable, and the electronic device can relearn the fill light brightness of the new lock screen wallpaper. For example, if 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 from the first brightness to the fifth brightness during the face unlocking process.

[0246] In the embodiment shown in Figure 5, different color levels may affect the success rate of face unlocking. Therefore, in the embodiment of the present application, the effect of improving the face unlocking rate is achieved by refining the relationship between color levels, grayscales and fill light brightness.

[0247] In this way, the electronic device can learn the fill light brightness corresponding to different lock screen wallpapers, and fill light the lock screen wallpaper based on the fill light brightness, thereby improving the unlock rate under each lock screen wallpaper.

[0248] Optionally, it also includes: in the screen-off state, in response to the sixth triggering of the screen-on operation, displaying a second lock screen interface, and the brightness of the second lock screen interface is the first brightness; the ambient light brightness when the screen is triggered to turn on for the sixth time is greater than the ambient light threshold.

[0249] The ambient light threshold can be a threshold that distinguishes between low-light and bright-light environments. For example, the ambient light threshold can be a value between 0-2.5 lux, for example, 1 lux. When the ambient light brightness is greater than the ambient light threshold, it can be determined that the current environment is bright, and the electronic device can avoid using screen brightness to fill in the light for the face. Therefore, in a bright light environment, after the sixth triggering of the screen light, the brightness of the second lock screen interface will not change and will remain at the first brightness.

[0250] In this way, the electronic device can learn the correspondence between color levels and / or gray levels and fill light brightness in a dark environment, and not learn the correspondence between color levels and / or gray levels and fill light brightness in a bright environment, 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 environment.

[0251] Optionally, the electronic device includes a first array, in which the correspondence between color levels and / or gray levels and target screen brightness is recorded; 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 levels and / or gray levels of the first lock screen wallpaper; when the ambient light brightness is less than the ambient light threshold, searching for the color levels and / or gray levels 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: when the color levels and / or gray levels of the first lock screen wallpaper are included in the first array, 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 levels and / or gray levels of the first lock screen wallpaper in the first array.

[0252] The first array records a self-learning record table, which includes a correspondence between color scales and / or gray scales and fill light brightness. The target screen brightness may correspond to the fill light brightness corresponding to the color scales and / or gray scales in the embodiment of the present application. The first array may store both the self-learning record table and a default list, or may only store the self-learning record table, which is not limited in the embodiment of the present application.

[0253] The process can be referred to the relevant descriptions in the embodiments shown in FIG3 , FIG6 and FIG7 , and will not be described again here.

[0254] In this way, in a dark environment, before the electronic device uses face unlocking, it can obtain a more 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.

[0255] Optionally, the brightness of the first lock screen interface changes from the first brightness to the second brightness, and also includes: the brightness of the first lock screen interface changes from the first brightness to the second brightness instantaneously; or, the brightness of the first lock screen interface changes gradually from the first brightness to the second brightness based on the brightness step.

[0256] The term "instantaneous" may be understood as a relatively short time period, such as a few milliseconds from the first brightness to the second brightness. The gradual change from the first brightness to the second brightness may be understood as the screen brightness being increased every 75 ms as described in the above embodiment.

[0257] In this way, electronic devices can fill in the light of the face in a variety of ways. Among them, when the electronic device adopts the progressive fill-in 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.

[0258] Optionally, after successfully unlocking based on the first unlock information, it also includes: in the first array, updating 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.

[0259] After the screen is turned on for the first time, face unlock is successful. After receiving feedback that face unlock is successful, the electronic device can adjust the self-learning record table according to the face unlock result. This process can be referred to the relevant description of the embodiment shown in Figure 6 or Figure 7, and will not be repeated here.

[0260] In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0261] Optionally, after unsuccessful unlocking based on the second unlocking information, it also includes: in the first array, updating 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.

[0262] After the screen is turned on for the first time, face unlock is successful. After receiving feedback that face unlock failed, the electronic device can adjust the self-learning record table according to the face unlock result. This process can be referred to the relevant description of the embodiment shown in Figure 6 or Figure 7, and will not be repeated here.

[0263] In this way, the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0264] Optionally, the correspondence between the color scale and gray scale of the first lock screen wallpaper and the fourth brightness is updated in the first array, including: when the first information is obtained, the correspondence between the color scale and / or gray scale of the first lock screen wallpaper and the fourth brightness is updated in the first array; the first information is used to characterize the unlocking failure caused by dark facial brightness, and the screen is unlocked by the third unlocking information within the preset time.

[0265] The first information may be that the failed reason in the above embodiment is the first value.

[0266] In this way, scenarios where face unlocking fails due to user mis-triggering and scenarios where face unlocking fails due to non-fill light scenarios can be eliminated, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.

[0267] Optionally, when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the first time, the difference in target screen brightness before and after the update is x; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the i-th time (i is a positive integer greater than 1), the difference in target screen brightness before and after the update is x-i+1; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the j-th time (j is a positive integer greater than i), if the difference in 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.

[0268] This process may correspond to the description of the array portion in the above embodiment. The i-th update may correspond to the second to fourth face unlocks, and the j-th update may correspond to the fifth face unlock.

[0269] In this way, the electronic device can converge the fill light brightness to a value suitable for face unlocking with the current lock screen wallpaper through a learning gradient that decreases with the number of updates, thereby effectively reducing the glare problem caused by excessive screen brightness.

[0270] In order to better understand the embodiment of the present application, the structure of the electronic device 100 according to the embodiment of the present application is introduced below:

[0271] 9 shows a schematic structural diagram of an electronic device 100. 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identification module (SIM) card interface 195, and an embedded secure element (eSE) 196. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air 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.

[0272] It should be understood that the structures illustrated in the embodiments of the present application do 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0273] 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 can be independent devices or integrated into one or more processors. In the embodiment of the present application, the processor 110 can be used for the steps related to information processing in the screen unlocking method provided in the embodiment of the present application.

[0274] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The display screen 194 is used to display images, videos, etc. In the embodiment of the present application, the display screen 194 can be used to display a first lock screen interface, a second lock screen interface, and an unlock screen, etc.

[0275] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor. Among them, the camera 193 is used to capture still images or videos. In the embodiment of the present application, the electronic device can use the camera to collect facial information to implement the face unlocking process.

[0276] The internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may 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 instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor. In an embodiment of the present application, the electronic device may use the internal memory 121 to store a self-learning record table and a default list.

[0277] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. 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 touches. In an embodiment of the present application, the electronic device can detect whether the current environment is a dark environment based on the ambient light brightness, and in a dark environment, execute the screen unlocking process provided in the embodiment of the present application.

[0278] The screen unlocking method according to the embodiment of the present application has been described above. The following describes the device for performing the above screen unlocking method provided by the embodiment of the present application. It will be understood by those skilled in the art that the method and device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can perform the steps in the above screen unlocking method.

[0279] As shown in Figure 10, a screen unlocking device 1100 can be used in a communication device, circuit, hardware component, or chip. The screen unlocking device includes a display unit 1101 and a processing unit 1102. The display unit 1101 is used to support the display step performed by the screen unlocking device 1100; the processing unit 1102 is used to support the information processing step performed by the screen unlocking device 1100.

[0280] 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 screen unlocking device 1100 in performing the steps of sending and receiving data. The communication unit 1103 may be an input or output interface, pin, or circuit.

[0281] 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 via a circuit. The storage unit 1104 may include one or more memories, which may be devices in one or more devices or circuits used to store programs or data. The storage unit 1104 may exist independently and be connected to the processing unit 1102 of the screen unlocking device via a communication line. The storage unit 1104 may also be integrated with the processing unit 1102.

[0282] The storage unit 1104 can store computer-executable instructions for the method in the electronic device, so that the processing unit 1102 executes the method in the above embodiment. The storage unit 1104 can be a register, a cache, or a RAM, etc. The storage unit 1104 can be integrated with the processing unit 1102. The storage unit 1104 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions. The storage unit 1104 can be independent of the processing unit 1102.

[0283] The screen unlocking method provided in the embodiment of the present application can be applied to electronic devices with communication functions. The electronic device includes an electronic device. The specific device form of the electronic device can refer to the above related description and will not be repeated here.

[0284] An embodiment of the present application provides 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 performs the above method.

[0285] The present embodiment provides a chip system comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a circuit, and the at least one processor is configured to execute a computer program or instruction to perform the above-described method. The implementation principles and technical effects thereof are similar to those of the above-described related embodiments and are not further described here.

[0286] The embodiments of the present application also provide 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-mentioned 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. Computer-readable media can include computer storage media and communication media, 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 that can be accessed by a computer.

[0287] In one possible implementation, computer-readable media may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium designed to carry or store the desired program code in the form of instructions or data structures and accessible by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave are used to transmit software from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and optical disk as used herein include optical disk, laser disk, optical disk, digital versatile disk (DVD), floppy disk and Blu-ray disk, where disks generally reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0288] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed, the computer executes the above method.

[0289] The present application embodiment is described with reference to the flow chart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application.It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processing unit of general-purpose computer, special-purpose computer, embedded processing machine or other programmable device to produce a machine, so that the instruction executed by the processing unit of computer or other programmable data processing device produces the device for realizing the function specified in one flow chart flow or multiple flows and / or one block or multiple blocks of block diagram.

[0290] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the scope of protection 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 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 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 is not successful 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 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, characterized in that, 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 is not successful 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 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 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 on, display the second lock screen interface, and the brightness of the second lock screen interface is the first brightness; The ambient light brightness when the sixth operation to trigger the screen 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 correspondence 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 level and / or gray level of the first lock screen wallpaper; When the ambient light brightness is less than the ambient light threshold, look up the color level and / or gray level of the first lock screen wallpaper in the first array; The change of the brightness of the first lock screen interface from the first brightness to the second brightness includes: When the first array includes the color level and / or gray level 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 level and / or gray level of the first lock screen wallpaper in the first array.

8. The method according to claim 7, characterized in that, The change of 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.

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 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.

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 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.

11. The method according to claim 10, wherein 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, update 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 characterize that the unlocking fails due to the dark 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 to 11, characterized in that, 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 no longer updates the target screen brightness corresponding to the color level and gray level 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 a computer to execute the method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Face information collection method and related equipment

    CN107657221A

  • Unlocking control method and related products of the same

    CN107679482A

  • Light supplementing method and device for face recognition and computer readable storage medium

    CN109862278A

  • Heuristic learning for setting automatic display brightness based on an ambient light sensor

    US20180211608A1