Unlocking method and device

By separating the display-related and irrelevant processes in the unlocking process in the electronic device's screen-off state, and removing the black mask in advance, the problem of long-term unlocking in the screen-off state is solved, improving the user experience.

CN120068030APending Publication Date: 2025-05-30HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311553045.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When the electronic device is turned off, the unlocking process takes a long time, resulting in the user experience not being smooth enough.

Method used

By dividing the unlocking process in the screen-out state into display-related processes and display-independent processes, and immediately remove the black mask after the interface display-related processes are completed to display the application interface, thereby completing the unlocking process from the user's perspective in advance.

Benefits of technology

It shortens the time to unlock the electronic device when the screen is turned off, improves the user experience, and allows users to enter the application interface faster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068030A_ABST
    Figure CN120068030A_ABST
Patent Text Reader

Abstract

The invention discloses an unlocking method and equipment, and the unlocking method comprises the steps: responding to a first unlocking operation in a screen-off state, and displaying a black mask above a screen locking interface layer. In response to the fact that the unlocking data corresponding to the first unlocking operation passes verification, business data related to screen locking interface display is cleared firstly. And further, stopping displaying the black mask above the lock screen interface layer. And finally, clearing business data irrelevant to the display of the lock screen interface. According to the technical scheme, the unlocking duration in the screen-off state can be shortened, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of terminals, and particularly to an unlocking method and device. Background Art

[0002] In the scenario of unlocking an electronic device in the screen-off state, the time taken for the process from when the user triggers unlocking to when the electronic device completes unlocking and enters the display interface is relatively long, and the user experience is not smooth enough. Therefore, it is necessary to shorten the time taken for the above process so that the user can enter the display interface as soon as possible. Summary of the Invention

[0003] The object of the present invention is to provide an unlocking method and device to shorten the time taken for unlocking an electronic device in the screen-off state and improve the user experience.

[0004] In a first aspect, the present invention provides an unlocking method, including: in response to a first unlocking operation in the screen-off state, displaying a black mask on the layer above the first layer, where a first interface is displayed on the first layer, and the first layer is located above the layer where the second interface is located; in response to the unlocking data corresponding to the first unlocking operation being verified as passed, clearing the first data corresponding to the first interface, where the first data is related to the display of the first interface; not displaying the black mask on the layer above the first layer; clearing the second data corresponding to the first interface, where the second data is not related to the display of the first interface.

[0005] In the above implementation solution, the service processes that affect the unlocking duration of the electronic device in the screen-off state are divided into a display-related process and a display-unrelated process, and after the display-related process of the interface is completed, the black mask is immediately removed and the application interface is displayed, and then the display-unrelated process is continued. Thus, the timing when the user's perspective unlocks can be advanced to before the display-unrelated process of the interface is executed, so as to achieve the purpose of shortening the screen-off unlocking time and improving the user experience.

[0006] In some implementation manners of the first aspect, for the above unlocking method, in response to the unlocking data corresponding to the first unlocking operation being verified as passed, clearing the first data corresponding to the first interface includes: in response to the unlocking data corresponding to the first unlocking operation being verified as passed, setting the first layer to an invisible state; clearing the first data corresponding to the first interface.

[0007] In this implementation manner, first setting the corresponding layer to an invisible state and then deleting the data related to the layer display can further reduce the possibility of abnormal screen display during the data clearing process.

[0008] In some implementation manners of the first aspect, for the above unlocking method, the method further includes: in response to the unlocking data being verified as failed, setting the black mask on the layer above the first layer to an invisible state.

[0009] An unlocking method as described above. In some implementations of the first aspect, before entering the screen-off state, the method further includes: in response to a screen-off operation, generating a black mask; setting the black mask to an invisible state.

[0010] In this implementation, when entering the screen-off state, a black mask is created. Then, after receiving an unlocking operation, only need to set the black mask to a visible state to complete the display, thus avoiding temporarily generating a black mask, which is beneficial to reducing the time used in the unlocking process.

[0011] An unlocking method as described above. In some implementations of the first aspect, before entering the screen-off state, the method further includes: in response to a screen-off operation, generating a first interface; displaying the first interface on a first layer.

[0012] An unlocking method as described above. In some implementations of the first aspect, the first interface includes a lock screen interface.

[0013] In this implementation, it can support improving the screen-off unlocking speed when the always-on display function is not enabled.

[0014] An unlocking method as described above. In some implementations of the first aspect, the first interface includes a lock screen interface and an always-on display interface, and the first layer includes a first sub-layer and a second sub-layer; displaying the first interface on the first layer includes: displaying the always-on display interface on the first sub-layer and displaying the lock screen interface on the second sub-layer; the first sub-layer is located above the second sub-layer.

[0015] In this implementation, it can support improving the screen-off unlocking speed when the always-on display function is enabled.

[0016] In a second aspect, the present technical solution provides an electronic device, including: one or more processors; a memory; and one or more computer programs, where the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to execute the method in the first aspect or any possible implementation of the first aspect.

[0017] In a third aspect, the present invention further provides a chip, the chip includes a processor and a data interface, and the processor reads instructions stored on a memory through the data interface and executes the method in the first aspect or any possible implementation of the first aspect.

[0018] Optionally, as an implementation, the chip may further include a memory in which instructions are stored, and the processor is configured to execute the instructions stored on the memory. When the instructions are executed, the processor is configured to execute the method in the first aspect or any possible implementation of the first aspect.

[0019] In a fourth aspect, the present invention further provides a computer-readable storage medium storing program code for execution by a device, the program code including instructions for performing the method in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a schematic diagram of a scenario of the unlocking method provided by an embodiment of the present application;

[0021] Figure 2 is a schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0022] Figure 3 is another schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0023] Figure 4 is another schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0024] Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0025] Figure 6 is another schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0026] Figure 7 is another schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0027] Figure 8 is another schematic diagram of a scenario of the unlocking method provided by an embodiment of the present application;

[0028] Figure 9 is another schematic flowchart of the unlocking method provided by an embodiment of the present application;

[0029] Figure 10 is another schematic diagram of a scenario of the unlocking method provided by an embodiment of the present application;

[0030] Figure 11 is another schematic diagram of a scenario of the unlocking method provided by an embodiment of the present application;

[0031] Figure 12 is another schematic flowchart of the unlocking method provided by an embodiment of the present application. Detailed implementation manners

[0032] In the unlocking scenario of an electronic device, it is often found that the time taken for the unlocking process in the screen-off state is longer than that in the screen-on state. This is related to the specific process of unlocking in the screen-off state.

[0033] Different from the unlocking process in the screen-on state, when unlocking in the screen-off state, after detecting that the user triggers unlocking, abnormal screen display phenomena such as screen flashing and screen distortion will occur on the screen of the electronic device. In order to cover the possible screen abnormalities, in the related art, in the unlocking scenario in the screen-off state, after detecting that the user triggers unlocking, a black mask will be covered on the topmost layer of the display interface, and the black mask will be deleted after the unlocking process in the screen-off state is completed, so as to display the application interface located in the lower layer. That is to say, the user can only perceive the application interface after removing the black mask, and the black mask exists for a long time in the above process, which results in a long time for the user to enter the application interface.

[0034] For easy understanding, the following analyzes the specific unlocking process in the screen-off state in conjunction with the accompanying drawings.

[0035] In the screen-off state of the electronic device, as Figure 1 shown in FIG. 1A, the screen layers from top to bottom at least include a lock screen interface layer and an application interface layer. Among them, the lock screen interface layer is used to display the lock screen interface, and the application interface layer is used to display the application interface displayed when the electronic device enters the lock screen state. At the same time, this application interface is also the interface that should be displayed on the screen of the electronic device after unlocking is successful. The application interface may specifically be any interface of any application program in the electronic device, or may also be the main interface of the electronic device.

[0036] After detecting that the user triggers an unlocking operation, as Figure 1 shown in FIG. 1B, a black mask is added to the layer above the lock screen interface layer. Since the layer of the black mask is above the lock screen interface layer and the application interface layer, the display contents of both the lock screen interface layer and the application interface layer can be covered at the same time. At the same time, referring to Figure 2 , after detecting that the user triggers an unlocking operation, the electronic device can also collect unlocking data and verify the collected unlocking data. After determining that the unlocking data verification is passed, the electronic device will clear the service data corresponding to the lock screen interface layer. After the service data corresponding to the lock screen interface layer is cleared, the lock screen interface stops displaying. At this time, the electronic device will remove the black mask, so that the application interface located in the application interface layer is displayed, and the unlocking is completed.

[0037] As can be understood from the above description, when the electronic device is unlocked in the screen-off state, the time to remove the black mask is the time when the user enters the application interface and perceives that the unlocking is successful. And the timing to remove the black mask is after the electronic device clears the service data corresponding to the lock screen interface layer. That is to say, the time taken for the unlocking process of the electronic device in the screen-off state is limited by the duration of clearing the service data corresponding to the lock screen interface layer.

[0038] Based on the above description, in the embodiments of the present application, as Figure 3 shown, the process of the electronic device clearing the service data corresponding to the lock screen interface layer can be divided into a display-related process and a display-unrelated process. Among them, the display-related process will affect the display of the lock screen interface on the corresponding layer, and the display-unrelated process is a background service process that does not affect the display of the lock screen interface on the corresponding layer.

[0039] As Figure 4 shown, after the electronic device detects that the unlocking data verification is passed, it can first execute the above-mentioned interface display-related process. After the interface display-related process is completed, the lock screen interface layer has stopped displaying. At this time, the electronic device can remove the black mask above the lock screen interface layer, so as to display the application interface layer. At this time, from the user's perception perspective, the electronic device enters the application interface and the unlocking is completed. Furthermore, the electronic device can continue to execute the above-mentioned interface display-unrelated process.

[0040] Through the above technical solution, the service processes that affect the screen-off unlocking duration of the electronic device are divided into a display-related process and a display-unrelated process, and the black mask is removed and the application interface is displayed immediately after the interface display-related process is executed, and then the display-unrelated process is continued. Thus, the timing when the unlocking is completed from the user's perspective can be advanced to before the display-unrelated process is executed, so as to achieve the purpose of shortening the screen-off unlocking time and improving the user experience.

[0041] In the embodiments of the present application, the specific unlocking operation in the screen-off state can be a fingerprint unlocking operation, a face unlocking operation, etc., and the embodiments of the present application do not limit this.

[0042] Figure 5 FIG. shows a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application.

[0043] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a fingerprint sensor 180H, a pressure sensor 180A, a touch sensor 180K, an ambient light sensor 180L, a proximity light sensor 180G, a temperature sensor 180J, a distance sensor 180F, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a bone conduction sensor 180M, etc.

[0044] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0045] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0046] The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0047] A memory can also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can hold the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the said memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0048] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0049] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193, etc. through different I2C bus interfaces. For example: The processor 110 can be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the electronic device 100.

[0050] The MIPI interface can be used to connect the processor 110 to the display screen 194. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.

[0051] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative descriptions and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0052] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0053] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0054] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, files such as music and videos are saved in the external memory card.

[0055] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as an unlocking function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as fingerprint data, lock screen interface data, etc.). In addition, the internal memory 121 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.

[0056] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to achieve unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.

[0057] The touch sensor 180K, also called a "touch control device". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on it or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194. When the electronic device 100 enables the Always on Display (AOD) function, the electronic device 100 can light up the always-on display interface according to the touch operation detected by the touch sensor 180K.

[0058] The ambient light sensor 180L is used to sense the ambient light brightness. When the electronic device 100 enables the always-on display function, the electronic device 100 can adaptively adjust the brightness of the always-on display interface according to the sensed ambient light brightness. Also, the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.

[0059] In the following embodiments of this application, an electronic device having Figure 5 the structure shown will be used as an example to specifically describe the unlocking method provided by the embodiments of this application.

[0060] Figure 6 is a schematic flowchart of the unlocking method provided by the embodiments of this application, asFigure 6 As shown in Figure 6 , the unlocking method provided by the embodiments of the present application includes:

[0061] 101. The electronic device detects a screen-off operation.

[0062] 102. In response to the screen-off operation, the electronic device generates a lock screen interface and displays it on the lock screen interface layer.

[0063] 103. In response to the screen-off operation, the electronic device generates a black mask and sets the black mask to an invisible state.

[0064] In the embodiments of the present application, the electronic device may be an electronic device configured with an always-on display function, or may be an electronic device not configured with an always-on display function. The always-on display function means that without lighting up the entire screen, only a partial area of the screen is controlled to light up for displaying important information such as time, weather, and battery level. Based on the always-on display function, the operation frequencies of the user's screen-on operation and unlocking operation in the screen-off state can be reduced, which is beneficial to saving the power consumption of the electronic device.

[0065] The user can set the on / off state of the always-on display function based on the settings application of the electronic device. For the two different states of the always-on display function being enabled and not enabled, the screen layers included in the electronic device in the screen-off state are different. Correspondingly, when unlocking using the unlocking method provided by the present application, the method execution process is also different.

[0066] Next, the implementation process of the unlocking method in the case where the electronic device is not configured with an always-on display function, or is configured with an always-on display function but the always-on display function is not enabled, will be described.

[0067] In the embodiments of the present application, in the case where the always-on display function is not enabled, when the electronic device is displaying an application interface and detects a screen-off operation, the electronic device responds to the screen-off operation to turn off the screen and performs the following operations:

[0068] Generate a lock screen interface and display the lock screen interface above the layer where the current application interface is located. The current application interface may be any interface of any application program, or may also be the main interface of the electronic device. It should be understood that since the electronic device is already in the screen-off state at this time, although the lock screen interface is displayed, from the user's perspective, the electronic device is in the screen-off state.

[0069] Generate resource data related to the lock screen interface, including but not limited to: creating a thread for listening for unlocking operations and sensor states, creating a service for obtaining relevant service data (such as service data for updating time information in the lock screen interface), etc.

[0070] Generate a black mask and set it to an invisible state so that the black mask is not displayed. Setting the black mask to an invisible state can be, for example, when compositing the layer to be displayed, setting the layer corresponding to the black mask to be invisible, so that when displaying the data of each layer, the layer corresponding to the black mask is not displayed.

[0071] The above steps can be executed in parallel or sequentially according to a preset time sequence, and the embodiments of the present application do not limit this.

[0072] 104. The electronic device detects an unlocking operation.

[0073] Based on the above operation process, in the screen-off state of the electronic device, referring to Figure 1 , from top to bottom, the screen layer includes a lock screen interface layer and an application interface layer.

[0074] Among them, the lock screen interface layer is used to display the lock screen interface, and the application interface layer is used to display the application interface displayed when the electronic device enters the screen-off state. At the same time, this application interface is also the interface that should be displayed on the screen of the electronic device after successful unlocking. This application interface can specifically be any interface of any application program in the electronic device, or it can also be the main interface of the electronic device.

[0075] It should be understood that the layer located above can cover the layer located below, making the lower layer invisible. For example, the lock screen interface layer is located above the application interface layer. Therefore, after the electronic device is turned on, the user can only perceive the lock screen interface of the upper layer and cannot see the application interface below the lock screen interface layer.

[0076] In the screen-off state, the electronic device can detect an unlocking operation triggered by the user. The unlocking operation can be, for example, a fingerprint unlocking operation, a face unlocking operation, etc., and the embodiments of the present application do not limit this.

[0077] Exemplarily, for the fingerprint unlocking method, the electronic device can be configured with a preset sensing area. The electronic device detecting an unlocking operation triggered by the user can be detecting that the user's finger touches the preset sensing area. Among them, the preset sensing area can be located, for example, at the screen position of the electronic device, such as the middle position below the screen, or it can also be configured in other areas unrelated to the screen. For face unlocking, the electronic device detecting an unlocking operation triggered by the user can be detecting a face input acting on the camera.

[0078] 105. In response to the unlocking operation, the electronic device displays a black mask above the lock screen interface layer.

[0079] In response to the unlocking operation, as Figure 7 shown, the electronic device can execute the following process:

[0080] First, control the screen to light up.

[0081] In the embodiments of the present application, based on the differences in the screen material and the principle of lighting up the screen, the way for the electronic device to control the screen to light up can be, for example, to light up the backlight, or it can be to light up the screen itself. The present application does not limit this.

[0082] Second, display a black mask above the lock screen interface layer.

[0083] In the embodiments of the present application, the electronic device creates a black mask after the screen is turned off and sets it to an invisible state. When receiving an unlocking operation, the black mask is changed from an invisible state to a visible state and is displayed on the upper layer of the lock screen interface layer. Through this implementation method, creating the black mask in advance can shorten the time for displaying the black mask during the unlocking process.

[0084] By displaying the black mask on the upper layer of the lock screen interface layer, the lock screen interface can be covered by the black mask. From the user's perspective, even if the electronic device has controlled the screen to light up at this time, the user cannot observe the lock screen interface after the screen is lit, but instead sees that the screen still presents a "screen-off" state. On the one hand, it can prevent the user from seeing the phenomenon of screen flashing or flickering caused by reasons such as changes in the display layer during the unlocking process. On the other hand, it can maintain the consistency of the screen display state before and after the user's finger presses.

[0085] Third, collect unlocking data.

[0086] In the embodiments of the present application, when the unlocking operation is fingerprint unlocking, the unlocking data collected is fingerprint data; when the unlocking operation is face unlocking, the unlocking data collected is face data. Here, taking the under-screen fingerprint unlocking scenario as an example, the implementation method of collecting unlocking data will be described.

[0087] Based on the differences in the configured position of the preset sensing area and the type of fingerprint sensor, the principle and process of collecting fingerprint data are different. The present application does not limit this. Here, only one possible implementation method will be described as an example.

[0088] Refer to Figure 8 As shown in 8A, in the under-screen fingerprint unlocking scenario, the electronic device responds to a touch operation on the preset sensing area in the screen-off state. At this time, the electronic device screen lights up, and at the same time, a black mask is covered above the lock screen interface layer. Then, refer to Figure 8 As shown in 8B, in the embodiments of the present application, in the under-screen fingerprint unlocking scenario, the priority of lighting up the screen of the preset sensing area is higher than the layer display priority. Therefore, the black mask layer cannot cover the screen light of the preset sensing area, and a light spot area will appear in the preset sensing area. Furthermore, the fingerprint sensor can obtain fingerprint data based on the reflected light of the fingerprint.

[0089] In the embodiments of the present application, the above-mentioned various processes can be executed in parallel, which is beneficial to shortening the time used for the unlocking process.

[0090] 106. The electronic device collects unlocking data corresponding to the unlocking operation and verifies the unlocking data.

[0091] 107. The electronic device determines whether the unlocking data passes the verification. If the verification passes, step 108 is executed; otherwise, step 111 is executed.

[0092] 108. The electronic device deletes the service data related to display in the service data corresponding to the lock screen interface.

[0093] Furthermore, the electronic device can verify the collected unlocking data. Specifically, the collected unlocking data can be compared with the pre-stored unlocking data. When it is confirmed that the comparison is consistent, the electronic device determines that the unlocking data passes the verification. At this time, the electronic device can stop displaying the lock screen interface.

[0094] In the embodiments of the present application, the service data related to the lock screen interface can be divided into data related to display and data unrelated to display. Among them, it can be understood that the data related to display is the data that affects the foreground display of the lock screen interface, such as screenshot wallpaper image data, etc. The data unrelated to display is the background service data. Exemplarily, it can include but is not limited to: the related service service generated when creating the lock screen interface; the listening threads generated when creating the lock screen interface, such as the thread for listening to touch screen events, the thread for listening to sensors, etc.

[0095] When the electronic device controls to stop displaying the lock screen interface, in one possible implementation, the electronic device can directly delete the data related to the lock screen interface display mentioned above to stop displaying the lock screen interface. In another possible implementation, the electronic device can first set the lock screen interface layer to an invisible state, and then delete the data related to the lock screen interface display to stop displaying the lock screen interface. Among them, setting the lock screen interface layer to an invisible state can specifically be that, before the electronic device controls the display of each layer of data, during the execution of the layer composition process, the lock screen interface layer is set to an invisible state. By setting the lock screen interface layer to an invisible state before deleting the data related to the lock screen interface display, the probability of abnormal display during the data deletion process can be further reduced. However, it should be noted that in the actual execution scenario, even if the lock screen interface layer is first set to an invisible state, there may still be abnormal screen display when deleting the data related to the lock screen interface display without covering the black mask. Therefore, in the embodiments of the present application, even if the lock screen interface layer is first set to an invisible state, the black mask above the lock screen interface layer is still stopped from being displayed after deleting the data related to the lock screen interface display, thereby further preventing the phenomenon of abnormal screen display.

[0096] 109. The electronic device stops displaying the black mask above the lock screen interface layer.

[0097] After completing the above processing, the electronic device can stop displaying the black mask above the lock screen interface layer. Specifically, it can be to destroy the black mask covering above the lock screen interface layer, specifically by deleting the resource data corresponding to the black mask. Or, the black mask layer can also be set to an invisible state.

[0098] Furthermore, referring to Figure 1 As shown, since both the lock screen interface layer and the black mask have stopped being displayed, at this time, the electronic device only displays the application interface layer, and the application interface and the screen light are no longer blocked by the upper layer and are simultaneously perceived by the user. At this time, referring to Figure 8 as shown in 8C in

[0099] 110. The electronic device deletes the service data unrelated to the display in the service data corresponding to the lock screen interface.

[0100] Furthermore, after the user enters the application interface, the electronic device can delete the data in the service data corresponding to the lock screen interface mentioned above that is unrelated to the lock screen interface display.

[0101] Since the above-mentioned background service data does not affect the foreground display, in the embodiments of the present application, its execution timing can be placed after clearing the black mask covered by the lock screen interface layer. After clearing the black mask, on the one hand, the user can directly enter the application interface, and on the other hand, the electronic device can simultaneously execute the process of clearing the above-mentioned background service data, so that the user can enter the application interface as soon as possible on the premise of meeting the timing requirements, thereby shortening the time for the user to enter the application interface in the screen-off unlocking scenario.

[0102] 111. The electronic device sets the black mask to an invisible state.

[0103] On the contrary, in the case where it is confirmed that the collected unlocking data does not match the pre-stored unlocking data, the electronic device determines that the unlocking data verification fails. At this time, the electronic device can again change the above-mentioned black mask from a visible state to an invisible state. At the same time, the electronic device can also control the screen to turn off. It can be understood that since the black mask is in a visible state when the screen is lit and in an invisible state after the screen is turned off, during the process from detecting the unlocking operation to unlocking failure, the electronic device is always in the "screen-off" state from the user's perspective.

[0104] In the above implementation, when unlocking fails, the electronic device sets the black mask to an invisible state but does not delete it, so that when the unlocking operation is detected again, the time for displaying the black mask can be shortened by avoiding re-creating the black mask.

[0105] Figure 9 is another schematic flowchart of the unlocking method provided by the embodiments of the present application. As Figure 9 shown, the unlocking method provided by the embodiments of the present application includes:

[0106] 201. The electronic device detects a screen-off operation.

[0107] 202. In response to the screen-off operation, the electronic device generates a screen-off display interface and displays it on the screen-off display interface layer.

[0108] 203. In response to the screen-off operation, the electronic device generates a lock screen interface and displays it on the lock screen interface layer.

[0109] 204. In response to the screen-off operation, the electronic device generates a black mask and sets the black mask to an invisible state.

[0110] In the embodiments of the present application, the implementation process of the unlocking method in the scenario where the screen-off display function is enabled is described.

[0111] In an embodiment of the present application, when the always-on display function is enabled, during the process of the electronic device displaying an application interface, when a screen-off operation is detected, the electronic device responds to the screen-off operation to perform a screen-off and performs the following operations:

[0112] Generate a lock screen interface and display the lock screen interface above the layer where the current application interface is located. Generate a black mask corresponding to the lock screen interface and set it to an invisible state, so that the black mask is not displayed. Generate resource data related to the lock screen interface, including but not limited to: a thread for listening for unlock operations and sensor status, a service for obtaining relevant service data (such as service data for updating time information in the lock screen interface), etc.

[0113] Generate an always-on display interface and display the always-on display interface above the layer where the lock screen interface is located. And generate a black mask corresponding to the always-on display interface and set it to an invisible state, so that the black mask is not displayed. Generate resource data related to the always-on display interface, including but not limited to: a thread for listening for unlock operations and sensor status, a service for obtaining relevant service data (such as service data for updating time information in the always-on display interface), etc.

[0114] In an embodiment of the present application, for example, two threads can be created respectively to execute the above steps related to the lock screen interface and the steps related to the always-on display interface in parallel.

[0115] 205, the electronic device detects an unlock operation.

[0116] Based on the above description, when the always-on display function is enabled, in the screen-off state of the electronic device, referring to Figure 10 10A in, the screen layers from top to bottom include an always-on display interface layer, a lock screen interface layer, and an application interface layer.

[0117] Among them, the always-on display interface layer is used to display the always-on display interface. Based on the always-on display function, in the screen-off state of the electronic device, touch operations on any area within the screen can be detected. In response to the detected touch operation, as shown in 11A in Figure 11 , some areas within the always-on display interface are lit up and can be used to display information such as time, weather, and battery power. At the same time, a fingerprint unlock icon can also be displayed at the position corresponding to the preset sensing area on the screen. When the always-on display interface is lit up, since the always-on display interface layer is above the other layers, the user can only perceive the always-on display interface and cannot see the lock screen interface and the application interface below its layer.

[0118] Similar to the above embodiments, in the screen-off state, the electronic device can detect the unlocking operation triggered by the user. The specific method can refer to the above embodiments and will not be elaborated here.

[0119] 206. The electronic device responds to the unlocking operation and displays a black mask above the layer of the always-on display interface.

[0120] 207. The electronic device responds to the unlocking operation and displays a black mask above the layer of the lock screen interface.

[0121] 208. The electronic device collects the unlocking data corresponding to the unlocking operation and verifies the unlocking data.

[0122] In response to the detected unlocking operation, the electronic device can execute the following process:

[0123] First, control the screen to light up.

[0124] Second, display a black mask above the layer of the always-on display interface.

[0125] In the embodiment of the present application, the electronic device creates a black mask corresponding to the always-on display interface after the screen is turned off and sets it to an invisible state. When receiving an unlocking operation, the black mask is changed from an invisible state to a visible state and is displayed on the upper layer of the always-on display interface layer. Through this implementation method, creating the black mask in advance can shorten the time for displaying the black mask during the unlocking process.

[0126] Third, display a black mask above the layer of the lock screen interface.

[0127] In the embodiment of the present application, the electronic device creates a black mask corresponding to the lock screen interface after the screen is turned off and sets it to an invisible state. When receiving an unlocking operation, the black mask is changed from an invisible state to a visible state and is displayed on the upper layer of the lock screen interface layer. Through this implementation method, creating the black mask in advance can shorten the time for displaying the black mask during the unlocking process.

[0128] By displaying a black mask above the layer of the always-on display interface and the layer of the lock screen interface, the always-on display interface and the lock screen interface can be covered by the black mask. From the user's perspective, even if the screen of the electronic device has been controlled to light up at this time, the screen still appears to be in the "screen-off" state to the user's perspective. On the one hand, it can maintain the consistency of the screen display state before and after the user's finger presses. On the other hand, it can prevent the user from seeing the phenomenon of screen distortion or flashing caused by changes in the display layer during the unlocking process.

[0129] In the embodiment of the present application, refer to Figure 1010B in this case, at this time, the screen display layers from top to bottom are: a black mask, a screen-off display interface layer, a black mask, a lock screen interface layer, and an application interface layer.

[0130] Fourth, collect unlocking data.

[0131] Still taking the fingerprint unlocking scenario as an example, in the embodiment of the present application, referring to Figure 11 as shown in 11A, when the electronic device responds to a touch operation on the fingerprint unlocking icon in the screen-off display interface in the screen-off state, at this time, the screen of the electronic device lights up, and at the same time, a black mask is covered above the lock screen interface layer. Then, referring to Figure 11 as shown in 11B, in the embodiment of the present application, in the under-screen fingerprint unlocking scenario, the screen lighting priority of the preset sensing area is higher than the layer display priority. Therefore, the black mask cannot cover the screen light in the fingerprint icon area, and a light spot area will appear in the fingerprint icon area. Furthermore, the fingerprint sensor can obtain fingerprint data based on the reflected light of the fingerprint.

[0132] In the embodiment of the present application, the above-mentioned various processes can be executed in parallel, which is beneficial to shortening the time used for the unlocking process.

[0133] Furthermore, the electronic device can verify the collected unlocking data.

[0134] 209, the electronic device determines whether the unlocking data passes the verification. If it passes the verification, step 210 is executed; otherwise, step 215 is executed.

[0135] 210, the electronic device deletes the display-related service data in the service data corresponding to the screen-off display interface.

[0136] 211, the electronic device stops displaying the black mask above the screen-off display interface layer.

[0137] 212, the electronic device deletes the display-related service data in the service data corresponding to the lock screen interface.

[0138] 213, the electronic device stops displaying the black mask above the lock screen interface layer.

[0139] When the electronic device determines that the unlocking data passes the verification, the electronic device can stop displaying the screen-off display interface and the lock screen interface, and stop displaying the black mask covered above the screen-off display interface layer and the lock screen interface layer.

[0140] Specifically, after the electronic device determines that the fingerprint to be measured passes the verification, the following processes can be executed respectively, and the following processes can be executed in parallel:

[0141] First, stop displaying the screen-off display interface layer, and then delete the black mask covered above the screen-off display interface layer.

[0142] Similar to the above embodiments, the electronic device can directly delete the display-related data in the service data corresponding to the screen-off display interface, or it can also first set the screen-off display interface layer to an invisible state, and then clear the display-related data. After completing the above process, the electronic device can delete the black mask on the layer above the screen-off display interface layer.

[0143] Second, stop displaying the lock screen interface layer, and then delete the black mask covering the layer above the lock screen interface layer.

[0144] The electronic device can directly clear the display-related data in the service data corresponding to the lock screen interface, or it can also first set the lock screen interface layer to an invisible state, and then clear the display-related data. After completing the above process, the electronic device can delete the black mask on the layer above the lock screen interface layer.

[0145] 214. The electronic device deletes the service data unrelated to display in the service data corresponding to the screen-off display interface.

[0146] 215. The electronic device deletes the service data unrelated to display in the service data corresponding to the lock screen interface.

[0147] After both of the above processes are completed, at this time, as shown in 10B in Figure 10 Since the screen-off display interface layer, the lock screen interface layer, and the black masks corresponding to their respective layers are no longer displayed, at this time, the electronic device only displays the application interface layer. As shown in 11C in Figure 11 The application interface and the screen light are simultaneously perceived by the user, and the user's perspective unlocking is completed, and the user enters the application interface.

[0148] Further, after the user enters the application interface, the electronic device can clear the service data unrelated to display in the service data corresponding to the screen-off display interface and the lock screen interface. In the embodiments of the present application, clearing the service data unrelated to the screen-off display interface display may include, but is not limited to: canceling the listening of relevant sensors in the screen-off display scenario, such as the ambient light sensor; unbinding the relevant services bound when the screen-off display function is started; deleting the memory resources corresponding to the fingerprint icon displayed in the screen-off display interface; closing the listening threads created when the screen-off display function is started, such as the thread for listening to touch screen events, etc.

[0149] Since the processing flow of the above-mentioned background service data does not affect the foreground display, in the embodiments of the present application, its execution timing can be placed after clearing the black mask. After clearing the black mask, on the one hand, the user can directly enter the application interface, and on the other hand, the electronic device can simultaneously execute the processing flow of the above-mentioned background service data, so that the user can enter the application interface as soon as possible on the premise of meeting the timing requirements, thereby shortening the time for the user to enter the application interface in the screen-off unlocking scenario.

[0150] 216, the electronic device sets the black mask to an invisible state.

[0151] On the contrary, in the case where it is confirmed that the collected unlocking data does not match the pre-stored unlocking data, the electronic device determines that the unlocking data verification fails. At this time, the electronic device can again change the above-mentioned black mask from a visible state to an invisible state. At the same time, the electronic device can also control the screen to turn off. However, since the always-on display function is enabled, at this time, the screen is not completely turned off, but a part of the screen remains lit for displaying the always-on display interface. When no touch operation on the screen is received within the preset time, the screen completely turns off, and at this time, the always-on display interface is no longer displayed, entering the "screen-off" state.

[0152] In the above implementation manner, when unlocking fails, the electronic device sets the black mask to an invisible state but does not delete it. Thus, when the unlocking operation is detected again, the time for displaying the black mask can be shortened by avoiding re-creating the black mask.

[0153] In another embodiment of the present application, in combination with the software structure of the electronic device 100, the unlocking method provided in the embodiments of the present application is described.

[0154] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the Android system with a layered architecture as an example, the software structure of the electronic device 100 is exemplarily described.

[0155] Figure 12 It is the software structure block diagram of the electronic device 100 in the embodiments of the present application.

[0156] The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom are the application layer, the application framework layer, the native layer, and the kernel layer.

[0157] Among them, the application layer may include applications for implementing the screen-off and screen-unlock functions. In the embodiments of the present application, the functional modules that execute corresponding functions are expressed as execution units. In response to the user's screen-off operation, the execution unit may respectively perform the following operations: create and display a screen-off display interface and a lock screen interface, create a black mask, monitor the status information of the fingerprint sensor, register a sensor monitoring event, and register a service to obtain relevant service data to update the status information of the screen display, such as refreshing time information.

[0158] The kernel layer may include a touch screen driver, a fingerprint driver, a display driver, etc. In the screen-off state, in response to the user's touch operation on the fingerprint sensing area on the screen, the touch screen driver may notify the fingerprint driver that a fingerprint unlock event has been detected currently. The fingerprint driver may notify the control unit located in the local layer of the fingerprint unlock event.

[0159] In the screen-off state, the control unit in the local layer, in response to the received fingerprint unlock event, notifies the management unit in the application framework layer of the fingerprint unlock event. Furthermore, the management unit in the application framework layer sends an instruction to the execution unit in the application layer, so that the execution unit in the application layer displays a black mask. When the AOD function is started, there are two display positions for the black mask, which are respectively the upper layer of the screen-off display interface layer and the upper layer of the lock screen interface layer. When the AOD function is not started, the black mask is displayed on the upper layer of the lock screen interface layer.

[0160] The control unit in the local layer, in response to the received fingerprint unlock event, may also verify the fingerprint data of the fingerprint unlock event. If the verification is passed, an indication message of successful verification may be sent to the management unit in the application framework layer. Furthermore, the management unit in the application framework layer may send an instruction to the execution unit in the application layer. In response to the received instruction, when the AOD function is started, the execution unit in the application layer controls to clear the display-related data in the service data of the screen-off display interface and the lock screen interface, or when the AOD function is not started, the execution unit in the application layer controls to clear the display-related data in the service data of the lock screen interface. Furthermore, the management unit in the application framework layer controls to stop displaying and delete the black mask. At this time, the screen is lit up and the user's perspective unlock is successful. Furthermore, the management unit in the application framework layer controls to delete the service data that is not related to the display of the screen-off display interface and the lock screen interface.

[0161] If the verification fails, the control unit in the local layer may send an indication message of failed verification to the management unit in the application framework layer. Furthermore, the management unit in the application framework layer may send an instruction to the execution unit in the application layer. In response to the received instruction, the execution unit in the application layer stops displaying the black mask.

[0162] Through the above technical solution, the electronic device divides the operations required for the unlocking process into display-related operations and display-unrelated operations. After displaying the black mask, it preferentially executes the display-related operations and destroys the black mask, and then executes the display-unrelated operations. Thereby, the time for the user to enter the application interface can be advanced, and the unlocking speed of the electronic device can be improved.

[0163] It should be understood that the electronic device is embodied in the form of functional units here. The term "unit" here can be implemented in the form of software and / or hardware, and no specific limitation is made thereto. For example, the "unit" can be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, and a memory, a merged logic circuit, and / or other suitable components that support the described functions. Whether a certain function is executed in the manner of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments.

[0164] The division of modules in this embodiment is illustrative, only a logical function division, and there may be other division methods in actual implementation. For example, each function module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware.

[0165] An embodiment of the present application further provides an electronic device, which includes a storage medium and a central processing unit. The storage medium can be a non-volatile storage medium. A computer-executable program is stored in the storage medium. The central processing unit is connected to the non-volatile storage medium and executes the computer-executable program to implement the above unlocking method.

[0166] An embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions are run on a computer, the computer is caused to execute each step of the unlocking method of the embodiment of the present application.

[0167] An embodiment of the present application further provides a computer program product containing instructions. When the computer program product is run on a computer or any at least one processor, the computer is caused to execute each step of the unlocking method of the embodiment of the present application.

[0168] An embodiment of the present application further provides a chip, including a processor and a data interface. The processor reads instructions stored on a memory through the data interface to perform corresponding operations and / or processes executed by the unlocking method provided by the present application.

[0169] Optionally, the chip further includes a memory, which is connected to the processor through a circuit or wire. The processor is used to read and execute a computer program in the memory. Further optionally, the chip further includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and / or information to be processed. The processor obtains the data and / or information from the communication interface and processes the data and / or information. The communication interface may be an input / output interface.

[0170] The memory may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), or other types of dynamic storage devices that can store information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices. Or it may also be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.

[0171] In the embodiments of the present application, "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent the situation of A existing alone, A and B existing simultaneously, and B existing alone. Where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the preceding and following associated objects. "At least one of the following" and its similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c can be single or multiple.

[0172] Those of ordinary skill in the art can realize that the units and algorithm steps described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0173] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0174] In several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0175] The above is only the specific implementation manner of this application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application and should be covered by the protection scope of this application. The protection scope of this application shall be subject to the protection scope of the claimed rights.

Claims

1. An unlocking method, characterized in that, it includes: In response to a first unlocking operation in the screen-off state, a black mask is displayed on the layer above the first layer, the first layer displays a first interface, and the first layer is located above the layer where the second interface is located; In response to the unlocking data corresponding to the first unlocking operation being verified successfully, the first data corresponding to the first interface is cleared, and the first data is related to the display of the first interface; The black mask on the layer above the first layer is not displayed; The second data corresponding to the first interface is cleared, and the second data is not related to the display of the first interface.

2. The method according to claim 1, characterized in that, In response to the unlocking data corresponding to the first unlocking operation being verified successfully, clearing the first data corresponding to the first interface includes: In response to the unlocking data corresponding to the first unlocking operation being verified successfully, the first layer is set to an invisible state; The first data corresponding to the first interface is cleared.

3. The method according to claim 1, characterized in that, The method further includes: In response to the unlocking data verification failing, the black mask on the layer above the first layer is set to an invisible state.

4. The method according to claim 1, characterized in that, Before entering the screen-off state, the method further includes: In response to a screen-off operation, a black mask is generated; The black mask is set to an invisible state.

5. The method according to claim 1 or 4, characterized in that, Before entering the screen-off state, the method further includes: In response to a screen-off operation, the first interface is generated; The first interface is displayed on the first layer.

6. The method according to claim 5, characterized in that, The first interface includes a lock screen interface.

7. The method according to claim 5, characterized in that, The first interface includes a lock screen interface and a screen-off display interface, and the first layer includes a first sub-layer and a second sub-layer; Displaying the first interface on the first layer includes: Displaying the screen-off display interface on the first sub-layer and displaying the lock screen interface on the second sub-layer; The first sub-layer is located above the second sub-layer.

8. An electronic device, characterized in that, it includes: One or more processors; A memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, when the instructions are executed by the device, the device is caused to execute the method according to any one of claims 1-7.

9. A chip, characterized in that, The chip includes a processor and a data interface, and the processor reads instructions stored on a memory through the data interface and executes the method according to any one of claims 1-7 above.

10. A storage medium, characterized in that, Program instructions are stored in the storage medium, and when it runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-7.