Fingerprint identification method and device
Patent Information
- Application Number
- CN202380059224.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-18
- Filing Date
- 2023-05-05
- Publication Date
- 2025-03-25
AI Technical Summary
Existing fingerprint template update methods consider a single factor, resulting in a low fingerprint recognition success rate and affecting user experience.
Screen high-quality fingerprint images through multiple judgment conditions to update the fingerprint template library, including matching information, cumulative update times and priority information, to ensure the quality and update strategy of fingerprint templates.
It improves the success rate and unlocking speed of fingerprint recognition, improves the user's unlocking experience, and reduces the false rejection rate.
Smart Images

Figure CN119698644A_ABST
Abstract
Description
Fingerprint recognition method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 18, 2022, with application number 202210994157.5 and application name “Method and Device for Fingerprint Identification”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of biometrics, and in particular, to a fingerprint recognition method and device. Background Art
[0003] With the widespread adoption of smart devices, fingerprint recognition technology has also rapidly developed in the terminal sector. Especially in scenarios where users wear masks, fingerprint unlocking is indispensable compared to facial unlocking. During the fingerprint unlocking process, a fingerprint template must be pre-entered for use. The fingerprint template plays a crucial role in fingerprint unlocking. If the initial fingerprint template is of low quality and is not updated after the initial entry, the subsequent user experience will be affected. Therefore, it is essential to continuously update and improve the fingerprint template.
[0004] However, current fingerprint template update methods mostly consider relatively simple factors. For example, they only decide whether to update the fingerprint template based on the number of fingerprint templates, which has certain limitations. Therefore, how to effectively update the fingerprint template has become an urgent problem to be solved.
[0005] Summary of the Invention
[0006] In view of this, the present application provides a fingerprint recognition method, device, computer-readable storage medium and computer program product, which can improve the success rate of fingerprint recognition by considering multiple judgment conditions to update the fingerprint template, and greatly enhance the user's fingerprint recognition experience.
[0007] In a first aspect, a fingerprint recognition method is provided, the method being applied to an electronic device, the method comprising:
[0008] Collecting a first fingerprint image, and matching the first fingerprint image with a fingerprint template library;
[0009] Determining whether the first fingerprint image is successfully matched;
[0010] After the first fingerprint image is successfully matched, obtaining matching information of the first fingerprint image, the matching information being used to indicate a degree of matching between the first fingerprint image and a first fingerprint template, the first fingerprint template being a fingerprint template in the fingerprint template library that successfully matches the first fingerprint image;
[0011] Determining whether the matching information satisfies a first preset condition;
[0012] When the matching information satisfies a first preset condition, determining whether a first number is greater than a first number threshold, the first number being used to represent a cumulative number of updates of the second fingerprint template in the fingerprint template library;
[0013] When the first number is greater than the first number threshold, determining whether the priority information of the second fingerprint template meets a second preset condition;
[0014] When the priority information of the second fingerprint template meets the second preset condition, obtaining index information of the second fingerprint template;
[0015] Based on the index information of the second fingerprint template, the second fingerprint template is updated using the first fingerprint image.
[0016] The above method can be executed by a terminal device or a chip within the terminal device. Based on the above scheme, high-quality fingerprint images are selected based on multiple judgment conditions to update the fingerprint template library. Specifically, the method includes: first, determining whether the first fingerprint image is successfully matched. If the first fingerprint image is successfully matched, determining whether the matching information of the first fingerprint image meets a first preset condition; then, if the matching information of the first fingerprint image meets the first preset condition, determining whether the cumulative number of updates of the second fingerprint template exceeds a first threshold; then, if the cumulative number of updates of the second fingerprint template exceeds the first threshold, determining whether the priority information of the second fingerprint template meets a second preset condition; finally, if the priority information of the second fingerprint template meets the second preset condition, updating the second fingerprint template using the first fingerprint image. Using these multiple judgment conditions, high-quality fingerprint images can be selected to update the fingerprint template library. In this way, when a user subsequently unlocks their device using their fingerprint, matching based on the updated fingerprint template library can achieve faster fingerprint unlocking, improve the fingerprint unlock rate and unlock speed, and thus enhance the user's unlocking experience.
[0017] In a possible implementation, when the first number is greater than the first number threshold, the method further includes:
[0018] determining whether a second number is less than or equal to a second number threshold, the second number being used to represent a number of times the first fingerprint image fails to be recognized during fingerprint matching;
[0019] When the second number is less than or equal to a second number threshold, determining whether a third number is less than a third number threshold, the third number being used to represent the total number of fingerprint templates currently stored in the fingerprint template library;
[0020] When the third number is less than a third number threshold, the first fingerprint image is added to the fingerprint template library.
[0021] In a possible implementation, the method further includes:
[0022] When the third number is greater than or equal to a third number threshold, the second fingerprint template is updated using the first fingerprint image.
[0023] Therefore, when the first number is greater than the first number threshold, the second number and the third number may be further considered to add or update the fingerprint template.
[0024] In one possible implementation, the matching information includes a matching score, a matching area, and a quality score; wherein, whether the matching information satisfies a first preset condition includes: the matching score is greater than a first score threshold, the matching area is greater than an area threshold, and the quality score is greater than a second score threshold.
[0025] In a possible implementation, the priority information of the second fingerprint template satisfies the second preset condition, including:
[0026] The weight value of the second fingerprint template is greater than the weight threshold, the value of the first number after automatically increasing by one is less than a fourth number threshold, and the matching success rate of the second fingerprint template is less than a ratio threshold; wherein, when determining whether the first number is greater than the first number threshold, the first number is automatically increased by one.
[0027] In a possible implementation, the electronic device has a fingerprint template update function enabled. That is, the fingerprint template update process is performed only when the fingerprint template update function is enabled.
[0028] In a possible implementation, the method further includes:
[0029] Performing anti-counterfeiting judgment on the first fingerprint image to determine whether it is genuine or fake;
[0030] Wherein, determining whether the matching information satisfies a first preset condition includes:
[0031] When the first fingerprint image is of a real finger, it is determined whether the matching information meets a first preset condition.
[0032] Therefore, by distinguishing between real and fake fingers, it is possible to avoid using fake fingers for fingerprint unlocking and improve the security of fingerprint recognition.
[0033] In a possible implementation, the method further includes:
[0034] A first interface is displayed, wherein the first interface includes a first option, and the first option is used to select whether to turn on or off the fingerprint template update function.
[0035] Therefore, the embodiment of the present application also provides a switch option for the fingerprint template update function, allowing the user to choose to turn the fingerprint template update function on or off.
[0036] In a second aspect, a fingerprint recognition device is provided, comprising a unit for executing the method of any implementation of the first aspect. The device can be a terminal (or terminal device) or a chip within the terminal (or terminal device). The device includes an input unit, a display unit, and a processing unit.
[0037] When the device is a terminal, the processing unit may be a processor, the input unit may be a communication interface, and the display unit may be a graphics processing module and a screen; the terminal may also include a memory for storing computer program code, and when the processor executes the computer program code stored in the memory, the terminal executes any one of the methods in the first aspect.
[0038] When the device is a chip in a terminal, the processing unit may be a logic processing unit inside the chip, the input unit may be an input interface, pin or circuit, etc., and the display unit may be a graphics processing unit inside the chip; the chip may also include a memory, which may be a memory inside the chip (for example, a register, a cache, etc.) or a memory located outside the chip (for example, a read-only memory, a random access memory, etc.); the memory is used to store computer program code, and when the processor executes the computer program code stored in the memory, the chip executes the method in any one of the implementations of the first aspect.
[0039] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a fingerprint recognition device, the device executes the method in any one of the implementations of the first aspect.
[0040] In a fourth aspect, a computer program product is provided, comprising: computer program code, which, when executed by a fingerprint recognition device, causes the device to execute the method in any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] FIG1 is an example diagram of an application scenario of an embodiment of the present application;
[0042] FIG2 is a schematic diagram of a hardware system of an electronic device applicable to the present application;
[0043] FIG3 is a schematic diagram of a software system of an electronic device applicable to the present application;
[0044] FIG4 is a schematic block diagram of a global process of fingerprint recognition according to an embodiment of the present application;
[0045] FIG5 is a schematic flowchart of fingerprint unlocking according to an embodiment of the present application;
[0046] FIG6 is a schematic flow chart of a fingerprint recognition method according to an embodiment of the present application;
[0047] FIG7 is an example diagram of an interface according to an embodiment of the present application;
[0048] FIG8 is a schematic block diagram of a fingerprint recognition device according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0050] The fingerprint recognition method provided in the embodiments of the present application can be applied to electronic devices with fingerprint recognition functions. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a wearable device, a multimedia player, an e-book reader, a personal computer, a personal digital assistant (PDA), a netbook, an augmented reality (AR) device, a virtual reality (VR) device, or other electronic device. This application does not limit the specific form of the electronic device.
[0051] As an example and not a limitation, when the electronic device is a wearable device, the wearable device can be a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the human body or integrated into the user's clothes or accessories, and can collect the user's biometric data. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. In one implementation, wearable smart devices include devices that are full-featured, large in size, and can achieve full or partial functions without relying on smartphones, such as smart watches or smart glasses. In another implementation, wearable smart devices can be devices that focus on a certain type of application function and need to be used in conjunction with other devices (such as smartphones), such as smart bracelets and smart jewelry with unlocked touch screens.
[0052] The embodiments of this application do not specifically limit the application scenarios of fingerprint recognition, and are applicable to any scenario involving fingerprint recognition, such as when a user uses a fingerprint to unlock, pay, or authenticate an identity.
[0053] The embodiments of the present application can be applied to optical fingerprint recognition scenarios. Optical fingerprint recognition mainly uses the principles of light reflection and refraction. When a finger presses the screen, the screen lights up and emits a bright light, which illuminates the fingerprint. The fingerprint is then transmitted to the sensor under the screen through reflection and refraction for recognition. The embodiments of the present application do not specifically limit the fingerprint recognition scenario and can also be reasonably applied to other fingerprint recognition scenarios, such as ultrasonic fingerprint recognition, capacitive fingerprint recognition, etc.
[0054] It is understood that the embodiment of the present application does not specifically limit the location of the fingerprint module. For example, if optical fingerprint recognition technology is used, the fingerprint module can be set below the screen (or touch screen) of the electronic device, that is, under-screen fingerprint recognition. For another example, the fingerprint module device can also be set on the back or side of the electronic device.
[0055] Generally speaking, updating the fingerprint template plays a crucial role in the fingerprint unlocking process. The quality of the fingerprint template directly affects the speed and rate of fingerprint unlocking. If the fingerprint template is not updated, the user's fingerprint recognition experience will be affected.
[0056] FIG1 is a schematic diagram of an application scenario of an embodiment of the present application. Taking a mobile phone as an example, the electronic device adopts an under-screen fingerprint unlocking method. As shown in FIG1 (1), the user presses the fingerprint unlocking area 10 of the screen with a finger to attempt fingerprint unlocking. After the user presses the fingerprint unlocking area 10, the mobile phone will match the collected fingerprint with the fingerprint template pre-stored by the user. If the match is successful, the mobile phone screen is successfully unlocked.
[0057] It should be understood that the fingerprint unlocking area 10 shown in (1) of Figure 1 is only an exemplary description, and the embodiments of the present application are not limited thereto. In fact, the fingerprint unlocking area 10 can be located in other areas of the screen, such as the screen area near the power button.
[0058] It should also be understood that the fingerprint unlocking shown in (1) in Figure 1 is illustrated by taking the fingerprint unlocking under the screen as an example, and the embodiments of the present application are not limited to this. For example, the embodiments of the present application are also applicable to fingerprint unlocking on the back of the mobile phone.
[0059] If the user successfully matches the fingerprint, the user can enter the main interface of the mobile phone. In one possible scenario, for example, after the fingerprint is successfully unlocked, the mobile phone displays the interface shown in (2) in Figure 1, which displays icons of multiple applications, such as Application 1 to Application 8. Of course, the interface shown in (2) in Figure 1 is only one possible scenario, and the embodiments of the present application are not limited to this.
[0060] It should be understood that the scenario in Figure 1 is only a schematic illustration of an application scenario of the present application, which does not constitute a limitation on the embodiments of the present application, and the present application is not limited to this.
[0061] The following describes the hardware system and software architecture applicable to the embodiments of the present application in conjunction with Figures 2 and 3.
[0062] FIG2 shows a hardware system of an electronic device suitable for the present application.
[0063] The electronic device 100 can be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, an in-vehicle electronic device, an augmented reality (AR) device, a virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a projector, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device 100.
[0064] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0065] It should be noted that the structure shown in FIG2 does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in FIG2, or the electronic device 100 may include a combination of some of the components shown in FIG2, or the electronic device 100 may include sub-components of some of the components shown in FIG2. For example, the proximity light sensor 180G shown in FIG2 may be optional. The components shown in FIG2 may be implemented in hardware, software, or a combination of software and hardware.
[0066] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: 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 a neural-network processing unit (NPU). The different processing units may be independent devices or integrated devices.
[0067] In some embodiments, when the first fingerprint image is successfully matched, the processor 110 determines whether the matching information of the first fingerprint image meets the first preset condition; when the matching information of the first fingerprint image meets the first preset condition, the processor 110 determines whether the cumulative update times of the second fingerprint template are greater than the first quantity threshold; when the cumulative update times of the second fingerprint template are greater than the first quantity threshold, the processor 110 determines whether the priority information of the second fingerprint template meets the second preset condition; when the priority information of the second fingerprint template meets the second preset condition, the processor 110 uses the first fingerprint image to update the second fingerprint template.
[0068] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0069] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0070] 2 is merely a schematic illustration and does not limit the connection relationship between the modules of the electronic device 100. Optionally, the modules of the electronic device 100 may also adopt a combination of the multiple connection modes in the above embodiments.
[0071] Electronic device 100 can implement display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0072] The display screen 194 can be used to display images or videos. The display screen 194 includes a display panel. The display panel can use 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 mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0073] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0074] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can perform algorithmic optimization on image noise, brightness, and color. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0075] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard red, green, blue (RGB), YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0076] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0077] The electronic device 100 can implement audio functions, such as music playback and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0078] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, including resistive, inductive, and capacitive pressure sensors. A capacitive pressure sensor may comprise at least two parallel plates made of conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes, and electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed; when a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.
[0079] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When reflected light is detected, the electronic device 100 may determine that there is an object nearby. When no reflected light is detected, the electronic device 100 may determine that there is no object nearby. The electronic device 100 may use the proximity light sensor 180G to detect whether the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used for automatic unlocking and automatic screen locking in holster mode or pocket mode. It should be understood that the proximity light sensor 180G described in FIG2 may be an optional component. In some scenarios, an ultrasonic sensor may be used instead of the proximity light sensor 180G to detect proximity light.
[0080] Fingerprint sensor 180H is used to collect fingerprints. Electronic device 100 can use the collected fingerprint characteristics to implement functions such as unlocking, accessing application locks, taking photos, and answering calls. Fingerprint sensor 180H can be implemented using a fingerprint module. In some embodiments, the fingerprint module is an optical fingerprint module.
[0081] The touch sensor 180K is also referred to as a touch-sensitive device. The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also referred to as a touch screen. The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor 180K can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100 and at a different location from the display screen 194.
[0082] The buttons 190 include a power button and a volume button. The buttons 190 can be mechanical buttons or touch buttons. The electronic device 100 can receive button input signals and implement functions related to the case input signals.
[0083] Motor 191 can generate vibration. Motor 191 can be used for incoming call reminders or for touch feedback. Motor 191 can produce different vibration feedback effects for touch operations acting on different applications. Motor 191 can also produce different vibration feedback effects for touch operations acting on different areas of the display screen 194. Different application scenarios (for example, time reminders, receiving messages, alarm clocks, and games) can correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0084] The hardware system of electronic device 100 is described in detail above. The following describes the software system of electronic device 100. The software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. In the embodiment of the present application, the layered architecture is used as an example to exemplify the software system of electronic device 100.
[0085] As shown in Figure 3, a software system using a layered architecture is divided into several layers, each with clear roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments, the software system can be divided into five layers: from top to bottom, the application layer, the application framework layer, the Android runtime and system libraries, the kernel layer, and the trusted execution environment (TEE) layer.
[0086] The application layer may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0087] The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer may include some predefined functions.
[0088] For example, the application framework layer includes the window manager, content provider, view system, telephony manager, resource manager, and notification manager.
[0089] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, and take screenshots.
[0090] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, and phone books.
[0091] The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon can include a view for displaying text and a view for displaying images.
[0092] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (connected or hung up).
[0093] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files.
[0094] The Notification Manager allows applications to display notifications in the status bar. These messages can be used to convey informational messages and can disappear automatically after a short pause, without requiring user interaction. For example, the Notification Manager is used to notify you of completed downloads and message reminders. The Notification Manager can also manage notifications that appear in the system's top status bar as icons or scrolling text, such as notifications from background applications. The Notification Manager can also manage notifications that appear on the screen as dialog windows, such as text messages in the status bar, beeping sounds, vibrating electronic devices, and flashing indicator lights.
[0095] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for scheduling and management of the Android system.
[0096] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0097] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0098] The system library can include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as the open graphics library for embedded systems (OpenGL ES)) and a 2D graphics engine (such as the skia graphics library (SGL)).
[0099] The surface manager is used to manage the display subsystem and provide the fusion of 2D layers and 3D layers for multiple applications.
[0100] The media library supports playback and recording of multiple audio and video formats, as well as still image files. It supports a variety of audio and video codecs, such as MPEG4, H.264, Moving Picture Experts Group Audio Layer III (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR), Joint Photographic Experts Group (JPG), and Portable Network Graphics (PNG).
[0101] The 3D graphics processing library can be used to implement 3D graphics drawing, image rendering, compositing and layer processing.
[0102] A 2D graphics engine is a drawing engine for 2D drawings.
[0103] The kernel layer is the layer between hardware and software. The kernel layer can include driver modules such as fingerprint module driver, display driver, camera driver, audio driver, and sensor driver.
[0104] The TEE layer provides security services for the Android system. It is used to execute various biometric algorithms. The TEE layer is typically used to run key operations: (1) mobile payments: fingerprint verification, PIN code entry, etc.; (2) confidential data: secure storage of private keys, certificates, etc.; (3) content: digital copyright protection or digital rights management (DRM), etc.
[0105] In some possible embodiments, the TEE layer includes a fingerprint entry module, a fingerprint verification module, and a fingerprint template update module. Optionally, the fingerprint template update module can be independently set in the TEE layer (for example, as shown in Figure 3), or it can be located in the fingerprint verification module. This embodiment of the present application does not specifically limit this. In the embodiment of the present application, the fingerprint template update module is used to update the fingerprint template.
[0106] In some possible examples, the fingerprint module update module is used to execute the fingerprint recognition method of the embodiment of the present application.
[0107] For example, the fingerprint module driver in the kernel layer calls the fingerprint module to collect fingerprint data, and then transmits the collected fingerprint data to the TEE layer for processing.
[0108] It should be understood that the above example illustrates the structural diagram of the electronic device based on FIG2 , and the software architecture of the embodiment of the present application is illustrated through FIG3 , but the embodiment of the present application is not limited thereto.
[0109] The following describes a fingerprint recognition method according to an embodiment of the present application in conjunction with Figures 4 to 7. It is understood that the fingerprint recognition method shown below can be implemented in an electronic device with the above hardware structure (for example, the electronic device shown in Figure 2).
[0110] Figure 4 is a schematic block diagram of the overall fingerprint recognition process. As shown in Figure 4, fingerprint recognition typically includes a fingerprint registration process and a fingerprint verification process. For example, the fingerprint registration process can be implemented using the fingerprint registration module shown in Figure 3; the fingerprint verification process can be implemented using the fingerprint verification module and fingerprint template update module shown in Figure 3.
[0111] The fingerprint entry process can be understood as: preprocessing the collected user fingerprint image, extracting features based on the preprocessed fingerprint image, and finally storing the extracted fingerprint features as a fingerprint template.
[0112] For example, the fingerprint entry process usually involves the following processing steps: preprocessing (including brightness normalization, denoising, etc.), quality control, extraction of traditional fingerprint features, extraction of high-order fingerprint features, and template compression and storage.
[0113] Among them, preprocessing is the process of performing image processing such as brightness normalization and denoising on the collected fingerprint image.
[0114] Denoising is the process of performing image denoising on a fingerprint image to eliminate noise interference in the fingerprint image. The present embodiment of the application does not specifically limit the denoising method. For example, the denoising method may employ wavelet transform, bilateral filtering, or the like.
[0115] It should be understood that the above description is based on the example of preprocessing including brightness normalization and denoising, and the embodiments of the present application are not limited thereto. In fact, preprocessing may include other processing operations, such as filtering, image enhancement, binarization, etc.
[0116] Quality control: refers to judging the image quality of the pre-processed fingerprint image, filtering out low-quality fingerprint images, and obtaining high-quality fingerprint images so as to record high-quality fingerprint images.
[0117] Extracting traditional fingerprint features refers to the preliminary extraction of fingerprint features based on the denoised fingerprint image. Traditional fingerprint features can be understood as the overall features (or global features) of the fingerprint.
[0118] Extracting high-order fingerprint features refers to extracting detailed feature points from the refined fingerprint image. High-order fingerprint features can be understood as local features that are more detailed than traditional fingerprint features.
[0119] Template compression storage refers to the process of storing extracted fingerprint features. Generally speaking, the results of fingerprint feature extraction are saved as feature templates for storage.
[0120] The fingerprint verification process can be understood as: after collecting the fingerprint image to be verified, the fingerprint image to be verified is preprocessed, and features are extracted based on the preprocessed fingerprint image to be verified. Finally, the extracted fingerprint features to be verified are matched with the fingerprint template. In the embodiment of the present application, the fingerprint verification process also includes template update. Template update refers to the process of updating or adding to the fingerprint template based on the verified fingerprint image under certain preset conditions.
[0121] Exemplarily, the fingerprint verification process involves the following processing steps: preprocessing (including brightness normalization, denoising, etc.), quality control, extraction of traditional fingerprint features, extraction of high-order fingerprint features, feature matching, and template update.
[0122] For the description of preprocessing, denoising, quality control, extraction of traditional fingerprint features, and extraction of high-order fingerprint features, please refer to the description of the fingerprint entry process. For the sake of brevity, we will not repeat it here.
[0123] Feature matching refers to matching the features of the fingerprint image to be verified with the fingerprint features stored in the fingerprint template.
[0124] It should be understood that the process schematic block diagram shown in FIG4 is only an exemplary description, and the embodiments of the present application are not limited thereto.
[0125] The following, combined with Figure 5, briefly describes the position of the template update function in the fingerprint recognition process using the fingerprint unlocking scenario. It should be understood that Figure 5 is only used as an example for the fingerprint unlocking scenario, but the embodiments of the present application are not limited to this. For example, fingerprint recognition can also be used in fingerprint payment scenarios.
[0126] As shown in Figure 5, the fingerprint recognition process includes:
[0127] Step 1: Enter your fingerprint.
[0128] Fingerprint registration can be understood as the process of collecting the user's fingerprint characteristics. For example, in an optical fingerprint scenario, the user registers their fingerprint by pressing the fingerprint unlocking area.
[0129] Step 2: Store the features of the fingerprint image in the fingerprint template library.
[0130] The fingerprint template library may include one or more fingerprint templates.
[0131] It is understood that the upper limit of the number of fingerprint templates stored in the fingerprint template library may depend on the implementation of the electronic device and is not specifically limited thereto. For example, a maximum of 5 fingerprints can be recorded in the fingerprint template library.
[0132] Step 3: Verify (or match) the fingerprint image to be verified based on the fingerprint template stored in the fingerprint template library.
[0133] If the fingerprint image to be verified passes the verification, then execute step 4 and step 5; if the fingerprint image to be verified fails the verification, then execute step 6.
[0134] Step 4, unlock successfully.
[0135] When the fingerprint entered by the user is successfully matched to the fingerprint template stored in the fingerprint template library, the electronic device is unlocked successfully.
[0136] Step 5: Determine whether to update the template.
[0137] If the fingerprint entered by the user is successfully verified, a determination is made as to whether a template update is to be performed. In the embodiment of the present application, the determination as to whether a template update is to be performed takes into account multiple factors, and the specific process will be described in detail later in conjunction with FIG6. If a template update is to be performed, the template library is returned to update the fingerprint template stored therein.
[0138] Step 6, unlock failed.
[0139] It should be understood that the process shown in FIG5 is merely an exemplary description, and the embodiments of the present application are not limited thereto.
[0140] The following will describe the schematic logical flow of fingerprint template update in conjunction with Figure 6. It should be understood that the method 600 shown in Figure 6 can be implemented in combination with the method in Figure 5 or independently, and there is no specific limitation on this. As shown in Figure 6, the method 600 includes the following steps:
[0141] Step 601: collect a first fingerprint image, and use the first fingerprint image to match with a fingerprint template library.
[0142] The first fingerprint image is used to generally refer to the fingerprint image to be verified or the fingerprint image to be matched. For example, when the user performs fingerprint unlocking, the first fingerprint image is the image captured when the user presses the fingerprint unlocking area, for example, as shown in (1) in Figure 1, the image is captured when the user's finger presses the fingerprint unlocking area 10.
[0143] Optionally, matching the first fingerprint image with the fingerprint template includes: matching the extracted features of the first fingerprint image with features of the fingerprint template stored in the fingerprint template library.
[0144] Optionally, the fingerprint template library includes one or more fingerprint templates. The fingerprint templates stored in the fingerprint template library are pre-entered by the user. In the embodiment of the present application, the fingerprint template library can be updated based on the fingerprint image that has passed the verification.
[0145] Optionally, the fingerprint templates stored in the fingerprint template library can be arranged in descending order of priority. For example, when the first fingerprint image is matched with the fingerprint template library, the fingerprint templates can be matched in descending order of priority until a match is successful.
[0146] It is understood that the embodiments of the present application do not specifically limit the fingerprint feature matching algorithm. Those skilled in the art can use the current fingerprint feature matching algorithm to implement the matching process between the first fingerprint image and the fingerprint template.
[0147] Step 602: Determine whether the first fingerprint image is successfully matched.
[0148] That is, after the first fingerprint image is matched with the fingerprint template library, it is necessary to determine whether the first fingerprint image successfully matches. If the first fingerprint image successfully matches, then it is necessary to execute the subsequent judgment process to update the template. If the first fingerprint image does not successfully match, it means that the first fingerprint image is not a valid fingerprint or a high-quality fingerprint. Of course, the successful matching of the first fingerprint image only means that the subsequent judgment process can be executed. Whether the template is updated depends on other judgment conditions described below. In other words, the successful matching of the first fingerprint image is one of the prerequisites for template updating.
[0149] Exemplarily, the successful matching of the first fingerprint image means that the feature verification between the first fingerprint image and a fingerprint template (such as the first fingerprint template) in the fingerprint template library is passed.
[0150] Step 603: After the first fingerprint image is successfully matched, matching information of the first fingerprint image is obtained, and it is determined (or judged) whether the matching information meets a first preset condition. The matching information is used to indicate the degree of match (or similarity) between the first fingerprint image and the first fingerprint template. The first fingerprint template is the fingerprint template in the fingerprint template library that successfully matches the first fingerprint image. In other words, the first fingerprint template is the fingerprint template in the fingerprint template library that has the highest similarity or the largest overlapping area with the first fingerprint image.
[0151] Optionally, the matching information includes one or more of the following: matching score, matching area, and quality score.
[0152] The matching score refers to the score when the first fingerprint image is matched with the first fingerprint template. For example, the matching score between the first fingerprint image and the first fingerprint template is 90%.
[0153] The matching area refers to the area of the feature points that overlap when the first fingerprint image and the first fingerprint template are matched. For example, the overlapping area between the first fingerprint image and the first fingerprint template is 95%.
[0154] The quality score is used to represent the quality rating of the first fingerprint image. Optionally, the quality score may include, but is not limited to, the following factors: fingerprint image clarity, overall fingerprint image quality, and local fingerprint image quality. For example, assuming a 100-point scale, the quality score of the first fingerprint image is 92.
[0155] It should be understood that the content included in the above matching information is only an exemplary description, and the embodiments of the present application are not limited thereto. In fact, the above matching information may also include other indicators for characterizing the degree of fingerprint matching.
[0156] The specific content of the first preset condition can be set accordingly based on the content included in the matching information. For example, when the matching information includes a matching score, a matching area, and a quality score, the matching information satisfies the first preset condition if: the matching score is greater than a first score threshold, the matching area is greater than an area threshold, and the quality score is greater than a second score threshold.
[0157] Exemplarily, determining whether the matching information satisfies the first preset condition includes determining whether the matching score is greater than a first score threshold, whether the matching area is greater than an area threshold, and whether the quality score is greater than a second score threshold.
[0158] It should be understood that the above example of matching information meeting the first preset condition is merely an illustrative description, and the embodiments of the present application are not limited thereto. In fact, those skilled in the art may use other evaluation indicators to define matching information, or define whether matching information meets the first preset condition.
[0159] After the first fingerprint image is successfully matched with the first fingerprint template, the authenticity of the finger can be judged. If the first fingerprint image is of a genuine finger, step 603 will be continued.
[0160] Optionally, the method 600 further includes: step 602-1, after the first fingerprint image successfully matches the fingerprint template, determining whether the first fingerprint image is a real finger; if it is determined that the first fingerprint image is a real finger, determining whether the matching information meets a first preset condition.
[0161] By distinguishing between real and fake fingers, it is possible to prevent the use of fake fingers for fingerprint unlocking and improve the security of fingerprint recognition. For example, a fake finger is a finger that is manufactured or forged using other technologies to achieve the purpose of imitating a real finger.
[0162] It is understood that the embodiments of the present application do not limit the specific means of judging whether a finger is genuine or fake. For example, an anti-counterfeiting result module can be used to verify the authenticity of the fingerprint image.
[0163] Matching information is also a prerequisite for updating the fingerprint template. Whether to proceed to step 604 is determined by determining whether the matching information meets the first preset condition. If the matching information meets the first preset condition, step 604 is executed; if the matching information does not meet the first preset condition, step 604 is not executed.
[0164] Step 604: When the matching information satisfies the first preset condition, determine (or judge) whether a first number is greater than a first number threshold, where the first number is used to represent the cumulative update times of the second fingerprint template in the fingerprint template library.
[0165] In addition, when determining whether the first number is greater than the first number threshold, the first number may be automatically increased by 1. It is understood that the description here is based on the example of increasing the first number by 1 when the matching information meets the first preset condition.
[0166] The first number mentioned above can be understood as the cumulative number of times the second fingerprint template is updated.
[0167] For example, it can be determined whether the cumulative update times of a template in the fingerprint template library is greater than a set threshold (such as a first quantity threshold). If the cumulative update times of the second fingerprint template exceeds the set threshold, it is considered that the second fingerprint template does need to be updated.
[0168] The purpose of setting the judgment logic of whether the first number is greater than the first number threshold is to execute the subsequent template update related process only when the first number is greater than the first number threshold, thereby avoiding frequent updates of the fingerprint template.
[0169] Step 605: When the first number is greater than the first number threshold, determine whether the priority information of the second fingerprint template meets a second preset condition.
[0170] It should be noted that each fingerprint template in the fingerprint template library has corresponding priority information. The priority information of each fingerprint template can be comprehensively considered or evaluated based on different factors. For example, the priority information of a fingerprint template can be determined based on one or more of the following: the weight value of the fingerprint template, the cumulative number of updates of the fingerprint template, and the matching success rate (or matching success ratio) of the fingerprint template.
[0171] The weight of a fingerprint template can be determined based on the number of times the fingerprint template is matched. For example, when collecting a user's fingerprint for unlocking or matching, the more frequently the fingerprint template is matched, the higher the weight corresponding to the fingerprint template; if the fingerprint template is matched less frequently or even never matched, the weight corresponding to the fingerprint template is lower.
[0172] The cumulative number of fingerprint template updates depends on how often the fingerprint template is updated or replaced. The fingerprint template matching success rate refers to the percentage of successful matches of the fingerprint template in the most recent N matches. For example, if the fingerprint template has been matched 8 times recently, but only matched with the fingerprint image twice, the matching success rate of the fingerprint template is 25%.
[0173] Optionally, as a possible implementation, the priority information of the second fingerprint template satisfies a second preset condition, including: the weight value of the second fingerprint template is greater than a weight threshold, the value after the first number is automatically incremented by one is less than a fourth number threshold, and the matching success rate of the second fingerprint template is less than a ratio threshold. Furthermore, the automatic increment of the first number is mentioned in step 604.
[0174] That is, when it is determined that the weight value of the second fingerprint template is greater than the weight threshold, the first number is less than the fourth number threshold, and the matching success rate of the second fingerprint template is less than the ratio threshold, it can be determined that the second fingerprint template is a low priority template.
[0175] It should be noted that the purpose of setting the second preset condition here is to find low-priority templates in the fingerprint templates and update the low-priority fingerprint templates. For example, the low-priority template is: during the fingerprint matching process, it is frequently matched by the fingerprint image but has a relatively low matching success rate, and the cumulative number of template updates is less than a predetermined threshold (such as the fourth number threshold). It is understood that the above description of the second preset condition and priority information is only exemplary, and the embodiments of the present application are not limited thereto.
[0176] Alternatively, if it is determined that the second fingerprint template does not meet the second preset condition, the priority information of other fingerprint templates in the fingerprint template library can be judged until a fingerprint template with a lower priority is found. Alternatively, if there are multiple fingerprint templates with a lower priority in the fingerprint template library, the fingerprint template with the lowest priority can be updated.
[0177] Optionally, in an extreme case, if no fingerprint template with a low priority is found in the fingerprint template library, the first fingerprint template may be updated using the first fingerprint image, that is, the fingerprint template that successfully matches the first fingerprint image may be updated.
[0178] Step 606: When the priority information of the second fingerprint template meets the second preset condition, obtain index information of the second fingerprint template.
[0179] Optionally, the index information of the second fingerprint template includes an identifier of the second fingerprint template. The identifier may be in the form of an ID or an index. Based on the identifier, the corresponding second fingerprint template may be found in the fingerprint template library.
[0180] Optionally, each fingerprint template stored in the fingerprint template library has corresponding index information.
[0181] Step 607: Based on the index information of the second fingerprint template, the second fingerprint template is updated using the first fingerprint image.
[0182] “Update” can be understood as “replace.” For example, in the fingerprint template library, the fingerprint features stored in the second fingerprint template are replaced with the features of the first fingerprint image, that is, the fingerprint features of the first fingerprint image are stored as the second fingerprint template in the fingerprint template library.
[0183] The embodiment of the present application considers multiple factors to determine whether to update the fingerprint template. First, it is determined whether the first fingerprint image is matched successfully. If the first fingerprint image is matched successfully, it is determined whether the matching information of the first fingerprint image meets the first preset condition. Then, if the matching information of the first fingerprint image meets the first preset condition, it is determined whether the cumulative number of updates of the second fingerprint template is greater than the first number threshold. Then, if the cumulative number of updates of the second fingerprint template is greater than the first number threshold, it is determined whether the priority information of the second fingerprint template meets the second preset condition. Finally, if the priority information of the second fingerprint template meets the second preset condition, the second fingerprint template is updated using the first fingerprint image. Through the above multiple judgment conditions, high-quality fingerprint images can be screened out to update the fingerprint template library. In this way, when the user subsequently uses the fingerprint to unlock, matching is performed based on the updated fingerprint template library, which can achieve fingerprint unlocking faster, improve the fingerprint unlocking rate and unlocking speed, and thus improve the user's unlocking experience. Moreover, compared with the fingerprint recognition process without fingerprint template update, the fingerprint recognition method of the embodiment of the present application can significantly reduce the false rejection rate (FRR) of fingerprint recognition.
[0184] Optionally, as a possible embodiment, before using the first fingerprint image to update the second fingerprint template, the upper limit of the number of fingerprint templates can be taken into consideration. For example, if the number of fingerprint templates stored in the fingerprint template library reaches the upper limit of the maximum number of fingerprint templates, the second fingerprint template is updated using the first fingerprint image; if the number of fingerprint templates stored in the fingerprint template library does not exceed the upper limit of the maximum number of fingerprint templates, the first fingerprint image is added to the fingerprint template library.
[0185] It is understood that, for the purpose of unified description here, the multiple judgment factors or features for updating the fingerprint template considered in the embodiment of the present application can be used in combination, and the embodiment of the present application does not impose any specific limitation on this.
[0186] The above describes an embodiment when the first number is greater than the first number threshold (including determining the priority information of the second fingerprint template and updating the second fingerprint template). The following describes another embodiment when the first number is greater than the first number threshold.
[0187] Optionally, as an embodiment, when the first number is greater than the first number threshold, the method 600 further includes:
[0188] Step 608: Determine (or judge) whether a second number is less than or equal to a second number threshold, where the second number is used to represent the number of times the first fingerprint image fails to be recognized during fingerprint matching.
[0189] Step 609: When the second number is less than or equal to the second number threshold, determine (or judge) whether a third number is less than a third number threshold, where the third number is used to represent the total number of fingerprint templates currently stored in the fingerprint template library;
[0190] When the third number is less than the third number threshold, step 610 is executed (the specific content of step 610 is described later); when the third number is greater than or equal to the third number threshold, step 607 is executed, that is, the second fingerprint template is updated using the first fingerprint image.
[0191] The second number can be understood based on the following example: when the user presses to unlock, it takes multiple presses to successfully match the fingerprint template. The number of failures experienced from the start of pressing to the successful matching is the second number.
[0192] The third number is the total number of fingerprint templates currently stored in the fingerprint template library. The third number threshold may depend on the upper limit of the fingerprint templates that can be stored in the electronic device. The embodiment of the present application does not specifically limit the value of the third number threshold.
[0193] Optionally, as an embodiment, the method 600 further includes: step 610, when the third number is less than a third number threshold, adding the first fingerprint image to the fingerprint template library.
[0194] For example, when the first number is greater than the first number threshold, if it is determined that the number of recognition failures (corresponding to the second number) is less than or equal to a predetermined threshold (e.g., the second number threshold), then the number of fingerprint templates (corresponding to the third number) is determined to be less than a predetermined threshold (e.g., the third number threshold). If the number of fingerprint templates is not less than (i.e., greater than or equal to) the predetermined threshold, then the second fingerprint template is updated using the first fingerprint image. If the number of fingerprint templates is less than the predetermined threshold, then the first fingerprint image is added to the fingerprint template library.
[0195] Before executing the above fingerprint template update method, it can also be determined whether the electronic device has enabled the fingerprint template update function. If the fingerprint template update function is enabled, the above fingerprint template update method is executed. In the embodiment of the present application, the fingerprint template update function is enabled by default.
[0196] Optionally, as a possible embodiment, the method 600 further includes:
[0197] Step 601-1, determine whether to enable the fingerprint template update function;
[0198] The step of determining whether the first fingerprint image is successfully matched includes:
[0199] When the fingerprint template update function is enabled, it is determined whether the first fingerprint image is successfully matched.
[0200] For example, before determining whether the first fingerprint image is successfully matched, it may be determined whether the electronic device has enabled a fingerprint template update function. If the fingerprint template update function is enabled, the determination of whether the first fingerprint image is successfully matched is continued.
[0201] It should be understood that FIG6 illustrates an example in which step 601-1 precedes step 602, but the present embodiment is not limited thereto. For example, step 601-1 may be located after step 602 and before step 603. For another example, if step 602-1 is included, step 601-1 may be located before or after step 602-1, without specific limitation.
[0202] The fingerprint template update function of the embodiment of the present application can be solidified in the terminal, without the user manually turning it on, or an option can be provided for the user to manually turn it on or off. Optionally, the embodiment of the present application also provides a switch option for the fingerprint template update function, allowing the user to choose to turn the fingerprint template update function on or off.
[0203] Optionally, the method further includes: displaying a first interface, the first interface including a first option, the first option being used to select whether to turn on or off the fingerprint template update function.
[0204] The first interface is the fingerprint setting interface. It is understood that the embodiments of the present application do not specifically limit how to enter the first interface. For example, the fingerprint setting interface can be entered through the settings application. For another example, the fingerprint setting interface can also be entered through a fingerprint application.
[0205] For example, a switch option for updating the fingerprint template (corresponding to the first option) may be added to the fingerprint setting interface.
[0206] FIG7 is an example interface diagram of an embodiment of the present application. As shown in FIG7 (1), the user clicks Settings 801 to enter the settings interface, such as the interface shown in FIG7 (2). It is understood that the interface shown in FIG7 (1) may also include icons of other applications, such as Application 1 to Application 7.
[0207] As shown in (2) of FIG7 , the interface includes a biometric device and password control 802. It is understood that the interface shown in (2) of FIG7 may also include other setting functions. For example, the application settings, battery settings, storage settings, privacy settings, etc. shown in (2) of FIG7 .
[0208] It should be understood that the setting options shown in (2) of Figure 7 are only examples of some setting functions, and the embodiments of the present application are not limited thereto. It should also be understood that (2) of Figure 7 also shows a search setting item bar, in which the user can quickly search for function settings.
[0209] When the user clicks on the biometric device and password control 802, the interface shown in (3) of Figure 7 is entered. As shown in (3) of Figure 7, the interface includes a fingerprint setting control 803.
[0210] Optionally, in addition to the fingerprint setting control 803, (3) in Figure 7 may also include a face recognition setting control, a lock screen password management control (including changing the lock screen password and turning off the lock screen password), a security lock setting control, and a smart unlock control. It should be understood that the biometric identification and password options shown in (3) in Figure 7 are only exemplary and the embodiments of the present application are not limited thereto.
[0211] When the user clicks the fingerprint setting control 803, the interface is displayed as shown in Figure 7 (4). As shown in Figure 7 (4), the interface includes a fingerprint template update option 804. The user can click the fingerprint template update option 804 to turn the fingerprint template update function on or off. For example, the fingerprint template update option 804 shown in Figure 7 (4) is turned on.
[0212] Optionally, in addition to the fingerprint template update option 804, (4) in FIG7 may also include other controls for fingerprint management. For example, (4) in FIG7 shows fingerprint usage options, including: an option for using fingerprints to unlock the device, an option for using fingerprints to access the application lock, an option for using fingerprints to automatically fill in accounts and passwords, and an option for using fingerprints for quick wallet payments. For another example, (4) in FIG7 shows fingerprint list management options, including management controls for fingerprint 1, management controls for fingerprint 2, a new fingerprint option, and an identification fingerprint option.
[0213] It should be understood that the application scenario in FIG. 7 is merely for facilitating understanding by those skilled in the art, and is not intended to limit the embodiments of the present application to the specific scenarios illustrated.
[0214] The fingerprint recognition method provided by the embodiment of the present application is described in detail above with reference to Figures 1 to 7 . The device embodiment of the present application will be described in detail below with reference to Figure 8 . It should be understood that the fingerprint recognition device of the embodiment of the present application can perform the various fingerprint recognition methods of the aforementioned embodiments of the present application. That is, the specific working processes of the various products below can refer to the corresponding processes in the aforementioned method embodiments.
[0215] FIG8 is a schematic block diagram of a fingerprint recognition device 800 according to an embodiment of the present application. It should be understood that the device 800 can execute the fingerprint recognition method shown in FIG4 to FIG7.
[0216] As shown in Figure 8, the fingerprint recognition apparatus 800 includes a matching unit 810, a judgment unit 820, an acquisition unit 830, and an update unit 840. Optionally, the apparatus 800 further includes a display unit 850. In a possible example, the apparatus 800 may be a terminal device.
[0217] In one example, the matching unit 810 is used to collect a first fingerprint image and use the first fingerprint image to match with a fingerprint template library;
[0218] The judgment unit 820 is used to judge whether the first fingerprint image is matched successfully;
[0219] After the first fingerprint image is successfully matched, the acquisition unit 830 is used to obtain matching information of the first fingerprint image, where the matching information is used to indicate the degree of matching between the first fingerprint image and a first fingerprint template, where the first fingerprint template is a fingerprint template in the fingerprint template library that successfully matches the first fingerprint image;
[0220] The judgment unit 820 is further configured to determine whether the matching information satisfies a first preset condition;
[0221] The judgment unit 820 is further configured to determine whether a first number is greater than a first number threshold when the matching information satisfies a first preset condition, the first number being used to represent the cumulative number of updates of the second fingerprint template in the fingerprint template library;
[0222] The judging unit 820 is further configured to judge whether the priority information of the second fingerprint template meets a second preset condition when the first number is greater than the first number threshold;
[0223] When the priority information of the second fingerprint template meets the second preset condition, the acquiring unit 830 is further configured to acquire index information of the second fingerprint template;
[0224] The updating unit 840 is configured to update the second fingerprint template using the first fingerprint image based on the index information of the second fingerprint template.
[0225] Optionally, as an embodiment, when the first number is greater than the first number threshold, the judgment unit 820 is further configured to determine whether a second number is less than or equal to a second number threshold, where the second number is used to represent the number of times the first fingerprint image fails to be recognized during fingerprint matching;
[0226] The judgment unit 820 is further configured to determine whether a third number is less than a third number threshold when the second number is less than or equal to a second number threshold, wherein the third number is used to represent the total number of fingerprint templates currently stored in the fingerprint template library;
[0227] The updating unit 840 is further configured to add the first fingerprint image to the fingerprint template library when the third number is less than a third number threshold.
[0228] Optionally, as an embodiment, the updating unit 840 is further configured to update the second fingerprint template using the first fingerprint image when the third number is greater than or equal to a third number threshold.
[0229] Optionally, as an embodiment, the matching information includes a matching score, a matching area and a quality score; wherein, whether the matching information meets the first preset condition includes: the matching score is greater than a first score threshold, the matching area is greater than an area threshold, and the quality score is greater than a second score threshold.
[0230] Optionally, as an embodiment, the priority information of the second fingerprint template satisfies the second preset condition, including:
[0231] The weight value of the second fingerprint template is greater than the weight threshold, the value of the first number after automatically increasing by one is less than a fourth number threshold, and the matching success rate of the second fingerprint template is less than a ratio threshold; wherein, when determining whether the first number is greater than the first number threshold, the first number is automatically increased by one.
[0232] Optionally, as an embodiment, the device 800 enables a fingerprint template update function.
[0233] Optionally, as an embodiment, the judgment unit 820 is further configured to perform an anti-counterfeiting judgment on the first fingerprint image to determine whether it is a genuine or fake finger;
[0234] The determining unit 820 is configured to determine whether the matching information satisfies a first preset condition, including:
[0235] When the first fingerprint image is of a real finger, it is determined whether the matching information meets a first preset condition.
[0236] Optionally, as an embodiment, the display unit 850 is used to display a first interface, where the first interface includes a first option, and the first option is used to select whether to turn on or off the fingerprint template update function.
[0237] In one possible example, matching unit 810, judgment unit 820, acquisition unit 830, and update unit 840 can be implemented by a processor or processing unit. Display unit 850 can be implemented by a display screen. It should be understood that the above-mentioned device 800 is embodied in the form of a functional unit. The term "unit" here can be implemented in the form of software and / or hardware, and this embodiment of the application does not specifically limit this.
[0238] For example, a "unit" may be a software program, a hardware circuit, or a combination of the two that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group processor, etc.) that executes one or more software or firmware programs and a memory, an integrated logic circuit, and / or other suitable devices that can provide the above functions. In a simple embodiment, those skilled in the art will appreciate that the device 800 can take the form shown in Figure 2.
[0239] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0240] The present application also provides a computer program product, which, when executed by a processor, implements the method described in any method embodiment of the present application.
[0241] The computer program product can be stored in a memory and finally converted into an executable target file that can be executed by a processor through preprocessing, compilation, assembly and linking.
[0242] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the method described in any method embodiment of the present application. The computer program can be a high-level language program or an executable target program.
[0243] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0244] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0245] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0246] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0247] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0248] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0249] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disk.
[0250] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0251] Additionally, the terms "system" and "network" are often used interchangeably in this document. The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship. For example, A / B can mean either A or B.
[0252] The terms (or numbers) "first", "second", ... etc. that appear in the embodiments of the present application are only used for descriptive purposes, that is, they are only used to distinguish different objects, such as different "fingerprints", etc., and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first", "second", ... etc. may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "at least one (item)" refers to one or more. "Multiple" means two or more. "At least one of the following (item)" or similar expressions refers to any combination of these items, including any combination of a single (item) or multiple (items).
[0253] For example, the meaning of expressions similar to "the item includes at least one of the following: A, B, and C" in the embodiments of the present application, unless otherwise specified, generally means that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B, B and C, C and C; C, C and C, and other combinations of A, B and C. The above examples use A, B, and C as an example to illustrate the optional items of the item. When the expression is "the item includes at least one of the following: A, B, ..., and X", that is, when the expression has more elements, the items that can be applied to the item can also be obtained according to the above rules.
[0254] In short, the above description is only a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the scope of protection of this application.
Claims
1. A fingerprint recognition method, characterized in that: The method is applied to an electronic device, and includes: Collecting a first fingerprint image, and matching the first fingerprint image with a fingerprint template library; Determining whether the first fingerprint image is successfully matched; After the first fingerprint image is successfully matched, obtaining matching information of the first fingerprint image, the matching information being used to indicate a degree of matching between the first fingerprint image and a first fingerprint template, the first fingerprint template being a fingerprint template in the fingerprint template library that successfully matches the first fingerprint image; Determining whether the matching information satisfies a first preset condition; When the matching information satisfies the first preset condition, determining whether a first number is greater than a first number threshold, the first number being used to represent the cumulative number of updates of the second fingerprint template in the fingerprint template library; When the first number is greater than the first number threshold, determining whether the priority information of the second fingerprint template meets a second preset condition; When the priority information of the second fingerprint template meets the second preset condition, obtaining index information of the second fingerprint template; Based on the index information of the second fingerprint template, the second fingerprint template is updated using the first fingerprint image.
2. The method according to claim 1, characterized in that When the first number is greater than the first number threshold, the method further includes: determining whether a second number is less than or equal to a second number threshold, the second number being used to represent a number of times the first fingerprint image fails to be recognized during fingerprint matching; When the second number is less than or equal to a second number threshold, determining whether a third number is less than a third number threshold, the third number being used to represent the total number of fingerprint templates currently stored in the fingerprint template library; When the third number is less than a third number threshold, the first fingerprint image is added to the fingerprint template library.
3. The method according to claim 2, characterized in that The method further comprises: When the third number is greater than or equal to a third number threshold, the second fingerprint template is updated using the first fingerprint image.
4. The method according to any one of claims 1 to 3, characterized in that The matching information includes a matching score, a matching area, and a quality score; wherein, whether the matching information satisfies a first preset condition includes: the matching score is greater than a first score threshold, the matching area is greater than an area threshold, and the quality score is greater than a second score threshold.
5. The method according to any one of claims 1 to 4, characterized in that The priority information of the second fingerprint template satisfies the second preset condition, including: The weight value of the second fingerprint template is greater than the weight threshold, the value of the first number after automatically increasing by one is less than a fourth number threshold, and the matching success rate of the second fingerprint template is less than a ratio threshold; wherein, when determining whether the first number is greater than the first number threshold, the first number is automatically increased by one.
6. The method according to any one of claims 1 to 5, characterized in that The electronic device has enabled the fingerprint template update function.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Performing anti-counterfeiting judgment on the first fingerprint image to determine whether it is genuine or fake; Wherein, determining whether the matching information satisfies a first preset condition includes: When the first fingerprint image is of a real finger, it is determined whether the matching information meets a first preset condition.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: A first interface is displayed, wherein the first interface includes a first option, and the first option is used to select whether to turn on or off the fingerprint template update function.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the processor and the memory are coupled, and the memory is used to store a computer program. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 8.
11. A chip, characterized in that: The method comprises a processor, wherein when the processor executes instructions, the processor performs the method according to any one of claims 1 to 8.