A lock screen interface motion effect display method and device
By delaying the display of the lock screen animation during the face unlock process, the problem of high power consumption during face unlock of electronic devices is solved, achieving a balance between power saving and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2023-11-10
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the real-time feedback scheme for facial recognition unlocking of electronic devices consumes a lot of power, resulting in high cumulative power consumption when users unlock frequently.
During the face unlock process, in response to the screen lighting operation, the lock screen interface does not immediately display the face unlock icon animation and prompt information. The icon animation is only displayed after the face is recognized, and power consumption is saved by delaying the display or adjusting the animation.
By streamlining the real-time feedback for face unlock, power consumption is reduced while ensuring that the user experience is not affected, waiting time is shortened, and the accuracy of feedback is improved.
Smart Images

Figure CN120029433B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and more particularly to a method and apparatus for displaying animation effects on a lock screen interface. Background Technology
[0002] Currently, electronic devices (such as mobile phones) generally support facial recognition unlocking. When a user has enabled facial recognition on their electronic device, the device can automatically recognize their face when the user triggers the screen to wake up. Furthermore, the device can provide real-time notifications about the facial recognition status, for example, through text and animation effects. However, this real-time feedback method consumes a significant amount of power. Summary of the Invention
[0003] This application provides a method and apparatus for displaying animation effects on a lock screen interface, which can reduce the power consumption generated when an electronic device performs face unlock.
[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:
[0005] In a first aspect, a method for displaying animation effects on a lock screen interface is provided, applied to an electronic device, wherein the electronic device's face unlock function is enabled. The method includes: displaying a lock screen interface in response to a first screen-on operation; wherein the lock screen interface includes an icon indicating that the electronic device is performing face unlock; the lock screen interface does not display the icon's animation effect and does not include a first prompt message, the first prompt message indicating that the electronic device is performing face recognition; displaying a first animation effect of the icon in response to face recognition; wherein the first animation effect indicates that the electronic device is performing face unlock; and exiting the lock screen interface in response to successful face recognition.
[0006] Based on the method provided in this application embodiment, in response to the first screen-on operation, the animation of the face unlock icon is not displayed immediately, nor is a prompt message indicating that face recognition is in progress displayed. Instead, the first animation of the icon is displayed only when a face is recognized. This makes the feedback for face unlock more accurate and saves power consumption.
[0007] In one possible implementation, the first animation of the icon displayed in response to face recognition includes: displaying the first animation of the icon after a preset time has elapsed since the first screen-on operation was received, in response to face recognition. This ensures that the first animation of the icon is displayed only when both face detection and the preset time elapsed since the first screen-on operation are received. This makes the feedback for face unlocking more accurate and saves power. It is understandable that, due to the short preset time, not displaying the first animation before the preset time has elapsed will not affect the user experience. Furthermore, displaying the first animation after the preset time has elapsed and face detection provides more accurate feedback for face unlocking and reduces the perceived waiting time for the user.
[0008] In one possible implementation, in response to face recognition and after a preset time has elapsed since the first screen-on operation was received, a first animation effect of the icon is displayed. This includes: if the time difference between the first time point and the second time point is greater than or equal to the preset time, the first animation effect of the icon is displayed immediately; if the time difference between the first time point and the second time point is less than the preset time, the first animation effect is displayed after a first delay of the first time, where the first time is the difference between the time difference and the preset time. The first time point is the time when the first screen-on operation is received, and the second time point is the time when the face is recognized. That is, when a face is recognized, a preset time has elapsed since the screen-on operation was received, and the first animation effect of the icon (e.g., a lock icon) can be displayed immediately. This makes the feedback for face unlock more accurate and saves power.
[0009] In one possible implementation, the method further includes: displaying a second animation of an icon in response to a failed face recognition attempt; wherein the second animation prompts the user to restart face recognition; restarting face recognition in response to the restart operation; and displaying a first animation of an icon in response to a recognized face; wherein the first animation indicates that the electronic device is in the process of unlocking with face. This allows for timely feedback to the user that the face recognition attempt failed, reminding the user to retry promptly and ensuring a good user experience.
[0010] In one possible implementation, the electronic device includes a lock screen application, a face recognition framework, and a camera. In response to face recognition, a first animation of an icon is displayed, comprising: the lock screen application registering a face event with the face recognition framework; the face recognition framework activating the camera; image data acquisition including: the camera acquiring image data; the face recognition framework recognizing a face based on the image data; if the face recognition framework recognizes a face based on the image data, the face recognition framework returns a face event to the lock screen application, the face event indicating that a face has been recognized based on the image data; the lock screen application receiving the face event from the face recognition framework; and in response to receiving the face event, the lock screen application displays the first animation of the icon. The lock screen application only displays the first animation of the icon in response to receiving the face event. This provides more accurate feedback for face unlocking and can save power.
[0011] In one possible implementation, the first animation is a breathing animation. Breathing animations have low power consumption, thus saving power.
[0012] Secondly, a method for displaying animation effects on a lock screen interface is provided, applied to an electronic device. The electronic device's face unlock function is activated. The method includes: displaying a lock screen interface in response to a first screen-on operation; wherein the lock screen interface includes an icon indicating that the electronic device is performing face unlock; the lock screen interface does not include a first prompt message indicating that the electronic device is performing face recognition; after a preset time elapsed from receiving the first screen-on operation, displaying a first animation effect of the icon; wherein the first animation effect indicates that the electronic device is performing face unlock; and exiting the lock screen interface in response to successful face recognition.
[0013] Based on the method provided in this application embodiment, in response to the first screen-on operation, the animation of the face unlock icon is not displayed immediately, nor is a prompt message indicating that face recognition is in progress displayed. Instead, the first animation of the icon is displayed only after a preset time has elapsed since the first screen-on operation was received. This saves power consumption. It is understood that since the preset time is short, the user experience will not be affected even if the first animation is not displayed before the preset time is reached.
[0014] In one possible implementation, after a preset time has elapsed since the first screen-on operation was received, the first animation of the icon is displayed: in response to face recognition, and after the preset time has elapsed since the first screen-on operation was received, the first animation of the icon is displayed. That is, the first animation is displayed only after the preset time has elapsed and a face has been detected. This makes the feedback for face unlock more accurate and can reduce the user's perceived waiting time.
[0015] In one possible implementation, in response to the recognition of a face and after a preset time elapsed since the first screen-on operation was received, the first animation effect of the icon is displayed, including: if the time difference between the first time point and the second time point is greater than or equal to the preset time, the first animation effect of the icon is displayed immediately; if the time difference between the first time point and the second time point is less than the preset time, the first animation effect is displayed after a first time delay, wherein the first time point is the time point at which the first screen-on operation is received, and the second time point is the time point at which the face is recognized.
[0016] In one possible implementation, the method further includes: displaying a second animation of an icon in response to a face recognition failure; wherein the second animation prompts the user to restart face recognition; restarting face recognition in response to the restart operation; and displaying a first animation of an icon in response to a face being recognized; wherein the first animation prompts the electronic device to be unlocking with face.
[0017] In one possible implementation, the electronic device includes a lock screen application, a face recognition framework, and a camera. In response to the recognition of a face, a first animation of an icon is displayed, comprising: the lock screen application registering a face event with the face recognition framework; the face recognition framework activating the camera; acquiring image data including: the camera acquiring image data; the face recognition framework recognizing a face based on the image data; if the face recognition framework recognizes a face based on the image data, the face recognition framework returns a face event to the lock screen application, the face event indicating that a face has been recognized based on the image data; the lock screen application receiving the face event from the face recognition framework; and in response to receiving the face event, the lock screen application displays the first animation of an icon.
[0018] Thirdly, this application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on an electronic device (such as a mobile phone), they cause the electronic device to perform the methods described in the first aspect or the second aspect and any possible design configuration thereof.
[0019] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect or the second aspect and any possible design thereof.
[0020] Fifthly, embodiments of this application provide a motion effect display device for a lock screen interface, including a processor and a memory coupled together. The memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the device implements the method described in the first aspect or the second aspect and any possible design scheme thereof. The device may be an electronic device or a server device; or it may be a component of an electronic device or a server device, such as a chip.
[0021] Sixthly, embodiments of this application provide a motion display device for a lock screen interface. The device can be divided into different logical units or modules according to function, and each unit or module performs different functions so that the device can perform the methods described in the first aspect or the second aspect and any possible design method thereof.
[0022] In a seventh aspect, this application provides a chip system including one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines. The chip system described above can be applied to electronic devices including communication modules and memory. The interface circuits are used to receive signals from the memory of the electronic device and send the received signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device can perform the methods described in the first aspect or the second aspect and any possible design configuration thereof.
[0023] It is understood that the beneficial effects achieved by the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, the apparatus described in the fifth and sixth aspects, and the chip system described in the seventh aspect can be referred to the beneficial effects in the first or second aspect and any possible design embodiments thereof, which will not be repeated here. Attached Figure Description
[0024] Figure 1 This is a schematic diagram illustrating a related technology;
[0025] Figure 2 This is a timing diagram of related technologies;
[0026] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0027] Figure 4 A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0028] Figure 5 A schematic diagram provided for an embodiment of this application;
[0029] Figure 6 This is yet another display schematic diagram provided for an embodiment of this application;
[0030] Figure 7 This is yet another display schematic diagram provided for an embodiment of this application;
[0031] Figure 8 A schematic diagram of signal interaction provided in an embodiment of this application;
[0032] Figure 9 This application provides a schematic diagram of inter-module interactions.
[0033] Figure 10 This is another schematic diagram of inter-module interaction provided in an embodiment of this application;
[0034] Figure 11 A timing diagram provided for an embodiment of this application;
[0035] Figure 12 This is yet another timing diagram provided for an embodiment of this application;
[0036] Figure 13 This is yet another timing diagram provided for an embodiment of this application;
[0037] Figure 14 This is yet another display schematic diagram provided for an embodiment of this application;
[0038] Figure 15 This is yet another display schematic diagram provided for an embodiment of this application;
[0039] Figure 16 This is yet another timing diagram provided for an embodiment of this application;
[0040] Figure 17 This is yet another timing diagram provided for an embodiment of this application;
[0041] Figure 18 This is yet another schematic diagram of signal interaction provided in an embodiment of this application;
[0042] Figure 19 This is yet another display schematic diagram provided for an embodiment of this application;
[0043] Figure 20 This is yet another schematic diagram of signal interaction provided in an embodiment of this application;
[0044] Figure 21 This is yet another display schematic diagram provided for an embodiment of this application;
[0045] Figure 22 This is a schematic diagram of the chip system provided in an embodiment of this application. Detailed Implementation
[0046] Currently, when a user has enabled face unlock on their electronic device, the device can automatically recognize the user's face when the screen is turned on from lock. Furthermore, the device can provide real-time notifications about the face recognition status, for example, through text and animation effects.
[0047] For example, taking a mobile phone as an electronic device, such as Figure 1As shown in (a), when a user triggers the phone to enter the lock screen wake-up state, the phone can initiate face recognition and simultaneously display the lock screen interface 01. The lock screen interface 01 can include a lock icon 02 and text prompts 03. The lock icon 02 can display real-time animation (e.g., a breathing animation), and the text prompt 03 can read "Recognizing face" to inform the user that face recognition is in progress. For example, as... Figure 1 As shown in (b), when a user triggers the phone to enter the lock screen wake-up state, the phone can display the lock screen interface 04. The lock screen interface 04 may include a face icon 05, which can display animation effects in real time (e.g., left and right swaying animation) to prompt the user that face recognition is in progress.
[0048] like Figure 2 As shown in (a) above, based on Figure 1 As shown in (a) of the diagram, when the phone initiates face recognition, it can display the lock screen interface 01. The lock icon 02 in the lock screen interface 01 can display animation effects in real time, and text prompts 03 can be displayed in real time until face recognition is successful. Figure 2 As shown in (b) above, based on Figure 1 As shown in (b) above, when the phone starts face recognition, it can display the lock screen interface 04. The face icon 05 in the lock screen interface 04 can display animation effects in real time until face recognition is successful.
[0049] However, the aforementioned real-time facial recognition status feedback scheme consumes a significant amount of power. Considering that users unlock their electronic devices multiple times a day, the cumulative power consumption from each unlock can be substantial. For example, taking a mobile phone as an example, assuming a user unlocks their phone an average of 76 times a day, with an average unlock duration of 1 second, and assuming a current increment of 330mA and a battery capacity of 5000mAh, the daily power consumption for unlocking is: 76 * 1 * 330mA = 25080mAs ≈ 7mAh, 7mAh / 5000mA = 0.14%. That is, the daily power consumption for unlocking is 0.14% of the electronic device's battery capacity. Therefore, how to reduce unlocking power consumption has become an urgent problem to be solved.
[0050] This application provides a method and apparatus for displaying animation effects on a lock screen interface, which can reduce the power consumption generated when electronic devices unlock with facial recognition.
[0051] Figure 3 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application.
[0052] like Figure 3As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0053] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0054] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0055] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0056] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0057] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0058] In some embodiments, the processor 110 may include one or more interfaces. 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.
[0059] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0060] The charging management module 140 receives charging input from the charger. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.
[0061] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0062] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0063] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.
[0064] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
[0065] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194.
[0066] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0067] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0068] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0069] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), 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.
[0070] Electronic device 100 can perform shooting functions through an ISP, camera 193, video codec, GPU, display screen 194, and application processor. The ISP processes data fed back from the camera 193. The camera 193 captures still images or video. The digital signal processor processes digital signals, including digital image signals and other digital signals. The video codec compresses or decompresses digital video. Electronic device 100 can support one or more video codecs. Thus, electronic device 100 can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0071] Camera 193 may include 1 to N cameras. For example, an electronic device may include 2 front-facing cameras and 4 rear-facing cameras. The front-facing cameras may include a Time-of-Flight (TOF) camera. The TOF camera includes TX and RX; TX can be used to emit light signals (infrared light or laser pulses), and RX can be used to receive images. TX may be, for example, an infrared light emitter. RX may be, for example, a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor.
[0072] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.
[0073] 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 data storage functionality. For example, music, video, and other files can be saved on the external memory card. The internal memory 121 can be used to store computer executable program code, which includes instructions. 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. For example, in this embodiment, the processor 110 can execute instructions stored in the internal memory 121, which may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, 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, phone book, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0074] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0075] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for audio signal encoding and decoding. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Receiver 170B, also called a "handset," is used to convert audio electrical signals into sound signals. Microphone 170C, also called a "microphone" or "microphone unit," is used to convert sound signals into electrical signals. Headphone jack 170D is used to connect wired headphones.
[0076] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with electronic device 100. Electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
[0077] The methods described in the following embodiments can all be implemented in the electronic device 100 having the above-described hardware structure.
[0078] The software system of the aforementioned electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of the electronic device 100.
[0079] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through interfaces. In some embodiments, the Android system may include an application layer, an application framework layer, an Android runtime and system libraries, a hardware abstraction layer (HAL), and a kernel layer. It should be noted that this application uses the Android system as an example; however, the solution can also be implemented in other operating systems (such as HarmonyOS, iOS, etc.) as long as the functions implemented by each module are similar to those in the embodiments of this application.
[0080] The application layer can include a series of application packages.
[0081] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, lock screen application, and settings application. Of course, the application layer may also include other application packages, such as payment applications, shopping applications, banking applications, chat applications, or financial management applications, etc., which are not limited in this application.
[0082] The settings application includes functions for setting up face unlock and registering a face, with the registered face used for face unlock. The lock screen application includes a function for face unlock in response to the user's screen-on operation (e.g., pressing the power button or releasing the screen). Of course, the lock screen application can also perform unlocking processes such as fingerprint unlocking and password unlocking, which are not limited in this application. This application mainly uses face unlocking as an example for illustration.
[0083] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions. These may include, for example, an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, a camera service, and a face recognition service, etc., though this application embodiment does not impose any limitations on these.
[0084] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0085] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0086] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0087] OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0088] SGL is a 2D graphics engine.
[0089] The Android Runtime comprises the core libraries and the virtual machine. The Android Runtime is responsible for scheduling and managing the Android system. The core libraries consist of two parts: one part contains the functionalities that Java calls, and the other part contains the core Android libraries. The application layer and application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0090] The HAL layer is a wrapper around Linux kernel drivers, providing interfaces to the upper layers and shielding them from the implementation details of the lower-level hardware.
[0091] The HAL layer can include Wi-Fi HAL, audio HAL, camera HAL, and face recognition control module (Face CA), etc.
[0092] The camera HAL is the core software framework for the camera. The face recognition control module is the core software framework / application for face recognition.
[0093] Optionally, the software system of the electronic device 100 may also include a Face Trusted Application (Face TA), which is an application for face recognition running in a TEE environment (not shown in the figure). In this embodiment, Face TA is referred to as Face Recognition TA.
[0094] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0095] Among them, the camera driver is the driver layer of the camera device, which is mainly responsible for interacting with the hardware.
[0096] The hardware layer includes displays, cameras, etc. Among them, cameras can be used to capture image data.
[0097] In this embodiment, the face recognition service, camera service, face recognition module, camera HAL, camera driver, and face recognition TA modules can constitute a face recognition framework. The face recognition framework can be viewed as a bridge for information interaction between the lock screen application and the camera. Due to the existence of the face recognition framework, the lock screen application does not need to concern itself with the underlying logic.
[0098] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. In the description of this application, unless otherwise stated, "at least one" refers to one or more, and "more than one" refers to two or more. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0099] To facilitate understanding, we will use a mobile phone as an example and introduce the process of setting up face unlock with the help of the accompanying diagram.
[0100] In this embodiment of the application, the user can set up face unlock on a mobile phone (e.g., mobile phone A). For example, as shown... Figure 5 As shown in (a), in response to a user clicking the settings application 302 on the main screen 301 of a mobile phone (e.g., mobile phone A), the phone displays the following: Figure 5 The settings interface 303 is shown in (b) above. The settings interface 303 may include multiple settings options, such as personal account settings (e.g., Glen Gao), WLAN settings, Bluetooth settings, mobile network settings, more connection settings, security and privacy settings, etc. In response to user actions on the control 304 corresponding to the security and privacy settings (e.g., a click action), such as... Figure 5 As shown in (c), the mobile phone can display a security and privacy interface 305. The security and privacy interface 305 may include multiple settings, such as fingerprint settings, face recognition settings, and lock screen password settings. In response to user actions on the control 306 corresponding to the face recognition settings (e.g., a click), such as... Figure 5 As shown in (d), the mobile phone can display a face recognition interface 307. Optionally, before displaying the face recognition interface 307, the mobile phone can display a password input interface to prompt the user to enter a lock screen password. If the entered lock screen password is correct, the mobile phone displays the face recognition interface 307. The face recognition interface 307 may include screen unlock settings, smart lock screen notification settings, and other settings, such as the screen wake-up setting when the phone is picked up.
[0101] like Figure 6 As shown in (a), in response to a user's action on the control 308 corresponding to the unlock screen settings item (e.g., a click action), as Figure 6 As shown in (b), the phone can display a pop-up window 310, which may include a direct unlock setting 3101, a swipe-to-unlock setting 3102, and a disable setting 3103. If the direct unlock setting 3101 is selected, the phone will unlock directly after successful face recognition. If the swipe-to-unlock setting 3102 is selected, the phone will unlock by swiping (swiping up) the screen after successful face recognition. If the disable setting 3103 is selected, face recognition will not be used to unlock the screen, meaning the face unlock function is disabled.
[0102] like Figure 7 As shown in (a), in response to a user's action on the control 309 corresponding to the "Pick up the phone to wake up" setting (e.g., a click), as... Figure 7As shown in (b), the mobile phone can display interface 320, which may include a prompt animation 3201, prompt text 3202, and a pick-to-wake screen switch 3203. The prompt animation 3201 is used to demonstrate the gesture of picking up the phone to wake the screen. The prompt text 3202 could be, for example, "When the device screen is off, pick it up to wake the screen." If the pick-to-wake screen switch 3203 is turned on, the screen will wake up when the device is off. If the pick-to-wake screen switch 3203 is not turned on (is in the off state), the screen will not wake up when the device is off.
[0103] When face unlock is enabled, the phone can display the following animated effects.
[0104] like Figure 8 As shown in the figure, this application provides a method for displaying animation effects on a lock screen interface. Taking a mobile phone as an example, the method includes:
[0105] 801a. The lock screen application receives the user's screen-on operation.
[0106] The screen-on operation (first screen-on operation) refers to the operation that triggers the phone's screen to turn on. Before receiving the screen-on operation, the phone is in a screen-off state or an AOD (Always On Display) state. For example, the screen-on operation may include pressing the power button, lifting the phone when it is set to turn on, or swiping, tapping, or unplugging the charging cable on the phone's screen to trigger the screen to turn on.
[0107] 801b. In response to the user's screen-on operation, display the lock screen interface.
[0108] In response to a user's screen-on operation, the lock screen application can display the lock screen interface on the phone's display. The lock screen interface includes target elements (i.e., icons indicating that the electronic device is in the process of facial unlocking). Target elements may be, for example, a padlock icon, a face icon, or other identifiers; this application does not limit the scope of the target elements.
[0109] For example, the lock screen interface can be as follows: Figure 14 In the interface 701 shown in (a), the target element can be such as the lock icon 702 in the interface 701. Optionally, the lock screen interface may also include other elements, such as date, time, fingerprint icon, lock screen wallpaper, etc., which are not limited in this application.
[0110] Before a face is recognized, the lock screen does not display the animation of the target element (e.g., the padlock icon) (first animation).
[0111] In this embodiment, the lock screen interface may not display a prompt message (first prompt information) regarding face recognition. The first prompt information can be a text prompt indicating that the electronic device is performing face recognition. For example, the text prompt "Recognizing face" can be removed. This simplifies text display space, ensures the depth-of-field effect of the person in the lock screen wallpaper, and saves power. Furthermore, intelligent keying processing can be applied to the lock screen wallpaper, with the person masked above the text (e.g., date or time), ensuring that the image (face) on the lock screen wallpaper is not obscured by the text.
[0112] 802. At the first moment, the lock screen application calls the face recognition framework to perform face recognition.
[0113] In response to a user's screen-on action, the lock screen app can register a face event with the face recognition framework at the first moment. Registering a face event enables the face recognition framework to begin face recognition, and upon detecting a face, returns a face event to the lock screen app. The face event indicates that a face has been recognized (detected).
[0114] 803. The face recognition framework activates the camera.
[0115] In this embodiment, the face recognition framework may include face recognition service, camera service, face recognition module, camera HAL, camera driver, and other modules.
[0116] In one possible design, such as Figure 9 As shown, the process of the face recognition framework activating the camera includes:
[0117] S1. In response to the lock screen application registration face event, the face recognition service sends a face recognition request to the face recognition control module.
[0118] S2. The face recognition control module sends a request to the camera service to open the camera.
[0119] S3. In response to receiving a request to open the Camera, the camera service sends a request to the camera HAL to open the Camera.
[0120] S4. The camera HAL sends a request to the camera driver module to open the Camera.
[0121] S5. The camera driver module sends a start (stream on) command / instruction to the camera.
[0122] The `stream on` command is used to drive a camera (e.g., a TOF camera) to acquire data.
[0123] 804. The camera collects image data.
[0124] For example, in response to receiving a stream on command, the camera acquires image data.
[0125] In one possible design, the image data captured by the camera can be stored in secure memory (SecureBuffer). The storage location of the image data in secure memory can be represented by FD1.
[0126] 805. The face recognition framework detects faces based on image data collected by a camera.
[0127] In other words, the face recognition framework detects whether a face exists in the image data collected by the camera.
[0128] In one possible design, such as Figure 10 As shown, the face recognition framework detects the presence of a face in the image data captured by the camera by including:
[0129] S11, The camera sends FD1 to the camera driver module.
[0130] S12, The camera driver module sends FD1 to the camera HAL.
[0131] S13, Camera HAL sends FD1 to Camera Service.
[0132] S14, The camera service sends FD1 to the face recognition control module.
[0133] S15, The face recognition control module sends FD1 to the face recognition TA.
[0134] The face recognition technology (TA) includes a Time-of-Flight (TOF) algorithm and a Face ID algorithm. The TOF algorithm converts RAW data into grayscale and depth maps, and then calculates the security of the face (i.e., whether the current user is the owner of the device) based on these maps. The Face ID algorithm is used for grayscale image matching and depth map verification to prevent spoofing.
[0135] S16. Face recognition TA reads the image data to be collected by the camera from the secure memory according to FD1, and determines whether there is a face in the image data to be collected by the camera.
[0136] For example, a face recognition TA can process the image data captured by the camera using the TOF algorithm to obtain a first grayscale image, and then use a face ID algorithm to perform face recognition based on the first grayscale image to determine whether a face exists in the image data captured by the camera.
[0137] 806. If a face is detected (recognized), the face recognition framework sends a face event to the lock screen application.
[0138] Among them, face events are used to indicate that a face has been identified.
[0139] In one possible design, such as Figure 10 As shown, the process by which the face recognition framework sends face events to the lock screen application includes:
[0140] S17. The face recognition TA sends the face event to the face recognition control module.
[0141] S18. The face recognition control module sends face events to the face recognition service.
[0142] S19. The facial recognition service sends facial events to the lock screen application.
[0143] Additionally, if no face is detected, the face recognition framework will not send a face event to the lock screen application. The lock screen application will also not display the initial animation of the target element subsequently.
[0144] 807. At the second time point, the lock screen application receives a face event.
[0145] Lock screen apps can record the second time point when a face event is received and can calculate the time difference between the first and second time points.
[0146] In response to receiving a face event, the lock screen app can display the first animation of the target element. Before displaying the first animation of the target element, the lock screen app can also execute steps 808 and 809.
[0147] 808. Lock screen applications determine whether this is the first time initiating face recognition.
[0148] It should be noted that the lock screen app can initiate the first face recognition after receiving a screen-on operation. That is, the phone screen is off before initiating the first face recognition.
[0149] In some embodiments, the initial face recognition can last for a preset time (e.g., 3 seconds). That is, the initial face recognition can begin from the moment the screen is turned on and end at a maximum preset time (e.g., 3 seconds). During this preset time, the camera can continuously acquire image data, and the face recognition framework performs face recognition based on the image data acquired by the camera.
[0150] If face recognition is successful within the preset time (e.g., 3 seconds), the face recognition process can be ended and the camera can be turned off. If face recognition fails within the preset time (e.g., no face is detected or face comparison fails), i.e., the first face recognition attempt fails, the camera will be turned off offline to save power.
[0151] If the first face recognition attempt fails, a second face recognition attempt can be initiated based on user actions (e.g., double-tap to retry, raise to retry, etc.) or automatically based on motion sensing. This restarts the camera to collect image data and performs face recognition based on that data. The second face recognition attempt can last for a preset time (e.g., 3 seconds). During this time, the camera continuously collects image data, and the face recognition framework performs the recognition. If the second attempt fails, a third attempt can be initiated, and so on. It should be understood that the phone screen must be on before initiating the second or third face recognition attempt.
[0152] Among them, initiating a second face recognition based on displacement sensing means that after the first face recognition fails, the mobile phone can automatically initiate a second face recognition by detecting displacement of the mobile phone through sensors such as accelerometers.
[0153] In other embodiments, the duration of the first face recognition is not limited; that is, the camera can remain offline and continuously collect image data to perform face recognition based on the image data collected by the camera until the face recognition is successful.
[0154] 809. When face recognition is initiated for the first time, the lock screen application determines whether the time difference between the first time point and the second time point is less than the preset duration.
[0155] The preset duration can be, for example, Y seconds. Y is greater than 0. Optionally, Y is less than 3.
[0156] For example, suppose the first time point is T1, the second time point is T2, the time difference between T1 and T2 is ΔT (i.e., T1-T2=ΔT), and the preset duration is Y, that is, to determine whether ΔT is less than Y.
[0157] 810. If ΔT is less than Y, display the first animation of the target element after a delay of (Y-ΔT) milliseconds.
[0158] In response to the detection of a face, the first animation effect of the target element (e.g., a breathing animation) is displayed after a delay. Here, ΔT is less than Y, which means that when a face is detected (when the lock screen application receives a face event), the preset time has not yet elapsed since the screen-on operation was received, and the first animation effect of the target element is displayed after the preset time has elapsed since the screen-on operation was received.
[0159] The first animation includes a target element, which can display a breathing animation. This means the lock screen application displays the first animation of the target element after a delay. The first animation indicates that the electronic device (e.g., a mobile phone) is performing face unlock. The first animation can be a breathing animation. A breathing animation can refer to a regular change in at least one of the target element's attributes, such as size, color, or position. For example, a breathing animation could be a regular change in the target element's color intensity.
[0160] 811. If ΔT is greater than or equal to Y, the lock screen application immediately displays the first animation of the target element.
[0161] In response to the detection of a face, the first animation (e.g., a breathing animation) of the target element (e.g., a lock icon) is immediately displayed. Here, ΔT is greater than or equal to Y, indicating that when a face is detected (when the lock screen application receives a face event), a preset time has elapsed since the screen-on operation was received, and the first animation of the target element (e.g., a lock icon) can be displayed immediately.
[0162] When the second time point arrives, if the time difference between the first time point and the second time point is greater than or equal to the preset duration (i.e., ΔT is greater than or equal to Y), the lock screen application immediately displays the first animation effect (i.e., the lock screen application immediately displays the first animation effect of the target element), that is, the target element immediately displays the animation effect (e.g., breathing animation).
[0163] For example, suppose that at the first time point, in response to the screen-on operation, the lock screen application registers a face event with the face recognition framework (i.e., initiates the first face recognition). At the second time point, the lock screen application receives the face event, i.e., the lock screen application determines that a face has been detected. At the third time point, the duration of face recognition meets the preset duration. The duration of face recognition is the time from the moment face recognition is initiated (first time point) to the moment the face is determined to be detected (second time point). That is, ΔT = Y. For example, Y can be 1. At the fourth time point, face recognition is successful.
[0164] In some embodiments, such as Figure 11 As shown, the second time point is earlier than the third time point, that is, ΔT is less than Y. When the second time point is reached, the first animation screen can be displayed after a delay of (Y-ΔT) milliseconds (that is, the first animation of the target element is displayed). In other words, the lock screen application can start displaying the first animation screen from the third time point until the fourth time point (that is, the first animation screen stops being displayed at the fourth time point).
[0165] In other embodiments, such as Figure 12 As shown, the second time point is later than the third time point, meaning ΔT is greater than Y. The lock screen application can immediately display the first animation (i.e., display the first animation of the target element) from the second time point until the fourth time point.
[0166] In some other embodiments, such as Figure 13 As shown, the second time point equals the third time point, i.e., ΔT = Y. The lock screen application can immediately display the first animation (i.e., display the first animation of the target element) from the second time point until the fourth time point.
[0167] In this embodiment, after facial recognition is initiated, the first animation effect is not displayed immediately. Instead, it is displayed only when a face is detected (i.e., the lock screen application receives a facial event) and the facial recognition duration meets a preset duration (e.g., 1 second). This results in more accurate feedback for facial unlocking and saves power consumption.
[0168] Understandably, since the preset duration is relatively short, not displaying the first animation before the preset duration expires will not affect the user experience. Furthermore, displaying the first animation after the preset duration expires and upon detecting a face provides more accurate feedback for face unlocking and reduces the perceived waiting time for the user.
[0169] Furthermore, embodiments of this application may also include the following steps:
[0170] 812. If face recognition is successful, the lock screen application will exit the lock screen interface.
[0171] In other words, upon successful facial recognition, the user exits the lock screen.
[0172] For example, such as Figure 14 As shown in (a), in response to a screen-on operation (e.g., pressing the power button), at a first instant, the phone initiates face recognition and can display the lock screen interface 701. The lock screen interface 701 may include a lock icon 702. At this time, the lock icon 702 does not display any animation (e.g., a breathing animation). If the face recognition duration meets a preset duration (e.g., 1 second) and a face is detected (i.e., the lock screen application receives a face event), as... Figure 14 As shown in (b), a first animation screen 703 can be displayed. The first animation screen 703 includes a lock icon 702, which displays a first animation (e.g., a breathing animation). Furthermore, if face recognition is successful (face recognition is successful within 3 seconds), as shown... Figure 14 As shown in (c), when the aforementioned swipe-to-unlock setting 3102 is selected, interface 704 can be displayed. Interface 704 may include an unlock icon 705 (in an open state, which can visually indicate to the user that face unlock has been successful) and the prompt text "Swipe up to enter" 706. Responding to the user's swipe-up operation, as... Figure 14As shown in (d), the phone can display the desktop. Alternatively, the phone can display the interface of an application (system application or third-party application). Or, if the direct unlock setting 3101 is selected above, and face recognition is successful, the phone can unlock directly without any additional user intervention, such as... Figure 14 As shown in (d), the phone can directly display desktop 707 (or directly display the application interface).
[0173] In one possible design, if the grayscale image of the currently captured facial information (recognized from image data captured by the camera) matches the grayscale image of the previously entered facial information (i.e., the facial information captured by the electronic device when the user performs facial registration), it can be considered that they are the same user (i.e., the user performing facial registration and the user performing unlocking are the same user). Furthermore, if the image data captured by the camera includes depth information, the current user can be considered authentic and trustworthy (not a photo, video, or other disguise), and the current user's face can be considered secure, meaning the facial recognition result is successful. If the grayscale image of the currently captured facial information does not match the grayscale image of the previously entered facial information, or if the currently captured facial information does not include depth information, the current user's face is considered insecure, meaning the facial recognition result is unsuccessful.
[0174] 813. In response to a failed face recognition, display a second animation for the target element.
[0175] The second animation prompts the user to restart facial recognition.
[0176] If facial recognition fails, a second animated effect is displayed. This second animated effect includes the target element, which can display the second animated effect (e.g., a swaying effect). A swaying effect can refer to the target element rotating according to a preset angle or direction. For example, a swaying effect could be the target element swaying left and right.
[0177] If the first face recognition attempt fails—that is, if face recognition still fails after a preset time (e.g., 3 seconds) from the start of the attempt—the lock screen app can switch from the first animated effect screen to the second animated effect screen (e.g., a swaying animation on the target element) to prompt the user to retry and initiate a new round of face recognition (e.g., initiating a second face recognition). Optionally, the lock screen app can also display a text prompt to prompt the user to retry. For example, the text prompt could be: "Double-tap the screen to retry," or "Raise the screen to retry." This provides timely feedback to the user that the face recognition failed, reminding them to retry promptly and ensuring a better user experience.
[0178] For example, assuming a preset duration Y of 1 second, the first face recognition can last up to 3 seconds. From the start of the first face recognition, if a face is recognized within 1 second, the animation (i.e., the first animation screen) can begin execution from 1 second onwards; if a face is recognized between 1 and 3 seconds, the animation (i.e., the first animation screen) can be executed immediately. If face recognition fails after 3 seconds, a second animation screen can be displayed to remind the user to retry.
[0179] For example, let's take the target element as a lock icon. Figure 15 As shown in (a), in response to a screen-on operation (e.g., pressing the power button), the phone initiates face recognition at a first instant, and subsequently displays the lock screen interface 701. The lock screen interface 701 may include a lock icon 702. At this time, the lock icon 702 does not display any animation (e.g., a breathing animation). If the face recognition duration meets a preset duration (e.g., 1 second) and a face is detected (i.e., the lock screen application receives a face event), as... Figure 15 As shown in (b), a first animation screen 703 can be displayed. The first animation screen 703 includes a lock icon 702, which displays a first animation (e.g., a breathing animation). Furthermore, if face recognition fails within a preset time (e.g., 3 seconds) from the moment it is initiated (e.g., a first time point), as shown in (b), the first animation screen 703 can display a first animation screen 703, which includes a lock icon 702, and displays a first animation (e.g., a breathing animation). Figure 15 As shown in (c), the lock screen application can display a second animation screen 710, which includes a lock icon 711. The lock icon 711 can display a second animation (e.g., a left-right swaying animation) and can also display a text prompt 712, prompting the user to double-tap the screen to retry and initiate a new round of face recognition. In response to the user's double-tap retry operation (i.e., restarting face recognition), a second face recognition operation can be initiated (i.e., restarting face recognition). If a face is detected, such as... Figure 15 As shown in (d), the lock screen application can immediately display the first animation 703. That is, in response to the recognition of a face, the first animation of the target element (e.g., the lock icon) is displayed. The lock icon 702 can display the first animation (e.g., a breathing animation) until the face recognition is successful (the second face recognition is successful) or the second face recognition ends.
[0180] In some embodiments, after initiating the Mth face recognition (M being an integer greater than or equal to 2) (e.g., the second face recognition), if a face is detected, the first animation effect can be displayed. This makes the feedback for face unlocking more accurate and saves power consumption.
[0181] In other words, when initiating the first face recognition, after detecting a face, the system can consider whether the duration of the face recognition (first face recognition) meets the preset time limit. During subsequent face recognition (e.g., the second face recognition), after detecting a face, the animation (i.e., the first animation screen) can be displayed immediately, without considering whether the duration of the face recognition (second face recognition) meets the time threshold. This allows for timely feedback to the user that the current face recognition failed, reminding the user to retry.
[0182] For example, such as Figure 16 As shown, if the first face recognition fails—that is, if face recognition fails within a preset time (e.g., 3 seconds) from the start of the first face recognition attempt—a second animation (i.e., the second animation of the target element) can be displayed at the end of the first face recognition attempt (e.g., at the 3rd second). Optionally, a prompt text (e.g., "Double-tap to retry") can be displayed to prompt the user to retry. Assuming a double-tap retry operation is received at 3.5 seconds, the lock screen application can initiate a second face recognition attempt in response. Assuming a face event is received at 4 seconds, the lock screen application can again display the first animation (i.e., the first animation of the target element). The duration of the second face recognition attempt can be a maximum of a preset time (e.g., 3 seconds), meaning the first animation can be displayed for up to 6.5 seconds. Of course, if face recognition succeeds between 4 seconds and 6.5 seconds (e.g., at 4 seconds), the lock screen application stops displaying the first animation and exits the lock screen interface. If face recognition succeeds between 3.5 and 4 seconds (i.e., the second face recognition is successful), the lock screen app can exit the lock screen interface directly. Alternatively, if face recognition fails by 6.5 seconds, a second animation screen can be displayed (switching from the first animation screen to the second animation screen), along with a prompt message (e.g., "Double-tap to retry") to encourage the user to try again.
[0183] In some embodiments, after the Mth face recognition (M is an integer greater than or equal to 2) is initiated (e.g., the second face recognition), the first animation screen can be displayed immediately, thereby promptly notifying the user that face recognition is in progress, reducing the perceived waiting time for the user, and ensuring user experience.
[0184] For example, such as Figure 17As shown, if the first face recognition fails—that is, if face recognition fails within a preset time (e.g., 3 seconds) from the start of the first face recognition attempt—a second animation (i.e., displaying the second animation of the target element) can be displayed at the end of the first face recognition attempt (e.g., at the 3rd second). Optionally, a prompt text (e.g., "Double-tap to retry") can also be displayed to prompt the user to retry. Assuming a double-tap retry operation is received at 3.5 seconds, in response to this operation, the lock screen application can initiate a second face recognition attempt and display the first animation (switching from the second animation to the first). The duration of the second face recognition attempt can be a maximum of a preset time (e.g., 3 seconds), meaning the first animation can be displayed for up to 6.5 seconds. Of course, if face recognition succeeds between 3.5 seconds and 6.5 seconds (e.g., at the 4th second), the lock screen application stops displaying the first animation and exits the lock screen interface. Additionally, if face recognition still fails at 6.5 seconds, the second animation screen can be displayed again (switching from the first animation screen to the second animation screen), and prompt text (e.g., double-tap to retry) can also be displayed to prompt the user to retry.
[0185] In this embodiment, text prompts (e.g., unlock failed, charging, unlock successful, swipe up to enter) can replace the date and time display. This reduces text display space and ensures the depth effect of the figures in the lock screen wallpaper.
[0186] In one possible design, text prompts such as "unlock failed / unlock successful (swipe up to enter) / double-tap to retry" have higher priority than other text prompts (e.g., "charging"). This is to provide timely feedback to the user on the current unlock status.
[0187] The above embodiments determine whether the face recognition time meets a preset duration (e.g., 1 second) after detecting a face, and then decide whether to delay or immediately display the first animation effect. In other embodiments, it may first determine whether the face recognition time meets the preset duration (e.g., 1 second), and if so, then determine whether a face has been detected. Further determination is then made regarding whether to delay or immediately display the first animation effect. This application does not impose specific limitations on this approach.
[0188] Based on the method provided in this application embodiment, after initiating face recognition, the first animation screen is not displayed immediately. Instead, it is displayed only when a face is detected (i.e., the lock screen application receives a face event) and the face recognition duration meets a preset duration (e.g., 1 second). This results in more accurate feedback for face unlocking and saves power consumption.
[0189] Understandably, since the preset duration is relatively short, not displaying the first animation before the preset duration expires will not affect the user experience. Furthermore, displaying the first animation after the preset duration expires and upon detecting a face provides more accurate feedback for face unlocking and reduces the perceived waiting time for the user.
[0190] In addition, for abnormal or timeout scenarios where the first face recognition fails, the system can promptly inform the user that the face recognition has failed and remind the user to retry.
[0191] In summary, the method provided in this application embodiment can ensure that no unnecessary power consumption is generated in most unlocking scenarios, and can provide timely prompts for abnormal or timeout scenarios, thereby reducing the waiting time perceived by the user and ensuring user experience.
[0192] like Figure 18 As shown, this application provides a method for displaying animated images, taking a mobile phone as an example, including steps 1801a-1808.
[0193] Steps 1801a-1807 can be referred to as steps 801a-807, and will not be repeated here.
[0194] 1808. In response to receiving a face event, the lock screen application displays the first animation of the target element.
[0195] In response to the recognition of a face, the first animation (e.g., breathing animation) of the target element (e.g., a padlock icon) is displayed.
[0196] For example, such as Figure 19 As shown in (a), in response to a screen-on operation (e.g., pressing the power button), the phone initiates face recognition at a first instant, and subsequently displays the lock screen interface 701. The lock screen interface 701 may include a lock icon 702. At this time, the lock icon 702 does not display any animation (e.g., a breathing animation). Upon detecting a face (i.e., the lock screen application receives a face event), as... Figure 19 As shown in (b), a first motion effect screen 703 can be displayed, which includes a lock icon 702 and displays a first motion effect (e.g., a breathing motion effect).
[0197] Furthermore, in response to the recognition of a face, and after a preset time elapsed from the start of the screen-on operation (or after a preset time elapsed from the start of screen-on), the first animation of the target element is displayed. For a detailed description, please refer to the above text; it will not be repeated here.
[0198] In addition, in this embodiment, for abnormal or timeout scenarios where the first face recognition fails, the user can be promptly notified that the face recognition has failed and reminded to retry. For details, please refer to... Figure 8 The embodiments shown are not described in detail here.
[0199] Based on the method provided in this application embodiment, after initiating face recognition, the first animation effect is not displayed immediately. Instead, it is displayed only after a face is detected (i.e., the lock screen application receives a face event). This makes the feedback for face unlocking more accurate and saves power consumption.
[0200] like Figure 20 As shown, this application provides a method for displaying animated visuals, using a mobile phone as an example, including steps 2001a-2006:
[0201] Steps 2001a-2005 can be referred to as steps 801a-805, and will not be repeated here.
[0202] 2006. Starting from the first time point, after a preset time, the lock screen application displays the first animation of the target element.
[0203] That is, after a preset time has elapsed since the screen-on operation was received, the first animation of the target element is displayed.
[0204] Alternatively, the first animation of the target element can be displayed after a preset time since the screen lights up.
[0205] For example, such as Figure 21 As shown in (a), in response to a screen-on operation (e.g., pressing the power button), the phone initiates face recognition at a first instant, and subsequently displays the lock screen interface 701. The lock screen interface 701 may include a lock icon 702. At this time, no animation (e.g., breathing animation) of the lock icon 702 is displayed. If the face recognition duration meets a preset duration (e.g., 1 second), as... Figure 21 As shown in (b), a first motion effect screen 703 can be displayed, which includes a lock icon 702 and displays a first motion effect (e.g., a breathing motion effect).
[0206] Furthermore, in response to the recognition of a face, and after a preset time elapsed from the start of the screen-on operation (or after a preset time elapsed from the start of screen-on), the first animation of the target element is displayed. For a detailed description, please refer to the above text; it will not be repeated here.
[0207] In addition, in this embodiment, for abnormal or timeout scenarios where the first face recognition fails, the user can be promptly notified that the face recognition has failed and reminded to retry. For details, please refer to... Figure 8 The embodiments shown are not described in detail here.
[0208] Based on the method provided in this application embodiment, after initiating face recognition, the first animation effect is not displayed immediately. Instead, it is displayed only after the face recognition duration meets a preset duration (e.g., 1 second). This saves power consumption. It is understood that since the preset duration is short, the user experience will not be affected even if the first animation effect is not displayed before the preset duration is reached.
[0209] Some embodiments of this application provide an electronic device that may include a touchscreen, a memory, and one or more processors. The touchscreen, memory, and processors are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the electronic device in the above method embodiments. The structure of the electronic device can be referred to... Figure 3 The structure of the electronic device 100 shown.
[0210] This application also provides a chip system (e.g., a system-on-a-chip (SoC)). Figure 22 As shown, the chip system includes at least one processor 2201 and at least one interface circuit 2202. The processor 2201 and the interface circuit 2202 are interconnected via lines. For example, the interface circuit 2202 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 2202 can be used to send signals to other devices (e.g., the processor 2201 or the touchscreen of an electronic device). Exemplarily, the interface circuit 2202 can read instructions stored in the memory and send those instructions to the processor 2201. When the instructions are executed by the processor 2201, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete components, which are not specifically limited in this application embodiment.
[0211] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
[0212] This application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform various functions or steps performed by the electronic device in the above method embodiments.
[0213] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0214] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0215] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0216] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0217] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0218] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for displaying animation effects on a lock screen interface, characterized in that, Applied to an electronic device, wherein the facial recognition unlock function of the electronic device is enabled, the method includes: In response to the first screen-on operation, face recognition is initiated and the lock screen interface is displayed; wherein, the lock screen interface includes an icon indicating that the electronic device is performing face unlock; before a face is recognized, the lock screen interface does not display the animation of the icon and does not include the first prompt information, which indicates that the electronic device is performing face recognition; In response to the recognition of a face, and after a preset time elapsed since the first screen-on operation was received, a first animation effect of the icon is displayed; wherein, the first animation effect indicates that the electronic device is performing face unlock; Upon successful facial recognition, exit the lock screen interface.
2. The method according to claim 1, characterized in that, The first animation effect of displaying the icon in response to the recognition of a face and after a preset time elapsed from the receipt of the first screen-on operation includes: If the time difference between the first time point and the second time point is greater than or equal to the preset duration, the first animation effect of the icon will be displayed immediately. If the time difference between the first time point and the second time point is less than the preset duration, the first animation effect is displayed after a first delay of the first duration, where the first duration is the difference between the time difference and the preset duration. Wherein, the first time point is the time point at which the first screen-on operation is received, and the second time point is the time point at which the face is recognized.
3. The method according to claim 1 or 2, characterized in that, The method further includes: In response to a face recognition failure, a second animation effect of the icon is displayed; wherein, the second animation effect prompts the user to restart face recognition; Responding to the operation of restarting face recognition, restart face recognition; In response to the recognition of a face, a first animation effect of the icon is displayed; wherein the first animation effect indicates that the electronic device is performing face unlock.
4. The method according to claim 1 or 2, characterized in that, The electronic device includes a lock screen application, a face recognition frame, and a camera. The first animation effect of displaying the icon in response to face recognition includes: The lock screen application registers face events with the face recognition framework; The facial recognition framework activates the camera; The acquired image data includes: The camera collects image data; The face recognition framework identifies faces based on the image data; If the face recognition framework identifies a face based on the image data, the face recognition framework returns a face event to the lock screen application, and the face event is used to indicate that a face has been identified based on the image data; The lock screen application receives the face event from the face recognition framework; In response to receiving the face event, the lock screen application displays the first animation of the icon.
5. The method according to claim 1 or 2, characterized in that, The first animation effect is a breathing animation effect.
6. An electronic device, characterized in that, The electronic device includes: a wireless communication module, a memory, and one or more processors; the wireless communication module, the memory, and the processor are coupled together. The memory is used to store computer program code, which includes computer instructions; when the computer instructions are executed by the processor, the electronic device performs the method as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, Includes computer instructions; When the computer instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Unlocking method and device, mobile terminal and computer-readable medium
CN108920922A
Unlocking control method and apparatus, electronic device, and readable storage medium
WO2023125238A1