Fingerprint identification method and electronic equipment
By combining attitude sensors and fingerprint sensors in electronic devices, the user's intentions are detected and unlocked is performed only in a specific posture, which solves the problem of misunderstanding in side fingerprint recognition, and reduces power consumption without close-light sensors, improving the reliability of the device's usage and battery life.
Patent Information
- Application Number
- CN202311828157.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-07-04
AI Technical Summary
In electronic devices with side fingerprint recognition, the problem of misunderstanding caused by user accidentally touching the fingerprint sensor while holding the device is particularly obvious in pocket scenes and running scenes. At the same time, devices lacking close-light sensors consume more power.
The attitude sensor is used in combination with the fingerprint sensor, and by detecting the equipment's attitude and fingerprint feature information, the unlocking operation is only performed when the specific attitude conditions are met, avoiding misunderstandings, and reducing power consumption without close-light sensors.
It effectively prevents misunderstandings in various application scenarios, including pocket and running scenarios, reduces the power consumption of the device and improves the user experience.
Smart Images

Figure CN120260089A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and in particular, to a fingerprint recognition method and an electronic device. Background Art
[0002] With the continuous development of terminal technologies, people are increasingly accustomed to using electronic devices to handle various daily affairs. At the same time, in order to protect user privacy and the security of electronic devices, fingerprint recognition technology has emerged accordingly. Some electronic devices can adopt side fingerprint recognition. That is to say, the fingerprint sensor for collecting the user's fingerprint can be located on the side of the electronic device. When the user's finger touches the fingerprint sensor, the electronic device can obtain the user's fingerprint feature information and match it with a pre-stored fingerprint template. If the match is successful, the electronic device can change from the locked screen state to the unlocked state. If the match is unsuccessful, the electronic device can still remain in the locked screen state.
[0003] However, in electronic devices with side fingerprint recognition, since the fingerprint sensor is set on the side of the electronic device, it often occurs that when the user holds the electronic device, the fingerprint sensor is accidentally touched. This will cause the electronic device to perform the fingerprint matching process when the user does not want to perform fingerprint recognition, resulting in the problem that the electronic device is accidentally locked due to multiple unsuccessful matches. Summary of the Invention
[0004] This application provides a fingerprint recognition method and an electronic device, which are applied to an electronic device including a fingerprint sensor and an attitude sensor, realizing the prevention of accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario), and can also be applied to electronic devices without a proximity light sensor, reducing the power consumption of the electronic device.
[0005] In a first aspect, the present application provides a fingerprint recognition method applied to an electronic device. The electronic device includes a fingerprint sensor disposed on a side of the electronic device and an attitude sensor for detecting attitude information of the electronic device. The method includes: when the electronic device is in a locked screen state and placed in the user's pocket or the user is holding the electronic device and moving, when the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device and collects fingerprint feature information through the fingerprint sensor. The electronic device matches the fingerprint feature information with a preset fingerprint template and the matching is successful. If the attitude of the electronic device is a first preset attitude, the electronic device performs a device unlocking operation. If the attitude of the electronic device is not the first preset attitude but a second preset attitude, the electronic device performs a device unlocking operation. In this way, it is possible to prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario), and at the same time, it can also be applied to an electronic device without a proximity light sensor, reducing the power consumption of the electronic device.
[0006] In a possible implementation manner, if the attitude of the electronic device is not the first preset attitude and not the second preset attitude, the electronic device maintains the locked screen state. In this way, it is possible to prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario), and at the same time, it can also be applied to an electronic device without a proximity light sensor, reducing the power consumption of the electronic device.
[0007] In a possible implementation manner, if the attitude of the electronic device is a first preset attitude, the electronic device performs a device unlocking operation, specifically including: if the pitch angle of the electronic device is within a first preset range, the electronic device determines that the attitude of the electronic device is the first preset attitude. The electronic device performs a device unlocking operation. In this way, by judging the attitude of the electronic device through the value of the pitch angle, it is possible to more conveniently judge whether the user has the intention to use the electronic device, and prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario).
[0008] In a possible implementation manner, the first preset range is from -165 degrees to 15 degrees.
[0009] In a possible implementation, the electronic device further includes a proximity light sensor. When the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device and collects fingerprint feature information through the fingerprint sensor. Specifically, when the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device, obtains the proximity light state of the electronic device through the proximity light sensor, and collects fingerprint feature information through the fingerprint sensor. If the attitude of the electronic device is not the first preset attitude but the second preset attitude, the electronic device performs a device unlocking operation. Specifically, if the attitude of the electronic device is not the first preset attitude but the second preset attitude, and the proximity light state is the away state, the electronic device performs a device unlocking operation. In this way, it is possible to prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario), more precisely match the user's intention, and reduce the power consumption of the electronic device.
[0010] In a possible implementation, the method further includes: if the attitude of the electronic device is not the first preset attitude and not the second preset attitude, the electronic device maintains the locked screen state. If the attitude of the electronic device is not the first preset attitude but the second preset attitude, and the proximity light state is the close state, the electronic device maintains the locked screen state. In this way, it is possible to prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario), more precisely match the user's intention, and reduce the power consumption of the electronic device.
[0011] In a possible implementation, if the attitude of the electronic device is the first preset attitude, the electronic device performs a device unlocking operation. Specifically, if the pitch angle of the electronic device is within a first preset range, the electronic device determines that the attitude of the electronic device is the first preset attitude. The electronic device performs a device unlocking operation. In this way, by judging the attitude of the electronic device through the value of the pitch angle, it is possible to more conveniently judge whether the user intends to use the electronic device, and prevent accidental unlocking of the electronic device in various application scenarios (such as the pocket scenario and the running scenario).
[0012] In a possible implementation, the first preset range is -90 degrees to 15 degrees.
[0013] In a possible implementation, if the posture of the electronic device is not the first preset posture but the second preset posture, the electronic device performs a device unlocking operation, which specifically includes: if the pitch angle of the electronic device is not within the first preset range, the roll angle of the electronic device changes by more than the first preset angle within a specified period of time, and the electronic device remains stationary within the second preset range for more than the first specified duration, the electronic device determines that the posture of the electronic device is not the first preset posture but the second preset posture. The electronic device performs a device unlocking operation. In this way, by judging the posture of the electronic device through the value of the roll angle, it is possible to more accurately judge whether the user intends to use the electronic device, and prevent the electronic device from being accidentally unlocked in various application scenarios (such as the pocket scenario and the running scenario).
[0014] In a possible implementation, when the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the posture information of the electronic device and collects fingerprint feature information through the fingerprint sensor, which specifically includes: when the electronic device receives a finger touch event reported by the fingerprint sensor through the fingerprint service, the electronic device determines that it has detected that the user's finger touches the fingerprint sensor. The electronic device obtains the posture information of the electronic device reported by the posture sensor through the fingerprint service and collects fingerprint feature information through the fingerprint sensor.
[0015] In a possible implementation, the electronic device matches the fingerprint feature information with a preset fingerprint template and the matching is successful, which specifically includes: the electronic device matches the fingerprint feature information with a preset fingerprint template through the fingerprint hardware abstraction layer and the matching is successful.
[0016] In a second aspect, the present application provides an electronic device, including: a posture sensor, one or more processors, one or more memories, and a display screen. The one or more memories are coupled to the posture sensor and the one or more processors. The one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors and the posture sensor execute the computer instructions, the electronic device performs the method in any possible implementation manner in the first aspect above. In this way, it is possible to prevent the electronic device from being accidentally unlocked in various application scenarios (such as the pocket scenario and the running scenario), and at the same time, it can also be applied to electronic devices without a proximity light sensor, reducing the power consumption of the electronic device.
[0017] In a third aspect, the present application provides a computer-readable storage medium including computer instructions. When the computer instructions run on an electronic device, the electronic device is caused to execute the method in any possible implementation manner of the first aspect described above. In this way, it is possible to prevent accidental unlocking of the electronic device in multiple application scenarios (such as the pocket scenario and the running scenario), and at the same time, it can also be applied to electronic devices without a proximity light sensor, reducing the power consumption of the electronic device.
[0018] In a fourth aspect, the present application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions to execute the method in any possible implementation manner of the first aspect described above. In this way, it is possible to prevent accidental unlocking of the electronic device in multiple application scenarios (such as the pocket scenario and the running scenario), and at the same time, it can also be applied to electronic devices without a proximity light sensor, reducing the power consumption of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1A It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
[0020] Figure 1B It is a schematic diagram of the software structure of an electronic device 100 provided by an embodiment of the present application;
[0021] Figure 2A It is a schematic diagram of the appearance of an electronic device 100 provided by an embodiment of the present application;
[0022] Figure 2B It is a schematic diagram of the appearance of another electronic device 100 provided by an embodiment of the present application;
[0023] Figures 3A - 3B It is a schematic diagram of a set of scenarios of accidental fingerprint unlocking provided by an embodiment of the present application;
[0024] Figure 4 It is a schematic diagram of a fingerprint recognition process provided by an embodiment of the present application;
[0025] Figures 5A - 5C It is a schematic diagram of a set of user interfaces provided by an embodiment of the present application;
[0026] Figure 5D It is a schematic diagram of a fingerprint acquisition device provided by an embodiment of the present application;
[0027] Figure 5E It is a schematic diagram of a coordinate system provided by an embodiment of the present application;
[0028] Figure 5F It is a schematic diagram of the posture of an electronic device provided by an embodiment of the present application;
[0029] Figures 5G - 5H A set of schematic diagrams of user interface changes provided by an embodiment of the present application;
[0030] Figure 6A A specific process schematic diagram of a fingerprint recognition method provided by an embodiment of the present application;
[0031] Figure 6B An attitude schematic diagram of another electronic device provided by an embodiment of the present application;
[0032] Figure 6C An attitude schematic diagram of yet another electronic device provided by an embodiment of the present application;
[0033] Figure 7 A module interaction flowchart provided by an embodiment of the present application;
[0034] Figure 8 A specific process schematic diagram of another fingerprint recognition method provided by an embodiment of the present application;
[0035] Figure 9A Another module interaction flowchart provided by an embodiment of the present application;
[0036] Figure 9B Yet another module interaction flowchart provided by an embodiment of the present application. Detailed implementation manners
[0037] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an", "the", "above", "said", "this" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations including one or more of the listed items. In the embodiments of the present application, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise stated, the meaning of "a plurality" is two or more.
[0038] First, the hardware structure and software structure of the electronic device in the embodiments of the present application will be described in detail.
[0039] Figure 1A A hardware structure of an electronic device provided by an embodiment of the present application.
[0040] In the embodiments of the present application, the electronic device (which may be referred to as electronic device 100 in subsequent embodiments) may be an electronic device such as a mobile phone, a tablet computer, a PC, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA). The present application does not impose any restrictions on the specific type of this electronic device.
[0041] As Figure 1A shown, the electronic device 100 may include a processor 101, a memory 102, a sensor module 103, a display screen 104, a wireless communication module 105 (optional), an audio module 106 (optional), and a microphone 107 (optional).
[0042] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may further include more or fewer components than Figure 1A shown, or combine certain components, or split certain components, or have different component arrangements. Figure 1A The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0043] The processor 101 may include one or more processor units. For example, the processor 101 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. The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0044] A memory may also be provided in the processor 101 for storing instructions and data. In some embodiments, the memory in the processor 101 is a cache memory. This memory can save the instructions or data that the processor 101 has just used or recycled. If the processor 101 needs to use this instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 101, and thus improves the efficiency of the system.
[0045] In some embodiments, the processor 101 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 USB interface, etc.
[0046] The memory 102 is coupled to the processor 101 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 102 may include a volatile memory, such as a random access memory (RAM); it may also include a non-volatile memory, such as a ROM, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); the memory 102 may also include a combination of the above types of memories. The memory 102 may also store some program codes so that the processor 101 can call the program codes stored in the memory 102 to implement the implementation method of the embodiments of the present application in the electronic device 100. The memory 102 may store an operating system, such as an embedded operating system like uCOS, VxWorks, RTLinux, etc.
[0047] The sensor module 103 may include multiple sensor components. For example, a fingerprint sensor 103A and an attitude sensor 103B, etc. The fingerprint sensor 103A can be used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc. The attitude sensor 103B can be used to determine the attitude of the electronic device 100. For example, the attitude sensor 103B can determine that the electronic device 100 is in a rolling attitude, or it can determine that the electronic device 100 is in a hovering attitude, etc. Among them, the attitude sensor 103B may include a gyroscope sensor and / or an acceleration sensor, etc. The gyroscope sensor can detect the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes) to determine the attitude of the electronic device 100. The acceleration sensor can detect the magnitude of the acceleration of the electronic device 100 in each direction (generally the x, y, and z axes) to determine the attitude of the electronic device 100. The acceleration sensor can also be used to detect the magnitude and direction of gravity when the electronic device 100 is stationary.
[0048] In some examples, the sensor module 103 may further include a proximity light sensor ( Figure 1A (not shown). The proximity light sensor may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The electronic device 100 emits infrared light outward through the light-emitting diode. The electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, the proximity light sensor can determine that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor to detect when the user holds the electronic device 100 close to the ear for a call, so as to automatically turn off the screen to achieve the purpose of power saving. The proximity light sensor can also be used for automatic unlocking and locking of the holster mode and pocket mode.
[0049] In some examples, the sensor module 103 may further include a touch sensor ( Figure 1A (not shown), which can also be called a "touch control device". The touch sensor can be disposed on the display screen 104, and together with the display screen 104, it forms a touch screen, also known as a "touch screen". The touch sensor can be used to detect touch operations acting on it or nearby.
[0050] The display screen 104 can be used to display images, videos, etc. The display screen 104 can include a display panel. The display panel can adopt a liquid crystal display (LCD), 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. In some embodiments, the electronic device 100 can include one or N display screens 104, where N is a positive integer greater than 1.
[0051] The wireless communication module 105 can provide solutions for wireless communications applied to 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), infrared technology (IR), etc. The wireless communication module 105 can be one or more devices integrating at least one communication processing module. The wireless communication module 105 receives electromagnetic waves via an antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 101. The wireless communication module 105 can also receive the signals to be sent from the processor 101, frequency-modulate and amplify them, and convert them into electromagnetic waves through the antenna for radiation. In some embodiments, the electronic device 100 can also use the Bluetooth module ( Figure 1A not shown) and the WLAN module ( Figure 1AThe transmitting signal detects or scans devices near the electronic device 100 and establishes a wireless communication connection with the nearby devices to transmit data (not shown). Among them, the Bluetooth module can provide a solution for Bluetooth communication including one or more of classic Bluetooth (basic rate / enhanced data rate, BR / EDR) or Bluetooth low energy (BLE), and the WLAN module can provide a solution for WLAN communication including one or more of Wi-Fi direct, Wi-Fi LAN, or Wi-Fi softAP.
[0052] The audio module 106 can be used to convert digital audio information into an analog audio signal for output, or to convert an analog audio input into a digital audio signal. The audio module 106 can also be used to encode and decode audio signals. In some embodiments, the audio module 106 can also be disposed in the processor 101, or some functional modules of the audio module 106 can be disposed in the processor 101.
[0053] The microphone 107, also known as a "microphone" or "transmitter", can be used to collect sound signals in the surrounding environment of the electronic device, convert the sound signals into electrical signals, and then process the electrical signals through a series of processes, such as analog-to-digital conversion, etc., to obtain digital audio signals that can be processed by the processor 101 of the electronic device. When making a call or sending a voice message, the user can speak close to the microphone 107 to input the sound signal into the microphone 107. The electronic device 100 can be provided with at least one microphone 107. In some other embodiments, the electronic device 100 can be provided with two microphones 107, which can not only collect sound signals but also achieve a noise reduction function. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 107 to achieve functions such as collecting sound signals, noise reduction, identifying the sound source, and realizing the function of directional recording.
[0054] It should be noted that Figure 1A the electronic device 100 shown is only used to exemplarily explain the hardware structure of the electronic device provided by the present application and does not constitute a specific limitation to the present application.
[0055] Figure 1B This is a software structure of an electronic device 100 provided by an embodiment of the present application.
[0056] Please refer to Figure 1B , Figure 1B which exemplarily shows a software structure block diagram provided by an embodiment of the present application.
[0057] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of this application, taking the Android system with a layered architecture as an example, the software structure of the electronic device 100 will be exemplarily described. The layered architecture divides the software into several layers. 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, namely the application layer, the application framework layer, the hardware abstraction layer, and the kernel layer.
[0058] As Figure 1B shown, the application layer may include a series of application packages, such as the camera, calendar, memo, weather, and browser, etc.
[0059] In the embodiments of this application, the application layer may include the lock screen application 201. Among them, the lock screen application 201 can be used for data interaction with the fingerprint service 202 in the application framework layer. For example, the lock screen application 201 can receive the fingerprint matching result reported by the fingerprint service 202, and then determine whether to perform the device unlocking operation based on the fingerprint matching result. Among them, the device unlocking operation refers to changing the electronic device 100 from the locked screen state to the unlocked state. In the unlocked state, the electronic device 100 can provide all the functions that the electronic device 100 can execute.
[0060] As Figure 1B shown, the application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a window manager, a content provider, a phone manager, a resource manager, a notification manager, etc., where:
[0061] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0062] The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.
[0063] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of call status (including answering, hanging up, etc.).
[0064] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0065] The notification manager enables an application to display notification information in the status bar. It can be used to convey messages of the notification type, and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to inform that the download is completed, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background running application, or a notification that appears on the screen in the form of a dialogue window. For example, it can prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.
[0066] In an embodiment of the present application, the application framework layer may further include a fingerprint service (fingerprint service, FPService, also referred to as FP framework) 202. Among them, the fingerprint service 202 can be used for data interaction with the lock screen application 201 and the fingerprint hardware abstraction layer (fingerprint hardware abstract layer, FP HAL) 203A. For example, the fingerprint service 202 can receive the fingerprint matching result reported by the fingerprint hardware abstraction layer 203A, and then report the fingerprint matching result to the lock screen application 201. The fingerprint service 202 can also be used to receive the data information reported by the sensor. For example, the fingerprint service 202 can receive the angle information of the electronic device 100 reported by the acceleration sensor, the proximity light status reported by the proximity light sensor, and other data information.
[0067] As Figure 1B shown, the hardware abstraction layer is located between the kernel layer and the application framework layer, playing a connecting role. Specifically, the hardware abstraction layer defines a set of standard interfaces, including the fingerprint hardware abstraction layer 203A, the attitude sensor hardware abstraction layer (which can be simply referred to as attitude HAL) 203B, the proximity light hardware abstraction layer (optionally, which can be simply referred to as proximity light HAL) 203C, and the camera hardware abstraction layer (Camera HAL) not shown, etc. Among them, the set of interfaces defined by the fingerprint hardware abstraction layer 203A can be used for the fingerprint service 202 to call, and coordinate the fingerprint sensor driver in the sensor driver 204 to control the normal operation of the fingerprint sensor. The fingerprint hardware abstraction layer 203A can also match the fingerprint feature information reported by the fingerprint sensor with the fingerprint feature information in the fingerprint template to determine the fingerprint matching result, etc. The set of interfaces defined by the attitude HAL 203B can be used for the fingerprint service 202 to call, and coordinate the attitude sensor driver in the sensor driver 204 to control the normal operation of the attitude sensor. The set of interfaces defined by the proximity light HAL 203C can be used for the fingerprint service 202 to call, and coordinate the proximity light sensor driver in the sensor driver 204 to control the normal operation of the proximity light sensor.
[0068] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver 204, etc. Among them, the sensor driver 204 can include sensor drivers corresponding to multiple sensors, such as a fingerprint sensor driver, a proximity light sensor driver, an attitude sensor driver, and so on. Each sensor driver in the sensor driver 204 can be used to control the corresponding sensor to collect data information. For example, the fingerprint sensor driver can control the fingerprint sensor to collect fingerprint feature information of a finger, the attitude sensor driver can control the attitude sensor to collect angular velocity information or acceleration information, and the proximity light sensor driver can control the proximity light sensor to collect proximity light values, etc.
[0069] Figure 1B The software structure shown is only for exemplary explanation of this application and does not impose any limitation on this application.
[0070] Based on the above introduction of the software and hardware structure, the appearance of the electronic device 100 provided by this application will be described next.
[0071] Figures 2A - 2B The appearance of the electronic device 100 provided by the embodiments of this application is exemplarily shown.
[0072] As Figure 2A shown, the electronic device 100 may have a display screen 104, a power key 108, a front camera 109, a fingerprint collection area 110, etc. Among them, the fingerprint collection area 110 can be set at any position on the side frame of the electronic device 100, such as Figure 2A shown and set below the power key 108. The fingerprint collection area 110 can be integrated with a fingerprint sensor. When the electronic device 100 detects that a user's finger touches / presses the fingerprint collection area 110, the fingerprint sensor can collect the fingerprint feature information of the finger.
[0073] Further, as Figure 2B shown, the electronic device 100 may further include a proximity light sensor 111. Among them, the proximity light sensor 111 can be set in an area near the front camera 109, such as Figure 2B shown and set on the left side of the front camera 109.
[0074] Figures 2A - 2B It is only for exemplary explanation of this application and does not impose any limitation on this application. In specific implementation, the appearance of the electronic device 100 may also be different from Figure 2A and Figure 2B the examples.
[0075] Combined with the above description of the appearance of the electronic device 100, some exemplary scenarios that are prone to false fingerprint unlocking will be introduced below.
[0076] AsFigure 3A As shown, when the user is holding the electronic device 100 and placing the electronic device 100 in the pocket, and the electronic device 100 is in the locked screen state, the user's finger may accidentally touch / press the fingerprint collection area 110 on the side of the electronic device 100. At this time, the fingerprint sensor can collect the fingerprint feature information of the user's finger, and the electronic device 100 can match the fingerprint feature information with a preset fingerprint template. If the match is successful, the electronic device 100 will perform a device unlocking operation and change the electronic device 100 from the locked screen state to the unlocked state. However, in this scenario, the user has no intention of using the electronic device 100, so it will cause the problem of accidentally unlocking the electronic device 100.
[0077] As Figure 3B shown, when the user is running while holding the electronic device 100 and the electronic device 100 is in the locked screen state, as the user's body posture changes, the user's finger may also accidentally touch / press the fingerprint collection area 110 on the side of the electronic device 100. At this time, the fingerprint sensor can collect the fingerprint feature information of the user's finger, and the electronic device 100 can match the fingerprint feature information with a preset fingerprint template. If the match is successful, the electronic device 100 will perform a device unlocking operation and change the electronic device 100 from the locked screen state to the unlocked state. However, in this scenario, the user has no intention of using the electronic device 100, so it will also cause the problem of accidentally unlocking the electronic device 100.
[0078] Figures 3A - 3B It is only used for exemplary explanation of the present application and does not constitute any limitation to the present application. In specific implementations, there may also be other scenarios different from Figures 3A - 3B that are prone to accidental fingerprint unlocking.
[0079] Next, a fingerprint recognition process provided by an embodiment of the present application is introduced.
[0080] As Figure 4 shown, this process may specifically include:
[0081] S401: When the electronic device 100 is in the locked screen state, the electronic device 100 triggers the FPService to monitor the attitude sensor and the proximity light sensor through the lock screen application.
[0082] In the embodiments of the present application, the FP Service can register an attitude sensor listening interface and a proximity light sensor listening interface. When the electronic device 100 is in the locked screen state, the locked screen application can trigger the FP Service to receive, through the attitude sensor listening interface, the angle information reported by the attitude sensor via the attitude HAL, and receive, through the proximity light sensor listening interface, the proximity light state reported by the proximity light sensor via the proximity light HAL. Among them, the proximity light state can be divided into a proximity state and a far state. The proximity state is used to indicate that there is an object blocking near the electronic device 100, and the far state is used to indicate that there is no object blocking the electronic device 100.
[0083] Specifically, in the embodiments of the present application, the electronic device 100 can have two states: the locked screen state and the unlocked screen state. The locked screen state can refer to a state in which some functions of the electronic device 100 are locked, that is, the electronic device 100 does not provide some functions. The functions provided by the electronic device 100 in the locked screen state have relatively low requirements for data security. For example: answering a call, hanging up a call, adjusting the music volume, starting the camera application, turning on / off the flight mode, etc. When the electronic device 100 is in the unlocked screen state, it can not only provide the above functions with relatively low requirements for data security, but also provide functions with relatively high requirements for data security. For example: starting some application programs (such as the WeChat application program), and the functions provided by the application program (such as, displaying the WeChat payment interface). That is to say, in the unlocked screen state, the electronic device 100 can provide all the functions that the electronic device 100 can execute.
[0084] When the electronic device 100 is in the locked screen state, the screen (which can also be referred to as a display screen or a touch screen) interface of the electronic device 100 can be as follows: a blank screen interface, an always-on display (AOD) interface, and a locked screen interface. Among them, the blank screen interface can refer to: when the electronic device 100 is in the locked screen state, the display of the electronic device 100 goes into sleep and becomes a black screen, and its screen does not display interface elements, but other devices and programs are working properly. The AOD interface can refer to: when the electronic device 100 is in the locked screen state, a partial area of the screen of the electronic device 100 remains always-on to display information such as time, notifications, etc. The locked screen interface can refer to: when the electronic device 100 is in the locked screen state, all pixel points on the screen of the electronic device 100 are lit.
[0085] Such as Figure 5AAs shown, the electronic device 100 can display the AOD interface 20 in the locked screen state. The AOD interface 20 may include: a calendar indicator, a battery status indicator, an image specified by the user for display, etc. Among them, the calendar indicator can be used to indicate the current time, such as date, day of the week, hour and minute information, etc. In the AOD interface 20, the calendar indicator can be the text information "08:08", "June 13th", "Monday", and "May 15th of the Renyin Year". The battery status indicator can be used to indicate the current battery level. Without being limited to the above interface elements, the AOD interface can also display notification information, other icons, etc., which are not limited in this application.
[0086] As Figure 5B shown, the electronic device 100 can display the locked screen interface 21 in the locked screen state. The locked screen interface 21 may include: a status bar and a calendar indicator, etc. Among them, the status bar may include one or more signal strength indicators of the mobile communication signal (also known as the cellular signal), one or more signal strength indicators of the wireless fidelity (Wi-Fi) signal, a battery status indicator, etc. The description of the calendar indicator can refer to Figure 5A the description in the embodiments shown, which will not be elaborated here.
[0087] As Figure 5C shown, the electronic device 100 can display the off-screen interface 22 in the locked screen state. The off-screen interface 22 is a black screen, and no interface elements are displayed on its screen.
[0088] Figures 5A - 5C This is only for exemplary explanation of this application and does not constitute any limitation to this application.
[0089] S402: The electronic device 100 triggers the fingerprint sensor to monitor finger touch events through the lock screen application.
[0090] In the embodiments of this application, the finger touch event is that the user's finger touches / presses on the fingerprint collection area. The fingerprint sensor can adopt capacitive fingerprint recognition technology, and its specific implementation of monitoring finger touch events can be as follows:
[0091] As Figure 5DAs shown, the fingerprint collection area on the electronic device 100 may integrate a fingerprint sensor, and the fingerprint sensor may include devices such as a silicon crystal sensor. Multiple monitoring points for collecting hand information may be included on the silicon crystal sensor, and the area S of each detection point is the same. When the user's finger touches / presses on the fingerprint collection area, the finger skin surface can be matched with the detection points one by one to form a capacitor. Among them, the raised places on the finger skin surface can be called "ridges", and the sunken places on the finger skin surface can be called "grooves". The distance between the ridge capacitor formed by the ridge and the detection point is shorter than the distance between the groove capacitor formed by the groove and the detection point. Therefore, the capacitance value of the ridge capacitor is larger than that of the groove capacitor. The electronic device 100 can charge each detection point to a preset voltage value. Then, when the user's finger touches / presses on the fingerprint collection area, each detection point can discharge. Since the capacitance of the ridge capacitor is high, the discharge of the detection point at the ridge is slower. The capacitance of the groove capacitor is low, so the discharge of the detection point at the groove is faster. When the fingerprint sensor detects a discharge change in one or more detection points, the electronic device 100 can determine that the user's finger touches / presses on the fingerprint collection area.
[0092] Not limited to capacitive fingerprint recognition technology, in a specific implementation, the fingerprint sensor can also adopt other technical solutions to monitor finger touch events, and this application does not limit this.
[0093] S403A: In response to the touch operation of the user on the fingerprint collection area, the electronic device 100 can receive the finger touch event reported by the fingerprint sensor through the FPHAL.
[0094] Specifically, the touch operation of the user on the fingerprint collection area may include the touch operation of the user's finger touching or pressing on the fingerprint collection area. In response to the touch operation of the user on the fingerprint collection area, the fingerprint sensor can determine the finger touch event according to the detected discharge change in one or more detection points, and then, the fingerprint sensor can report the finger touch event to the FP HAL.
[0095] S403B: The electronic device 100 triggers the fingerprint sensor to collect and report fingerprint feature information through the FP HAL.
[0096] In the embodiment of this application, when the FP HAL receives the finger touch event, the FP HAL can send fingerprint collection indication information to the fingerprint sensor to trigger the fingerprint sensor to collect the fingerprint feature information of the finger that the user touches / presses on the fingerprint collection area. Then, the fingerprint sensor can determine the fingerprint feature information according to the discharge change situation of each detection point and report the fingerprint feature information to the FP HAL.
[0097] S403C: The electronic device 100 matches the collected fingerprint feature information with the fingerprint template through the FP HAL to obtain a matching result.
[0098] In the embodiment of the present application, the electronic device 100 may pre-store a fingerprint template, and the fingerprint template may include fingerprint feature information for the electronic device 100 to perform a device unlocking operation. When the FP HAL receives the fingerprint feature information collected by the fingerprint sensor, the FP HAL may match the collected fingerprint feature information with the fingerprint template. That is to say, the FP HAL may calculate the similarity between the collected fingerprint feature information and the fingerprint feature information in the fingerprint template according to a specified algorithm. When the similarity is greater than or equal to a preset threshold A1 (such as 0.7, 0.8, etc.), the FP HAL can determine that the matching is successful; when the similarity is less than the preset threshold A1, the FP HAL can determine that the matching fails. Among them, the specified algorithm may be a matching algorithm based on the Hough transform, a matching algorithm based on string distance, etc., and the embodiment of the present application does not limit this.
[0099] S404: The electronic device 100 receives the finger touch event reported by the FP HAL through the FP Service.
[0100] That is to say, the fingerprint sensor may report the finger touch event to the FP HAL, and then the FP HAL reports the finger touch event to the FP Service.
[0101] S405: When the FP Service receives the finger touch event, the electronic device 100 determines whether the posture of the electronic device 100 is a preset posture 1 through the FP Service.
[0102] Specifically, in order to illustrate the posture of the electronic device 100, a coordinate system established based on the electronic device 100 is first introduced.
[0103] As Figure 5E shown, the side of the electronic device 100 where the power button is set is the right side, the side without the power button is the left side, the side with the front camera is the top, and the side with the charging port is the tail. Taking the center of the electronic device 100 as the origin O of the coordinate system, the direction from the charging port to the front camera is the positive direction of the Y axis, the direction pointing to the outside of the display screen of the electronic device 100 is the positive direction of the Z axis, and the direction from the left side to the right side is the positive direction of the X axis. The direction from the charging port to the front camera can also be regarded as the reference direction. Based on this coordinate system, the pitch angle and roll angle (roll, which can also be called the tumbling angle, flipping angle) of the electronic device 100 are defined as follows:
[0104] The pitch angle indicates the angle at which the top or the tail of the electronic device 100 is tilted. When the electronic device 100 is placed horizontally with the display screen facing upward, the pitch angle is 0 degrees; when the top of the electronic device 100 is lifted upward, the electronic device 100 is rotated 180 degrees along the X axis until the display screen faces downward and the value of the pitch angle changes from 0 degrees to -180 degrees; when the tail of the electronic device 100 is lifted upward, the electronic device 100 is rotated 180 degrees along the X axis until the display screen faces downward and the value of the pitch angle changes from 0 degrees to 180 degrees.
[0105] The roll angle indicates the tilted angle of the left or right side of the electronic device. When the electronic device 100 is placed horizontally with the display screen facing upward, the roll angle is 0 degrees; when the left side of the electronic device 100 is lifted upward, the electronic device 100 is rotated along the Y axis until the display screen is perpendicular to the ground, during which the roll angle value changes from 0 degrees to -90 degrees; when the right side of the electronic device 100 is lifted upward, the electronic device 100 is rotated along the Y axis until the display screen is perpendicular to the ground, during which the roll angle value changes from 0 degrees to 90 degrees.
[0106] In an embodiment of the present application, the FP Service may receive the pitch angle value reported by a posture sensor (e.g., an acceleration sensor or a gyroscope sensor, etc.). When the pitch angle value is within the preset threshold value A2 (e.g., [-90 degrees, 15 degrees]), the FP Service may determine that the posture of the electronic device 100 is the preset posture 1; otherwise, the FP Service may determine that the posture of the electronic device 100 is not the preset posture 1. Not limited to [-90 degrees, 15 degrees], in actual implementation, the preset threshold value A2 may also be other values, and the present application does not impose any limitation on this.
[0107] according to Figure 5E The coordinate system shown, the preset posture 1 in this step can be as follows:
[0108] like Figure 5F As shown, taking the preset threshold value A2 [-90 degrees, 15 degrees] as an example, the preset posture 1 of the electronic device 100 may include: Figure 5F The three angles shown are 15 degrees, -45 degrees, and -90 degrees.
[0109] S406: When the posture of the electronic device 100 is not the preset posture 1, the electronic device 100 determines through the FP Service whether the proximity light state reported by the proximity light sensor is the proximity state.
[0110] In the embodiments of the present application, the FP Service can receive the proximity light status reported by the proximity light sensor. When the proximity light sensor detects that the value of the proximity light is between [0.0f, 5.0f), the proximity light sensor can output 0 cm to represent that the proximity light status is the proximity state, that is, there is an object blocking near the electronic device 100; when the proximity light sensor detects that the value of the proximity light >= 5.0f, the proximity light sensor can output 5 cm to represent that the proximity light status is the far state, that is, there is no object blocking near the electronic device 100. Here, f means that the numerical type is floating-point type (float).
[0111] S407: When the proximity light status is the proximity state, the electronic device 100 indicates to the FP HAL through the FP Service that the proximity light status is the proximity state.
[0112] Specifically, when the FP Service determines that the proximity light status reported by the proximity light sensor is the proximity state, the FP Service can send proximity state indication information to the FP HAL to indicate to the FP HAL that the proximity light status is the proximity state.
[0113] S408: The electronic device 100 does not report the matching result through the FP HAL.
[0114] In the embodiments of the present application, the FP HAL can match the collected fingerprint feature information with the fingerprint feature information in the fingerprint template in the manner described in the foregoing step S403C to obtain a matching result. When the FP HAL receives the proximity state indication information, the FP HAL does not report the matching result to the FP Service.
[0115] S409: In some examples, the electronic device 100 clears the matching result reported by the FP HAL through the FP Service.
[0116] In a possible implementation manner, when the FP Service determines that the posture of the electronic device 100 and / or the process of detecting the proximity light status is blocked by other processes, resulting in a slow operation speed, while the operation speed of the FP HAL for matching fingerprint feature information is relatively fast, in order to ensure the user's unlocking experience, the FP HAL will report the matching result to the FP Service when it has not received the proximity light status. That is to say, when the FP Service sends proximity state indication information to the FP HAL, the FP HAL has already reported the matching result to the FP Service. At this time, the FP Service can clear the matching result.
[0117] S410: When the posture of the electronic device 100 is the preset posture 1, or when the electronic device 100 is not in the preset posture 1 and it is determined that the proximity light state is the away state, the electronic device 100 instructs the FP HAL through the FP Service that the proximity light state is the away state.
[0118] Among them, when the posture of the electronic device 100 is the preset posture 1, it can indicate that the user has the intention to use the electronic device 100. Therefore, the electronic device 100 can stop detecting the proximity light state. Regardless of whether the proximity light state reported by the proximity light sensor is the close state or the away state, the FP Service instructs the FP HAL that the proximity light state is the away state, and the FP HAL only needs to report the matching result.
[0119] Specifically, the FP Service can send the away state indication information to the FP HAL to indicate to the FP HAL that the proximity light state is the away state.
[0120] S411: The electronic device 100 receives the matching result reported by the FP HAL through the FP Service.
[0121] That is to say, when the FP HAL receives the away state indication information, the FP HAL can report the matching result between the collected fingerprint feature information and the fingerprint feature information in the fingerprint template to the FP Service.
[0122] S412: The electronic device 100 receives the matching result reported by the FP Service through the lock screen application.
[0123] S413: The electronic device 100 performs corresponding operations according to the matching result through the lock screen application.
[0124] In the embodiment of the present application, when the matching result is successful, the lock screen application can perform the device unlocking operation to change the electronic device 100 from the locked state to the unlocked state; when the matching result is failed, the lock screen application does not perform the device unlocking operation and maintains the current locked state of the electronic device 100. In some implementation manners, when the matching result is failed, the lock screen application can also trigger the electronic device 100 to output a matching failure prompt message on the lock screen interface to prompt the user that the fingerprint unlocking operation of the electronic device 100 this time is unsuccessful.
[0125] Such as Figure 5GAs shown, if the electronic device 100 displays a blank screen interface in the locked screen state, when the matching is successful, the lock screen application can perform a device unlocking operation to change the electronic device 100 from the locked screen state to the unlocked state, and the blank screen interface of the electronic device 100 can be changed to the desktop 24. One or more application icons (including weather application icons, stock application icons, calculator application icons, email application icons, theme application icons, and calendar application icons, etc.) can be displayed on the desktop 24. Optionally, the desktop 24 can also display a status bar, a page indicator, and a tray icon area. Among them, the status bar can include one or more signal strength indicators of the mobile communication signal (also known as the cellular signal), the signal strength indicator of the wireless fidelity (Wi-Fi) signal, the battery status indicator, the time indicator, and so on. The page indicator can be used to indicate the positional relationship between the currently displayed page and other pages. The tray icon area includes multiple tray icons (such as a dial application icon, a message application icon, and a contacts application icon, etc.), and the tray icons remain displayed during page switching. The above-mentioned page can also include multiple application icons and a page indicator. The page indicator can exist separately and is not part of the page. The above-mentioned tray icons are also optional, and the embodiments of the present application do not limit this.
[0126] As Figure 5H shown, if the electronic device 100 displays a blank screen interface in the locked screen state, when the matching fails, the lock screen application does not perform a device unlocking operation and maintains the current locked screen state of the electronic device 100. The electronic device 100 can display the locked screen interface and output a matching failure prompt message, and the matching failure prompt message can be a text message such as "Fingerprint unlocking failed, please unlock again".
[0127] From Figure 4 the process shown, it can be seen that the application scenarios of this fingerprint recognition process are limited. For example, it can be applied to Figure 3A the pocket scenario shown to prevent the problem of accidentally unlocking the electronic device 100 in this scenario. However, in scenarios such as Figure 3B shown, since the electronic device 100 is exposed and not blocked, when the posture of the electronic device 100 is not the preset posture 1, the proximity light sensor reports the proximity light state as the away state, and the electronic device 100 performs a device unlocking operation based on steps S410 - S413. This process cannot prevent the problem of accidental unlocking in Figure 3B this scenario. In addition, if there is no proximity light sensor set on the electronic device 100, Figure 4 the process shown cannot be applied either.
[0128] Therefore, the present application provides a fingerprint recognition method, which may include: when the electronic device is in the locked screen state and placed in the user's pocket or the user is holding the electronic device and moving (such as running), when the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the posture information of the electronic device and collects fingerprint feature information through the fingerprint sensor. The electronic device matches the fingerprint feature information with a preset fingerprint template and the matching is successful. If the posture of the electronic device is the first preset posture, the electronic device performs a device unlocking operation. If the posture of the electronic device is not the first preset posture but the second preset posture, the electronic device performs a device unlocking operation.
[0129] Implementing the fingerprint recognition method provided by the present application can prevent the electronic device 100 from being accidentally unlocked in various application scenarios (such as the aforementioned Figure 3A pocket scenario and Figure 3B running scenario), and can also be applied to electronic devices without a proximity light sensor, reducing the power consumption of the electronic device.
[0130] Figure 6A This is the specific process of a fingerprint recognition method provided by an embodiment of the present application.
[0131] As Figure 6A shown, the method may specifically include:
[0132] S601: When the electronic device 100 is in the locked screen state, the electronic device 100 listens for finger touch events through the fingerprint sensor.
[0133] Specifically, for the description of the locked screen state and the fingerprint sensor listening for finger touch events, reference may be made to the description in the foregoing Figure 4 shown embodiment, and details are not described herein again.
[0134] In an embodiment of the present application, when the electronic device 100 is in the locked screen state and placed in the user's pocket or the user is holding the electronic device 100 and moving (such as running, walking, etc.), the electronic device 100 may execute S601 and subsequent steps. Without limitation, the electronic device 100 may also execute S601 and subsequent steps when in the locked screen state in other scenarios. That is to say, the present application does not limit in what scenario the electronic device 100 is in the locked screen state.
[0135] S602: When the electronic device 100 listens for a finger touch event in response to a touch operation by the user on the fingerprint collection area, the electronic device 100 detects the posture of the electronic device 100 through the posture sensor.
[0136] In the embodiments of the present application, the attitude sensor may include an acceleration sensor and / or a gyroscope sensor. Among them, the acceleration sensor can detect the magnitude of the acceleration of the electronic device 100 in each direction (generally the x, y, and z axes), and calculate the pitch angle value / roll angle value of the electronic device 100 according to the magnitude of the acceleration in each direction; the gyroscope sensor can detect the angular velocity of the electronic device 100 around three axes (i.e., the x, y, and z axes), and calculate the pitch angle value / roll angle value of the electronic device 100 according to the angular velocity of the three axes. Without limitation, in specific implementations, the attitude sensor can also detect the attitude of the electronic device 100 in other ways.
[0137] In some implementation manners, since there is an error between the roll angle value output by the attitude sensor and the true roll angle value corresponding to the actual attitude of the electronic device 100, when the roll angle value output by the attitude sensor is obtained, the electronic device 100 can correct the output roll angle value to the true roll angle value according to a specified intelligent attitude algorithm. Among them, the intelligent attitude algorithm can be an algorithm constructed based on a neural network, such as a convolutional neural network (CNN) algorithm, a recurrent neural network (RNN) algorithm, etc., and the present application does not limit this.
[0138] S603: The electronic device 100 collects fingerprint feature information through a fingerprint sensor.
[0139] Specifically, for the implementation manner of the fingerprint sensor to collect fingerprint feature information, reference can be made to the description in the foregoing Figure 4 illustrated embodiments, and details are not described herein again.
[0140] S604: When the electronic device 100 matches the collected fingerprint feature information with a preset fingerprint template, a matching result is obtained.
[0141] Specifically, for the implementation manner of the electronic device 100 to match the collected fingerprint feature information with the fingerprint template, reference can be made to the description in the foregoing Figure 4 illustrated embodiments, and details are not described herein again.
[0142] S605: The electronic device 100 determines whether the attitude of the electronic device 100 is a preset attitude 2.
[0143] In the embodiments of the present application, when the pitch angle value of the electronic device 100 is within a preset threshold A3 (for example, [-165 degrees, 15 degrees]), the electronic device 100 can determine that the attitude of the electronic device 100 is the preset attitude 2; otherwise, the electronic device 100 can determine that the attitude of the electronic device 100 is not the preset attitude 2. Among them, it is not limited to [-165 degrees, 15 degrees], and in actual implementations, the preset threshold A3 can also be other values, and the present application does not limit this.
[0144] Specifically, according to Figure 5E the coordinate system shown, the preset posture 2 in this step can be as follows:
[0145] As Figure 6B shown, taking the preset threshold A3 as [-165 degrees, 15 degrees] as an example, the preset posture 1 of the electronic device 100 can include Figure 6B the three angles of -165 degrees, -45 degrees, and 15 degrees shown exemplarily.
[0146] S606: When the posture of the electronic device 100 is not the preset posture 2, the electronic device 100 determines whether the posture of the electronic device 100 is the preset posture 3.
[0147] In the embodiment of the present application, when the value of the roll angle of the electronic device 100 changes by more than a preset angle B1 (for example, 30 degrees, etc.) within a specified duration T1 (for example, within 200 milliseconds, etc.) starting from the time point when the electronic device determines that the posture is not the preset posture 2 or the time point when a finger touch event is detected, and remains stationary within a preset threshold A4 (for example, -60 degrees to 60 degrees, etc.) for more than a specified duration T2 (for example, 100 milliseconds, etc.), the electronic device 100 can determine that the posture of the electronic device 100 is the preset posture 3; otherwise, the electronic device 100 determines that the posture of the electronic device 100 is not the preset posture 3. Without being limited to the above examples, the specific values of the specified duration T1, the specified duration T2, the preset angle B1, and the preset threshold A4 can be other values.
[0148] Specifically, the preset posture 3 in this step can be as follows:
[0149] As Figure 6C shown, exemplarily, the preset posture 3 of the electronic device 100 can be the posture of the electronic device 100 performing left - right scrolling. The value of the roll angle corresponding to this preset posture 3 changes by more than 30 degrees within 200 milliseconds, and the value of the roll angle remains stationary between -60 degrees and 60 degrees for more than 1 second.
[0150] S607: When the posture of the electronic device 100 is not the preset posture 2 and not the preset posture 3, the electronic device 100 maintains the locked - screen state.
[0151] Specifically, when the posture of the electronic device 100 is not the preset posture 2 and not the preset posture 3, regardless of whether the collected fingerprint feature information and the fingerprint template match successfully, the electronic device 100 does not perform the device unlocking operation, but maintains the locked - screen state.
[0152] It should be noted that Figure 4 in the process shown, the range of the preset threshold A2 corresponding to the preset posture 1 (for example, [-90 degrees, 15 degrees] in the previous example) is less than Figure 6AThe preset threshold A3 range corresponding to the preset posture 2 in the shown process (for example, [-165 degrees, 15 degrees] in the previous example), so that Figure 6A The process in which the electronic device 100 shown does not use the proximity light can be applied to Figure 4 The application scenarios covered when using the proximity light shown (for example, when the user is lying in bed or on the sofa using the electronic device 100), therefore, Figure 6A The shown process can be Figure 4 Applied to a wider range of usage scenarios of the electronic device 100 than the shown process, and at the same time, the power consumption of the electronic device 100 can be reduced.
[0153] S608: When the posture of the electronic device 100 is the preset posture 2, or, when the posture of the electronic device 100 is not the preset posture 2 but is the preset posture 3, the electronic device 100 performs corresponding operations according to the matching result.
[0154] Specifically, when the posture of the electronic device 100 is the preset posture 2, or, when it is not the preset posture 2 but is the preset posture 3, if the collected fingerprint feature information matches the fingerprint template successfully, the electronic device 100 performs the device unlocking operation, and the interface change can refer to the previous Figure 5G Shown; if the collected fingerprint feature information fails to match the fingerprint template, the electronic device 100 does not perform the device unlocking operation and maintains the locked screen state, and the interface on the electronic device 100 can refer to the previous Figure 5H Shown.
[0155] Combined with Figure 6A Embodiment, Figure 7 This is a module interaction process of a fingerprint recognition method provided by an embodiment of the present application.
[0156] As Figure 7 Shown, this module interaction process can specifically include:
[0157] S701: The lock screen application 201 determines that the electronic device 100 is in the locked screen state.
[0158] Specifically, when the display screen 104 of the electronic device 100 displays the lock screen interface, the AOD interface or the screen is turned off without displaying any information, the lock screen application 201 can determine that the electronic device 100 is in the locked screen state. Regarding the description of the lock screen interface, the AOD interface or the screen being turned off without displaying any information on the display screen 104 when the electronic device 100 is in the locked screen state, reference can be made to the description in the previous shown embodiment, and details are not described here.
[0159] S702: When the electronic device 100 is in the locked screen state, the lock screen application 201 sends the indication information M1 for listening for finger touch events to the FP Service202.
[0160] S703: FP Service202 sends the indication message M1 to FP HAL203A.
[0161] S704: FP Service202 sends the indication message M1 to the fingerprint sensor.
[0162] S705: When the fingerprint sensor receives the indication message M1, in response to the touch operation of the user on the fingerprint collection area, the fingerprint sensor sends the finger touch event to FP Service202 through FP HAL203A.
[0163] S706: FP Service202 sends the indication message M2 for listening to the posture of the electronic device 100 to the posture HAL203B.
[0164] Specifically, FP Service202 can register the posture sensor listening interface, and then send the indication message M2 to the posture HAL203B through this posture sensor listening interface.
[0165] S707: The posture HAL203B sends the indication message M2 to the posture sensor.
[0166] S708: FP HAL203A sends the indication message M3 for collecting fingerprint feature information to the fingerprint sensor.
[0167] S709: When the fingerprint sensor receives the indication message M3, it collects the fingerprint feature information.
[0168] S710: The fingerprint sensor sends the collected fingerprint feature information to FP HAL203A.
[0169] S711: FP HAL203A matches the collected fingerprint feature information with the preset fingerprint template to obtain a matching result.
[0170] S712: When the posture sensor receives the indication message M2, the posture sensor sends the angle data 1 and the angle data 2 to FP Service202 through the posture HAL.
[0171] Among them, the angle data 1 may include the value of the pitch angle, and the angle data 2 may include the value of the roll angle.
[0172] S713: FP Service202 determines whether the posture of the electronic device 100 is the preset posture 2 according to the angle data 1.
[0173] Specifically, the implementation method for determining whether the posture of the electronic device 100 is the preset posture 2 can refer to the description in the foregoing embodiments, and will not be elaborated here.
[0174] S714: When the posture of the electronic device 100 is not the preset posture 2, the FP Service202 determines whether the posture of the electronic device 100 is the preset posture 3 according to the angle data 2.
[0175] Specifically, the implementation manner of determining whether the posture of the electronic device 100 is the preset posture 3 may refer to the description in the foregoing embodiments, and will not be elaborated herein.
[0176] S715: When the posture of the electronic device 100 is not the preset posture 2 but is the preset posture 3, or when the posture of the electronic device 100 is the preset posture 2, the FP Service202 sends an indication message M4 for instructing to report the matching result to the FP HAL203A.
[0177] S716: When the FP HAL203A receives the indication message M4, the FP HAL203A reports the matching result to the FP Service202.
[0178] S717: The FP Service202 reports the matching result to the lock screen application 201.
[0179] S718: The lock screen application 201 performs corresponding operations according to the matching result.
[0180] Specifically, the lock screen application 201 performs corresponding operations according to the matching result may refer to the corresponding description in the foregoing embodiments, and will not be elaborated herein.
[0181] S719: When the posture of the electronic device 100 is not the preset posture 2 and is not the preset posture 3, the FP Service202 sends an indication message M5 for instructing not to report the matching result to the FP HAL203A.
[0182] In some embodiments, when the process of the FP Service202 determining the posture of the electronic device 100 and / or detecting the proximity light state is blocked by other processes, resulting in a slow operation speed, and the operation speed of the FP HAL203A for matching fingerprint feature information is relatively fast, in order to ensure the user's unlocking experience, the FP HAL203A will report the matching result to the FP Service202 when it has not received the proximity light state. That is to say, when the FP HAL203A has not received the indication message M4 / indication message M5, the FP HAL203A may report the matching result to the FP Service202. Therefore, when the FP HAL203A receives the indication message M5, the FP HAL203A has already reported the matching result to the FP Service202, and at this time, the FP Service202 may clear the matching result.
[0183] Figure 8 This is the flowchart of another fingerprint recognition method provided by an embodiment of the present application.
[0184] As Figure 8 shown, the process of this fingerprint recognition method may specifically include:
[0185] S801: When the electronic device 100 is in the locked screen state, the electronic device 100 monitors finger touch events through the fingerprint sensor.
[0186] Specifically, the description of this step can refer to the description in S601 above, which will not be elaborated here. Figure 6A in S601 above, which will not be elaborated here.
[0187] S802: When the electronic device 100 monitors a finger touch event in response to a touch operation by the user on the fingerprint collection area, the electronic device 100 detects the posture of the electronic device 100 through the posture sensor and detects the proximity light state of the electronic device 100 through the proximity light sensor.
[0188] Specifically, the description of this step can refer to the description in S602 above, which will not be elaborated here. Figure 6A in S602 above, which will not be elaborated here.
[0189] S803: The electronic device 100 collects fingerprint feature information through the fingerprint sensor.
[0190] Specifically, the description of this step can refer to the description in S603 above, which will not be elaborated here. Figure 6A in S603 above, which will not be elaborated here.
[0191] S804: The electronic device 100 matches the collected fingerprint feature information with a preset fingerprint target to obtain a matching result.
[0192] Specifically, the description of this step can refer to the description in S604 above, which will not be elaborated here. Figure 6A in S604 above, which will not be elaborated here.
[0193] S805: The electronic device 100 determines whether the posture of the electronic device 100 is a preset posture 1.
[0194] Specifically, the electronic device 100 may receive the value of the pitch angle reported by the posture sensor (for example, an acceleration sensor or a gyroscope sensor, etc.). When the value of the pitch angle is within the preset threshold A2 (for example, [-90 degrees, 15 degrees]), the electronic device 100 may determine that the posture of the electronic device 100 is the preset posture 1; otherwise, the electronic device 100 may determine that the posture of the electronic device 100 is not the preset posture 1. Among them, it is not limited to [-90 degrees, 15 degrees], and in actual implementation, the preset threshold A2 may also be other values, which are not limited in this application. Other descriptions about the preset posture 1 can refer to the description of the foregoing embodiment, which will not be elaborated here.
[0195] S806: When the posture of the electronic device 100 is not the preset posture 1, the electronic device 100 determines whether the proximity light state of the electronic device 100 is the away state and whether the posture is the preset posture 3.
[0196] Specifically, when the value of the roll angle of the electronic device 100 changes by more than a preset angle B1 (for example, 30 degrees, etc.) within a specified duration T1 (for example, within 200 milliseconds, etc.) starting from the time point when the electronic device determines that the posture is not the preset posture 1 or the time point when a finger touch event is detected, and remains stationary within a preset threshold A4 (for example, -60 degrees to 60 degrees, etc.) for more than a specified duration T2 (for example, 100 milliseconds, etc.), the electronic device 100 can determine that the posture of the electronic device 100 is the preset posture 3; otherwise, the electronic device 100 determines that the posture of the electronic device 100 is not the preset posture 3. For other descriptions of the preset posture 1 and the preset posture 3, reference can be made to the descriptions of the foregoing Figure 4 neutralization Figure 6A and the embodiments shown, which will not be elaborated here.
[0197] S807: When the posture of the electronic device 100 is not the preset posture 1, the proximity light state is the approaching state, or the posture is not the preset posture 3, the electronic device 100 maintains the locked screen state.
[0198] That is to say, in case one: when the posture of the electronic device 100 is not the preset posture 1 and not the preset posture 3, or, in case two: when the posture of the electronic device 100 is not the preset posture 1 but is the preset posture 3 and the proximity light state is the approaching state, the electronic device 100 maintains the locked screen state.
[0199] Specifically, for the relevant descriptions of the proximity light state and the preset posture 3, reference can be made to the descriptions in the foregoing embodiments.
[0200] S808: When the posture of the electronic device 100 is the preset posture 1, or, when the posture of the electronic device 100 is not the preset posture 1, but the posture is the preset posture 3 and the proximity light state is the away state, the electronic device 100 performs corresponding operations according to the matching result.
[0201] Specifically, for the electronic device 100 to perform corresponding operations according to the matching result, reference can be made to the foregoing Figure 4 step S413 in Figure 6A and the description of step S608 in
[0202] Combined with Figure 8 the embodiments, Figure 9A This is the module interaction process of a fingerprint recognition method provided by an embodiment of the present application.
[0203] As Figure 9AAs shown, the module interaction process may include:
[0204] S901: The lock screen application 201 determines that the electronic device 100 is in the lock screen state.
[0205] For the description of this step, reference may be made to the description in step S701 above. Figure 7 in step S701.
[0206] S902: When the electronic device 100 is in the lock screen state, the lock screen application 201 sends an indication message M1 for listening to finger touch events to the fingerprint sensor through the FP Service 202 and the FPHAL 203A.
[0207] S903: When the fingerprint sensor receives the indication message M1, in response to the touch operation of the user on the fingerprint collection area, the fingerprint sensor sends a finger touch event to the FP Service 202 through the FP HAL 203A.
[0208] S904: The FP Service 202 sends an indication message M2 for listening to the posture of the electronic device 100 to the posture sensor through the posture HAL 203B.
[0209] S905: The FP Service 202 sends an indication message M6 for listening to the proximity light state of the electronic device 100 to the proximity light sensor through the proximity light HAL 203C.
[0210] S906: The FP HAL 203A sends an indication message M3 for collecting fingerprint feature information to the fingerprint sensor.
[0211] S907: The fingerprint sensor collects fingerprint feature information.
[0212] S908: The fingerprint sensor sends the collected fingerprint feature information to the FP HAL 203A.
[0213] S909: The FP HAL 203A matches the collected fingerprint feature information with a preset fingerprint template to obtain a matching result.
[0214] S910: When the posture sensor receives the indication message M2, the posture sensor sends angle data 1 and angle data 2 to the FP Service 202 through the posture HAL 203B.
[0215] Among them, the angle data 1 may include the value of the pitch angle, and the angle data 2 may include the value of the roll angle.
[0216] S911: When the proximity light sensor receives the indication message M6, the proximity light sensor sends the proximity light state to the FP Service202 through the proximity light HAL203C.
[0217] S912: The FP Service202 determines whether the posture of the electronic device 100 is the preset posture 1 according to the angle data 1.
[0218] Specifically, the implementation manner of determining whether the posture of the electronic device 100 is the preset posture 1 can refer to the description in the foregoing embodiments and will not be elaborated herein.
[0219] S913: When the posture of the electronic device 100 is the preset posture 1, the FP Service202 sends the indication message M4 for indicating the reporting of the matching result to the FP HAL203A.
[0220] S914: When the posture of the electronic device 100 is not the preset posture 1, the FP Service202 determines whether the proximity light state is the away state, and determines whether the posture of the electronic device 100 is the preset posture 3 according to the angle data 2.
[0221] S915: When the posture of the electronic device 100 is not the preset posture 1 but is the preset posture 3 and the proximity light state is the away state, the FP Service202 sends the indication message M4 for indicating the reporting of the matching result to the FP HAL203A.
[0222] S916: When the posture of the electronic device 100 is not the preset posture 1, the posture of the electronic device 100 is not the preset posture 3, or the proximity light state is the close state, the FP Service202 sends the indication message M5 for indicating not to report the matching result to the FP HAL203A.
[0223] S917: When the FP HAL203A receives the indication message M4, the FP HAL203A reports the matching result to the FP Service202.
[0224] S918: The FP Service202 reports the matching result to the lock screen application 201.
[0225] S919: The lock screen application 201 performs corresponding operations according to the matching result.
[0226] Specifically, the lock screen application 201 performs corresponding operations according to the matching result can refer to the corresponding description in the foregoing embodiments and will not be elaborated herein.
[0227] In some embodiments, when the process of the FP Service202 determining the posture of the electronic device 100 and / or detecting the proximity light state is blocked by other processes, resulting in a slow operation speed, while the FP HAL203A has a fast operation speed in matching fingerprint feature information, in order to ensure the user's unlocking experience, the FP HAL203A will report the matching result to the FP Service202 when it has not received the proximity light state. That is to say, when the FP HAL203A has not received the indication message M4 / indication message M5, the FP HAL203A can report the matching result to the FP Service202. Therefore, when the FP HAL203A receives the indication message M5, the FP HAL203A has already reported the matching result to the FP Service202, and at this time, the FP Service202 can clear the matching result.
[0228] Combined with Figure 8 the embodiment, Figure 9B it is a module interaction process of a fingerprint recognition method provided by an embodiment of the present application.
[0229] As Figure 9B shown, the module interaction process may include:
[0230] S9001: The lock screen application 201 determines that the electronic device 100 is in the lock screen state.
[0231] For the description of this step, reference can be made to the description in step S701 in the foregoing Figure 7 above.
[0232] S9002: When the electronic device 100 is in the lock screen state, the lock screen application 201 sends the indication message M1 for listening to finger touch events to the fingerprint sensor through the FP Service202 and the FP HAL203A.
[0233] S9003: When the fingerprint sensor receives the indication message M1, in response to the touch operation of the user on the fingerprint collection area, the fingerprint sensor sends a finger touch event to the FP Service202 through the FP HAL203A.
[0234] S9004: The FP Service202 sends the indication message M2 for listening to the posture of the electronic device 100 to the posture sensor through the posture HAL203B.
[0235] S9005: The FP Service202 sends the indication message M6 for listening to the proximity light state of the electronic device 100 to the proximity light sensor through the proximity light HAL203C.
[0236] S9006: FP HAL203A sends the indication message M3 for collecting fingerprint feature information to the fingerprint sensor.
[0237] S9007: The fingerprint sensor collects fingerprint feature information.
[0238] S9008: The fingerprint sensor sends the collected fingerprint feature information to FP HAL203A.
[0239] S9009: FP HAL203A matches the collected fingerprint feature information with a preset fingerprint template to obtain a matching result.
[0240] S9010: When the attitude sensor receives the indication message M2, the attitude sensor sends the angle data 1 and the angle data 2 to FP HAL203A through the attitude HAL203B.
[0241] Among them, the angle data 1 may include the value of the pitch angle, and the angle data 2 may include the value of the roll angle.
[0242] S9011: When the proximity light sensor receives the indication message M6, the proximity light sensor sends the proximity light state to FP HAL203A through the proximity light HAL203C.
[0243] S9012: FP HAL203A determines whether the attitude of the electronic device 100 is the preset attitude 1 according to the angle data 1.
[0244] Specifically, the implementation manner of determining whether the attitude of the electronic device 100 is the preset attitude 1 can refer to the description in the foregoing embodiments and will not be elaborated herein.
[0245] S9013: When the attitude of the electronic device 100 is the preset attitude 1, FP HAL203A reports the matching result to FP Service202.
[0246] S9014: When the attitude of the electronic device 100 is not the preset attitude 1, FP HAL203A determines whether the proximity light state is the away state, and determines whether the attitude of the electronic device 100 is the preset attitude 3 according to the angle data 2.
[0247] S9015: When the attitude of the electronic device 100 is not the preset attitude 1 but is the preset attitude 3 and the proximity light state is the away state, FP HAL203A reports the matching result to FP Service202.
[0248] S9016: When the attitude of the electronic device 100 is the preset attitude 1, the attitude of the electronic device 100 is not the preset attitude 3, or the proximity light state is the close state, FP HAL203A ends the process.
[0249] S9017: When the FP Service 202 receives the matching result, the FP Service 202 reports the matching result to the lock screen application 201.
[0250] S9018: The lock screen application 201 performs corresponding operations according to the matching result.
[0251] Specifically, for the lock screen application 201 to perform corresponding operations according to the matching result, reference may be made to the corresponding descriptions in the foregoing embodiments, which will not be elaborated herein.
[0252] In a possible implementation manner, in the Figure 6A shown process, whether the electronic device 100 collects fingerprint feature information through the fingerprint sensor and matches it with the fingerprint template can be triggered by the posture of the electronic device 100. That is to say, after the electronic device 100 executes S602, it can execute S605 instead of S603 and S604. When it is determined that the posture of the electronic device 100 is the preset posture 2, or when the posture of the electronic device 100 is not the preset posture 2 but is the preset posture 3, the electronic device 100 then collects fingerprint feature information through the fingerprint sensor, and matches the collected fingerprint feature information with the preset fingerprint template to obtain a matching result. Then, the electronic device 100 specifies corresponding operations according to the matching result.
[0253] In a possible implementation manner, in the Figure 8 shown process, whether the electronic device 100 collects fingerprint feature information through the fingerprint sensor and matches it with the fingerprint template can be triggered by the posture and proximity light state of the electronic device 100. That is to say, after the electronic device 100 executes S802, it can execute S805 instead of S803 and S804. When it is determined that the posture of the electronic device 100 is the preset posture 1, or when the posture of the electronic device 100 is not the preset posture 1 but is the preset posture 3 and the proximity light state is the away state, the electronic device 100 then collects fingerprint feature information through the fingerprint sensor, and matches the collected fingerprint feature information with the preset fingerprint template to obtain a matching result. Then, the electronic device 100 specifies corresponding operations according to the matching result.
[0254] In the embodiments of the present application, in the Figure 6A implementation manner, the preset posture 2 may be referred to as the first preset posture, and the preset threshold A3 range may be referred to as the first preset range; in the Figure 8 implementation manner, the preset posture 1 may be referred to as the first preset posture, and the preset threshold A2 range may be referred to as the first preset range.
[0255] In the embodiments of the present application, the preset posture 3 may be referred to as the second preset posture, the preset angle B1 may be referred to as the first preset angle, the preset threshold A4 range may be referred to as the second preset range, and the specified duration T2 may be referred to as the first specified duration.
[0256] As used in the foregoing embodiments, depending on the context, the term "when..." may be interpreted to mean "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" may be interpreted to mean "if determining...", "in response to determining...", "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".
[0257] In the foregoing embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0258] Those of ordinary skill in the art can understand all or part of the processes in the methods of the foregoing embodiments. These processes can be completed by relevant hardware instructed by a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the foregoing method embodiments. The foregoing storage media include various media that can store program codes, such as ROM, random access memory (RAM), magnetic disks, or optical discs.
Claims
1. A fingerprint recognition method, characterized in that, Applied to an electronic device, the electronic device includes a fingerprint sensor disposed on a side of the electronic device and an attitude sensor for detecting attitude information of the electronic device. The method includes: When the electronic device is in a locked screen state and placed in the user's pocket or the user holds the electronic device and moves, when the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device and collects fingerprint feature information through the fingerprint sensor; The electronic device matches the fingerprint feature information with a preset fingerprint template and the matching is successful; If the attitude of the electronic device is a first preset attitude, the electronic device performs a device unlocking operation; If the attitude of the electronic device is not the first preset attitude but is a second preset attitude, the electronic device performs a device unlocking operation.
2. The method according to claim 1, characterized in that, The method further includes: If the attitude of the electronic device is not the first preset attitude and not the second preset attitude, the electronic device maintains the locked screen state.
3. The method according to claim 1 or 2, characterized in that, If the attitude of the electronic device is a first preset attitude, the electronic device performs a device unlocking operation, specifically including: If the pitch angle of the electronic device is within a first preset range, the electronic device determines that the attitude of the electronic device is the first preset attitude; The electronic device performs a device unlocking operation.
4. The method according to claim 3, wherein The first preset range is from -165 degrees to 15 degrees.
5. The method according to claim 1, characterized in that, The electronic device further includes a proximity light sensor; When the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device and collects fingerprint feature information through the fingerprint sensor, specifically including: When the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the attitude information of the electronic device, obtains the proximity light state of the electronic device through the proximity light sensor, and collects fingerprint feature information through the fingerprint sensor; If the attitude of the electronic device is not the first preset attitude but is a second preset attitude, the electronic device performs a device unlocking operation, specifically including: If the attitude of the electronic device is not the first preset attitude but is a second preset attitude, and the proximity light state is a far state, the electronic device performs a device unlocking operation.
6. The method according to claim 5, wherein The method further includes: If the attitude of the electronic device is not the first preset attitude and not the second preset attitude, the electronic device maintains the locked screen state; If the attitude of the electronic device is not the first preset attitude but is a second preset attitude and the proximity light state is a near state, the electronic device maintains the locked screen state.
7. The method according to claim 5 or 6, characterized in that, If the attitude of the electronic device is a first preset attitude, the electronic device performs a device unlocking operation, specifically including: If the pitch angle of the electronic device is within a first preset range, the electronic device determines that the attitude of the electronic device is the first preset attitude; The electronic device performs a device unlocking operation.
8. The method according to claim 7, wherein The first preset range is from -90 degrees to 15 degrees.
9. The method according to claim 1, wherein If the posture of the electronic device is not the first preset posture but is the second preset posture, the electronic device performs a device unlocking operation, which specifically includes: If the pitch angle of the electronic device is not within the first preset range, the roll angle of the electronic device changes by more than the first preset angle within a specified time period, and the electronic device remains stationary within the second preset range for more than the first specified duration, the electronic device determines that the posture of the electronic device is not the first preset posture but is the second preset posture; The electronic device performs a device unlocking operation.
10. The method according to claim 9, wherein The second preset angle is 30 degrees, and the second preset range is from -60 degrees to 60 degrees.
11. The method according to claim 1, characterized in that, When the electronic device detects that the user's finger touches the fingerprint sensor, the electronic device obtains the posture information of the electronic device and collects fingerprint feature information through the fingerprint sensor, which specifically includes: When the electronic device receives the finger touch event reported by the fingerprint sensor through the fingerprint service, the electronic device determines that it has detected that the user's finger touches the fingerprint sensor; The electronic device obtains the posture information of the electronic device reported by the posture sensor through the fingerprint service and collects fingerprint feature information through the fingerprint sensor.
12. The method according to claim 1, wherein The electronic device matches the fingerprint feature information with a preset fingerprint template and the match is successful, which specifically includes: The electronic device matches the fingerprint feature information with a preset fingerprint template through the fingerprint hardware abstraction layer and the match is successful.
13. An electronic device, characterized in that, Including: A posture sensor, one or more processors, one or more memories, and a display screen; the one or more memories are coupled to the posture sensor and the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors and the posture sensor execute the computer instructions, the electronic device performs the method according to any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, Including computer instructions, when the computer instructions run on the electronic device, the electronic device performs the method according to any one of claims 1-12.
15. A chip system, characterized in that, Including a processing circuit and an interface circuit, the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions to execute the method according to any one of claims 1-12.