Screen unlocking method and related device

By recording the correspondence between color levels and gray levels and the brightness of the fill light in a self-learning log table, the screen brightness is adjusted, which solves the problem of user discomfort caused by excessive screen brightness in low-light environments, and achieves efficient face unlock and improved user experience.

WO2025149062A9PCT designated stage Publication Date: 2026-01-15HONOR DEVICE CO LTD
View PDF 0 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
2026-01-15

AI Technical Summary

Technical Problem

In low-light environments, when electronic devices increase screen brightness for facial recognition unlocking, excessive screen brightness can cause user discomfort and negatively impact the user experience.

Method used

The system records the correspondence between color levels and gray levels and the brightness of the fill light using a self-learning log table. It adjusts the screen brightness to adapt to different lock screen wallpapers and uses progressive or instantaneous brightness adjustments to reduce screen glare.

Benefits of technology

In low-light environments, it improves the success rate of face unlock and reduces eye strain caused by excessive screen brightness, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025071901_15012026_PF_FP_ABST
    Figure CN2025071901_15012026_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 methods and related devices

[0001] This application claims priority to Chinese patent application filed on January 11, 2024, with application number 202410052389.8 and entitled "Screen unlocking method and related device", the entire contents of which are incorporated herein by reference. Technical Field

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

[0003] To enhance the security of information in electronic devices, electronic devices support screen lock functionality. Correspondingly, electronic devices can support various screen unlocking methods, such as password unlocking, fingerprint unlocking, face unlocking, gesture unlocking, and Bluetooth device unlocking.

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

[0005] In one possible implementation, electronic devices could increase screen brightness to provide supplemental lighting for the user's face when unlocking, enabling the device to capture clear facial information. However, if the user is in a dark environment, increasing screen brightness could make the screen too bright, negatively impacting the user experience. Summary of the Invention

[0006] This application provides a screen unlocking method and related equipment, which are applied in the field of terminal technology; it provides a face unlocking method in low light environment, in which the screen brightness is moderate during the unlocking process, which is more friendly to the user's eyes, reduces the glare caused by excessive screen brightness, and improves the user experience.

[0007] Firstly, this application proposes a screen unlocking method. The method includes: in a screen-off state, responding to a first screen-on operation, displaying a first lock screen interface, with the brightness of the first lock screen interface changing from a first brightness level to a second brightness level; if unlocking is successful based on first unlocking information, displaying an unlock interface; the first unlocking information includes information collected by the electronic device's camera during the brightness change of the first lock screen interface from the first brightness level to the second brightness level; in a screen-off state, responding to a second screen-on operation, displaying the first lock screen interface, with the brightness of the first lock screen interface changing from the first brightness level to a third brightness level; the third brightness level being less than the second brightness level. 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, effectively reducing the glare problem caused by excessively high screen brightness.

[0008] Optionally, it also includes: if the screen fails to unlock based on the second unlock information during the process of the brightness changing from a first brightness level to a third brightness level on the first lock screen interface, then in the screen-off state, in response to the third screen-on operation, the first lock screen interface is displayed, and the brightness of the first lock screen interface changes from a first brightness level to a fourth brightness level, where the fourth brightness level is greater than the third brightness level, and the second brightness level is greater than the fourth brightness level; wherein, the second unlock information includes information collected by the camera of the electronic device during the process of the brightness changing from a first brightness level to a third brightness level on the first lock screen interface. 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, thus effectively reducing the glare problem caused by excessively high screen brightness.

[0009] Optionally, before the brightness of the first lock screen interface changes from a first brightness level to a fourth brightness level, the method further includes: displaying the unlock interface within a preset time period after unsuccessful unlocking based on the second unlock information, and if successful unlocking based on the third unlock information; the third unlock information includes password information and / or fingerprint information. This allows for the identification of scenarios where face unlocking fails due to user error, thereby improving the accuracy of the learning process and the accuracy of the supplementary light brightness in the self-learning record table.

[0010] Optionally, it also includes: if, during the process of the brightness of the first lock screen changing from a first brightness level to a fourth brightness level, the device successfully unlocks based on the fourth unlock information, then, in the screen-off state, in response to the fourth trigger of the screen-on operation, the first lock screen is displayed, and the brightness of the first lock screen changes from the first brightness level to the fourth brightness level; 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 level to the fourth brightness level. In this way, after multiple learning sessions, the electronic device can learn the more accurate supplementary lighting brightness required for face unlocking of the current lock screen, thereby effectively reducing the glare problem caused by excessively high screen brightness.

[0011] Optionally, the lock screen wallpaper of the first lock screen interface includes a first lock screen wallpaper, and the lock screen wallpaper of the second lock screen interface includes a second lock screen wallpaper. The system also includes: in the screen-off state, responding to the fifth screen-on trigger, displaying the second lock screen interface, where the brightness of the second lock screen interface changes from a first brightness level to a fifth brightness level; the second lock screen wallpaper is different from the first lock screen wallpaper; and the fifth brightness level is different from the fourth brightness level. In this way, the electronic device can learn the corresponding fill light brightness for different lock screen wallpapers and apply fill light to the lock screen wallpaper based on this fill light brightness, thereby improving the unlocking rate under each lock screen wallpaper.

[0012] Optionally, it also includes: in the screen-off state, in response to the sixth screen-on trigger, displaying a second lock screen interface, and the brightness of the second lock screen interface is the first brightness; the ambient light brightness at the sixth screen-on trigger is greater than the ambient light threshold. In this way, the electronic device can learn the correspondence between color gradation and / or grayscale and supplementary light brightness in low-light environments, and does not learn the correspondence between color gradation and / or grayscale and supplementary light brightness in bright light environments, thus improving the accuracy of supplementary light brightness; at the same time, it can also reduce power consumption caused by increasing screen brightness in bright light environments.

[0013] Optionally, the electronic device includes a first array recording the correspondence between color levels and / or grayscale and target screen brightness. Before the brightness of the first lock screen interface changes from a first brightness to a second brightness, the process includes: acquiring the ambient light brightness and the color levels and / or grayscale 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 grayscale of the first lock screen wallpaper in the first array; the brightness of the first lock screen interface changing from the first brightness to the second brightness includes: if the color levels and / or grayscale 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 grayscale of the first lock screen wallpaper in the first array. In this way, in low-light environments, before the electronic device uses face unlock, it can obtain a more accurate supplementary light brightness corresponding to the current lock screen wallpaper, thereby using a lower screen brightness to implement the face unlock process and reducing the glare problem caused by an overly bright screen.

[0014] Optionally, the brightness change of the first lock screen interface from a first brightness level to a second brightness level can also include: the brightness of the first lock screen interface changing instantaneously from the first brightness level to the second brightness level; or, the brightness of the first lock screen interface gradually changing from the first brightness level to the second brightness level based on a brightness step size. In this way, electronic devices can provide supplementary lighting for the face in multiple ways. When the electronic device uses a progressive supplementary lighting method, it can reduce eye discomfort caused by sudden screen brightening and better improve the user experience.

[0015] Optionally, after successfully unlocking based on the first unlock information, the method further includes: updating the correspondence between the color gradation and / or grayscale of the first lock screen wallpaper and the second brightness in the first array to the correspondence between the color gradation and / or grayscale 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, effectively reducing the glare problem caused by excessive screen brightness.

[0016] Optionally, after unsuccessfully unlocking based on the second unlock information, the method further includes: updating the correspondence between the color gradation and / or grayscale of the first lock screen wallpaper and the third brightness in the first array to the correspondence between the color gradation and / or grayscale 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 unlock, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlock, effectively reducing the glare problem caused by excessive screen brightness.

[0017] Optionally, the correspondence between the color gradation and grayscale of the first lock screen wallpaper and the fourth brightness is updated in the first array, including: when the first information is obtained, updating the correspondence between the color gradation and / or grayscale 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 dim facial brightness, and the screen is unlocked by the third unlocking information within a preset time. In this way, scenarios where face unlocking fails due to user accidental triggering, as well as scenarios where face unlocking fails due to non-supplementary lighting, can be excluded, thereby improving the accuracy of the learning process and the accuracy of the supplementary lighting brightness in the self-learning record table.

[0018] Optionally, in the first update of the target screen brightness corresponding to the color and gray levels of the first lock screen wallpaper, the difference in target screen brightness before and after the update is x; in the i-th (i is a positive integer greater than 1) update of the target screen brightness corresponding to the color and gray levels of the first lock screen wallpaper, the difference in target screen brightness before and after the update is x-i+1; in the j-th (j is a positive integer greater than i) update of the target screen brightness corresponding to the color and gray levels of the first lock screen wallpaper, if the difference in target screen brightness before and after the update is less than 1, then the electronic device will no longer update the target screen brightness corresponding to the color and gray levels of the first lock screen wallpaper. In this way, the electronic device can learn a learning gradient that decreases with the number of updates to converge the supplementary light brightness to a value suitable for face unlocking with the current lock screen wallpaper, thereby effectively reducing the glare problem caused by excessively high screen brightness.

[0019] Secondly, embodiments of this application provide an electronic device, which may also be referred to as a terminal device, terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. Terminal devices can be mobile phones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on.

[0020] The electronic device includes: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the electronic device to perform the method as described in the first aspect.

[0021] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method as described in the first aspect.

[0022] Fourthly, embodiments of this application provide a computer program product, which includes a computer program that, when run, causes a computer to perform the method as described in the first aspect.

[0023] This application provides a chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a line. The at least one processor is used to run computer programs or instructions to perform the method as described in the first aspect.

[0024] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0025] Figure 1A is a schematic diagram of a face unlock interface provided in an embodiment of this application;

[0026] Figure 1B is a schematic diagram of two interfaces for entering the lock screen provided in the embodiments of this application;

[0027] Figure 2 shows the relationship between the brightness of the supplementary light and time in two possible implementations of supplementary light methods;

[0028] Figure 3 is a flowchart illustrating a screen unlocking method provided in an embodiment of this application;

[0029] Figure 4 is a graph showing the relationship between the supplementary light intensity and time in the supplementary light method provided in the embodiments of this application;

[0030] Figure 5 shows the relationship between multiple lock screen wallpapers with the same grayscale and the lock screen rate provided in the embodiments of this application;

[0031] Figure 6 is a flowchart illustrating a screen unlocking method provided in an embodiment of this application;

[0032] Figure 7 is a flowchart illustrating a screen unlocking method provided in an embodiment of this application;

[0033] Figure 8 is a flowchart of the internal interaction of the electronic device provided in an embodiment of this application;

[0034] Figure 9 is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of this application;

[0035] Figure 10 is a schematic diagram of the screen unlocking device provided in an embodiment of this application. Detailed Implementation

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

[0037] 1) Lock screen and unlock

[0038] A lock screen can be understood as the state in which an electronic device displays its lock screen interface. While the screen is locked, the programs on the electronic device continue to run. The lock screen interface helps 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 has a password, the lock screen may display an area for entering the password; when the electronic device has fingerprint unlock, the lock screen may display an area for fingerprint registration; when the electronic device has face unlock, the lock screen may display an indicator for face unlock.

[0039] Taking face unlock as an example, Figure 1A is a schematic diagram of the face unlock interface in a low-light environment provided by an embodiment of this application. In a low-light environment, the electronic device can display the lock screen interface shown in Figure 1Aa. The lock screen interface shown in Figure 1Aa can display the time and date, lock screen prompt information 101, and face unlock prompt information 102; wherein, lock screen prompt information 101 is used to inform the user that the electronic device is in a locked state and can only be used after unlocking; face unlock prompt information 102 is used to inform the user that the electronic device can be unlocked based on facial information.

[0040] In a dark environment, the user can perform the operation shown in Figure 1Ab, placing the electronic device in front of the face so that the screen can illuminate the face and capture facial information.

[0041] Unlocking can be understood as removing the screen lock of an electronic device. When the electronic device collects and successfully verifies the user's facial information, it unlocks the screen and enters the unlock interface, as shown in Figure 1Ac. For example, the interface shown in Figure 1Ac can be the desktop.

[0042] 2) Always-on display (AOD) and screen on

[0043] Screen off, also known as screen-off mode, means that the display screen of an electronic device is powered off. When the screen is off, the brightness of the display screen is lower than the preset brightness. Screen on means that the display screen of an electronic device is powered on. When the screen is on, the brightness of the display screen is higher than the preset brightness.

[0044] AOD (Always On Display) can also be understood as always-on display. It refers to a situation where, when an electronic device is in a screen-off state, part of the screen is off while another part remains on. The on-screen area displays information such as time, date, and unread messages. AOD mode saves battery power while allowing users to easily check information at any time.

[0045] In some embodiments, the electronic device can transition from a screen-off state to a screen-on state. For example, in the interface shown in Figure 1B(a), the electronic device can be in a screen-off state, and when a trigger operation is received for the power button, the electronic device can transition to a screen-on state. If the electronic device has a screen lock function, after the screen is turned on, the electronic device can display the lock screen interface shown in Figure 1B(b), and implement face unlock with reference to the steps shown in Figure 1A.

[0046] In other embodiments, the electronic device can also enter the screen-on state from an always-on display (AOD) interface. For example, in the interface shown in Figure 1Bc, the electronic device can be in AOD state, and when it receives a trigger operation on the power button, it can enter the screen-on state. If the electronic device has a screen lock function, after the screen is turned on, the electronic device can display the lock screen interface shown in Figure 1Bb, and implement face unlock with reference to the steps shown in Figure 1A.

[0047] 3) Electronic equipment

[0048] The terminal device in this application embodiment can also be any form of electronic device. For example, electronic devices may include handheld devices with image processing functions, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, or future evolution of public land mobile communication networks. Terminal devices in a network (PLMN), etc., are not limited to this in the embodiments of this application.

[0049] By way of example and not limitation, in this embodiment, the electronic device can also be a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not merely hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those that focus on a specific type of application function and require the use of other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0050] Furthermore, in this embodiment of the 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 this 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 this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. 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 in the embodiments of this application, the terms "exemplary" or "for example" are used in the embodiments of this application to indicate that they are examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0054] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single 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, and c can be single or multiple.

[0055] It should be noted that the phrase "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation; the embodiments of this application do not specifically limit this. Furthermore, the display interface provided in the embodiments of this application is merely an example, and the display interface may include more or less content.

[0056] The electronic device can enable face unlock functionality. Once enabled, the electronic device can perform the face unlock process as shown in Figure 1A. However, in some implementations, using the screen to illuminate the face may result in an overly bright screen, causing glare for the user.

[0057] This is because, in most implementations, when an electronic device is in a low-light environment or locked, it raises the screen brightness to a fixed level. To ensure the screen brightness is sufficient to illuminate the face and capture clear facial information, this brightness value is often set too high. This results in excessively high screen brightness when the device uses screen illumination. For example, in a fixed illumination method, the brightness variation can be seen in Figure 2a, where the screen brightness remains constant during face unlock.

[0058] Alternatively, in a possible implementation, when the electronic device is in a low-light environment or locked, it can increase screen brightness through progressive illumination. This progressive illumination can involve gradually increasing screen brightness over time. For example, in a fixed illumination method, the brightness change can be illustrated in Figure 2b. It can be seen that initially, 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, allowing the electronic device to continuously attempt face unlock until successful; or the screen brightness reaches its maximum, at which point the electronic device stops increasing screen brightness and displays a face unlock failure message.

[0059] Progressive fill light can alleviate the glare caused by an overly bright screen to some extent. However, since the maximum fill light value in a possible implementation is also a preset fixed value, this fixed value is often set too high, resulting in glare even when the electronic device increases the screen brightness to the maximum value.

[0060] In view of this, this application provides a screen unlocking method. In low-light environments, the screen brightness used for the current face unlock is adjusted 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 was successful, the screen brightness used for the current unlock is reduced; if the screen brightness of the previous face unlock failed to unlock the screen, the screen brightness used for the current unlock is increased. However, in some scenarios, electronic devices may display different lock screen wallpapers during the previous and current face unlocks. Different lock screen wallpapers have different abilities to provide supplementary lighting for the user's face under the same screen brightness. Considering this factor, lock screen wallpapers can be classified by grayscale and / or color gradation. Under the same grayscale and / or color gradation, the screen brightness for the next unlock is adjusted based on the result of the previous face unlock and the screen brightness. In this way, at any grayscale and / or color level, the electronic device can learn through self-learning the minimum or lower screen brightness corresponding to that grayscale and / or color level that can achieve face unlock. This reduces the screen brightness when face unlocking in low-light environments while ensuring the screen unlock rate, reduces the problem of screen glare, and improves the user experience.

[0061] The conditions for entering the screen unlocking method provided in this application embodiment will be explained below with reference to Figure 3. As shown in Figure 3:

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

[0063] The operation that triggers the screen to light up can be used to control the electronic device to switch from a screen-off state to a screen-on state, after which the lock screen interface shown in Figure 1A can be displayed; alternatively, the operation that triggers the screen to light up can also be used to control the electronic device to switch from a screen-off state to a screen-on state, after which the lock screen interface shown in Figure 1A can be displayed. Other operations can also be used to trigger the screen to light up, and this embodiment does not limit the specific operations described herein.

[0064] S302, Electronic devices receive ambient light brightness.

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

[0066] The first preset brightness can be the system's preset brightness under the current bright lighting conditions. For example, the first preset brightness can be the brightness value set by the user by sliding the brightness bar in the control center interface, or it can be the brightness value set by the user by sliding the brightness bar in the settings interface. The first preset brightness can also be the brightness value that the electronic device adaptively adjusts based on the ambient light brightness after the automatic brightness function is enabled.

[0067] Understandably, in bright light, electronic devices can capture clear facial information without requiring the screen to provide additional lighting for the user's face. Therefore, electronic devices can avoid adjusting screen brightness and displaying a screen with a preset brightness.

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

[0069] The second preset brightness can be the system preset brightness in the current low-light environment. For example, the second preset brightness can be the brightness value set by the user by sliding the brightness bar in the control center interface, or it can be the brightness value set by the user by sliding the brightness bar in the settings interface. The second preset brightness can also be the brightness value that the electronic device adaptively adjusts based on the ambient light brightness after the automatic brightness function is enabled. The second preset brightness can be the same as or different from the first preset brightness. The first target brightness can be the brightness value at which the electronic device provides supplementary lighting for a face in a low-light environment. In this embodiment, the first target brightness can be a brightness value obtained based on the correspondence between grayscale and / or color gradation and supplementary lighting brightness. In this embodiment, supplementary lighting brightness can be understood as the maximum screen brightness that the electronic device learns to display when using a certain lock screen wallpaper to provide supplementary lighting for a face. The first target brightness can also be the default screen brightness. These two scenarios will be described in detail later in this embodiment, and will not be elaborated upon here.

[0070] When the electronic device screen is off, it receives a trigger to turn on the screen. In response to this trigger, the electronic device can display the lock screen interface shown in Figure 1Aa. The initial brightness of the lock screen interface can be a system preset brightness. Subsequently, the electronic device can increase the screen brightness to provide supplemental lighting for the face; for example, adjusting the screen brightness from a second preset brightness to a first target brightness.

[0071] Understandably, in low-light environments, ambient light cannot illuminate a face, and electronic devices need to supplement the light on the face using screen brightness to enable the device to capture relatively clear facial information. When the conditions of step S304 are met, the electronic device can activate the screen unlocking method provided in this embodiment. In bright light environments, after increasing the screen brightness to the first target brightness, the electronic device can also achieve face unlocking; however, this increases the computational burden on the electronic device, and the first preset brightness may be greater than or less than the first target brightness. In bright light environments, the screen brightness may suddenly brighten or dim after unlocking, affecting the user experience. Therefore, this embodiment is specifically designed for face unlocking scenarios in low-light environments.

[0072] The brightness adjustment process in step S303 or S304 also includes:

[0073] S305. Electronic devices unlock their screens based on facial information.

[0074] Understandably, in bright light environments, ambient light can be used to illuminate the face, and electronic devices can unlock the screen based on the facial information captured by the camera; in dark light environments, screen brightness can be used to illuminate the face, and electronic devices can unlock the screen based on the facial information captured by the camera.

[0075] In this embodiment, the electronic device can improve the success rate of face unlocking in low-light environments by providing supplemental lighting to the face. The electronic device can be configured with a self-learning record table, which includes the correspondence between grayscale and / or color gradation and the brightness of the supplemental lighting. For example, taking grayscale as an example, Table 1 shows the correspondence between grayscale and the brightness of the supplemental lighting in this embodiment, as shown in Table 1:

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

[0077] When an electronic device displays a lock screen, it shows the lock screen wallpaper. The device can obtain the grayscale corresponding to the lock screen wallpaper and look up 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, then the electronic device will adjust the lock screen interface to a fill light brightness of 2.

[0078] Here, 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 complementary light brightness corresponding to that grayscale value. As another example, when grayscale 1 to grayscale N are N grayscale intervals, the electronic device can obtain the complementary light brightness corresponding to the grayscale interval where the current lock screen wallpaper is located, and set the screen brightness to the complementary light brightness corresponding to that grayscale interval. This application does not impose any limitations on this.

[0079] In some embodiments, the electronic device can instantly 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 the ambient light threshold, the electronic device can 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 will set the screen brightness to a fill light brightness of 2.

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

[0081] For example, when unlocking with face, if the grayscale of the lock screen wallpaper is grayscale 2, the process of adjusting the screen brightness of the electronic device can be shown by the solid line in Figure 4.

[0082] When a screen-lighting operation is detected, the electronic device can initiate a face unlock process and a process to increase screen brightness.

[0083] For example, during the face unlock process (retry 0 times): At time A, the electronic device captures facial information, which is related to the screen brightness at time A. The electronic device attempts to match the facial information from time A with preset facial information. If the match is successful, the electronic device unlocks the screen and no longer increases 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 time A is low, and the electronic device may not be able to capture clear facial information, causing the electronic device to attempt face unlock again.

[0085] During the retry-1 face unlock process: At time C, the electronic device captures facial information. The facial information at time C is related to the screen brightness at time C; the screen brightness at time C is higher than the screen brightness at time A. The electronic device attempts to match the facial information at time C with preset facial information. If the match is successful, the electronic device unlocks the screen and no longer increases 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, if the brightness at time C is still low and the electronic device is still unable to capture clear facial information, the electronic device will attempt face unlock again, for example, retrying the face unlock process twice. This process is similar to retry0 and retry1, and will not be described in detail here.

[0087] Electronic devices can gradually increase the screen brightness to a supplementary light brightness of 2 through the aforementioned progressive supplementary light method, so as to provide supplementary light for the face and improve the success rate of face unlock.

[0088] It is understood that in this embodiment, the face unlocking process and the screen brightness change process can be controlled by two separate processes. During the face retry process, when unlocking occurs during a retry, the process controlling face unlocking will issue a command to stop supplementary lighting, and the screen brightness will no longer increase. The interaction between the two processes will cause a time delay, resulting in a scenario where face unlocking starts at time A, succeeds at time G, but only stops supplementary lighting at time B based on the command.

[0089] In this embodiment, the supplementary light brightness in the self-learning record table can be the maximum screen brightness that can be increased under the current grayscale and / or colorscale. The electronic device can reduce screen brightness by using the supplementary light brightness in the self-learning record table, thus reducing the glare caused by an overly bright screen. For example, in Figure 4, after two successful face unlock attempts, in this embodiment, since the supplementary light brightness is the maximum screen brightness that can be increased under the current grayscale and / or colorscale, the electronic device will not increase brightness further after reaching the supplementary light brightness. At time F, the screen brightness of the electronic device in this embodiment is brightness 'a'. In a possible implementation, since the maximum screen brightness in a possible implementation is greater than the supplementary light brightness in this embodiment, the screen brightness at time F may increase to brightness 'b' due to time delay. It can be seen that brightness 'a' is less than brightness 'b'. Therefore, the screen brightness during face unlock in this embodiment is even lower, thereby reducing screen brightness and reducing the glare caused by an overly bright screen.

[0090] Furthermore, in possible implementations, the face unlocking process is time-consuming because the electronic device cannot obtain the specific screen brightness required for face unlocking. However, in the embodiments of this application, the electronic device can obtain a corresponding supplementary light brightness based on grayscale and / or color gradation. Therefore, the electronic device can increase the brightness step size to quickly raise the screen brightness to the supplementary light brightness corresponding to the current grayscale and / or color gradation, thereby improving the face unlocking speed. The brightness step size can be the value of the screen brightness change within the same time period.

[0091] It was found that when multiple lock screen wallpapers have the same grayscale, electronic devices using the same fill light brightness for face unlocking will achieve different unlock rates, as shown in Figure 5.

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

[0093] It can be seen that the four lock screen wallpapers have the same equivalent grayscale and the electronic devices use the same brightness of fill light, but the unlocking rates of the electronic devices are different when fill light is applied by lock screen wallpapers 1-4.

[0094] This may be because when the lock screen wallpaper is uneven, the effect of supplemental lighting varies in different areas. For example, in lock screen wallpaper 1, the grayscale distribution is relatively uniform. When the electronic device uses lock screen wallpaper 1 to supplement the lighting of the face, the overall brightness of the face is roughly the same, and the electronic device can capture relatively clear facial information. However, when the electronic device uses lock screen wallpaper 4 to supplement the lighting of 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 the failure of face unlock.

[0095] To further improve the success rate of face unlocking in low-light environments, this application embodiment can mark the lock screen wallpaper with color levels. For example, lock screen wallpaper 1 to lock screen wallpaper 4 can correspond to 4 color levels. The correspondence between color levels and gray levels and the brightness of the fill light can be established, further refining the correspondence of the brightness of the fill light and improving the accuracy of the brightness of the fill light.

[0096] For example, Table 2 shows the correspondence between grayscale, color gradation and fill light brightness in the embodiments of this application, as shown in Table 2:

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

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

[0099] It is understandable that the brightness of the fill light will differ under different color levels but the same grayscale. This application's embodiments can distinguish multiple lock screen wallpapers at the same grayscale level through color levels, thereby improving the accuracy of the fill light brightness.

[0100] Here, color levels 1 to N can be specific color level values ​​or N color level intervals. For example, when color levels 1 to N are N specific color level values, the electronic device can compare the current lock screen wallpaper's color level with these N color level values ​​to obtain the closest color level value to the current lock screen wallpaper. As another example, when color levels 1 to N are N color level intervals, the electronic device can determine the interval containing the current color level based on the current lock screen wallpaper's color level.

[0101] In some embodiments, the electronic device can 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 may use a progressive supplemental lighting method to gradually increase the screen brightness to the supplemental lighting brightness, thereby reducing eye discomfort caused by sudden brightness changes. This process can be described in the relevant description 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, thereby learning the more accurate supplementary lighting brightness required for different lock screen wallpapers when unlocking with a face, thus effectively preventing the problem of glare caused by excessive screen brightness.

[0104] The face unlocking process in the embodiments of this application will be described below.

[0105] For example, when the ambient light intensity is less than the ambient light threshold, the process of facial unlocking after the electronic device performs supplementary lighting is 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 the second preset brightness.

[0107] It is understandable that when an electronic device enters the lock screen from a screen-off state or from a screen-off display state, the electronic device can display a screen with a system preset brightness. For example, in the current low-light 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 colorscale of the lock screen interface.

[0109] The grayscale mentioned in this embodiment can be understood as the equivalent grayscale of the lock screen wallpaper. The electronic device can obtain the color gradation of the lock screen interface and convert the color gradation into an equivalent grayscale. The color gradation can be (R, G, B), where the R, G, and B values ​​can all be represented by values ​​between 0 and 255.

[0110] Equivalent grayscale It can satisfy the following formula:

[0111] In the lock screen wallpaper, the color level of any pixel is (R). i G i B i ,), where α is the R-value weight, β is the G-value weight, γ is the B-value weight, and n is the number of pixels. In this formula, 2.2 can also be other values.

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

[0113] For example, in some embodiments, the self-learning record table may be as shown in Table 1; the electronic device can use grayscale to look up the complementary light brightness corresponding to that grayscale in Table 1. In other embodiments, the self-learning record table may be as shown in Table 2; the electronic device can use colorscale and grayscale to look up the complementary light brightness corresponding to that colorscale and grayscale in Table 2. This application will not describe these aspects in detail.

[0114] In this embodiment, the first target brightness can be the fill light brightness corresponding to the current color level and / or gray level obtained based on the self-learning record table, or it can be the default screen brightness. This embodiment does not limit this.

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

[0116] In this embodiment, the electronic device can control the screen brightness, increasing it from a second preset brightness to a first target brightness. During the brightness increase process, the electronic device can continuously attempt face unlock. This process is illustrated in the embodiment shown in Figure 4, and will not be repeated here.

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

[0118] S604. Electronic devices collect facial information and unlock devices based on facial information.

[0119] S605. If face unlock is successful, the electronic device ends the supplementary lighting process.

[0120] Taking Figure 4 as an example, during the 0th retry of face unlock, the electronic device increases the screen brightness to the brightness corresponding to time A-time B. After successful unlocking, 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] Alternatively, following S604, it also includes:

[0122] S606. If face unlock fails, the electronic device shall attempt face unlock again until face unlock is successful or the number of face unlock attempts reaches the threshold.

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

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

[0125] It should be noted that in this embodiment, the face unlocking process and the screen brightness enhancement process are executed simultaneously. After successful face unlocking, the electronic device can stop enhancing the screen brightness; if face unlocking fails, the electronic device will not process the screen brightness enhancement until the number of face unlock attempts reaches a threshold. In some embodiments, the screen brightness can be enhanced to a first target brightness before the number of face unlock attempts reaches the threshold.

[0126] In this way, the electronic device can provide supplemental lighting to the face based on a first target brightness, which is lower than the fixed brightness in possible implementations, thus reducing the problem of the screen being too bright when unlocking the face.

[0127] In this embodiment, the electronic device can learn the fill light brightness for the next scene with the same color level and / or gray level based on the result of the previous face unlock. Taking the correspondence between color level, gray level, and fill light brightness recorded in the self-learning record table as an example, the usage and update process of the self-learning record table are explained below with reference to Figure 7. As shown in Figure 7:

[0128] Following step S601, the following is included:

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

[0130] S702. The electronic device checks the self-learning record table to see if it includes the fill light brightness corresponding to the current grayscale and colorscale.

[0131] In this embodiment, the electronic device may use a fixed lock screen wallpaper for a period of time; the electronic device can learn the corresponding supplementary light brightness using the color level and grayscale of the lock screen wallpaper. Subsequently, when the electronic device displays the lock screen wallpaper again or displays a lock screen wallpaper with the same color level and grayscale, the electronic device can find the corresponding supplementary light brightness in the self-learning record table. The electronic device can then execute step S703.

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

[0133] S703. If the self-learning record table includes the fill light brightness corresponding to the current grayscale and colorscale, 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 unlock process as the screen brightness gradually increases from the second preset brightness to the first target brightness.

[0135] During the process of increasing screen brightness, the electronic device can periodically collect facial information. In this embodiment, the screen brightness can be adjusted at the same frequency so that the screen brightness is increased for each face unlock retry process.

[0136] For example, the electronic device collects facial information every 75ms and performs facial unlocking. The electronic device can also issue a command every 75ms to adjust screen brightness, which may include a desired increase in screen brightness. This desired increase in screen brightness is related to a first target brightness and a second preset brightness.

[0137] Specifically, the electronic device has a preset threshold for the number of times face unlock can be performed. Before the number of face unlock attempts reaches the threshold, the electronic device can increase the screen brightness from a second preset brightness to a first target brightness in increments. The increment can be greater than or equal to the ratio of the brightness difference between the second preset brightness and the first target brightness to the threshold.

[0138] Alternatively, in S704, if 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 level and gray level of the new lock screen wallpaper. In this embodiment, the electronic device is provided with a default list, which includes the correspondence between various color levels, gray levels, and default screen brightness. The default screen brightness can be based on preset color levels, preset gray levels, and preset fill light brightness. The preset color level can be the maximum color level achievable by the lock screen wallpaper, the preset gray level can be the maximum gray level achievable by the lock screen wallpaper, and the preset screen brightness is the maximum screen brightness achievable when using the lock screen wallpaper for fill light. The color level of any lock screen wallpaper is less than or equal to the preset color level, the gray level of any lock screen wallpaper is less than or equal to the preset gray level, 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 level and gray level 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 level and gray level, and the fill light brightness corresponding to the current color level and gray level can be learned.

[0140] The default screen brightness can be the supplementary light brightness calculated based on preset grayscale, preset colorscale, and / or preset screen brightness. For example, the default screen brightness can satisfy the following formula:

[0141] or:

[0142] Electronic devices can perform the face unlock process as the screen brightness gradually increases from the second preset brightness to the first target brightness.

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

[0144] Electronic devices can update the correspondence in a self-learning record table based on facial recognition results. This process can be, for example:

[0145] S705, Electronic devices initiate facial recognition unlocking.

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

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

[0148] Understandably, if an electronic device can unlock its face while increasing its screen brightness from a second preset brightness to a first target brightness, it indicates that the first target brightness is greater than the accurate fill light brightness corresponding to the current color and grayscale levels. After receiving feedback that the face unlock was successful, the electronic device can reduce the fill light brightness corresponding to the current color and grayscale levels in its self-learning record, for example, by 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 illuminate the face again, it can adjust the screen brightness based on the second target brightness.

[0149] In this embodiment, the difference between the first target brightness and the second target brightness can be a preset value. After the electronic device confirms successful face unlock, it can reduce the preset value based on the first target brightness to obtain the second target brightness. The preset value can be a fixed value or a learning gradient. The learning gradient can be a value that decreases with the number of updates to the supplementary light brightness corresponding to the current color level and gray level. For example, as the number of updates to the current color level and gray level in the self-learning record table increases, the difference between the target brightness before and after the update can gradually decrease. This embodiment does not limit this.

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

[0151] S707. In the event of a face unlock failure, the electronic device obtains the reason for the face unlock failure.

[0152] In real-world scenarios, electronic devices may fail to unlock faces due to factors such as low light conditions, overexposure, insufficient light-receiving area, misalignment, and backlighting. In this embodiment, the value of "failed reason" indicates the reason for the face unlock failure. When "failed reason" indicates that a low-light environment caused the face unlock failure, the electronic device can use the screen unlocking method provided in this embodiment to supplement the light on the face, thereby improving the face unlock rate.

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

[0154] Specifically, the value of the "failed reason" can include a first value, a second value, and a third value. The first value indicates that the face unlock failure was due to a low-light environment, and the screen has been unlocked within a preset time. The second value indicates that the face unlock failure was due to a low-light environment, and the screen has not been unlocked within a preset time. The third value indicates that the face unlock failure was not due to a low-light environment. For example, the first value can be 0, the second value can be 1, and the third value can be 2. In this embodiment, the first and third values ​​can also be other forms or other values, and this embodiment does not limit them.

[0155] If the value of the failed reason is the first value, the electronic device may execute step S709; otherwise, the electronic device terminates the supplementary lighting process.

[0156] It should be noted that the face unlocking process shown in steps S604-S606 can be understood as a process of multiple retryes within a single face unlocking process. The face unlocking processes shown in steps S706 and S707 are the final results of multiple face unlocking retryes. The face unlocking process in step S706 can correspond to the process of an electronic device successfully unlocking the screen from a single screen-off state, and the face unlocking process in step S707 can correspond to the process of an electronic device failing to unlock the screen from a single screen-off state until the number of retry attempts reaches a threshold. This application embodiment will illustrate this.

[0157] S708. In scenarios where face unlock fails due to a low-light environment and the screen has been unlocked within a preset time, the electronic device updates the correspondence between color levels and gray levels and the brightness of the third target in the learning record table; the brightness of the third target is greater than the brightness of the first target.

[0158] Understandably, if a face unlock fails while the electronic device is increasing its screen brightness from a second preset brightness to a first target brightness, it indicates that the first target brightness is lower than the accurate fill light brightness corresponding to the current color and grayscale levels. Upon receiving feedback that face unlock failed at the first target brightness, the electronic device can increase the fill light brightness corresponding to the current color and grayscale levels in its self-learning record table; for example, it can increase the fill light brightness from the first target brightness to a third target brightness. Subsequently, when the electronic device uses the current lock screen wallpaper again, it can adjust the screen brightness based on the third target brightness.

[0159] In this embodiment, 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, it can increase the preset value based on the first target brightness to obtain a third target brightness. The preset value can be a fixed value or a learning gradient; this embodiment does not limit this.

[0160] In this way, electronic devices can adjust the correspondence in the self-learning record table based on the results of multiple face unlocks, improve the accuracy of the correspondence between color levels, gray levels and fill light brightness, and thus use lower screen brightness to realize the face unlock process, reducing the glare problem caused by excessive screen brightness.

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

[0162] The color gradation can be used to distinguish different lock screen wallpapers with the same grayscale. The learned fill light brightness can be understood as the fill light brightness used during the next face unlock, and the learned fill light brightness can be the fill light brightness shown in Table 1 and / or Table 2. The default screen brightness can be the initial fill light brightness corresponding to the new lock screen wallpaper calculated based on the preset color gradation, preset grayscale, and preset screen brightness when displaying a new lock screen wallpaper and the learned fill light brightness is not included in the learning record table. The learning gradient can be used to specify the difference between two adjacent fill light brightness values ​​under the same color gradation and grayscale. 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; as 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 is understood that, in the embodiments of this 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. However, some color levels and / or gray levels in the array correspond to the learned supplementary light brightness. If the electronic device has not yet learned the supplementary light brightness corresponding to another part of the color levels and / or gray levels, then the learned supplementary light brightness corresponding to the other part of the color levels and / or gray levels in the array can be 0 or null.

[0164] In this embodiment, 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, learned supplementary light brightness 1, whether to terminate learning, learning gradient 1}, {RGB_L2, grayscale 2, learned supplementary light brightness 2, whether to terminate learning, learning gradient 2}……{RGB_LN, grayscale N, learned supplementary light brightness N, 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}}. This embodiment does not limit the storage format of the default list and the self-learning record table.

[0165] In this embodiment, the learning gradient decreases with each learning iteration. For example, the initial learning gradient is x. After learning the supplementary light brightness for the first time, the supplementary light brightness corresponding to the current color level and gray level can be learned again. For example, during the second learning process, the correspondence between the current color level, gray level, and supplementary light brightness in the self-learning record table is updated, and the difference between the supplementary light brightness before and after the update is x. During the third learning process, the correspondence between the current color level, gray level, and supplementary light brightness in the self-learning record table is updated, and the difference between the supplementary light brightness before and after the update is x-1. Learning terminates when the learning gradient is less than a preset learning gradient. For example, the preset learning gradient is 1.

[0166] For example, with x=5 and the initial fill light brightness of 300 nits, in a low-light environment, when the electronic device uses a fill light brightness of 300 nits for the first face unlock, and the unlock is unsuccessful, the electronic device can update the fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 305 nits.

[0167] During the second face unlock, the electronic device can use a fill light brightness of 305 nits for face unlock. If the unlock is successful, the electronic device can update the fill light brightness corresponding to the color level and / or gray level of the current lock screen wallpaper to 301 nits.

[0168] On the third attempt to unlock with face, the electronic device can use a fill light of 301 nits. If the unlock fails, the electronic device can update the fill light corresponding to the color level and / or gray level of the current lock screen wallpaper to 304 nits.

[0169] On the fourth face unlock, the electronic device can use a fill light of 304 nits for face unlock. If the unlock is successful, the electronic device can update the fill light corresponding to the color level and / or gray level of the current lock screen wallpaper to 302 nits.

[0170] On the fifth attempt to unlock via face recognition, the electronic device can use a fill light of 302 nits. If the unlock fails, the device can update the learned fill light brightness corresponding to the color level and / or grayscale of the current lock screen wallpaper to 303 nits. If the difference in fill light brightness between the two attempts 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 internal interaction flow of the electronic device in this embodiment of the application is described below with reference to Figure 8, as shown in Figure 8:

[0172] In this embodiment of the 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] The application layer can include a face recognition application and a lock screen application (keyguard). The lock screen application can be used to handle lock screen interface related business, such as unlocking the screen (fingerprint unlock, pattern unlock, PIN unlock, etc.), displaying lock screen notifications, quickly launching the camera application, speed dialing, and displaying the date / time. The face recognition application can be used to handle face-related business, such as face unlock, face recognition, and face detection.

[0174] The application framework layer may include a brightness management module, which manages screen brightness. For example, the brightness management module may include a fill light control module and a learning engine. The fill light control module can be used to acquire and distribute a first target brightness. The learning engine can be used to query and learn the correspondence between color levels, gray levels, and fill light brightness; the learning engine may include a learning module and an array; the array stores a self-learning record table and a default list; the learning module can be used to update the correspondence between color levels, gray levels, and fill light brightness based on the result of face unlock.

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

[0176] The kernel layer may include a camera driver and a display driver, where the camera driver is used to interact with the camera hardware to obtain face images; and the display driver is used to display the lock screen wallpaper at a set screen brightness.

[0177] For example, the process may include:

[0178] S801, The lock screen application receives an operation to trigger the screen to turn on.

[0179] S802, Lock screen application launches face application.

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

[0181] Lock screen applications can obtain the color level and grayscale of the current lock screen wallpaper and call the update wall paper gray function to send the color level and grayscale.

[0182] S804. When the ambient light intensity is less than the ambient light threshold, the face application indicates that the supplementary lighting control module should start supplementary lighting.

[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 supplement the light on the face.

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

[0185] In this embodiment of the application, after step S802, the process in which the face application is located can execute the face unlock 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 processes simultaneously.

[0186] The following describes the process of adjusting the fill light, as shown in Figure 8. After step S804, the process includes:

[0187] S805, the fill light control module queries the learning engine array based on color level and grayscale.

[0188] The fill light control module can issue commands to query fill light brightness; for example, the command to query fill light brightness could be `get Brightness After Map`. After receiving the command, the learning engine can parse it to obtain the color level and grayscale of the current lock screen wallpaper. The learning engine then queries the self-learning record table in the array for the corresponding fill light brightness based on the color level and grayscale.

[0189] S806. If the self-learning record table includes the fill light brightness corresponding to the current color level and gray level, the fill light control module sends a command to the backlight control module to adjust the screen brightness according to the system preset brightness and the fill light brightness corresponding to the current color level and gray level.

[0190] The command used to adjust screen brightness can include the screen brightness to be adjusted. For example, the command used to adjust screen brightness can be set Display Brightness.

[0191] This step can be referred to in the relevant description in step S703. The frequency at which the fill light control module issues instructions to adjust the screen brightness can be the same as the frequency at which the face application performs a retry. For example, the fill light control module instructs the backlight control module to adjust the screen brightness once every 75ms. The difference between two adjacent screen brightness values ​​can be the ratio of the difference between the fill light brightness corresponding to the color level and gray level and the system preset brightness to the number of retry thresholds.

[0192] S807, the backlight control module adjusts the screen brightness according to the instructions used to adjust the screen brightness.

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

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

[0195] S808. If the self-learning record table does not include the fill light brightness corresponding to the current color level and gray level, the fill light control module sends an instruction to the backlight control module to adjust the screen brightness according to the system preset brightness and the default screen brightness.

[0196] This step can be referred to as step S806. Specifically, the fill light control module instructs the backlight control module to adjust the screen brightness every 75ms. The difference between two adjacent screen brightness adjustments can be the ratio of the difference between the default screen brightness and the system preset brightness to a threshold number of adjustments.

[0197] Subsequently, the electronic device may execute step S807. This application embodiment does not limit this process.

[0198] S809, Face application instruction: The face recognition module is enabled for face recognition.

[0199] S810, the face recognition module obtains the 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 capture facial information. The face recognition module then receives the facial 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 feature points from facial information and compare these feature points with preset feature points of facial information. When the similarity is greater than a similarity threshold, the current facial information can be confirmed as the preset facial information. Other methods can also be used to verify facial information in this embodiment, and this embodiment does not impose specific limitations on them.

[0203] S812, the face recognition module reports the face recognition results to the face application.

[0204] The facial recognition result can be used to indicate whether facial unlocking was successful or failed. For example, in the case of successful facial unlocking, the facial recognition result may include a command indicating successful unlocking and the maximum fill light brightness at the time of successful unlocking. The command indicating successful unlocking may, for example, have a value of "is Success" as the fourth value; the maximum fill light brightness at the time of successful unlocking may, for example, be "max brightness".

[0205] In the event of a failed face unlock, the face recognition result may include an instruction indicating the failure and a reason for the failure. The instruction indicating successful unlock may have a value of "is Success" (the fifth value); the reason for the failure may have a value of the first, second, or third value.

[0206] S813, the face application transmits the face recognition results to the lock screen application.

[0207] Lock screen apps can initiate the screen unlocking process based on facial recognition results. For example, if the facial recognition result includes a command indicating successful unlocking, the lock screen app unlocks the screen; if the facial recognition result includes a command indicating unlocking failure, the lock screen app can prompt the user that facial unlocking failed, and the user can try facial unlocking again or change the unlocking method.

[0208] S814, the face application sends the face recognition results to the learning engine.

[0209] S815 The learning engine updates the self-learning record table based on the face recognition results.

[0210] When the face recognition result indicates that the face unlock is successful, the electronic device can reduce the brightness of the fill light 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 can increase the brightness of the fill light 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 levels, gray levels, and supplementary light brightness in the self-learning record table as an example to illustrate the screen unlocking method of this application. This application embodiment can also use the correspondence between gray levels and supplementary light brightness alone to implement the self-learning process, as shown in Table 4. This application embodiment does not impose any limitations on this.

[0213] Based on the above embodiments, this application provides a screen unlocking method. Exemplarily, the screen unlocking method may include the following steps:

[0214] S901. In the screen-off state, in response to the first 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 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 Figure 1Ba, or it may correspond to the interface shown in Figure 1Bc. The operation that triggers the screen to turn on can be an operation that triggers the electronic device to enter the screen-on state from the screen-off state or the AOD state. For example, the operation that triggers the screen to turn on is the operation triggered on the power button in the interface shown in Figure 1Ba; the operation that triggers the screen to turn on is the operation triggered on the power button in the interface shown in Figure 1Bc. In this embodiment, the operation that triggers the screen to turn on can also be other operations, such as entering the screen-on state from the screen-off state upon receiving a notification message. This embodiment does not limit this.

[0216] The first lock screen interface can be, for example, the interface shown in Figure 1A(a). The first brightness can be the system preset brightness when the screen is on; the second brightness can be the brightness corresponding to the first target brightness. For example, the second brightness can be the supplementary light brightness found in the self-learning record table based on the color gradation 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 gradation and / or grayscale of the lock screen wallpaper of the first lock screen interface.

[0217] In this embodiment, when the electronic device receives a screen-on trigger operation, it can increase the screen brightness to provide supplemental lighting for the user's face, enabling face unlocking in low-light environments. Specifically, after the screen is turned on, the electronic device displays a first lock screen interface. The initial brightness of the first lock screen interface is a system preset brightness, for example, an initial brightness of a first brightness. Subsequently, the electronic device can increase the screen brightness to a second brightness.

[0218] It is understandable that the second brightness can be understood as the maximum screen brightness that can be achieved during the supplemental lighting process; during the process of the brightness of the first lock screen changing from the first brightness to the second brightness, the electronic device can stop increasing the screen brightness to the second brightness after successful unlocking.

[0219] S902. If the device is successfully unlocked based on the first unlock information, the 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 changing from a first brightness to a second brightness.

[0220] The initial unlock information could be, for example, facial information or gesture information captured by the camera after the screen is first turned on. The unlock interface could be, for example, the interface shown in Figure 1Ac.

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

[0222] S903. In the screen-off state, in response to the second 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 third brightness; the third brightness is less than the second brightness.

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

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

[0225] When the screen is off, the electronic device can receive a second trigger to turn the screen on. Since the electronic device successfully unlocked using facial recognition previously, it updates the second brightness level in its self-learning record to the third brightness level. Therefore, the electronic device changes from the first brightness level to the third brightness level during the supplemental lighting process.

[0226] The third brightness is lower than the second brightness. Since the second brightness is sufficient for face unlocking, the second brightness can be reduced to the third brightness, thereby gradually decreasing 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.

[0227] In this embodiment, when face unlock is successful or the number of face unlock attempts reaches a threshold, the electronic device will control the brightness of the first lock screen interface to gradually change from the third brightness level to the first brightness level.

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

[0229] Optionally, it also includes: if the screen fails to unlock based on the second unlock information during the process of the brightness of the first lock screen changing from the first brightness to the third brightness, then in the screen-off state, in response to the third 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, where 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 changing from the first brightness to the third brightness.

[0230] The second unlock information can be facial information, gesture information, etc., captured by the camera after the screen is turned on for the second time. The second unlock information is different from the first unlock information. It is understandable that the facial information captured by the electronic device during two face unlock attempts for the same user will differ. The unlock interface can be, for example, the interface shown in Figure 1Ac. The fourth brightness can be the third target brightness.

[0231] It should be noted that, in the event of an unsuccessful unlock, the electronic device can learn and update the correspondence between the current color level and / or grayscale and the supplementary light brightness based on the unlock result. Since the electronic device previously unlocked successfully based on a face, the third brightness level in the self-learning record table was updated to the fourth brightness level. Therefore, the electronic device changes from the first brightness level to the fourth brightness level during the supplementary light process.

[0232] The fourth brightness level being greater than the third brightness level can be understood as the third brightness level being insufficient for face unlocking, thus requiring an increase from the third to the fourth brightness level to ensure that the current brightness is sufficient for face unlocking. The second brightness level being greater than the fourth brightness level can be understood as the electronic device appropriately increasing the supplementary light brightness value, but not increasing it beyond the brightness before learning; thus achieving the effect that as the number of learning iterations increases, the supplementary light brightness gradually converges to an intermediate value (e.g., 303 nits in the above embodiment).

[0233] The above steps can be referred to the description related to steps S707-S708 in the embodiment shown in Figure 7, and will not be repeated in this embodiment.

[0234] In this way, electronic devices can adjust the brightness of the fill light based on the result of the previous face unlock, thereby learning the more accurate fill light brightness required for the current lock screen interface when unlocking with face, thus 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, the method further includes: displaying the unlock interface within a preset time period after unsuccessful unlocking based on the second unlock information, and if successful unlocking based on the third unlock information; the third unlock information includes password information and / or fingerprint information.

[0236] The preset duration can be, for example, 10 seconds. It is understandable that face unlock failure may be caused by a variety of reasons, such as the user accidentally triggering the unlock process. In this case, the current face unlock failure can be determined by the electronic device unlocking conditions of other methods within the preset duration, to determine that the user did not accidentally trigger the unlock.

[0237] This step can be referred to the description related to step S708 in the embodiment shown in Figure 7, and will not be repeated in this embodiment.

[0238] This allows for the identification of scenarios where face unlock fails due to user error, thereby improving the accuracy of the learning process and the accuracy of the supplementary light brightness in the self-learning record table.

[0239] Optionally, it also includes: if the 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 camera of the electronic device during the process of the brightness of the first lock screen changing from the first brightness to the fourth brightness.

[0240] In this embodiment, the electronic device can stop learning once the learning record table has learned to a certain extent. 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 level and / or gray level of the lock screen wallpaper of the first lock screen interface is the fourth brightness. Therefore, even though the previous unlock was successful based on the fourth unlock information, the electronic device will not update the fill light brightness corresponding to the color level and / or gray level of the lock screen wallpaper of the first lock screen interface. So, when the fourth screen-on operation 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 repeated learning, electronic devices can learn the more accurate supplementary lighting brightness required by the current lock screen interface when unlocking with face, 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. It also includes: in the screen-off state, in response to the fifth triggering of the screen-on 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; 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 is different from that of the first lock screen wallpaper, which can be specifically reflected in the fact that the color level and / or gray level of the second lock screen wallpaper is different from that of the first lock screen wallpaper.

[0245] Understandably, during the fourth screen-on trigger, the electronic device has already trained itself on the fill light brightness corresponding to the color and / or grayscale levels of the first lock screen wallpaper, for example, the fourth brightness level. However, when the electronic device changes the lock screen wallpaper, this 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 and / or grayscale levels of the second lock screen wallpaper is the fifth brightness level, the electronic device will control the brightness of the second lock screen interface to change from the first brightness level to the fifth brightness level during face unlock.

[0246] In the embodiment shown in Figure 5, different color levels can affect the success rate of face unlocking. Therefore, in this embodiment, the face unlocking rate is improved by refining the relationship between color levels, gray levels and fill light brightness.

[0247] In this way, electronic devices can learn the corresponding fill light brightness for different lock screen wallpapers and fill the lock screen wallpaper with fill light 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 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 at the sixth screen-on operation is greater than the ambient light threshold.

[0249] The ambient light threshold is a threshold used to distinguish between low-light and bright-light environments. For example, the ambient light threshold can be a value between 0 and 2.5 lux, or even 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 does not need to use screen brightness to illuminate the face. Therefore, in a bright-light environment, after the sixth screen activation, the brightness of the second lock screen interface will not change and will remain at the first brightness level.

[0250] In this way, electronic devices can learn the correspondence between color levels and / or gray levels and the brightness of the fill light in low-light environments, but do not learn the correspondence between color levels and / or gray levels and the brightness of the fill light in bright light environments, 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 bright light environments.

[0251] Optionally, the electronic device includes a first array, which records the correspondence between color levels and / or gray levels and target screen brightness; before the brightness of the first lock screen interface changes from a first brightness to a second brightness, the method includes: acquiring 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 an 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 changing from the first brightness to the second brightness includes: when the first array includes the color levels and / or gray levels 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 in the first array corresponding to the color levels and / or gray levels of the first lock screen wallpaper.

[0252] The first array records a self-learning record table, which includes the correspondence between color levels and / or gray levels and supplementary light brightness. The target screen brightness can correspond to the supplementary light brightness corresponding to the color levels and / or gray levels in this embodiment. The first array can be an array that stores both the self-learning record table and the default list, or it can be an array that only stores the self-learning record table. This embodiment does not impose any restrictions on this.

[0253] The process can be referred to the relevant descriptions in the embodiments shown in Figures 3, 6 and 7, and will not be repeated here.

[0254] In this way, in low-light environments, before using facial recognition to unlock electronic devices, the system can obtain a more accurate brightness level corresponding to the current lock screen wallpaper, and then use a lower screen brightness to complete the facial unlocking process, reducing the glare caused by an overly bright screen.

[0255] Optionally, the brightness of the first lock screen interface changing from a first brightness level to a second brightness level may also include: the brightness of the first lock screen interface changing instantaneously from a first brightness level to a second brightness level; or, the brightness of the first lock screen interface changing gradually from a first brightness level to a second brightness level based on a brightness step size.

[0256] Here, "instantaneous" can be understood as a small time interval, such as a change from the first brightness level to the second brightness level within a few milliseconds. The gradual change from the first brightness level to the second brightness level can be understood as the screen brightness increasing every 75ms as described in the above embodiment.

[0257] In this way, electronic devices can provide supplemental lighting to the face in various ways. Among them, when electronic devices use a progressive supplemental lighting method, they can reduce eye discomfort caused by sudden brightening of the screen and better improve the user experience.

[0258] Optionally, after successfully unlocking based on the first unlock information, the method further includes: updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the second brightness in the first array to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness.

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

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

[0261] Optionally, after failing to unlock based on the second unlock information, the method further includes: updating the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness in the first array to the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness.

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

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

[0264] Optionally, updating the correspondence between the color level and grayscale of the first lock screen wallpaper and the fourth brightness in the first array includes: when the first information is obtained, updating the correspondence between the color level and / or grayscale 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 dim facial brightness, and the screen is unlocked by the third unlocking information within a preset time.

[0265] The first piece of information can be the "failed reason" in the above embodiment, which is the first value.

[0266] This eliminates scenarios where face unlock fails due to user accidental triggering or non-lighting conditions, thereby improving the accuracy of the learning process and the accuracy of the light intensity in the self-learning record table.

[0267] Optionally, in the case of updating the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper for the first time, the difference in target screen brightness before and after the update is x; in the case of updating the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper 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; in the case of updating the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper 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, then the electronic device will no longer update the target screen brightness corresponding to the color level and gray level of the first lock screen wallpaper.

[0268] This process corresponds to the relevant description of the array section in the above embodiments. Specifically, the i-th update corresponds to the second to fourth face unlocks, and the j-th update corresponds to the fifth face unlock.

[0269] In this way, electronic devices can learn a learning gradient that decreases with each update to converge the brightness of the supplementary light to a value suitable for face unlocking on the current lock screen wallpaper, thereby effectively reducing the glare caused by excessive screen brightness.

[0270] To better understand the embodiments of this application, the structure of the electronic device 100 of this application is described below:

[0271] Figure 9 shows a schematic diagram of the structure of electronic device 100. 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, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, and an embedded secure element (eSE) 196, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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 is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. 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, such as 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). Different processing units may be independent devices or integrated into one or more processors. In this embodiment, the processor 110 can be used in the information processing-related steps of the screen unlocking method provided in this embodiment.

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

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

[0276] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor. In this embodiment, the electronic device may use internal memory 121 to store a self-learning record table and a default list.

[0277] An ambient light sensor 180L is used to sense ambient light intensity. The electronic device 100 can adaptively adjust the brightness of its display screen 194 based on the sensed ambient light intensity. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L can also work in conjunction with a proximity sensor 180G to detect whether the electronic device 100 is in a pocket, preventing accidental touches. In this embodiment, the electronic device can detect whether the current environment is a low-light environment based on the ambient light intensity. In a low-light environment, the screen unlocking process provided in this embodiment is executed.

[0278] The screen unlocking method according to the embodiments of this application has been described above. The apparatus for performing the above-described screen unlocking method provided in the embodiments of this application will now be described. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above-described screen unlocking method.

[0279] As shown in Figure 10, the screen unlocking device 1100 can be used in communication equipment, circuits, hardware components, or chips. The screen unlocking device includes a display unit 1101 and a processing unit 1102. The display unit 1101 is used to support the display steps performed by the screen unlocking device 1100; the processing unit 1102 is used to support the information processing steps 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 supports the screen unlocking device 1100 in performing data transmission and data reception steps. The communication unit 1103 may be an input or output interface, pins, or circuitry, etc.

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

[0282] Storage unit 1104 may store computer-executable instructions for methods in an electronic device, so that processing unit 1102 executes the methods in the above embodiments. Storage unit 1104 may be a register, cache, or RAM, etc., and storage unit 1104 may be integrated with processing unit 1102. Storage unit 1104 may be a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, and storage unit 1104 may be independent of processing unit 1102.

[0283] The screen unlocking method provided in this application can be applied to electronic devices with communication functions. Electronic devices include electronic devices in general; the specific device form of an electronic device can be referred to the above-described related information, and will not be repeated here.

[0284] This 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, causing the electronic device to perform the above-described method.

[0285] This application provides a chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to execute the above-described method. Its implementation principle and technical effects are similar to the related embodiments described above, and will not be repeated here.

[0286] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted over the computer-readable medium. The computer-readable medium 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 accessible by a computer.

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

[0288] This application provides a computer program product, which includes a computer program that, when run, causes a computer to perform the above-described method.

[0289] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0290] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A screen unlocking method, characterized in that, Applied to electronic devices, the method includes: In the screen-off state, in response to the first screen-on operation, the first lock screen interface is displayed, and the brightness of the first lock screen interface changes from a first brightness to a second brightness. If the device is successfully unlocked based on the first unlock information, the unlock screen 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 changing from the first brightness to the second brightness. In the screen-off state, in response to the second 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 third brightness; the third brightness is less than the second brightness.

2. The method according to claim 1, characterized in that, Also includes: If, during the process of the brightness of the first lock screen interface changing from the first brightness to the third brightness, the screen is not successfully unlocked based on the second unlock information, then in the screen-off state, in response to the third 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, where 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.

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, the following is also included: Within a preset time period after unsuccessful unlocking based on the second unlocking information, and if successful unlocking based on the third unlocking information, the unlocking interface is displayed; the third unlocking information includes password information and / or fingerprint information.

4. The method according to claim 2 or 3, characterized in that, Also includes: If, during the process of the brightness of the first lock screen interface changing from the first brightness to the fourth brightness, the screen 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.

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, and the lock screen wallpaper of the second lock screen interface includes a second lock screen wallpaper, and also includes: In the screen-off state, in response to the fifth screen-on operation, a second lock screen interface is displayed, and the brightness of the second lock screen interface changes from a 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, Also includes: In the screen-off state, in response to the sixth screen-on operation, a second lock screen interface is displayed, and the brightness of the second lock screen interface is the first brightness; The ambient light brightness at the sixth time the screen is triggered 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, which records the correspondence between color levels and / or gray levels and target screen brightness. Before the brightness of the first lock screen interface changes from a first brightness level to a second brightness level, the following steps are included: Obtain the ambient light level and the color and / or grayscale of the first lock screen wallpaper; When the ambient light brightness is less than the ambient light threshold, the color level and / or gray level of the first lock screen wallpaper are searched in the first array; The brightness of the first lock screen interface changes from a first brightness level to a second brightness level, including: When the first array includes the color level and / or gray level of the first lock screen wallpaper, the brightness of the first lock screen interface is controlled to change from the first brightness to the second brightness; the second brightness is the target screen brightness in the first array that corresponds to the color level and / or gray level of the first lock screen wallpaper.

8. The method according to claim 7, characterized in that, The brightness of the first lock screen interface changes from a first brightness level to a second brightness level, and also includes: The brightness of the first lock screen interface changes instantaneously from the first brightness to the second brightness; Alternatively, the brightness of the first lock screen interface may gradually change from the first brightness to the second brightness based on a brightness step size.

9. The method according to any one of claims 1-8, characterized in that, After successfully unlocking based on the first unlocking information, the process also includes: In the first array, the correspondence between the color level and / or gray level of the first lock screen wallpaper and the second brightness is updated 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, the following also applies: In the first array, the correspondence between the color level and / or gray level of the first lock screen wallpaper and the third brightness is updated 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, characterized in that, Updating the correspondence between the color level and grayscale of the first lock screen wallpaper and the fourth brightness in the first array includes: Upon obtaining the first information, the correspondence between the color level and / or gray level of the first lock screen wallpaper and the fourth brightness is updated in the first array; the first information is used to characterize that the unlocking fails due to the dim facial brightness, and the screen is unlocked by the third unlocking information within a preset time.

12. The method according to any one of claims 7-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 in 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 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 level and gray level of the first lock screen wallpaper is updated for the j-th time (j is a positive integer greater than i), the difference in target screen brightness before and after the update is less than 1, then 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, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the electronic device to perform the method as described in 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 a processor, it implements the method as described in any one of claims 1-12.

15. A chip system, characterized in that, It includes at least one processor and a communication interface, the communication interface and the at least one processor being interconnected via a line, the at least one processor being configured to run a computer program or instructions to perform the method as described in any one of claims 1-12.

16. A computer program product, characterized in that, Includes a computer program that, when run, causes a computer to perform the method as described in any one of claims 1-12.