WO2025149062A1 - 屏幕解锁方法及相关设备 - Google Patents
屏幕解锁方法及相关设备Info
- Publication number
- WO2025149062A1 WO2025149062A1 PCT/CN2025/071901 CN2025071901W WO2025149062A1 WO 2025149062 A1 WO2025149062 A1 WO 2025149062A1 CN 2025071901 W CN2025071901 W CN 2025071901W WO 2025149062 A1 WO2025149062 A1 WO 2025149062A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- brightness
- screen
- lock screen
- electronic device
- unlocking
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/10—Image acquisition
- G06V10/12—Details of acquisition arrangements; Constructional details thereof
- G06V10/14—Optical characteristics of the device performing the acquisition or on the illumination arrangements
- G06V10/141—Control of illumination
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Definitions
- the present application relates to the field of terminal technology, and in particular to a screen unlocking method and related equipment.
- electronic devices support a lock screen function. Accordingly, electronic devices can support multiple screen unlocking methods.
- the screen unlocking methods may include: password unlocking, fingerprint unlocking, face unlocking, gesture unlocking, and Bluetooth device unlocking, etc.
- the user can enter the face of the electronic device, and the electronic device can enable the face unlocking function.
- the electronic device can unlock the screen after recognizing the user's face information.
- the electronic device may not be able to collect the face information.
- the electronic device can increase the screen brightness to fill in the user's face when unlocking, so that the electronic device can capture clear facial information.
- the screen brightness may be glaring after the electronic device increases, affecting the user's experience.
- the embodiments of the present application provide a screen unlocking method and related equipment, which are applied to the field of terminal technology; a method of face unlocking in a dark environment is provided.
- the screen brightness is moderate, which is more friendly to the user's eyes, reduces the glare problem caused by excessive screen brightness, and improves the user experience.
- the embodiment of the present application proposes a screen unlocking method.
- the method includes: in the screen-off state, in response to the operation of triggering the screen on for the first time, displaying the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the second brightness; in the case of successful unlocking based on the first unlocking information, displaying the unlocking interface; the first unlocking information includes information collected by the camera of the electronic device during the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness; in the screen-off state, in response to the operation of triggering the screen on for the second time, displaying the first lock screen interface, and the brightness of the first lock screen interface changes from the first brightness to the third brightness; the third brightness is less than the second brightness.
- the electronic device can adjust the fill light brightness according to the result of the previous face unlocking, so as to learn the more accurate fill light brightness required by the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness
- the electronic device can adjust the fill light brightness according to the result of the previous face unlock, so as to learn the more accurate fill light brightness required by the current lock screen interface during face unlock, thereby effectively reducing the glare problem caused by excessive screen brightness.
- the method further includes: within a preset time after the second unlocking information fails to unlock the face, and when the third unlocking information successfully unlocks the face, the unlocking interface is displayed; the third unlocking information includes password information and/or fingerprint information.
- the scene of face unlocking failure caused by user's false triggering can be identified, thereby improving the accuracy of the learning process and the accuracy of the fill light brightness in the self-learning record table.
- it also includes: if the first lock screen interface is successfully unlocked based on the fourth unlock information during the process of the brightness changing from the first brightness to the fourth brightness, then in the screen-off state, in response to the fourth triggering operation of the screen-on, 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.
- the electronic device can learn the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.
- the lock screen wallpaper of the first lock screen interface includes the first lock screen wallpaper
- the lock screen wallpaper of the second lock screen interface includes the second lock screen wallpaper
- the electronic device can learn the fill light brightness corresponding to different lock screen wallpapers, and fill light the lock screen wallpaper based on the fill light brightness, thereby improving the unlocking rate under each lock screen wallpaper.
- the electronic device in the screen-off state, in response to the sixth screen-on triggering operation, displaying a second lock screen interface, and the brightness of the second lock screen interface is the first brightness; the ambient light brightness when the screen is turned on for the sixth time is greater than the ambient light threshold.
- the electronic device can learn the correspondence between the color scale and/or gray scale and the fill light brightness in a dark light environment, and does not learn the correspondence between the color scale and/or gray scale and the fill light brightness in a bright light environment, thereby improving the accuracy of the fill light brightness; at the same time, it can also reduce the power consumption caused by increasing the screen brightness in a bright light environment.
- the electronic device includes a first array, in which the corresponding relationship between the color scale and/or gray scale and the target screen brightness is recorded; before the brightness of the first lock screen interface changes from the first brightness to the second brightness, it includes: obtaining the ambient light brightness and the color scale and/or gray scale of the first lock screen wallpaper; when the ambient light brightness is less than the ambient light threshold, searching the color scale and/or gray scale of the first lock screen wallpaper in the first array; the brightness of the first lock screen interface changes from the first brightness to the second brightness, including: when the color scale and/or gray scale of the first lock screen wallpaper is 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 scale and/or gray scale of the first lock screen wallpaper in the first array.
- the electronic device before the electronic device uses face unlocking, it can obtain a more accurate fill light brightness corresponding to the current lock screen wallpaper, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the screen being too bright.
- the brightness of the first lock screen interface changes from the first brightness to the second brightness, further comprising: the brightness of the first lock screen interface changes from the first brightness to the second brightness instantaneously; or the brightness of the first lock screen interface changes from the first brightness to the second brightness gradually based on the brightness step.
- the electronic device can fill in the light of the face in a variety of ways.
- the electronic device adopts the progressive fill-in light method it can reduce the discomfort of the human eye caused by the sudden brightness of the screen, and can better improve the user experience.
- An embodiment of the present application provides a chip system, which includes at least one processor and a communication interface, the communication interface and at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to execute the method of the first aspect.
- FIG8 is a flowchart of internal interaction of an electronic device provided in an embodiment of the present application.
- FIG1A is a schematic diagram of a face unlocking interface in a dark light environment provided by an embodiment of the present application.
- the electronic device may display a lock screen interface as shown in a in FIG1A.
- the lock screen interface may display time and date, lock screen prompt information 101 and face unlock prompt information 102; wherein, the lock screen prompt information 101 is used to prompt the user that the electronic device is in a lock screen state and can only be used after unlocking; the face unlock prompt information 102 is used to prompt the user that the electronic device can be unlocked based on face information.
- the electronic device may also be a wearable device.
- Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes.
- a wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction.
- the electronic device can also be a terminal device in the Internet of Things (IoT) system.
- IoT Internet of Things
- Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things.
- the electronic devices in the embodiments of the present application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.
- UE user equipment
- MS mobile station
- MT mobile terminal
- 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.
- the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
- the hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a 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 operating system, Unix operating system, Android operating system, iOS operating system, or Windows operating system.
- the application layer includes applications such as browsers, address books, word processing software, and instant messaging software.
- At least one refers to one or more, and “more than one” refers to two or more.
- “And/or” describes the association relationship of associated objects, indicating that three relationships may exist.
- a and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
- the character “/” generally indicates that the previous and next associated objects are in an “or” relationship.
- “At least one of the following” or similar expressions refers to any combination of these items, including any combination of single or plural items.
- At least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.
- the "at" in the embodiment of the present application can be the instant when a certain situation occurs, or a period of time after a certain situation occurs, and the embodiment of the present application does not specifically limit this.
- the display interface provided in the embodiment of the present application is only an example, and the display interface can also include more or less content.
- the electronic device can enable the face unlocking function. After the face unlocking function is enabled, the electronic device can perform the face unlocking process as shown in FIG1A. However, in a possible implementation, after the screen is used to fill in the light for the face, the screen may be too bright and the user may be glaring when viewing the screen.
- the electronic device when the electronic device is in a dark environment and the screen is locked, the electronic device increases the screen brightness by progressive fill light.
- the progressive fill light method can be a method of gradually increasing the screen brightness over time.
- the brightness change can be as shown in Figure b in Figure 2. It can be seen that in the initial stage, the screen brightness is low and the electronic device cannot recognize the face information; as the screen brightness increases, the face brightness also increases, and the electronic device can continue to try face unlocking until the unlocking is successful; or the screen brightness is increased to the maximum value, the electronic device no longer increases the screen brightness and prompts that the face unlocking failed.
- the electronic device can learn through self-learning the minimum or lower screen brightness corresponding to the grayscale and/or color scale that can achieve face unlocking, thereby reducing the brightness of the screen when face unlocking in a dark environment while ensuring the screen unlocking rate, reducing the problem scenarios of screen glare, and improving the user experience.
- S302 The electronic device obtains the ambient light brightness.
- the first preset brightness may be a system preset brightness in the current bright light environment.
- the first preset brightness may be a brightness value set by the user by sliding a brightness bar in the control center interface
- the first preset brightness may also be a brightness value set by the user by sliding a brightness bar in the setting interface
- the first preset brightness may also be a brightness value adaptively adjusted by the electronic device based on the ambient light brightness after the automatic brightness function is turned on.
- the electronic device When the electronic device is off the screen, it receives an operation to trigger the screen to light up.
- the electronic device may display a lock screen interface as shown in a of FIG. 1A; the initial brightness of the lock screen interface may be a system preset brightness.
- the electronic device may then increase the screen brightness to fill in the light for the face; for example, the screen brightness is adjusted from the second preset brightness to the first target brightness.
- S305 The electronic device unlocks the screen based on the facial information.
- ambient light can be used to illuminate the face, and the electronic device can unlock the screen based on the facial information collected by the camera; in a dark light environment, the screen brightness can be used to illuminate the face, and the electronic device can unlock the screen based on the facial information collected by the camera.
- the electronic device may use a progressive fill light method to gradually increase the brightness of the screen to the fill light brightness, so as to reduce the discomfort to the human eyes caused by sudden changes in brightness.
- the fill light brightness in the self-learning record table may be the maximum screen brightness that can be increased under the current grayscale and/or color scale.
- the electronic device can reduce the screen brightness through the fill light brightness in the self-learning record table to reduce the glare problem of the screen being too bright. For example, in FIG. 4 , after retrying 2 times, the face unlock is successful.
- the fill light brightness is the maximum screen brightness that can be increased under the current grayscale and/or color scale
- the electronic device no longer increases the brightness after reaching the fill light brightness.
- the screen brightness of the electronic device in an embodiment of the present application is a brightness.
- the screen brightness may be increased to b brightness due to the delay. It can be seen that a brightness is less than b brightness. Therefore, in an embodiment of the present application, the screen brightness is smaller during face unlocking, thereby reducing the screen brightness and reducing the glare problem of the screen being too bright.
- the electronic device since the electronic device cannot obtain the screen brightness for specific face unlocking, the face unlocking process takes a long time; in the embodiment of the present application, the electronic device can obtain a corresponding fill light brightness based on the gray scale and/or color scale, so the electronic device can increase the brightness step to quickly increase the screen brightness to the fill light brightness corresponding to the current gray scale and/or color scale, thereby increasing the speed of face unlocking; the brightness step can be the value of the screen brightness change within the same time.
- FIG5 shows four different forms of lock screen wallpapers, wherein the first lock screen wallpaper has a 136 grayscale area accounting for 100%, and the equivalent grayscale is 136 grayscale; the second lock screen wallpaper has a 0 grayscale area accounting for 40%, a 136 grayscale area accounting for 100%, a 255 grayscale area accounting for 10%, and the equivalent grayscale is 136 grayscale; the third lock screen wallpaper has a 0 grayscale area accounting for 75%, a 255 grayscale area accounting for 25%, and the equivalent grayscale is 136 grayscale; the fourth lock screen wallpaper has a 0 grayscale area accounting for 75%, a 255 grayscale area accounting for 25%, and the equivalent grayscale is 136 grayscale.
- the equivalent grayscale is calculated based on the pixel values of all pixels in the lock screen wallpaper, and the calculation method of the equivalent grayscale will be introduced later.
- the grayscale distribution in lock screen wallpaper 1 is relatively uniform.
- the electronic device uses lock screen wallpaper 1 to fill light for the face, the overall brightness of the face is roughly the same, and the electronic device can capture clearer facial information; when the electronic device uses lock screen wallpaper 4 to fill light for 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 failure of face unlocking.
- lock screen wallpaper 1-lock screen wallpaper 4 can correspond to 4 color scales, and a corresponding relationship can be established with the fill light brightness by adding color scale to gray scale, thereby further refining the corresponding relationship of the fill light brightness and improving the accuracy of the fill light brightness.
- Table 2 shows the corresponding relationship between grayscale, color scale and fill light brightness in the embodiment of the present application, as shown in Table 2:
- the electronic device When the electronic device displays the lock screen interface, it will display the lock screen wallpaper.
- the electronic device can obtain the grayscale and color scale corresponding to the lock screen wallpaper, and query the corresponding fill light brightness according to the grayscale and color scale. For example, if the color scale of the lock screen wallpaper currently set by the electronic device is color scale 2 and the grayscale is grayscale 2, the electronic device will adjust the lock screen interface to fill light brightness 2.
- S702 The electronic device queries the self-learning record table to see whether the fill light brightness corresponding to the current grayscale and color scale is included.
- the electronic device can perform a face unlocking process while the screen brightness gradually increases from a second preset brightness to a first target brightness.
- the electronic device starts face unlocking.
- the second target brightness may be the fill light brightness corresponding to the updated current color scale and gray scale.
- the fill light brightness corresponding to the current color scale and gray scale is the first target brightness.
- the fill light brightness corresponding to the current color scale and gray scale is the second target brightness.
- the electronic device can achieve face unlocking during the process of increasing the screen brightness from the second preset brightness to the first target brightness, it can be said that the first target brightness is greater than the accurate fill light brightness corresponding to the current color scale and gray scale.
- the electronic device can reduce the fill light brightness corresponding to the current color scale and gray scale in the self-learning record table, for example, reducing the fill light brightness from the first target brightness to the second target brightness.
- the screen brightness can be adjusted based on the second target brightness.
- the value of failed reason may include a first value, a second value, and a third value, wherein the first value may be used to indicate that the reason for the face unlock failure is a dark light environment, and the screen has been unlocked within a preset time; the second value may be used to indicate that the reason for the face unlock failure is a dark light environment, and the screen has not been unlocked within a preset time; the third value may be used to indicate that the reason for the face unlock failure is not a dark light environment.
- the first value may be 0, the second value may be 1, and the third value may be 2.
- the first value-third value may also be other forms or other values, which are not limited in the embodiment of the present application.
- the electronic device may execute step S709; otherwise, the electronic device terminates the fill light process.
- the face unlocking process shown in steps S604-S606 can be understood as a process of multiple retry in a single face unlocking process.
- the face unlocking process shown in steps S706 and S707 is the final result of multiple face unlocking retries.
- the face unlocking process in step S706 can correspond to the process of the electronic device going from screen off to face unlocking the screen successfully in a single attempt, and the face unlocking process in step S707 can correspond to the process of the electronic device going from screen off to face unlocking the screen failing when the number of retries reaches the threshold number. This application embodiment illustrates this.
- the electronic device updates the correspondence between the color scale and gray scale and the third target brightness in the self-learning record table; the third target brightness is greater than the first target brightness.
- the electronic device fails to perform face unlocking during the process of increasing the screen brightness from the second preset brightness to the first target brightness, it can be explained that the first target brightness is less than the accurate fill light brightness corresponding to the current color scale and gray scale.
- the electronic device can increase the fill light brightness corresponding to the current color scale and gray scale in the self-learning record table, for example, increase the fill light brightness from the first target brightness to the third target brightness.
- the screen brightness can be adjusted based on the third target brightness.
- the difference between the first target brightness and the second target brightness can be a preset value.
- the preset value can be increased based on the first target brightness to obtain a third target brightness.
- the preset value can be a fixed value, or a learning gradient, which is not limited in the embodiment of the present application.
- the self-learning record table may include information on multiple color scales and gray scales.
- the information on any color scale and gray scale includes color scale, gray scale, default screen brightness, fill light brightness after learning, learning gradient, and whether to terminate learning.
- the color scale can be used to distinguish different lock screen wallpapers of the same gray scale;
- the fill light brightness after learning can be understood as the fill light brightness used when the face is unlocked next time, and the fill light brightness after learning can be the fill light brightness shown in Table 1 and/or Table 2.
- the default screen brightness can be the initial fill light brightness corresponding to the new lock screen wallpaper calculated based on the preset color scale, preset gray scale and preset screen brightness when the new lock screen wallpaper is displayed and the fill light brightness after learning is not included in the self-learning record table;
- the learning gradient can be used to specify the difference between two adjacent fill light brightnesses at the same color scale and gray scale.
- the first target brightness is greater than the second target brightness, and the difference between the two brightness values is the learning gradient; for another example, in step S710, the first target brightness is less than the third target brightness, and the difference between the two brightness values is the learning gradient.
- the electronic device may record the default list and the self-learning record table in an array.
- the array includes the default screen brightness corresponding to any color scale and/or gray scale in the default list, but some of the color scales and/or gray scales in the array correspond to the learned fill light brightness, and the electronic device has not yet learned the fill light brightness corresponding to another part of the color scales and/or gray scales.
- the learned fill light brightness corresponding to the other part of the color scales and/or gray scales in the array can be 0 or a null value.
- the electronic device may also use different arrays to record the default list and the self-learning record table respectively.
- the first array stores the self-learning record table
- the first array [N] ⁇ RGB_L1, grayscale 1, fill light brightness 1 after learning, whether to terminate learning, learning gradient 1 ⁇ , ⁇ RGB_L2, grayscale 2, fill light brightness 2 after learning, whether to terminate learning, learning gradient 2 ⁇ ... ⁇ RGB_LN, grayscale N, fill light brightness N after learning, whether to terminate learning, learning gradient N ⁇ .
- the electronic device uses a fill light brightness of 300 nit for face unlocking, and the unlocking is unsuccessful.
- the electronic device can update the learned fill light brightness corresponding to the color scale and/or gray scale of the current lock screen wallpaper to 305 nit.
- the electronic device can use a fill light brightness of 304 nit for face unlocking, and if the unlocking is successful, the electronic device can update the learned fill light brightness corresponding to the color scale and/or gray scale of the current lock screen wallpaper to 302 nit.
- the electronic device may include an application layer, an application framework layer, a hardware abstraction layer, a kernel layer and a hardware layer.
- the kernel layer may include: a camera driver and a display driver, wherein the camera driver is used to interact with the camera hardware to obtain a face image; the display driver is used to display the lock screen wallpaper at a set screen brightness.
- the ambient light brightness uploaded by the ambient light sensor can be obtained.
- the face application can determine whether the current scene is a dark light scene based on the ambient light brightness. For example, in a dark light environment, the face application can instruct to use the screen brightness to fill in the light for the face.
- step S802 the process in which the face application is located can execute the face unlocking process; after step S804, the process in which the fill light control module is located can execute the process of adjusting the screen brightness; the two processes can execute their respective corresponding processes at the same time.
- step S804 The following first describes the process of adjusting the fill light. As shown in FIG8 , after step S804, the following steps are included:
- the fill light control module queries the learning engine for an array based on the color scale and gray scale.
- the instruction for adjusting the screen brightness may include the screen brightness to be adjusted.
- the instruction for adjusting the screen brightness may be set Display Brightness.
- the backlight control module adjusts the screen brightness according to the instruction for adjusting the screen brightness.
- the backlight control module may interact with the display driver to set the brightness of the display panel through the display driver. For example, the backlight control module sends an instruction (set panel brightness) to the display driver to set the brightness of the display panel; the display driver writes the screen brightness to be adjusted into the register to control the display screen to achieve the screen brightness to be adjusted.
- set panel brightness an instruction to the display driver to set the brightness of the display panel
- the display driver writes the screen brightness to be adjusted into the register to control the display screen to achieve the screen brightness to be adjusted.
- step S805 the following steps may also be included:
- This step may refer to step S806.
- the fill light control module instructs the backlight control module to adjust the screen brightness every 75 ms.
- the difference between two adjacent screen brightnesses may be the ratio of the difference between the default screen brightness and the system preset brightness to the number threshold.
- step S807 the electronic device may execute step S807, which is not limited in this embodiment of the present application.
- the face recognition module obtains face information reported by the camera driver.
- the face recognition module may instruct the camera driver to control the camera to collect face information.
- the face recognition module obtains the face information returned by the camera driver.
- the face recognition module matches the face information with the preset face information.
- the face recognition module can extract the feature points of the face information, compare the feature points of the face information with the feature points of the preset face information, and when the similarity is greater than the similarity threshold, it can be confirmed that the current face information is the preset face information.
- the embodiment of the present application can also use other methods to verify the face information, and the embodiment of the present application does not make specific restrictions on this.
- the face recognition module reports the face recognition result to the face application.
- the face recognition result can be used to indicate that the face unlock is successful or that the face unlock fails.
- the face recognition result may include an instruction for indicating that the unlock is successful and the maximum fill light brightness when the unlock is successful.
- the instruction for indicating that the unlock is successful may be, for example, the value of is Success is the fourth value; the maximum fill light brightness when the unlock is successful may be, for example, max brightness.
- the face recognition result may include an instruction for indicating unlocking failure and a reason for face unlocking failure.
- the instruction for indicating unlocking success may be, for example, a value of is Success as the fifth value; the value of the reason for face unlocking failure may be the first value, the second value, or the third value.
- the face application transmits the face recognition result to the lock screen application.
- the lock screen application can perform the screen unlocking process based on the face recognition result. For example, when the face recognition result includes an instruction for indicating that the unlocking is successful, the lock screen application unlocks the screen; when the face recognition result includes an instruction for indicating that the unlocking fails, the lock screen application can prompt the user that the face unlocking fails, and the user can try face unlocking again or change the unlocking method.
- the learning engine updates the self-learning record table according to the face recognition result.
- the electronic device can reduce the fill light brightness corresponding to the current color scale and gray scale. For details, please refer to the relevant description in step S707, which will not be repeated here.
- the electronic device may increase the fill light brightness corresponding to the current color scale and gray scale. For details, please refer to the relevant description in step S710, which will not be repeated here.
- the corresponding relationship between the color scale, gray scale and fill light brightness in the self-learning record table is used as an example to illustrate the screen unlocking method of the embodiment of the present application.
- the embodiment of the present application can also use the corresponding relationship between the gray scale and the fill light brightness to implement the self-learning process, such as shown in Table 4.
- the embodiment of the present application does not limit this.
- the present application provides a screen unlocking method.
- the screen unlocking method may include the following steps:
- the screen-off state may include the AOD state.
- the screen-off state may correspond to the interface shown in a in FIG. 1B
- the screen-off state may also correspond to the interface shown in c in FIG. 1B .
- the operation of triggering the screen to light up may be an operation of triggering the electronic device to enter the screen-on state from the screen-off state or the AOD state.
- the operation of triggering the screen to light up may be a trigger operation for the power button in the interface shown in a in FIG. 1B ; the operation of triggering the screen to light up may be a trigger operation for the power button in the interface shown in c in FIG.
- the operation of triggering the screen to light up may also be other operations, for example, when receiving a notification message, entering the screen-on state from the screen-off state, etc., and the embodiment of the present application does not limit this.
- the first lock screen interface may be, for example, the interface shown in a of FIG. 1A.
- the first brightness may be a system preset brightness when the screen is on; the second brightness may correspond to the first target brightness, for example, the second brightness may be a fill light brightness found in the self-learning record table based on the color scale and/or gray scale of the lock screen wallpaper of the first lock screen interface.
- the second brightness may also be a default screen brightness found in the default list based on the color scale and/or gray scale of the lock screen wallpaper of the first lock screen interface.
- the electronic device when the electronic device receives an operation to trigger the screen to light up, the electronic device can increase the screen brightness to fill in the user's face, so as to achieve face unlocking in a dark environment. Specifically, after the screen is turned on, the electronic device displays the first lock screen interface, and the initial brightness of the first lock screen interface is the system preset brightness, for example, the initial brightness is the first brightness. Afterwards, the electronic device can increase the screen brightness to the second brightness.
- the second brightness can be understood as the maximum screen brightness that can be achieved during the fill light process; in the process of the brightness of the first lock screen interface changing from the first brightness to the second brightness, the electronic device may no longer continue to increase the screen brightness to the second brightness after successful unlocking.
- the first unlocking information includes information collected by the camera of the electronic device during a process in which the brightness of the first lock screen interface changes from a first brightness to a second brightness.
- the first unlocking information may be, for example, face information, gesture information, etc. collected by the camera after the screen is first triggered.
- the unlocking interface may be, for example, the interface shown in c in FIG. 1A .
- the camera of the electronic device can collect the first unlocking information and perform the face unlocking process based on the first unlocking information.
- the electronic device can collect clearer face information and implement face unlocking.
- the third brightness may be, for example, the second target brightness.
- the third brightness may be the fill light brightness corresponding to the color scale and/or gray scale of the lock screen wallpaper of the updated first lock screen interface.
- the electronic device may perform a screen-off operation. For example, after step S902, when the unlock interface is displayed, an operation to trigger screen-off is received; in response to the operation to trigger screen-off, the electronic device turns off the screen; when the screen is off, an operation to trigger screen-on is received; and step S903 is executed. For another example, after step S902, when the unlock interface is displayed and the screen-off time is reached, the electronic device turns off the screen; when the screen is off, an operation to trigger screen-on is received; and step S903 is executed.
- the second unlock information may be face information, gesture information, etc. collected 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 for the same user, the face information captured by the electronic device during the two face unlocking processes may also be different.
- the unlock interface may be, for example, the interface shown in c in FIG. 1A.
- the fourth brightness may be the third target brightness.
- the first lock screen interface before the brightness of the first lock screen interface changes from the first brightness to the fourth brightness, it also includes: displaying an unlocking interface within a preset time after unsuccessful unlocking based on the second unlocking information and when successful unlocking based on the third unlocking information; the third unlocking information includes password information and/or fingerprint information.
- This step may refer to the description related to step S708 in the embodiment shown in FIG. 7 , and will not be described in detail in this embodiment of the present application.
- the electronic device can learn the fill light brightness corresponding to different lock screen wallpapers, and fill light the lock screen wallpaper based on the fill light brightness, thereby improving the unlocking rate under each lock screen wallpaper.
- the ambient light threshold may be a threshold for distinguishing a dark light environment from a bright light environment, for example, the ambient light threshold may be a value between 0-2.5 lux, for example, the ambient light threshold may be 1 lux.
- the ambient light threshold When the ambient light brightness is greater than the ambient light threshold, it can be determined that the current environment is bright light, and the electronic device may not use the screen brightness to fill in the light for the face. Therefore, in a bright light environment, after the screen is triggered for the sixth time, the brightness of the second lock screen interface will not change and will remain at the first brightness.
- the first array records a self-learning record table, which includes a correspondence between color scale and/or gray scale and fill light brightness, and the target screen brightness may correspond to the fill light brightness corresponding to the color scale and/or gray scale in the embodiment of the present application.
- the first array may be an array that stores both the self-learning record table and the default list, or may be an array that only stores the self-learning record table, and the embodiment of the present application does not limit this.
- the electronic device before the electronic device uses face unlocking, it can obtain a more accurate fill light brightness corresponding to the current lock screen wallpaper, and then use a lower screen brightness to implement the face unlocking process, reducing the glare problem caused by the screen being too bright.
- the brightness of the first lock screen interface changes from a first brightness to a second brightness, and also includes: the brightness of the first lock screen interface changes from the first brightness to the second brightness instantaneously; or, the brightness of the first lock screen interface changes gradually from the first brightness to the second brightness based on the brightness step.
- the instantaneous can be understood as a small time scale, such as increasing from the first brightness to the second brightness within a few milliseconds.
- the gradual change from the first brightness to the second brightness can be understood as increasing the screen brightness every 75ms as mentioned in the above embodiment.
- the electronic device can fill in the light of the face in a variety of ways.
- the electronic device adopts the progressive fill-in light method it can reduce the discomfort of the human eye caused by the sudden brightening of the screen, and can better improve the user experience.
- the first unlocking information after successfully unlocking based on the first unlocking information, it also includes: in the first array, updating the correspondence between the color scale and/or gray scale of the first lock screen wallpaper and the second brightness to the correspondence between the color scale and/or gray scale of the first lock screen wallpaper and the third brightness.
- the electronic device After the screen is turned on for the first time, face unlocking is successful. After receiving feedback that face unlocking is successful, the electronic device can adjust the self-learning record table according to the face unlocking result.
- the process can refer to the relevant description in the embodiment shown in Figure 6 or Figure 7, which will not be repeated here.
- the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.
- the second unlocking information after unsuccessful unlocking based on the second unlocking information, it also includes: in the first array, updating the correspondence between the color scale and/or gray scale of the first lock screen wallpaper and the third brightness to the correspondence between the color scale and/or gray scale of the first lock screen wallpaper and the fourth brightness.
- the electronic device After the screen is turned on for the first time, face unlocking is successful. After receiving feedback that face unlocking failed, the electronic device can adjust the self-learning record table according to the face unlocking result.
- the process can refer to the relevant description in the embodiment shown in Figure 6 or Figure 7, which will not be repeated here.
- the electronic device can adjust the fill light brightness based on the result of the previous face unlocking, thereby learning the more accurate fill light brightness required for the current lock screen interface during face unlocking, thereby effectively reducing the glare problem caused by excessive screen brightness.
- the correspondence between the color scale and gray scale of the first lock screen wallpaper and the fourth brightness is updated in the first array, including: when the first information is obtained, the correspondence between the color scale and/or gray scale of the first lock screen wallpaper and the fourth brightness is updated in the first array; the first information is used to characterize the unlocking failure caused by the dark facial brightness, and the screen is unlocked by the third unlocking information within a preset time.
- the first information may be that the failed reason in the above embodiment is the first value.
- the difference in target screen brightness before and after the update is x; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the i-th time (i is a positive integer greater than 1), the difference in target screen brightness before and after the update is x-i+1; when the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper is updated for the j-th time (j is a positive integer greater than i), if the difference in target screen brightness before and after the update is less than 1, the electronic device will no longer update the target screen brightness corresponding to the color scale and gray scale of the first lock screen wallpaper.
- This process may correspond to the relevant description of the array part in the above embodiment.
- the i-th update may correspond to the second to fourth face unlocking
- the j-th update may correspond to the fifth face unlocking.
- the electronic device can converge the fill light brightness to a value suitable for face unlocking of the current lock screen wallpaper through a learning gradient that decreases with the number of updates, thereby effectively reducing the glare problem caused by excessive screen brightness.
- the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195, and an embedded secure element (eSE) 196.
- SIM subscriber identification module
- eSE embedded secure element
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
- the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
- the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
- different processing units can be independent devices or integrated in one or more processors.
- the processor 110 can be used for the steps related to information processing in the screen unlocking method provided in the embodiment of the present application.
- the electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 can be used to display the first lock screen interface, the second lock screen interface, and the unlock interface, etc.
- the electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
- the camera 193 is used to capture static images or videos.
- the electronic device can use the camera to collect face information to realize the face unlocking process.
- the internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions.
- the internal memory 121 may include a program storage area and a data storage area.
- the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.
- the data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), etc.
- the screen unlocking method of the embodiment of the present application has been described above, and the device for executing the above screen unlocking method provided by the embodiment of the present application is described below. Those skilled in the art can understand that the method and the device can be combined and referenced with each other, and the relevant device provided by the embodiment of the present application can execute the steps in the above screen unlocking method.
- the screen unlocking method provided in the embodiment of the present application can be applied to electronic devices with communication functions.
- the electronic device includes an electronic device, and the specific device form of the electronic device can refer to the above related description, which will not be repeated here.
- the embodiments of the present application also provide a computer-readable storage medium.
- the computer-readable storage medium stores a computer program.
- the above method is implemented when the computer program is executed by the processor.
- the method described in the above embodiment can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted on a computer-readable medium.
- Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another.
- the storage medium can be any target medium that can be accessed by a computer.
- a computer readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that is intended to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.
- any connection is appropriately referred to as a computer readable medium.
- the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium.
- DSL digital subscriber line
- Disk and optical disk as used herein include optical disk, laser disk, optical disk, digital versatile disk (DVD), floppy disk and Blu-ray disk, where disks usually reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included in the scope of computer readable media.
- An embodiment of the present application provides a computer program product, which includes a computer program.
- the computer program When the computer program is executed, the computer executes the above method.
- each flow process and/or box in the flow chart and/or block diagram and the combination of the flow chart and/or box in the flow chart and/or block diagram can be realized by computer program instructions.
- These computer program instructions can be provided to the processing unit of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart or multiple flows and/or one box or multiple boxes of the block chart.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- User Interface Of Digital Computer (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
本申请实施例提供一种屏幕解锁方法及相关设备,涉及终端技术领域。适用于一种暗光环境下人脸解锁,具体方式:在灭屏状态下,响应于第一次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第二亮度变化;在基于第一解锁信息成功解锁的情况下,显示解锁界面;第一解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第二亮度变化的过程中采集的信息;在灭屏状态下,响应于第二次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第三亮度变化;第三亮度小于第二亮度。这样,可通过前一次人脸解锁结果调节补光亮度,学习到锁屏界面与补光亮度的对应关系,从而有效减小屏幕过亮导致的刺眼问题。
Description
本申请要求于2024年01月11日提交中国国家知识产权局、申请号为202410052389.8、申请名称为“屏幕解锁方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及终端技术领域,尤其涉及一种屏幕解锁方法及相关设备。
为了提升电子设备中信息的安全性,电子设备支持锁屏功能,相应的,电子设备可支持多种屏幕解锁方式,例如,屏幕解锁方式可包括:密码解锁、指纹解锁、人脸解锁、手势解锁和蓝牙设备解锁等。
用户可在电子设备录入人脸,电子设备开启人脸解锁功能。当电子设备处于锁屏状态时,电子设备可在识别到用户人脸信息后,解锁屏幕。但在暗光环境下,电子设备可能无法采集到人脸信息。
可能的实现中,电子设备可在解锁时,通过提升屏幕亮度的方式来对用户人脸进行补光,使得电子设备能够拍摄到清楚的人脸信息。但由于用户所处环境较暗,电子设备提升屏幕亮度后,可能导致屏幕较为刺眼,影响用户的使用体验。
本申请实施例提供一种屏幕解锁方法及相关设备,应用于终端技术领域;提供了一种暗光环境下人脸解锁的方式,在解锁过程中,屏幕亮度适中,对用户人眼较为友好,减小屏幕亮度过高导致的刺眼问题,提升用户的使用体验。
第一方面,本申请实施例提出一种屏幕解锁方法。该方法包括:在灭屏状态下,响应于第一次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第二亮度变化;在基于第一解锁信息成功解锁的情况下,显示解锁界面;第一解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第二亮度变化的过程中采集的信息;在灭屏状态下,响应于第二次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第三亮度变化;第三亮度小于第二亮度。这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,还包括:若在第一锁屏界面的亮度从第一亮度向第三亮度变化的过程中,基于第二解锁信息未成功解锁,则在灭屏状态下,响应于第三次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第四亮度变化,第四亮度大于第三亮度,第二亮度大于第四亮度;其中,第二解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第三亮度变化的过程中采集的信息。这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在第一锁屏界面的亮度从第一亮度向第四亮度变化之前,还包括:在基于第二解锁信息未成功解锁之后的预设时长内,且基于第三解锁信息成功解锁的情况下,显示解锁界面;第三解锁信息包括密码信息和/或指纹信息。这样,可识别用户误触发导致的人脸解锁失败的场景,从而提升学习过程的准确性,提升自学习记录表中补光亮度的准确性。
可选的,还包括:若在第一锁屏界面的亮度从第一亮度向第四亮度变化的过程中,基于第四解锁信息成功解锁,则在灭屏状态下,响应于第四次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第四亮度变化;其中,第四解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第四亮度变化的过程中采集的信息。这样,经过多次学习后,电子设备可学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,第一锁屏界面的锁屏壁纸包括第一锁屏壁纸,第二锁屏界面的锁屏壁纸包括第二锁屏壁纸,还包括:在灭屏状态下,响应于第五次触发亮屏的操作,显示第二锁屏界面,且第二锁屏界面的亮度从第一亮度向第五亮度变化,第二锁屏壁纸与第一锁屏壁纸不同;第五亮度与第四亮度不同。这样,电子设备可学习不同锁屏壁纸对应的补光亮度,并基于该补光亮度对锁屏壁纸进行补光,从而提升了各锁屏壁纸下的解锁率。
可选的,还包括:在灭屏状态下,响应于第六次触发亮屏的操作,显示第二锁屏界面,且第二锁屏界面的亮度为第一亮度;第六次触发亮屏时的环境光亮度大于环境光阈值。这样,电子设备可在暗光环境下对色阶和/或灰阶与补光亮度的对应关系进行学习,在亮光环境下,不学习色阶和/或灰阶与补光亮度的对应关系,提升补光亮度的准确性;同时,也可降低亮光环境下提升屏幕亮度导致的电量消耗。
可选的,电子设备中包括第一数组,第一数组中记录有色阶和/或灰阶与目标屏幕亮度的对应关系;在第一锁屏界面的亮度从第一亮度向第二亮度变化之前,包括:获取环境光亮度和第一锁屏壁纸的色阶和/或灰阶;在环境光亮度小于环境光阈值的情况下,在第一数组中查找第一锁屏壁纸的色阶和/或灰阶;第一锁屏界面的亮度从第一亮度向第二亮度变化,包括:在第一数组中包括第一锁屏壁纸的色阶和/或灰阶的情况下,控制第一锁屏界面的亮度从第一亮度向第二亮度变化;第二亮度为第一数组中与第一锁屏壁纸的色阶和/或灰阶对应的目标屏幕亮度。这样,暗光环境下,电子设备使用人脸解锁之前,可获取到当前锁屏壁纸对应的较准确的补光亮度,进而使用较低的屏幕亮度实现人脸解锁流程,减小因屏幕过亮导致的刺眼问题。
可选的,第一锁屏界面的亮度从第一亮度向第二亮度变化,还包括:第一锁屏界面的亮度从第一亮度瞬时变化为第二亮度;或者,第一锁屏界面的亮度基于亮度步长从第一亮度逐渐变化为第二亮度。这样,电子设备可通过多种方式对人脸进行补光,其中,当电子设备采用递进式补光的方式时,可减少屏幕突然变亮引起的人眼不适,能够更好的提升用户的使用体验。
可选的,在基于第一解锁信息成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与第二亮度的对应关系更新为,第一锁屏壁纸的色阶和/或灰阶与第三亮度的对应关系。这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在基于第二解锁信息未成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与第三亮度的对应关系更新为,第一锁屏壁纸的色阶和/或灰阶与第四亮度的对应关系。这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在第一数组中更新第一锁屏壁纸的色阶和灰阶与第四亮度的对应关系,包括:在获取到第一信息的情况下,在第一数组中更新第一锁屏壁纸的色阶和/或灰阶与第四亮度的对应关系;第一信息用于表征面部亮度暗导致解锁失败,且在预设时间内通过第三解锁信息解锁屏幕。这样,可排除用户误触发导致的人脸解锁失败的场景,以及非补光场景导致的人脸解锁失败的场景,从而提升学习过程的准确性,提升自学习记录表中补光亮度的准确性。
可选的,在第1次更新所第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值为x;在第i(i为大于1的正整数)次更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值为x-i+1;在第j(j为大于i的正整数)次更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值小于1,则电子设备不再更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度。这样,电子设备可通过随更新次数递减的学习梯度,将补光亮度收敛到一个适用于当前锁屏壁纸人脸解锁的值,从而有效的减小屏幕亮度过高出现的刺眼问题。
第二方面,本申请实施例提供一种电子设备,电子设备也可以称为终端设备、终端(terminal)、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。终端设备可以是手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。
该电子设备包括:包括:处理器和存储器;存储器存储计算机执行指令;处理器执行存储器存储的计算机执行指令,使得电子设备执行如第一方面的方法。
第三方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序。计算机程序被处理器执行时实现如第一方面的方法。
第四方面,本申请实施例提供一种计算机程序产品,计算机程序产品包括计算机程序,当计算机程序被运行时,使得计算机执行如第一方面的方法。
本申请实施例提供了一种芯片系统,芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行如第一方面的方法。
应当理解的是,本申请的第二方面至第五方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
图1A为本申请实施例提供的一种人脸解锁的界面示意图;
图1B为本申请实施例提供的两种进入锁屏界面的界面示意图;
图2为可能的实现中两种补光方式的补光亮度与时间的关系图;
图3为本申请实施例提供的一种屏幕解锁方法的流程示意图;
图4为本申请实施例提供的补光方式的补光亮度与时间的关系图;
图5为本申请实施例提供的多张相同灰阶的锁屏壁纸与锁屏率的关系图;
图6为本申请实施例提供的一种屏幕解锁方法的流程示意图;
图7为本申请实施例提供的一种屏幕解锁方法的流程示意图;
图8为本申请实施例提供的电子设备的内部交互流程图;
图9为本申请实施例提供的电子设备100的结构示意图;
图10为本申请实施例提供的屏幕解锁装置的结构示意图。
为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:
1)锁屏与解锁
锁屏可以理解为电子设备显示锁屏界面的状态。在锁屏状态下,电子设备中的程序保持运行状态。其中,锁屏界面的显示可以保障电子设备的数据安全。一些实施例中,锁屏界面可与屏幕解锁方式相对应,例如,当电子设备设置有密码时,锁屏界面可显示用于输入密码的区域;当电子设备设置有指纹解锁时,锁屏界面可显示用于录入指纹的区域;当电子设备设置有人脸解锁时,锁屏界面可显示有用于指示人脸解锁的标识。
以屏幕解锁方式为人脸解锁为例,图1A为本申请实施例提供的一种暗光环境下,人脸解锁的界面示意图。在暗光环境中,电子设备可显示如图1A中的a所示的锁屏界面。在图1A中的a所示的界面,该锁屏界面中可以显示有时间和日期、锁屏提示信息101和人脸解锁提示信息102;其中,锁屏提示信息101用于提示用户电子设备处于锁屏状态,解锁后方可使用;人脸解锁提示信息102用于提示用户电子设备可基于人脸信息解锁。
在周围场景较暗的情况下,用户可执行如图1A中的b所示的操作,将电子设备放置在人脸前方,使得屏幕能够照亮人脸,且采集到人脸信息。
解锁可理解为解除电子设备的显示屏锁定。当电子设备采集到用户人脸信息,并验证人脸信息成功时,电子设备解锁屏幕,进入解锁界面,如图1A中的c所示界面。例如,图1A中的c所示界面可以为桌面。
2)灭屏、息屏显示(always on display,AOD)和亮屏
灭屏也称为息屏,可理解为电子设备的显示屏下电,处于灭屏时,电子设备的显示屏的亮度低于预设亮度。亮屏可以理解为电子设备的显示屏上电,处于亮屏时,电子设备的显示屏的亮度高于预设亮度。
AOD可理解为也称为常亮显示。指电子设备在灭屏状态时,电子设备的部分屏幕处于灭屏,部分屏幕保持亮起状态;在亮屏区域,电子设备可显示信息,例如:时间、日期和未读消息等。AOD模式可节省电子设备的电池电量,同时也方便用户随时查看信息。
一些实施例中,电子设备可从灭屏状态进入亮屏状态。例如,在图1B中的a所示界面中,电子设备可处于灭屏状态,当接收到针对电源(power)按键的触发操作时,电子设备可进入亮屏状态。在电子设备设置有锁屏功能的情况下,亮屏后,电子设备可显示如图1B中的b所示的锁屏界面,并参照图1A所示步骤实现人脸解锁。
另一些实施例中,电子设备也可从息屏显示(always on display,AOD)界面进入亮屏状态。例如,在图1B中的c所示界面中,电子设备可处于AOD状态,当接收到针对电源(power)按键的触发操作时,电子设备可进入亮屏状态。在电子设备设置有锁屏功能的情况下,亮屏后,电子设备可显示如图1B中的b所示的锁屏界面,并参照图1A所示步骤实现人脸解锁。
3)电子设备
本申请实施例的终端设备也可以为任意形式的电子设备,例如,电子设备可以包括具有图像处理功能的手持式设备、车载设备等。例如,一些电子设备为:手机(mobile phone)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备等,本申请实施例对此并不限定。
作为示例而非限定,在本申请实施例中,该电子设备还可以是可穿戴设备。可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。
此外,在本申请实施例中,电子设备还可以是物联网(internet of things,IoT)系统中的终端设备,IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。
本申请实施例中的电子设备也可以称为:终端设备、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置等。
在本申请实施例中,电子设备或各个网络设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。该硬件层包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。该操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。该应用层包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
为了便于清楚描述本申请实施例的技术方案,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
需要说明的是,本申请实施例中的“在……时”,可以为在某种情况发生的瞬时,也可以为在某种情况发生后的一段时间内,本申请实施例对此不作具体限定。此外,本申请实施例提供的显示界面仅作为示例,显示界面还可以包括更多或更少的内容。
电子设备可开启人脸解锁和功能。人脸解锁功能开启后,电子设备可执行如图1A所示的人脸解锁过程。但可能的实现中,使用屏幕对人脸进行补光后,可能出现屏幕过亮,用户观看屏幕较为刺眼的现象。
这是因为:在可能的实现中,当电子设备处于暗光环境和锁屏状态时,电子设备将屏幕提升到固定亮度。为确保屏幕亮度能够照亮人脸,电子设备能够拍摄到清楚的人脸信息,该亮度值往往设置的偏高。这导致电子设备使用屏幕补光时,屏幕的亮度过高。例如,固定补光的方式中,亮度变化可如图2中的a图所示,在人脸解锁期间,屏幕亮度一直为固定值。
或者,可能的实现中,当电子设备处于暗光环境和锁屏状态时,电子设备通过递进式补光的方式提升屏幕亮度。递进式补光方式可以为随时间变化逐渐升高屏幕亮度的方式,例如,固定补光的方式中,亮度变化可如图2中的b图所示。可以看出,在开始阶段,屏幕亮度较低,电子设备无法识别到人脸信息;随着屏幕亮度的提升,人脸的亮度也在提升,电子设备可不断尝试人脸解锁,直至解锁成功;或屏幕亮度提升到最大值,电子设备不再提升屏幕亮度以及提示人脸解锁失败。
递进式补光方式可在一定程度上缓解屏幕过亮引发的刺眼问题。但由于可能的实现中补光最大值也是预设的固定值,该固定值往往设置的偏高,导致当电子设备将屏幕亮度提升至最大值时,仍会出现屏幕刺眼的问题。
有鉴于此,本申请实施例提供了一种屏幕解锁方法,在暗光环境下,通过前一次人脸解锁的结果和前一次人脸解锁的屏幕亮度,调整本次人脸解锁所使用的屏幕亮度。例如,前一次人脸解锁的屏幕亮度能够成功解锁屏幕,则降低本次解锁所用的屏幕亮度;前一次人脸解锁的屏幕亮度解锁屏幕失败,则提升本次解锁所用的屏幕亮度。但一些场景中,电子设备在前一次和本次人脸解锁时可能显示不同的锁屏壁纸,不同锁屏壁纸在相同屏幕亮度下,为用户人脸补光的能力不同;考虑该因素后,可通过灰阶和/或色阶对锁屏壁纸进行分类,在相同灰阶和/或色阶下,通过前一次的人脸解锁的结果和屏幕亮度调整下一次的屏幕亮度。这样,在任一灰阶和/或色阶下,电子设备能够通过自学习的方式,学习到该灰阶和/或色阶对应的能够实现人脸解锁的最低或较低的屏幕亮度,从而在保证屏幕解锁率的情况下,降低暗光环境下人脸解锁时屏幕的亮度,减少屏幕刺眼的问题场景,提升用户的使用体验。
下面结合图3先对进入本申请实施例提供的屏幕解锁方法的条件进行说明。如图3所示:
S301、电子设备接收到触发亮屏的操作。
其中,触发亮屏的操作可以为,用于控制电子设备由灭屏状态切换至亮屏状态的操作,在电子设备亮屏后,可显示如图1A所示的锁屏界面;或者,触发亮屏的操作也可以为,用于控制电子设备由息屏显示状态进入亮屏状态的操作,在电子设备亮屏后,可显示如图1A所示的锁屏界面。触发亮屏的操作也可以为其他操作,本申请实施例对此不做限制。
S302、电子设备得到环境光亮度。
S303、在环境光亮度大于或等于环境光阈值的情况下,电子设备可将屏幕亮度设置为第一预设亮度。
第一预设亮度可以为当前亮光环境下的系统预设亮度。例如,第一预设亮度可以为用户在控制中心界面通过滑动亮度条进行设置的亮度值,第一预设亮度也可以为用户在设置界面通过滑动亮度条进行设置的亮度值,第一预设亮度还可以为开启自动亮度功能后电子设备基于环境光亮度自适应调节的亮度值。
可以理解的是,在亮光环境下,电子设备可采集到清晰的人脸信息,不需要屏幕对用户人脸进行补光操作,电子设备可不对屏幕亮度进行调整,以及电子设备显示第一预设亮度的屏幕。
或者,S304、在环境光亮度小于环境光阈值的情况下,电子设备可将屏幕亮度由第二预设亮度调节为第一目标亮度。
第二预设亮度可以为当前暗光环境下的系统预设亮度。例如,第二预设亮度可以为用户在控制中心界面通过滑动亮度条进行设置的亮度值,第二预设亮度也可以为用户在设置界面通过滑动亮度条进行设置的亮度值,第二预设亮度还可以为开启自动亮度功能后电子设备基于环境光亮度自适应调节的亮度值。第二预设亮度可与第一预设亮度相同,也可与第一预设亮度不同。第一目标亮度可以为暗光环境下,电子设备对人脸进行补光的亮度值。本申请实施例中,第一目标亮度可以为基于灰阶和/或色阶与补光亮度的对应关系得到的亮度值,本申请实施例中,补光亮度可以理解为在使用某一锁屏壁纸对人脸补光时,电子设备学习到的能够显示的最大屏幕亮度。第一目标亮度也可以为默认屏幕亮度。本申请实施例后续会对这两种场景进行详细说明,此处先不做过多赘述。
在电子设备灭屏时,接收到触发亮屏的操作,响应于该操作,电子设备可显示如图1A中的a所示的锁屏界面;该锁屏界面的初始亮度可以为系统预设亮度。后续电子设备可通过提升屏幕亮度来对人脸进行补光;例如,将屏幕亮度由第二预设亮度调节到第一目标亮度。
可以理解的是,在暗光环境下,环境光无法照亮人脸,电子设备需要通过屏幕亮度对人脸进行补光,以使电子设备能够采集到较为清晰的人脸信息。在满足步骤S304的条件时,电子设备可开启本申请实施例提供的屏幕解锁方法。而在亮光环境中,将屏幕亮度提升至第一目标亮度后,电子设备可也实现人脸解锁;但会增加电子设备的运算压力,以及第一预设亮度可能大于第一目标亮度,第一预设亮度也可能小于第一目标亮度,在亮光环境下使用可能出现屏幕亮度解锁后突然变亮或变暗的现象,会影响到用户的使用体验。所以本申请实施例可定位于暗光环境下人脸解锁的场景。
在步骤S303或S304的亮度调节的过程中,还包括:
S305、电子设备基于人脸信息进行屏幕解锁。
可以理解的是,在亮光环境下,可使用环境光对人脸进行照亮,电子设备可基于摄像头采集的人脸信息进行屏幕解锁;在暗光环境下,可使用屏幕亮度对人脸进行照亮,电子设备可基于摄像头采集的人脸信息进行屏幕解锁。
本申请实施例中,电子设备可通过对人脸进行补光,以提升暗光环境下人脸解锁的成功率。其中,电子设备中可设置自学习记录表,自学习记录表中包括灰阶和/或色阶与补光亮度的对应关系。例如,以灰阶为例,表1示出了本申请实施例中灰阶与补光亮度的对应关系,如表1所示:
表1灰阶与补光亮度的对应关系表
电子设备在显示锁屏界面时,会显示锁屏壁纸。电子设备可得到锁屏壁纸对应的灰阶,并根据灰阶查询对应的补光亮度。例如,电子设备当前设置的锁屏壁纸的灰阶为灰阶2,则电子设备将锁屏界面调节至补光亮度2。
其中,灰阶1至灰阶N可以为具体灰阶值,也可以为N个灰阶区间。例如,当灰阶1至灰阶N为N个具体灰阶值时,电子设备可根据当前锁屏壁纸的灰阶与N个灰阶值比较,得到最接近的当前锁屏壁纸最接近的灰阶值,并将屏幕亮度设置为该灰阶值对应的补光亮度。又例如,灰阶1至灰阶N为N个灰阶区间时,电子设备可根据当前锁屏壁纸的灰阶所在区间得到灰阶区间对应的补光亮度,并将屏幕亮度设置为该灰阶区间对应的补光亮度。本申请实施例对此不做限制。
一些实施例中,电子设备可在判定当前环境为暗光环境后,将屏幕亮度瞬时提升至第一目标亮度。例如,在电子设备确定环境光亮度小于环境光阈值的情况下,电子设备可查询当前锁屏壁纸的灰阶,例如,当前锁屏壁纸的灰阶为灰阶2,则电子设备将屏幕亮度设置为补光亮度2。
另一些实施例中,电子设备可采用递进式补光的方式将屏幕的亮度逐渐提升至补光亮度,以减少亮度突变造成的人眼不适。
示例性的,以人脸解锁时,锁屏壁纸的灰阶为灰阶2为例,电子设备调节屏幕亮度的过程可如图4中的实线所示。
在检测到触发亮屏的操作时,电子设备可启动人脸解锁流程,以及提升屏幕亮度的流程。
例如,在retry0次人脸解锁的过程中:在A时刻,电子设备采集到人脸信息,A时刻的人脸信息与A时刻的屏幕亮度有关。电子设备尝试使用A时刻的人脸信息与预设的人脸信息进行匹配。若匹配成功,则电子设备解锁屏幕,且不再提升屏幕亮度。例如,在B时刻,人脸解锁成功,屏幕亮度提升至B时刻对应的亮度值。
一些场景下,A时刻的亮度较低,电子设备可能无法采集到清晰的人脸信息,使得电子设备再次尝试人脸解锁。
在retry1次人脸解锁的过程中:在C时刻,电子设备采集到人脸信息,C时刻的人脸信息与C时刻的屏幕亮度有关;C时刻的屏幕亮度高于A时刻的屏幕亮度。电子设备尝试使用C时刻的人脸信息与预设的人脸信息进行匹配。若匹配成功,则电子设备解锁屏幕,且不再提升屏幕亮度。例如,在D时刻,人脸解锁成功,屏幕亮度提升至D时刻对应的亮度值。
或者,C时刻的亮度依然较低,电子设备仍无法采集到清晰的人脸信息,电子设备再次尝试人脸解锁,例如,retry2次人脸解锁过程,与retry0和retry1的过程相似,此处不再赘述。
电子设备可通过上述递进式补光的方式将屏幕亮度逐渐提升至补光亮度2,以实现对人脸进行补光,提升人脸解锁的成功率。
可以理解的是,本申请实施例中,可通过两条进程分别控制人脸解锁过程和控制屏幕亮度变化过程。在人脸retry的过程中,当某次retry过程解锁时,控制人脸解锁的进程会下发指令,指示停止补光,屏幕亮度不再提升。两个进程之间的交互会产生时延,从而出现类似A时刻开始人脸解锁,G时刻人脸解锁成功,但在B时刻才基于指令停止补光的场景。
本申请实施例,自学习记录表中的补光亮度可以为当前灰阶和/或色阶下能够提升的最大屏幕亮度。电子设备可通过自学习记录表中的补光亮度降低屏幕亮度,减少屏幕过亮的刺眼问题。例如,在图4中,在retry2次人脸解锁成功,本申请实施例中,由于补光亮度为当前灰阶和/或色阶下能够提升的最大屏幕亮度,所以到达补光亮度后,电子设备不再提升亮度。在F时刻,本申请实施例中电子设备的屏幕亮度为a亮度。而在可能的实现中,由于可能的实现中最大屏幕亮度大于本申请实施例中的补光亮度,所以,在F时刻,屏幕亮度可能由于时延提升至b亮度,可以看出,a亮度小于b亮度,所以,本申请实施例中人脸解锁时的屏幕亮度更小,进而降低屏幕亮度,减少屏幕过亮的刺眼问题。
此外,在可能的实现中,由于电子设备无法获取具体实现人脸解锁的屏幕亮度,所以人脸解锁过程耗时较长;而本申请实施例中,电子设备可根据灰阶和/或色阶获取到一个对应的补光亮度,所以,电子设备可通过提升亮度步长,以快速将屏幕亮度提升至当前灰阶和/或色阶对应的补光亮度,提升人脸解锁的速度;亮度步长可以为相同时间内屏幕亮度变化的值。
经发现,多张锁屏壁纸的灰阶相同时,电子设备使用相同补光亮度进行人脸解锁,得到的解锁率不相同,如图5所示。
图5中示出了4张不同形式的锁屏壁纸,其中,第一张锁屏壁纸中136灰阶区域占比100%,等效灰阶为136灰阶;第二张锁屏壁纸中0灰阶区域占比40%,136灰阶区域占比100%,255灰阶区域占比10%,等效灰阶为136灰阶;第三张锁屏壁纸中0灰阶区域占比75%,255灰阶区域占比25%,等效灰阶为136灰阶;第四张锁屏壁纸中0灰阶区域占比75%,255灰阶区域占比25%,等效灰阶为136灰阶。其中,等效灰阶是基于锁屏壁纸中全部像素点的像素值计算得到的,后续会介绍等效灰阶的计算方法。
可以看出,4张锁屏壁纸的等效灰阶相同,电子设备使用的补光亮度也相同,但电子设备通过锁屏壁纸1-锁屏壁纸4进行补光时的解锁率不同。
这可能是由于锁屏壁纸不均匀时,不同的位置补光的效果不同,例如,锁屏壁纸1中灰阶分布较为均匀,电子设备使用锁屏壁纸1对人脸进行补光时,人脸的整体亮度大致相同,电子设备能够拍摄到较为清晰的人脸信息;而电子设备使用锁屏壁纸4对人脸进行补光时,眼睛部分亮度较高,嘴巴部分亮度较暗,电子设备可能无法提取嘴部的特征点,导致人脸解锁失败。
为进一步提升暗光环境下人脸解锁的成功率,本申请实施例可通过色阶对锁屏壁纸进行标记,例如,锁屏壁纸1-锁屏壁纸4可对应于4个色阶,可通过色阶加灰阶的方式与补光亮度建立对应关系,进一步细化补光亮度的对应关系,提升补光亮度的准确性。
示例性的,表2示出了本申请实施例中灰阶、色阶与补光亮度的对应关系,如表2所示:
表2灰阶、色阶与补光亮度的对应关系表
电子设备在显示锁屏界面时,会显示锁屏壁纸。电子设备可得到锁屏壁纸对应的灰阶和色阶,并根据灰阶和色阶查询对应的补光亮度。例如,电子设备当前设置的锁屏壁纸的色阶为色阶2,灰阶为灰阶2,则电子设备将锁屏界面调节至补光亮度2。
可以理解的是,在不同色阶、相同灰阶的情况下,补光亮度是不同的。本申请实施例可通过色阶来区分相同灰阶下的多个锁屏壁纸,进而提升补光亮度的准确性。
其中,色阶1至色阶N可以为具体色阶值,也可以为N个色阶区间。例如,当色阶1至色阶N为N个具体色阶值时,电子设备可根据当前锁屏壁纸的色阶与N个色阶值比较,得到最接近的当前锁屏壁纸最接近的色阶值。又例如,色阶1至色阶N为N个色阶区间时,电子设备可根据当前锁屏壁纸的色阶得到该色阶所在区间。
一些实施例中,电子设备可在判定当前环境为暗光环境后,将屏幕亮度直接提升至补光亮度。
另一些实施例中,电子设备可采用递进式补光的方式将屏幕的亮度逐渐提升至补光亮度,以减少亮度突变造成的人眼不适。该过程可图4所示实施例中的相关描述,此处不再赘述。
这样,电子设备可通过色阶和灰阶区分锁屏壁纸,从而学习到不同锁屏壁纸在人脸解锁时所需的较为准确的补光亮度,从而有效的防止屏幕亮度过高出现刺眼问题。
下面对本申请实施例中人脸解锁的过程进行说明。
示例性的,在环境光亮度小于环境光阈值的情况下,电子设备执行补光后人脸解锁的过程如步骤S601-S605所示:
S601、电子设备显示锁屏界面,且锁屏界面的亮度为第二预设亮度。
可以理解的是,在电子设备由灭屏状态进入锁屏界面或由息屏显示状态进入锁屏界面时,电子设备可显示系统预设亮度的屏幕,例如,当前暗光环境下,电子设备的系统预设亮度为第二预设亮度。
S602、电子设备基于锁屏界面的灰阶和/或色阶,得到第一目标亮度。
本申请实施例中所说的灰阶可以理解为锁屏壁纸的等效灰阶。电子设备可得到锁屏界面的色阶,并将色阶转化为等效灰阶。其中,色阶可以为(R,G,B),其中,R值、G值和B值均可以用0-255之间的数值进行表示。
等效灰阶可满足下述公式:
其中,锁屏壁纸中任一像素点的色阶为(Ri,Gi,Bi,),α为R值权重,β为G值权重,γ为B值权重,n为像素点数量。该公式中2.2也可以是其他值。
电子设备得到色阶和/或灰阶后,可基于自学习记录表查询该色阶和/或灰阶对应的补光亮度;第一目标亮度可以为该色阶和/或灰阶对应的补光亮度。
例如,一些实施例中,自学习记录表可例如表1所示;电子设备可使用灰阶在表1中查询与该灰阶对应的补光亮度。另一些实施例中,自学习记录表可例如表2所示;电子设备可使用色阶和灰阶在表2中查询与该色阶和灰阶对应的补光亮度。本申请实施例对此不再详细说明。
本申请实施例中,第一目标亮度可以为基于自学习记录表查询得到的当前色阶和/或灰阶对应的补光亮度,也可以是默认屏幕亮度。本申请实施例对此不做限制。
S603、电子设备将屏幕亮度提升至第一目标亮度。
本申请实施例中,电子设备可控制屏幕亮度,由第二预设亮度提升至第一目标亮度,在亮度提升的过程中,电子设备可不断尝试人脸解锁。该过程可如图4所示实施例中的相关描述,此处不再赘述。
具体的,在电子设备将屏幕亮度调节至第一目标亮度的过程中,包括:
S604、电子设备采集人脸信息,以及基于人脸信息进行解锁。
S605、在人脸解锁成功的情况下,电子设备结束补光流程。
以图4为例,例如,在retry0次人脸解锁时,电子设备将屏幕亮度提升至A时刻-B时刻对应的屏幕亮度。解锁成功后,电子设备结束补光流程,将B时刻对应的屏幕亮度逐渐降低至第二预设亮度,且显示解锁后的界面。
或者,在S604之后,还包括:
S606、在人脸解锁失败的情况下,电子设备再次尝试人脸解锁,直至人脸解锁成功或人脸解锁次数达到次数阈值。
以图4为例,例如,retry0次人脸解锁失败,电子设备尝试retry1次人脸解锁。在retry0次人脸解锁时,电子设备将屏幕亮度提升至C时刻-D时刻对应的屏幕亮度。解锁成功后,电子设备结束补光流程,将D时刻对应的屏幕亮度降低至第二预设亮度,且显示解锁后的界面。
依次类推,电子设备可在屏幕亮度达到第一目标亮度后,停止提升屏幕亮度;且在人脸解锁次数达到次数阈值时,终止人脸解锁。例如,多次人脸解锁失败后,电子设备可显示人脸解锁失败的提示信息,并提醒用户使用其他方式解锁。
需要说明的是,本申请实施例中,人脸解锁的过程和提升屏幕亮度的过程是同步执行的。在人脸解锁成功后,电子设备可停止提升屏幕亮度;人脸解锁失败,则电子设备不对提升屏幕亮度的过程进行处理,直至人脸解锁次数达到次数阈值。一些实施例中,人脸解锁次数达到次数阈值之前,屏幕亮度可提升至第一目标亮度。
这样,电子设备可基于第一目标亮度对人脸进行补光,第一目标亮度要低于可能的实现中的固定亮度,所以可降低人脸解锁时屏幕过亮的问题。
本申请实施例中,电子设备可基于前一次人脸解锁的结果学习下一次相同色阶和/或灰阶场景下的补光亮度。以自学习记录表中记录色阶、灰阶和补光亮度的对应关系为例,下面结合图7对自学习记录表的使用过程和更新过程进行说明。如图7所示:
在步骤S601之后,包括:
S701、电子设备得到当前锁屏壁纸的灰阶和色阶。
S702、电子设备在自学习记录表中查询是否包括当前灰阶和色阶对应的补光亮度。
本申请实施例中,电子设备可能在一段时间内使用固定的锁屏壁纸;电子设备可使用该锁屏壁纸的色阶和灰阶学习到对应的补光亮度。后续,电子设备再次显示该锁屏壁纸或显示相同色阶相同灰阶的锁屏壁纸时,电子设备可在自学习记录表中查找到对应的补光亮度。电子设备可执行步骤S703。
或者,电子设备可能更换新的锁屏壁纸,电子设备在自学习记录表中未查找到相关的补光亮度。电子设备中还设置有默认列表,默认列表中包括任一色阶和/或灰阶对应的默认屏幕亮度;电子设备可执行步骤S704,在以默认屏幕亮度为初始补光亮度的基础上,建立并学习新的锁屏壁纸的色阶、灰阶和补光亮度的对应关系。
S703、在自学习记录表中包括当前灰阶和色阶对应的补光亮度的情况下,电子设备基于该补光亮度提升屏幕亮度。
第一目标亮度包括当前灰阶和色阶对应的补光亮度。电子设备在屏幕亮度从第二预设亮度逐渐提升至第一目标亮度的过程中,进行人脸解锁流程。
在提升屏幕亮度的过程中,电子设备可周期性采集人脸信息,本申请实施例可采用相同频次调节屏幕亮度,使得每个人脸解锁retry过程对应的屏幕亮度均有所提升。
例如,电子设备每75ms采集一次人脸信息,并进行人脸解锁。电子设备可每75ms下发一次用于调节屏幕亮度的指令,用于调节屏幕亮度的指令中可包括待提升的屏幕亮度。其中,待提升的屏幕亮度与第一目标亮度和第二预设亮度有关。
具体的,电子设备预设有人脸解锁的次数阈值,电子设备可在人脸解锁次数达到次数阈值之前,将屏幕亮度按亮度步长由第二预设亮度提升至第一目标亮度。步长可大于或等于第二预设亮度与第一目标亮度的亮度差和次数阈值的比值。
或者,S704、在自学习记录表中不包括当前灰阶和色阶对应的补光亮度的情况下,电子设备基于默认屏幕亮度提升屏幕亮度。
第一目标亮度包括默认屏幕亮度,默认屏幕亮度可以为新的锁屏壁纸的色阶和灰阶对应的初始补光亮度。本申请实施例中,电子设备中设置有默认列表,默认列表中包括各个色阶、灰阶及默认屏幕亮度的对应关系,默认屏幕亮度可以是根据预设色阶、预设灰阶和预设补光亮度,其中,预设色阶可以为锁屏壁纸能够达到的最大色阶、预设灰阶可以为锁屏壁纸能够达到的最大灰阶和预设屏幕亮度为使用锁屏壁纸进行补光时能够达到的最大屏幕亮度;任一锁屏壁纸的色阶均小于或等于预设色阶,任一锁屏壁纸的灰阶均小于或等于预设会阶,任一锁屏壁纸的补光亮度均小于或等于预设屏幕亮度。当无法在自学习记录表中查找当前色阶和灰阶对应的补光亮度时,可使用默认屏幕亮度作为当前色阶和灰阶对应的初始补光亮度,并学习当前色阶和灰阶对应的补光亮度。
默认屏幕亮度可以为基于预设灰阶、预设色阶和/或预设屏幕亮度计算得到的补光亮度。例如,默认屏幕亮度可满足下述公式:
或者:
电子设备可在屏幕亮度从第二预设亮度逐渐提升至第一目标亮度的过程中,进行人脸解锁流程。
步骤S704中,提升屏幕亮度的过程可参考步骤S703中的相关描述,此处不再赘述。
电子设备可基于人脸识别结果更新自学习记录表中的对应关系。该过程可例如:
S705、电子设备启动人脸解锁。
S706、在人脸解锁成功的情况下,电子设备更新自学习记录表中,当前色阶和灰阶与第二目标亮度的对应关系;第二目标亮度小于第一目标亮度。
第二目标亮度可以为更新后的当前色阶和灰阶对应的补光亮度。例如,更新前,自学习记录表中,当前色阶和灰阶对应的补光亮度为第一目标亮度。更新后,自学习记录表中,当前色阶和灰阶对应的补光亮度为第二目标亮度。
可以理解的是,在电子设备将屏幕亮度由第二预设亮度提升至第一目标亮度的过程中,电子设备能够实现人脸解锁的话,可说明第一目标亮度要大于当前色阶和灰阶对应的准确的补光亮度。电子设备接收到人脸解锁成功的反馈后,可降低自学习记录表中当前色阶和灰阶对应的补光亮度,例如,将补光亮度由第一目标亮度降低第二目标亮度。后续,电子设备再次使用当前锁屏壁纸对人脸进行补光时,可基于第二目标亮度调整屏幕亮度。
本申请实施例中,第一目标亮度与第二目标亮度的差值可以为预设值,在电子设备在确认人脸解锁成功后,可在第一目标亮度的基础上降低预设值,得到第二目标亮度。预设值可以为定值,预设值也可以是学习梯度,学习梯度可以为随当前色阶和灰阶对应的补光亮度的更新次数而降低的值,例如,随着自学习记录表中当前色阶和灰阶的更新次数的增多,更新前后的目标亮度之间的差值可逐渐降低,本申请实施例对此不做限制。
或者,在步骤S704之后,还包括:
S707、在人脸解锁失败的情况下,电子设备得到人脸解锁失败的原因。
实际场景中,电子设备可能由于暗光环境、过曝、采光面积不足、脱靶和逆光等原因导致人脸解锁失败。本申请实施例中,可通过failed reason的值指示人脸解锁失败的原因。当failed reason指示暗光环境导致人脸解锁失败时,电子设备可使用本申请实施例提供的屏幕解锁方法对人脸进行补光,进而提升人脸解锁率。
一些实施例中,可能存在人脸解锁误触发的场景,用户无意触发人脸解锁。为减小这些场景对自学习记录表的准确性的影响,本申请实施例可获取用户是否有使用人脸解锁的意图,例如,电子设备在人脸解锁失败后的预设时间内,接收到用户使用除人脸解锁外的其他屏幕解锁方式,可认为本次人脸解锁失败的数据是准确的,电子设备可使用本次的人脸解锁的数据对自学习记录表进行学习。否则,可认为本次为用户误触发的人脸解锁过程,电子设备不对本次数据进行学习。预设时间可以例如10s。
具体的,failed reason的值可包括第一值、第二值和第三值,其中,第一值可用于指示人脸解锁失败的原因为暗光环境,且预设时间内屏幕已解锁;第二值可用于指示人脸解锁失败的原因为暗光环境,且预设时间内屏幕未解锁;第三值可用于指示人脸解锁失败的原因不是暗光环境。例如,第一值可以为0,第二值可以为1,第三值可以为2。本申请实施例中,第一值-第三值也可以是其他形式或其他数值,本申请实施例对此不做限制。
在failed reason的值为第一值的情况下,电子设备可执行步骤S709;否则,电子设备终止补光流程。
需要说明的是,步骤S604-S606中所示出的人脸解锁过程可理解为在单次人脸解锁过程中的多个retry的过程。步骤S706和S707中所示出的人脸解锁过程为多次人脸解锁retry的最终结果,步骤S706的人脸解锁过程可对应与电子设备单次由灭屏到人脸解锁屏幕成功的过程,步骤S707的人脸解锁过程可对应与电子设备单次由灭屏到retry次数达到次数阈值人脸解锁屏幕失败的过程。本申请实施例对此进行说明。
S708、在人脸解锁失败的原因为暗光环境,且预设时间内屏幕已解锁的场景下,电子设备更新自学习记录表中,色阶和灰阶与第三目标亮度的对应关系;第三目标亮度大于第一目标亮度。
可以理解的是,在电子设备将屏幕亮度由第二预设亮度提升至第一目标亮度的过程中,电子设备执行人脸解锁失败的话,可说明第一目标亮度要小于当前色阶和灰阶对应的准确的补光亮度。电子设备接收到在第一目标亮度下人脸解锁失败的反馈后,可提升自学习记录表中当前色阶和灰阶对应的补光亮度,例如,将补光亮度由第一目标亮度提升第三目标亮度。后续,电子设备再次使用当前锁屏壁纸时,可基于第三目标亮度调整屏幕亮度。
本申请实施例中,第一目标亮度与第二目标亮度的差值可以为预设值,在电子设备在确认人脸解锁失败后,可在第一目标亮度的基础上提升预设值,得到第三目标亮度。预设值可以为定值,预设值也可以是学习梯度,本申请实施例对此不做限制。
这样,电子设备可根据多次人脸解锁的结果调整自学习记录表中的对应关系,提升色阶、灰阶和补光亮度的对应关系的准确性,进而使用较低的屏幕亮度实现人脸解锁流程,减小因屏幕过亮导致的刺眼问题。
一种可能的实现方式中,自学习记录表中可包括多个色阶和灰阶的信息。任一色阶和灰阶的信息中包括色阶、灰阶、默认屏幕亮度、学习后的补光亮度、学习梯度和是否终止学习。例如,自学习记录表可以为数组的形式,数组[N]={{RGB_L1,灰阶1,默认屏幕亮度1,学习后的补光亮度1,是否终止学习,学习梯度1},{RGB_L2,灰阶2,默认屏幕亮度2,学习后的补光亮度2,是否终止学习,学习梯度2}……{RGB_LN,灰阶N,默认屏幕亮度N,学习后的补光亮度N,是否终止学习,学习梯度N}}。
其中,色阶可用于对相同灰阶的不同锁屏壁纸进行区分;学习后的补光亮度可理解为下一次人脸解锁时,使用的补光亮度,学习后的补光亮度可以为表1和/或表2中所示的补光亮度。默认屏幕亮度可以是在显示新的锁屏壁纸,自学习记录表中不包括学习后的补光亮度时,基于预设色阶、预设灰阶和预设屏幕亮度计算的新的锁屏壁纸对应的初始补光亮度;学习梯度可用于规定相同色阶和灰阶下相邻两次补光亮度的差值。例如,在步骤S707中,第一目标亮度大于第二目标亮度,两个亮度值的差值为学习梯度;又例如,在步骤S710中,第一目标亮度小于第三目标亮度,两个亮度值的差值为学习梯度。
可以理解的是,本申请实施例中,电子设备可将默认列表和自学习记录表记录在一个数组中,如上所示,数组中包括默认列表中的任一色阶和/或灰阶对应的默认屏幕亮度,但该数组中部分色阶和/或灰阶中对应有学习后的补光亮度,电子设备还未学习到另一部分色阶和/或灰阶对应的补光亮度,则数组中另一部分色阶和/或灰阶对应的学习后的补光亮度可以为0或空值。
本申请实施例中,电子设备也可采用不同数组分别记录默认列表和自学习记录表,例如第一数组存储自学习记录表,第一数组[N]={{RGB_L1,灰阶1,学习后的补光亮度1,是否终止学习,学习梯度1},{RGB_L2,灰阶2,学习后的补光亮度2,是否终止学习,学习梯度2}……{RGB_LN,灰阶N,学习后的补光亮度N,是否终止学习,学习梯度N}}。第二数组存储默认列表,第二数组[N]={{RGB_L1,灰阶1,默认屏幕亮度1},{RGB_L2,灰阶2,默认屏幕亮度2}……{RGB_LN,灰阶N,默认屏幕亮度N}}。本申请实施例对默认列表和自学习记录表的存储形式不做限制。
本申请实施例中,学习梯度随学习次数递减,例如,初始的学习梯度为x,在第一次学习到学习后的补光亮度后,可再次对当前色阶和灰阶对应的补光亮度进行学习。例如,在第二次学习过程中,更新自学习记录表中当前色阶、灰阶和补光亮度的对应关系,更新前的补光亮度与更新后的补光亮度相差x;在第三次学习过程中,更新自学习记录表中当前色阶、灰阶和补光亮度的对应关系,更新前的补光亮度与更新后的补光亮度相差x-1。当学习梯度小于预设学习梯度时,终止学习。例如,预设学习梯度为1。
示例性的,以x为5,初始补光亮度为300nit为例,在暗光环境下,在第一次人脸解锁时,电子设备使用300nit的补光亮度进行人脸解锁,且未成功解锁,电子设备可将当前锁屏壁纸的色阶和/或灰阶对应的学习后的补光亮度更新为305nit。
在第二次人脸解锁时,电子设备可使用305nit的补光亮度进行人脸解锁,且成功解锁,电子设备可将当前锁屏壁纸的色阶和/或灰阶对应的学习后的补光亮度更新为301nit。
在第三次人脸解锁时,电子设备可使用301nit的补光亮度进行人脸解锁,且未成功解锁,电子设备可将当前锁屏壁纸的色阶和/或灰阶对应的学习后的补光亮度更新为304nit。
在第四次人脸解锁时,电子设备可使用304nit的补光亮度进行人脸解锁,且成功解锁,电子设备可将当前锁屏壁纸的色阶和/或灰阶对应的学习后的补光亮度更新为302nit。
在第五次人脸解锁时,电子设备可使用302nit的补光亮度进行人脸解锁,且未成功解锁,电子设备可将当前锁屏壁纸的色阶和/或灰阶对应的学习后的补光亮度更新为303nit。两次的补光亮度差值小于1,电子设备停止训练,并在第六次及以后的人脸解锁过程中使用303nit的补光亮度。
下面结合图8对本申请实施例中电子设备内部交互流程进行说明,如图8所示:
本申请实施例中,电子设备可包括应用层、应用程序框架层、硬件抽象层、内核层和硬件层。
其中,应用层可包括人脸应用和锁屏应用(keyguard);锁屏应用可用于处理锁屏界面相关的业务,解锁屏幕(指纹解锁、图案解锁、PIN解锁等)、锁屏通知显示、快速启动相机应用、快速拨号、显示日期/时间等;人脸应用可用于处理人脸相关的业务,例如,人脸解锁、人脸识别和人脸检测等。
应用程序框架层可包括亮度管理模块,亮度管理模块用于管理屏幕亮度,例如,亮度管理模块可包括补光控制模块和学习引擎。其中,补光控制模块可用于获取并下发第一目标亮度。学习引擎可用于查询和学习色阶、灰阶和补光亮度的对应关系;学习引擎可包括学习模块和数组;数组中存储有自学习记录表和默认列表;,学习模块可用于根据人脸解锁的结果更新色阶、灰阶和补光亮度的对应关系。
硬件抽象层可包括人脸识别模块和背光控制模块,人脸识别模块可用于将人脸信息与预设人脸信息进行匹配,识别人脸。背光控制模块用于根据第一目标亮度调节当前屏幕亮度。
内核层可包括:相机驱动和显示驱动,其中相机驱动用于与相机硬件进行交互,得到人脸图像;显示驱动用于以设定的屏幕亮度显示锁屏壁纸。
示例性的,该过程可包括:
S801、锁屏应用接收到触发亮屏的操作。
S802、锁屏应用启动人脸应用。
S803、锁屏应用向补光控制模块下发锁屏壁纸的色阶和灰阶。
锁屏应用可获取当前锁屏壁纸的色阶和灰阶,并调用更新锁屏壁纸灰阶(update wall paper gray)函数下发色阶和灰阶。
S804、在环境光亮度小于环境光阈值的情况下,人脸应用指示补光控制模块开始补光。
一些实施例中,人脸应用启动后,可得到环境光传感器上传的环境光亮度。人脸应用可根据环境光亮度判断当前场景是否为暗光场景,例如,在暗光环境下,人脸应用可指示使用屏幕亮度对人脸进行补光。
其中,人脸应用可向补光控制模块下发用于指示开启补光的指令;例如,用于指示开启补光的指令可以为get Face Max Brightness do Lighter。
本申请实施例中,在步骤S802之后,人脸应用所处进程可执行人脸解锁流程;在步骤S804之后,补光控制模块所处进程可执行调节屏幕亮度的流程;两个进程可同时执行各自对应的流程。
下面先对调节补光的流程进行说明,如图8所示,在步骤S804之后,包括:
S805、补光控制模块基于色阶和灰阶向学习引擎查询数组。
补光控制模块可下发用于查询补光亮度的指令,例如,用于查询补光亮度的指令可以为get Brightness After Map。学习引擎得到用于查询补光亮度的指令后,可解析该指令,得到当前锁屏壁纸的色阶和灰阶。学习引擎根据色阶和灰阶在数组的自学习记录表中查询对应的补光亮度。
S806、在自学习记录表中包括当前色阶和灰阶对应的补光亮度的情况下,补光控制模块根据系统预设亮度和当前色阶和灰阶对应的补光亮度向背光控制模块下发用于调节屏幕亮度的指令。
用于调节屏幕亮度的指令中可包括待调节的屏幕亮度,例如,用于调节屏幕亮度的指令可以为set Display Brightness。
该步骤可参考步骤S703中的相关描述。补光控制模块下发用于调节屏幕亮度的指令的频率可与人脸应用执行retry的频率相同。例如,补光控制模块每隔75ms指示背光控制模块调节一次屏幕亮度。相邻两次屏幕亮度的差值可以为色阶和灰阶对应的补光亮度与系统预设亮度的差值和次数阈值的比值。
S807、背光控制模块根据用于调节屏幕亮度的指令调节屏幕亮度。
一些实施例中,背光控制模块可与显示驱动进行交互,通过显示驱动设置显示面板的亮度。例如,背光控制模块向显示驱动下发用于设置显示面板的亮度的指令(set panel brightness);显示驱动将待调节的屏幕亮度写入寄存器,以控制显示屏将屏幕亮度达到待调节的屏幕亮度。
可选地,在步骤S805之后,还可包括:
S808、在自学习记录表中不包括当前色阶和灰阶对应的补光亮度的情况下,补光控制模块根据系统预设亮度和默认屏幕亮度向背光控制模块下发用于调节屏幕亮度的指令。
该步骤可参考步骤S806。其中,补光控制模块每隔75ms指示背光控制模块调节一次屏幕亮度。相邻两次屏幕亮度的差值可以为默认屏幕亮度与系统预设亮度的差值和次数阈值的比值。
后续,电子设备可执行步骤S807。本申请实施例对此不做限制。
S809、人脸应用指示人脸识别模块开启人脸识别。
S810、人脸识别模块得到相机驱动上报的人脸信息。
一些实施例中,人脸识别模块可指示相机驱动控制摄像头采集人脸信息。人脸识别模块得到相机驱动返回的人脸信息。
S811、人脸识别模块将人脸信息与预设的人脸信息进行匹配。
人脸识别模块可提取人脸信息的特征点,将人脸信息的特征点与预设的人脸信息的特征点进行比对,当相似度大于相似度阈值可确认当前人脸信息为预设的人脸信息。本申请实施例也可采用其他方法验证人脸信息,本申请实施例对此不做具体限制。
S812、人脸识别模块将人脸识别结果上报至人脸应用。
人脸识别结果可用于指示人脸解锁成功或人脸解锁失败。例如,在人脸解锁成功的情况下,人脸识别结果中可包括用于指示解锁成功的指令和解锁成功时的最大补光亮度。用于指示解锁成功的指令可以例如is Success的值为第四值;解锁成功时的最大补光亮度可以例如max brightness。
在人脸解锁失败的情况下,人脸识别结果中可包括用于指示解锁失败的指令和人脸解锁失败的原因。用于指示解锁成功的指令可以例如is Success的值为第五值;人脸解锁失败的原因的值可以为第一值、第二值或第三值。
S813、人脸应用将人脸识别结果传递至锁屏应用。
锁屏应用可根据人脸识别结果进行屏幕解锁流程。例如,人脸识别结果中可包括用于指示解锁成功的指令时,锁屏应用解锁屏幕;人脸识别结果中可包括用于指示解锁失败的指令时,锁屏应用可提示用户人脸解锁失败,用户可再次尝试人脸解锁或更换解锁方式。
S814、人脸应用将人脸识别结果下发至学习引擎。
S815、学习引擎根据人脸识别结果对自学习记录表进行更新。
在人脸识别结果指示人脸解锁成功时,电子设备可降低当前色阶和灰阶对应的补光亮度,具体可参考步骤S707中的相关描述,此处不再赘述。
在人脸识别结果指示人脸解锁失败时,电子设备可提升当前色阶和灰阶对应的补光亮度,具体可参考步骤S710中的相关描述,此处不再赘述。
需要说明的是,图7和图8所示的实施例中以自学习记录表中包括色阶、灰阶和补光亮度的对应关系为例,对本申请实施例的屏幕解锁方法进行说明。本申请实施例也可单独使用灰阶和补光亮度的对应关系实现自学习的过程,例如表4所示。本申请实施例对此不做限制。
在上述实施例的基础上,本申请实施例提供一种屏幕解锁方法。示例性的,该屏幕解锁方法可以包括如下步骤:
S901、在灭屏状态下,响应于第一次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第二亮度变化。
灭屏状态可包括AOD状态,例如,灭屏状态可对应于图1B中的a所示界面,灭屏状态也可对应于图1B中的c所示界面。触发亮屏的操作可以为触发电子设备由灭屏状态或AOD状态进入亮屏状态的操作,例如,触发亮屏的操作例如图1B中的a所示界面中针对power按键的触发操作;触发亮屏的操作例如图1B中的c所示界面中针对power按键的触发操作;本申请实施例中,触发亮屏的操作也可以为其他操作,例如,在接收到通知消息时,从灭屏状态进入亮屏状态等,本申请实施例对此不做限制。
第一锁屏界面可以例如图1A中的a所示界面。第一亮度可以为亮屏时的系统预设亮度;第二亮度可以为对应于第一目标亮度,例如,第二亮度可以是基于第一锁屏界面的锁屏壁纸的色阶和/或灰阶,在自学习记录表中查找到的补光亮度。第二亮度也可以是基于第一锁屏界面的锁屏壁纸的色阶和/或灰阶,在默认列表中查找到的默认屏幕亮度。
本申请实施例中,当电子设备接收到触发亮屏的操作时,电子设备可通过提升屏幕亮度来对用户人脸进行补光,以实现暗光环境下的人脸解锁。具体的,在亮屏后,电子设备显示第一锁屏界面,第一锁屏界面的初始亮度为系统预设亮度,例如,初始亮度为第一亮度。之后,电子设备可将屏幕亮度提升到第二亮度。
可以理解的是,第二亮度可以理解为补光过程中能够达到的最大屏幕亮度;在第一锁屏界面的亮度从第一亮度向第二亮度变化的过程中,电子设备可在解锁成功后不再继续提升屏幕亮度至第二亮度。
S902、在基于第一解锁信息成功解锁的情况下,显示解锁界面;第一解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第二亮度变化的过程中采集的信息。
第一解锁信息可以例如在第一次触发亮屏后,摄像头采集的人脸信息,手势信息等。解锁界面可以例如图1A中的c所示界面。
第一锁屏界面的亮度从第一亮度向第二亮度变化的过程中,电子设备的摄像头可采集第一解锁信息,并基于第一解锁信息执行人脸解锁的流程。当第二亮度的第一锁屏壁纸能够照亮用户人脸时,电子设备可采集到较为清晰的人脸信息,并实现人脸解锁。
S903、在灭屏状态下,响应于第二次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第三亮度变化;第三亮度小于第二亮度。
第三亮度可以例如第二目标亮度。例如,第三亮度可以为更新后的第一锁屏界面的锁屏壁纸的色阶和/或灰阶对应的补光亮度。
在步骤S902与步骤S903之间,电子设备可执行灭屏的操作。例如,在步骤S902之后,在显示解锁界面时,接收到触发灭屏的操作;响应于触发灭屏的操作,电子设备灭屏;在灭屏时,接收到触发亮屏的操作;执行步骤S903。又例如,在步骤S902之后,在显示解锁界面,且达到灭屏时间时,电子设备灭屏;在灭屏时,接收到触发亮屏的操作;执行步骤S903。
在灭屏时,电子设备可接收到第二次触发亮屏的操作。由于之前电子设备基于人脸成功解锁,将自学习记录表中的第二亮度更新为第三亮度。所以电子设备在补光过程中从第一亮度向第三亮度变化。
其中,第三亮度小于第二亮度,可以为第二亮度能够实现人脸解锁,所以可降低第二亮度到第三亮度,从而逐步缩小第一锁屏界面对应的补光亮度。上述步骤可参考图7所示实施例中与步骤S706相关的描述,本申请实施例对此不在赘述。
本申请实施例中,在人脸解锁成功或人脸解锁次数达到次数阈值时,电子设备将控制第一锁屏界面的亮度从第三亮度逐渐变化为第一亮度。
这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,还包括:若在第一锁屏界面的亮度从第一亮度向第三亮度变化的过程中,基于第二解锁信息未成功解锁,则在灭屏状态下,响应于第三次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第四亮度变化,第四亮度大于第三亮度,第二亮度大于第四亮度;其中,第二解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第三亮度变化的过程中采集的信息。
其中,第二解锁信息可以为在第二次触发亮屏后,摄像头采集的人脸信息,手势信息等。第二解锁信息与第一解锁信息不相同。可以理解的是,针对同一用户在两次人脸解锁过程中,电子设备拍摄到的用户人脸信息也会存在差异。解锁界面可以例如图1A中的c所示界面。第四亮度可以第三目标亮度
需要说明的是,在未解锁成功的情况下,电子设备可基于该解锁结果学习更新当前色阶和/或灰阶与补光亮度的对应关系。由于之前电子设备基于人脸成功解锁,将自学习记录表中的第三亮度更新为第四亮度。所以电子设备在补光过程中从第一亮度向第四亮度变化。
第四亮度大于第三亮度,可以理解为第三亮度不能够实现人脸解锁,所以需要提升第三亮度到第四亮度,以确保当前亮度能够实现人脸解锁。第二亮度大于第四亮度,可以理解为电子设备虽然会适当提升补光亮度的值,但不会将补光亮度提升至大于学习之前的补光亮度;进而实现随学习次数的增多,补光亮度逐渐收敛到一个中间值(例如上述实施例中的303nit)的效果。
上述步骤可参考图7所示实施例中与步骤S707-S708相关的描述,本申请实施例对此不在赘述。
这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在第一锁屏界面的亮度从第一亮度向第四亮度变化之前,还包括:在基于第二解锁信息未成功解锁之后的预设时长内,且基于第三解锁信息成功解锁的情况下,显示解锁界面;第三解锁信息包括密码信息和/或指纹信息。
预设时长可以例如10s,可以理解的是,人脸解锁失败可能是多种原因导致的,例如,用户误触发解锁过程,这时,可通过预设时长内电子设备基于其他方式解锁的条件,确定当前人脸解锁失败不是用户误触发。
该步骤可参考图7所示实施例中与步骤S708相关的描述,本申请实施例对此不在赘述。
这样,可识别用户误触发导致的人脸解锁失败的场景,从而提升学习过程的准确性,提升自学习记录表中补光亮度的准确性。
可选的,还包括:若在第一锁屏界面的亮度从第一亮度向第四亮度变化的过程中,基于第四解锁信息成功解锁,则在灭屏状态下,响应于第四次触发亮屏的操作,显示第一锁屏界面,且第一锁屏界面的亮度从第一亮度向第四亮度变化;其中,第四解锁信息包括电子设备的摄像头在第一锁屏界面的亮度从第一亮度向第四亮度变化的过程中采集的信息。
本申请实施例中,当自学习记录表学习到一定程度后,电子设备可停止学习。例如,在对第一锁屏界面的锁屏壁纸进行多次学习后,学习梯度小于1,则终止学习过程。
在该步骤中,电子设备学习到第一锁屏界面的锁屏壁纸的色阶和/或灰阶对应的补光亮度为第四亮度,则虽然前一次基于第四解锁信息解锁成功,但电子设备不会再更新第一锁屏界面的锁屏壁纸的色阶和/或灰阶对应的补光亮度,所以,当接收到第四次触发亮屏的操作时,电子设备仍然获取到补光亮度为第四亮度,并控制第一锁屏界面的亮度从第一亮度向第四亮度变化。
这样,经过多次学习后,电子设备可学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,第一锁屏界面的锁屏壁纸包括第一锁屏壁纸,第二锁屏界面的锁屏壁纸包括第二锁屏壁纸,还包括:在灭屏状态下,响应于第五次触发亮屏的操作,显示第二锁屏界面,且第二锁屏界面的亮度从第一亮度向第五亮度变化,第二锁屏壁纸与第一锁屏壁纸不同;第五亮度与第四亮度不同。
第一锁屏壁纸可以为第一锁屏界面显示的锁屏壁纸;第二锁屏壁纸可以为第二锁屏界面显示的锁屏壁纸;第二锁屏壁纸与第一锁屏壁纸,可以理解为:第二锁屏壁纸的图像样式与第一锁屏壁纸的图像样式,可具体体现为第二锁屏壁纸的色阶和/或灰阶与第一锁屏壁纸的色阶和/或灰阶不同。
可以理解的是,在第四次触发亮屏的过程中,电子设备已训练好第一锁屏壁纸的色阶和/或灰阶对应的补光亮度,例如,第四亮度。但当电子设备更换锁屏壁纸后,该补光亮度不再适用,电子设备可重新学习新锁屏壁纸的补光亮度。例如新的锁屏壁纸为第二锁屏壁纸,第二锁屏壁纸的色阶和/或灰阶对应的补光亮度为第五亮度,电子设备在人脸解锁过程中会控制第二锁屏界面的亮度从第一亮度向第五亮度变化。
在图5所示实施例中,不同色阶可影响人脸解锁的成功率,所以,本申请实施例,通过细化色阶、灰阶和补光亮度的关系,达到提升人脸解锁率的效果。
这样,电子设备可学习不同锁屏壁纸对应的补光亮度,并基于该补光亮度对锁屏壁纸进行补光,从而提升了各锁屏壁纸下的解锁率。
可选的,还包括:在灭屏状态下,响应于第六次触发亮屏的操作,显示第二锁屏界面,且第二锁屏界面的亮度为第一亮度;第六次触发亮屏时的环境光亮度大于环境光阈值。
环境光阈值可以为区别暗光环境和亮光环境的阈值,例如环境光阈值可以为0-2.5lux之间的值,例如,环境光阈值可以为1lux。当环境光亮度大于环境光阈值时,可确定当前处于亮光环境,电子设备可不使用屏幕亮度对人脸进行补光。所以在亮光环境下,第六次触发亮屏后,第二锁屏界面的亮度不会发生变化,一直为第一亮度。
这样,电子设备可在暗光环境下对色阶和/或灰阶与补光亮度的对应关系进行学习,在亮光环境下,不学习色阶和/或灰阶与补光亮度的对应关系,提升补光亮度的准确性;同时,也可降低亮光环境下提升屏幕亮度导致的电量消耗。
可选的,电子设备中包括第一数组,第一数组中记录有色阶和/或灰阶与目标屏幕亮度的对应关系;在第一锁屏界面的亮度从第一亮度向第二亮度变化之前,包括:获取环境光亮度和第一锁屏壁纸的色阶和/或灰阶;在环境光亮度小于环境光阈值的情况下,在第一数组中查找第一锁屏壁纸的色阶和/或灰阶;第一锁屏界面的亮度从第一亮度向第二亮度变化,包括:在第一数组中包括第一锁屏壁纸的色阶和/或灰阶的情况下,控制第一锁屏界面的亮度从第一亮度向第二亮度变化;第二亮度为第一数组中与第一锁屏壁纸的色阶和/或灰阶对应的目标屏幕亮度。
第一数组中记录自学习记录表,自学习记录表中包括色阶和/或灰阶与补光亮度的对应关系,目标屏幕亮度可对应于本申请实施例中的色阶和/或灰阶对应的补光亮度。第一数组可以可同时存储有自学习记录表和默认列表的数组,也可以是仅存储有自学习记录表的数组,本申请实施例对此不做限制。
该过程可参考图3、图6和图7所示实施例中的相关描述,此处不再赘述。
这样,暗光环境下,电子设备使用人脸解锁之前,可获取到当前锁屏壁纸对应的较准确的补光亮度,进而使用较低的屏幕亮度实现人脸解锁流程,减小因屏幕过亮导致的刺眼问题。
可选的,第一锁屏界面的亮度从第一亮度向第二亮度变化,还包括:第一锁屏界面的亮度从第一亮度瞬时变化为第二亮度;或者,第一锁屏界面的亮度基于亮度步长从第一亮度逐渐变化为第二亮度。
其中,瞬时可以理解为时间量级较小,例如几毫秒之间从第一亮度提升到第二亮度。从第一亮度逐渐变化为第二亮度可理解为上述实施例中所说的每75ms提升一次屏幕亮度。
这样,电子设备可通过多种方式对人脸进行补光,其中,当电子设备采用递进式补光的方式时,可减少屏幕突然变亮引起的人眼不适,能够更好的提升用户的使用体验。
可选的,在基于第一解锁信息成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与第二亮度的对应关系更新为,第一锁屏壁纸的色阶和/或灰阶与第三亮度的对应关系。
在第一次触发亮屏后,人脸解锁成功。在接收到人脸解锁成功的反馈后,电子设备可根据人脸解锁结果调节自学习记录表,该过程可参考图6或图7所示实施例中的相关描述,此处不再赘述。
这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在基于第二解锁信息未成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与第三亮度的对应关系更新为,第一锁屏壁纸的色阶和/或灰阶与第四亮度的对应关系。
在第一次触发亮屏后,人脸解锁成功。在接收到人脸解锁失败的反馈后,电子设备可根据人脸解锁结果调节自学习记录表,该过程可参考图6或图7所示实施例中的相关描述,此处不再赘述。
这样,电子设备可通过前一次人脸解锁的结果调节补光亮度,从而学习到当前锁屏界面在人脸解锁时所需的较为准确的补光亮度,从而有效的减小屏幕亮度过高出现的刺眼问题。
可选的,在第一数组中更新第一锁屏壁纸的色阶和灰阶与第四亮度的对应关系,包括:在获取到第一信息的情况下,在第一数组中更新第一锁屏壁纸的色阶和/或灰阶与第四亮度的对应关系;第一信息用于表征面部亮度暗导致解锁失败,且在预设时间内通过第三解锁信息解锁屏幕。
第一信息可以为上述实施例中的failed reason为第一值。
这样,可排除用户误触发导致的人脸解锁失败的场景,以及非补光场景导致的人脸解锁失败的场景,从而提升学习过程的准确性,提升自学习记录表中补光亮度的准确性。
可选的,在第1次更新所第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值为x;在第i(i为大于1的正整数)次更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值为x-i+1;在第j(j为大于i的正整数)次更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值小于1,则电子设备不再更新第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度。
该过程可对应上述实施例中有关数组部分的相关说明。其中,第i次更新可以对应于第二次人脸解锁至第四次人脸解锁,第j次更新可以对应与第五次人脸解锁。
这样,电子设备可通过随更新次数递减的学习梯度,将补光亮度收敛到一个适用于当前锁屏壁纸人脸解锁的值,从而有效的减小屏幕亮度过高出现的刺眼问题。
为了能够更好地理解本申请实施例,下面对本申请实施例的电子设备100的结构进行介绍:
图9示出了电子设备100的结构示意图。电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,用户标识模块(subscriberidentification module,SIM)卡接口195以及嵌入式安全芯片(embedded secure element,eSE)196等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。本申请实施例中,处理器110可用于本申请实施例提供的屏幕解锁方法中与信息处理相关的步骤。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。显示屏194用于显示图像,视频等。本申请实施例中,显示屏194可用于显示第一锁屏界面、第二锁屏界面和解锁界面等。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。其中,摄像头193用于捕获静态图像或视频。本申请实施例中,电子设备可使用摄像头采集人脸信息,以实现人脸解锁流程。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。本申请实施例中,电子设备可使用内部存储器121存储自学习记录表和默认列表。
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。本申请实施例中,电子设备可根据环境光亮度检测当前环境是否为暗光环境,在暗光环境下,执行本申请实施例提供的屏幕解锁流程。
上面已对本申请实施例的屏幕解锁方法进行了说明,下面对本申请实施例提供的执行上述屏幕解锁方法的装置进行描述。本领域技术人员可以理解,方法和装置可以相互结合和引用,本申请实施例提供的相关装置可以执行上述屏幕解锁方法中的步骤。
如图10所示,屏幕解锁装置1100可以用于通信设备、电路、硬件组件或者芯片中,该屏幕解锁装置包括:显示单元1101、以及处理单元1102。其中,显示单元1101用于支持屏幕解锁装置1100执行的显示的步骤;处理单元1102用于支持屏幕解锁装置1100执行信息处理的步骤。
可能的实现方式中,该屏幕解锁装置1100中也可以包括通信单元1103。具体的,通信单元用于支持屏幕解锁装置1100执行数据的发送以及数据的接收的步骤。其中,该通信单元1103可以是输入或者输出接口、管脚或者电路等。
可能的实施例中,屏幕解锁装置还可以包括:存储单元1104。处理单元1102、存储单元1104通过线路相连。存储单元1104可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。存储单元1104可以独立存在,通过通信线路与屏幕解锁装置具有的处理单元1102相连。存储单元1104也可以和处理单元1102集成在一起。
存储单元1104可以存储电子设备中的方法的计算机执行指令,以使处理单元1102执行上述实施例中的方法。存储单元1104可以是寄存器、缓存或者RAM等,存储单元1104可以和处理单元1102集成在一起。存储单元1104可以是只读存储器(read-only memory,ROM)或者可存储静态信息和指令的其他类型的静态存储设备,存储单元1104可以与处理单元1102相独立。
本申请实施例提供的屏幕解锁方法,可以应用在具备通信功能的电子设备中。电子设备包括电子设备,电子设备的具体设备形态等可以参照上述相关说明,此处不再赘述。
本申请实施例提供一种电子设备,该电子设备包括:包括:处理器和存储器;存储器存储计算机执行指令;处理器执行存储器存储的计算机执行指令,使得电子设备执行上述方法。
本申请实施例提供一种芯片系统,芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行上述方法。其实现原理和技术效果与上述相关实施例类似,此处不再赘述。
本申请实施例还提供了一种计算机可读存储介质。计算机可读存储介质存储有计算机程序。计算机程序被处理器执行时实现上述方法。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。
一种可能的实现方式中,计算机可读介质可以包括RAM,ROM,只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储器,磁盘存储器或其它磁存储设备,或目标于承载的任何其它介质或以指令或数据结构的形式存储所需的程序代码,并且可由计算机访问。而且,任何连接被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,数字用户线(Digital Subscriber Line,DSL)或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘,激光盘,光盘,数字通用光盘(Digital Versatile Disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。上述的组合也应包括在计算机可读介质的范围内。
本申请实施例提供一种计算机程序产品,计算机程序产品包括计算机程序,当计算机程序被运行时,使得计算机执行上述方法。
本申请实施例是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理单元以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理单元执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。
Claims (16)
- 一种屏幕解锁方法,其特征在于,应用于电子设备,所述方法包括:在灭屏状态下,响应于第一次触发亮屏的操作,显示第一锁屏界面,且所述第一锁屏界面的亮度从第一亮度向第二亮度变化;在基于第一解锁信息成功解锁的情况下,显示解锁界面;所述第一解锁信息包括所述电子设备的摄像头在所述第一锁屏界面的亮度从所述第一亮度向所述第二亮度变化的过程中采集的信息;在所述灭屏状态下,响应于第二次触发亮屏的操作,显示所述第一锁屏界面,且所述第一锁屏界面的亮度从所述第一亮度向第三亮度变化;所述第三亮度小于所述第二亮度。
- 根据权利要求1所述的方法,其特征在于,还包括:若在所述第一锁屏界面的亮度从所述第一亮度向所述第三亮度变化的过程中,基于第二解锁信息未成功解锁,则在所述灭屏状态下,响应于第三次触发亮屏的操作,显示所述第一锁屏界面,且所述第一锁屏界面的亮度从所述第一亮度向第四亮度变化,所述第四亮度大于所述第三亮度,所述第二亮度大于所述第四亮度;其中,所述第二解锁信息包括所述电子设备的摄像头在所述第一锁屏界面的亮度从所述第一亮度向所述第三亮度变化的过程中采集的信息。
- 根据权利要求2所述的方法,其特征在于,在所述第一锁屏界面的亮度从所述第一亮度向第四亮度变化之前,还包括:在基于第二解锁信息未成功解锁之后的预设时长内,且基于第三解锁信息成功解锁的情况下,显示所述解锁界面;所述第三解锁信息包括密码信息和/或指纹信息。
- 根据权利要求2或3所述的方法,其特征在于,还包括:若在所述第一锁屏界面的亮度从所述第一亮度向所述第四亮度变化的过程中,基于第四解锁信息成功解锁,则在所述灭屏状态下,响应于第四次触发亮屏的操作,显示所述第一锁屏界面,且所述第一锁屏界面的亮度从所述第一亮度向所述第四亮度变化;其中,第四解锁信息包括所述电子设备的摄像头在所述第一锁屏界面的亮度从所述第一亮度向所述第四亮度变化的过程中采集的信息。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述第一锁屏界面的锁屏壁纸包括第一锁屏壁纸,第二锁屏界面的锁屏壁纸包括第二锁屏壁纸,还包括:在所述灭屏状态下,响应于第五次触发亮屏的操作,显示第二锁屏界面,且所述第二锁屏界面的亮度从第一亮度向第五亮度变化,所述第二锁屏壁纸与所述第一锁屏壁纸不同;所述第五亮度与第四亮度不同。
- 根据权利要求1-5任一项所述的方法,其特征在于,还包括:在所述灭屏状态下,响应于第六次触发亮屏的操作,显示第二锁屏界面,且所述第二锁屏界面的亮度为所述第一亮度;所述第六次触发亮屏时的环境光亮度大于环境光阈值。
- 根据权利要求5或6所述的方法,其特征在于,所述电子设备中包括第一数组,所述第一数组中记录有色阶和/或灰阶与目标屏幕亮度的对应关系;在所述第一锁屏界面的亮度从第一亮度向第二亮度变化之前,包括:获取环境光亮度和第一锁屏壁纸的色阶和/或灰阶;在所述环境光亮度小于环境光阈值的情况下,在所述第一数组中查找所述第一锁屏壁纸的色阶和/或灰阶;所述第一锁屏界面的亮度从第一亮度向第二亮度变化,包括:在所述第一数组中包括所述第一锁屏壁纸的色阶和/或灰阶的情况下,控制所述第一锁屏界面的亮度从所述第一亮度向所述第二亮度变化;所述第二亮度为所述第一数组中与所述第一锁屏壁纸的色阶和/或灰阶对应的所述目标屏幕亮度。
- 根据权利要求7所述的方法,其特征在于,所述第一锁屏界面的亮度从第一亮度向第二亮度变化,还包括:所述第一锁屏界面的亮度从所述第一亮度瞬时变化为所述第二亮度;或者,所述第一锁屏界面的亮度基于亮度步长从所述第一亮度逐渐变化为所述第二亮度。
- 根据权利要求1-8任一项所述的方法,其特征在于,在所述基于第一解锁信息成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与所述第二亮度的对应关系更新为,所述第一锁屏壁纸的色阶和/或灰阶与所述第三亮度的对应关系。
- 根据权利要求2-9任一项所述的方法,其特征在于,在基于第二解锁信息未成功解锁之后,还包括:在第一数组中,将第一锁屏壁纸的色阶和/或灰阶与所述第三亮度的对应关系更新为,所述第一锁屏壁纸的色阶和/或灰阶与第四亮度的对应关系。
- 根据权利要求10所述的方法,其特征在于,在所述第一数组中更新所述第一锁屏壁纸的色阶和灰阶与所述第四亮度的对应关系,包括:在获取到第一信息的情况下,在所述第一数组中更新所述第一锁屏壁纸的色阶和/或灰阶与所述第四亮度的对应关系;所述第一信息用于表征面部亮度暗导致解锁失败,且在预设时间内通过第三解锁信息解锁屏幕。
- 根据权利要求7-11任一项所述的方法,其特征在于,在第1次更新所第一锁屏壁纸的色阶和灰阶对应的目标屏幕亮度的情况下,更新前后的目标屏幕亮度的差值为x;在第i(i为大于1的正整数)次更新所述第一锁屏壁纸的色阶和灰阶对应的所述目标屏幕亮度的情况下,所述更新前后的目标屏幕亮度的差值为x-i+1;在第j(j为大于i的正整数)次更新所述第一锁屏壁纸的色阶和灰阶对应的所述目标屏幕亮度的情况下,所述更新前后的目标屏幕亮度的差值小于1,则所述电子设备不再更新所述第一锁屏壁纸的色阶和灰阶对应的所述目标屏幕亮度。
- 一种电子设备,其特征在于,包括:处理器和存储器;所述存储器存储计算机执行指令;所述处理器执行所述存储器存储的计算机执行指令,使得所述电子设备执行如权利要求1-12中任一项所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-12任一项所述的方法。
- 一种芯片系统,其特征在于,包括至少一个处理器和通信接口,所述通信接口和所述至少一个处理器通过线路互联,所述至少一个处理器用于运行计算机程序或指令,以执行如权利要求1-12任一项所述的方法。
- 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被运行时,使得计算机执行如权利要求1-12任一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410052389.8 | 2024-01-11 | ||
| CN202410052389.8A CN120335647A (zh) | 2024-01-11 | 2024-01-11 | 屏幕解锁方法及相关设备 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2025149062A1 true WO2025149062A1 (zh) | 2025-07-17 |
| WO2025149062A9 WO2025149062A9 (zh) | 2026-01-15 |
Family
ID=96361321
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2025/071901 Pending WO2025149062A1 (zh) | 2024-01-11 | 2025-01-10 | 屏幕解锁方法及相关设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN120335647A (zh) |
| WO (1) | WO2025149062A1 (zh) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107657221A (zh) * | 2017-09-12 | 2018-02-02 | 广东欧珀移动通信有限公司 | 一种面部信息采集方法及相关设备 |
| CN107679482A (zh) * | 2017-09-27 | 2018-02-09 | 广东欧珀移动通信有限公司 | 解锁控制方法及相关产品 |
| US20180211608A1 (en) * | 2017-01-26 | 2018-07-26 | Dell Products L.P. | Heuristic learning for setting automatic display brightness based on an ambient light sensor |
| CN109862278A (zh) * | 2019-04-19 | 2019-06-07 | 努比亚技术有限公司 | 人脸识别的补光方法、装置及计算机可读存储介质 |
-
2024
- 2024-01-11 CN CN202410052389.8A patent/CN120335647A/zh active Pending
-
2025
- 2025-01-10 WO PCT/CN2025/071901 patent/WO2025149062A1/zh active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180211608A1 (en) * | 2017-01-26 | 2018-07-26 | Dell Products L.P. | Heuristic learning for setting automatic display brightness based on an ambient light sensor |
| CN107657221A (zh) * | 2017-09-12 | 2018-02-02 | 广东欧珀移动通信有限公司 | 一种面部信息采集方法及相关设备 |
| CN107679482A (zh) * | 2017-09-27 | 2018-02-09 | 广东欧珀移动通信有限公司 | 解锁控制方法及相关产品 |
| CN109862278A (zh) * | 2019-04-19 | 2019-06-07 | 努比亚技术有限公司 | 人脸识别的补光方法、装置及计算机可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120335647A (zh) | 2025-07-18 |
| WO2025149062A9 (zh) | 2026-01-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113625860B (zh) | 模式切换方法、装置、电子设备及芯片系统 | |
| US20230178050A1 (en) | Electronic device comprising display, and operation method thereof | |
| CN111553846B (zh) | 超分辨率处理方法及装置 | |
| US20170277258A1 (en) | Method for adjusting screen luminance and electronic device | |
| CN116070684B (zh) | 一种集成芯片以及处理传感器数据的方法 | |
| KR20170028941A (ko) | 생체정보를 인식하는 방법 및 장치 | |
| CN109993115A (zh) | 图像处理方法、装置及可穿戴设备 | |
| US20190362059A1 (en) | Dynamic Recognition Method and Terminal Device | |
| WO2021238373A1 (zh) | 一种人脸注视解锁方法及电子设备 | |
| CN115083400B (zh) | 语音助手唤醒方法及装置 | |
| CN108228562A (zh) | 蓝牙模块的重命名方法以及电子设备 | |
| EP4336857B1 (en) | Photographing method and related apparatus | |
| EP4648432A1 (en) | Method and apparatus for screen switching during photographing process | |
| US11200437B2 (en) | Method for iris-based living body detection and related products | |
| CN114519891B (zh) | 背光调节方法、装置及存储介质 | |
| CN113038232A (zh) | 视频播放方法、装置、设备、服务器及存储介质 | |
| CN107402787A (zh) | 虹膜识别模式开启方法及相关产品 | |
| CN113781959B (zh) | 界面处理方法及装置 | |
| CN116339877A (zh) | 跨系统运行应用程序的方法及电子设备 | |
| WO2025149062A9 (zh) | 屏幕解锁方法及相关设备 | |
| CN114125145B (zh) | 显示屏解锁的方法、电子设备及存储介质 | |
| CN118447545A (zh) | 人脸特征检测方法及电子设备 | |
| CN117692540A (zh) | 业务管理方法、电子设备及计算机可读存储介质 | |
| CN118170568A (zh) | 存储单元的异常识别方法、装置、电子设备及存储介质 | |
| CN118658424B (zh) | 显示功耗的优化方法及电子设备 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25738589 Country of ref document: EP Kind code of ref document: A1 |