Fingerprint recognition method, electronic device and storage medium

By detecting the fingerprint image of wet fingers in electronic devices and optimizing the processing, the fingerprint recognition failure caused by wet fingers or sweaty fingers is solved, and the accuracy of recognition and user experience is improved.

WO2025045045A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/114927
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-08
Filing Date
2024-08-27
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

Prior Art In the case of wet fingers or sweaty fingers, electronic devices cannot accurately fingerprint recognition, resulting in unlocking or payment failure.

Method used

Optimized processing (such as AI repair) is performed to improve the accuracy of fingerprint recognition by detecting fingerprint images in electronic devices.

Benefits of technology

Improves the accuracy of electronic devices in recognition of fingerprint images of wet fingers, ensuring that users can successfully unlock or make payments even if their fingers are wet or sweaty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024114927_06032025_PF_FP_ABST
    Figure CN2024114927_06032025_PF_FP_ABST
Patent Text Reader

Abstract

A fingerprint recognition method, an electronic device and a storage medium. In the method, when a fingerprint image collected by an electronic device is a wet finger image of a user's finger that is wet, and the wet finger image fails to match a fingerprint template in a fingerprint template library, the electronic device can optimize the wet finger image to obtain an optimized fingerprint image. The electronic device then matches the optimized fingerprint image with the fingerprint template. By implementing the provided technical solution, when fingerprint recognition is performed on a user's finger that is wet, a fingerprint of the user can also be successfully recognized. Thus, when a user's finger is wet, an electronic device can also be successfully unlocked.
Need to check novelty before this filing date? Find Prior Art

Description

Fingerprint identification method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 29, 2023, with application number 202311103165.7 and application name “A fingerprint identification method and related device”, and the Chinese patent application filed with the China Patent Office on September 8, 2023, with application number 202311162041.6 and application name “A fingerprint identification method, electronic device and storable medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminals and fingerprint recognition, and in particular to a fingerprint recognition method, an electronic device, and a storable medium. Background Art

[0003] With the rapid development of fingerprint recognition technology, its applications are becoming increasingly widespread. Fingerprint recognition technology is not only used in access control and attendance systems, but also in mobile phones, tablets, laptops, cars, and bank payments. Mobile phones, tablets, and other electronic devices can collect user fingerprints to unlock the device and verify payments.

[0004] However, when the user's fingers are wet or sweaty, the electronic device cannot accurately perform fingerprint recognition, resulting in fingerprint unlocking failure or fingerprint payment failure.

[0005] Therefore, when the user's fingers are wet or sweaty, how to improve the accuracy of fingerprint recognition of electronic devices is an urgent problem to be solved.

[0006] Summary of the Invention

[0007] The present application provides a fingerprint recognition method, an electronic device, and a storage medium. Through the fingerprint recognition method, the accuracy of fingerprint recognition of a wet finger fingerprint image by an electronic device can be improved.

[0008] In a first aspect, the present application provides a fingerprint recognition method, which may include: an electronic device detecting a first operation of a user and collecting a first fingerprint image of the user; the electronic device optimizing the first fingerprint image to obtain a second fingerprint image; determining that the second fingerprint image successfully matches a fingerprint template saved by the electronic device, and unlocking the electronic device.

[0009] In this way, when a user uses a wet finger to unlock the device, the electronic device can optimize the captured fingerprint image of the wet finger and then perform fingerprint recognition on the optimized fingerprint image. This can improve the accuracy of fingerprint recognition of wet fingerprint images by the electronic device. In addition, the user can unlock the electronic device with a wet finger, which can improve the user experience.

[0010] In a possible implementation, before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method may further include: determining that the first fingerprint image fails to match the fingerprint template and that the first fingerprint image meets a first condition.

[0011] Among them, the first condition may include one or more of the following: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, the foreground area of ​​the first fingerprint image is less than a third threshold, the similarity between the first fingerprint image and the fingerprint template is greater than a fourth threshold, and the overlap between the first fingerprint image and the fingerprint template is greater than a fifth threshold.

[0012] In this way, the first condition can be used to determine whether the collected user fingerprint image is a wet fingerprint image. If so, the wet fingerprint image can be optimized. This allows users to unlock the device with a wet fingerprint without the need for additional hardware, thereby reducing device cost and complexity. Furthermore, there is no need to lower the fingerprint matching judgment threshold, ensuring unlocking with a wet finger while also protecting device security.

[0013] In a possible implementation, the image index of the second fingerprint image is higher than the image index of the first fingerprint image.

[0014] In one possible implementation, the image indicators of the second fingerprint image include one or more of the texture consistency of the second fingerprint image, the quality score of the second fingerprint image, and the foreground area of ​​the second fingerprint image; the image indicators of the first fingerprint image include one or more of the texture consistency of the first fingerprint image, the quality score of the first fingerprint image, and the foreground area of ​​the first fingerprint image.

[0015] In one possible implementation, the image indicators of the second fingerprint image are higher than the image indicators of the first fingerprint image, including: one or more of the following: the texture consistency of the second fingerprint image is higher than the fingerprint consistency of the first fingerprint image, the quality score of the second fingerprint image is higher than the quality score of the first fingerprint image, and the foreground area of ​​the second fingerprint image is higher than the foreground area of ​​the first fingerprint image.

[0016] In this way, optimizing the first fingerprint image can improve the image index of the first fingerprint image. In one possible implementation, before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method may further include: determining whether the first fingerprint image meets a second condition.

[0017] The second condition may include one or more of the following: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, and the foreground area of ​​the first fingerprint image is less than a third threshold.

[0018] In this way, the electronic device can directly determine to optimize the first fingerprint image or directly match the first fingerprint image according to the second condition.

[0019] In a possible implementation, before the electronic device detects the first operation of the user, the method may further include: the electronic device is in a screen-off state or a screen-locked state.

[0020] In a second aspect, a fingerprint recognition method is provided, which may include: the electronic device detects a first operation of the user and collects a first fingerprint image of the user; the electronic device optimizes the first fingerprint image to obtain a second fingerprint image; determines that the second fingerprint image successfully matches the fingerprint template saved by the electronic device, and the electronic device executes payment.

[0021] In this way, when a user uses a wet finger to make a fingerprint payment, the electronic device can optimize the captured fingerprint image of the wet finger and then perform fingerprint recognition on the optimized fingerprint image. This can improve the accuracy of fingerprint recognition of wet fingerprint images by the electronic device. In addition, the user can also use fingerprint payment with a wet finger, which can improve the user experience.

[0022] In a possible implementation, before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method may further include: determining that the first fingerprint image fails to match the fingerprint template and that the first fingerprint image meets a first condition.

[0023] Among them, the first condition may include one or more of the following: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, the foreground area of ​​the first fingerprint image is less than a third threshold, the similarity between the first fingerprint image and the fingerprint template is greater than a fourth threshold, and the overlap between the first fingerprint image and the fingerprint template is greater than a fifth threshold.

[0024] In this way, the first condition can be used to determine whether the collected user fingerprint image is a wet fingerprint image. If so, the wet fingerprint image can be optimized. This allows users to use wet fingerprint payments without the need for additional hardware, thereby reducing device cost and complexity. Furthermore, there is no need to lower the fingerprint matching judgment threshold, ensuring that wet fingerprint payments can be made while maintaining device security.

[0025] In a possible implementation, the image index of the second fingerprint image is higher than the image index of the first fingerprint image.

[0026] In one possible implementation, the image indicators of the second fingerprint image include one or more of the texture consistency of the second fingerprint image, the quality score of the second fingerprint image, and the foreground area of ​​the second fingerprint image; the image indicators of the first fingerprint image include one or more of the texture consistency of the first fingerprint image, the quality score of the first fingerprint image, and the foreground area of ​​the first fingerprint image.

[0027] In one possible implementation, the image indicators of the second fingerprint image are higher than the image indicators of the first fingerprint image, including: one or more of the following: the texture consistency of the second fingerprint image is higher than the fingerprint consistency of the first fingerprint image, the quality score of the second fingerprint image is higher than the quality score of the first fingerprint image, and the foreground area of ​​the second fingerprint image is higher than the foreground area of ​​the first fingerprint image.

[0028] In this way, optimizing the first fingerprint image can improve the image index of the first fingerprint image.

[0029] In a possible implementation, before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method may further include: determining whether the first fingerprint image satisfies a second condition.

[0030] The second condition may include one or more of the following: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, and the foreground area of ​​the first fingerprint image is less than a third threshold.

[0031] In this way, the electronic device can directly determine to optimize the first fingerprint image or directly match the first fingerprint image according to the second condition.

[0032] In one possible implementation, before the electronic device detects the user's first operation, the method may further include: the electronic device displays a payment interface, the payment interface includes payment information, and the payment information may include one or more of the payment amount, payer, and payee.

[0033] In a third aspect, an electronic device is provided, comprising: a fingerprint sensor, one or more processors, one or more memories, and a transceiver; wherein the transceiver, the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, the electronic device executes a method in any possible implementation of any of the above aspects.

[0034] In a fourth aspect, a computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute a method in any possible implementation of any of the above aspects.

[0035] In a fifth aspect, a chip is provided for use in electronic devices, characterized in that it includes a processing circuit and an interface circuit, the interface circuit being used to receive code instructions and transmit them to the processing circuit, and the processing circuit being used to run the code instructions to execute a method as in any possible implementation of the first aspect above.

[0036] In a sixth aspect, a computer program product is provided, which, when executed on a computer, enables the computer to execute the method in any possible implementation of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] FIG1A is a schematic diagram of fingerprint unlocking of an electronic device when the screen is off, provided by an embodiment of the present application;

[0038] FIG1B is a schematic diagram of the main interface of an electronic device provided in an embodiment of the present application;

[0039] FIG1C is a schematic diagram of a lock screen of an electronic device provided in an embodiment of the present application;

[0040] FIG1D is a schematic diagram of a payment interface of an electronic device provided in an embodiment of the present application;

[0041] FIG1E-FIG1F are schematic diagrams of user interfaces of an electronic device in which a group of fingerprint verifications fail, according to an embodiment of the present application;

[0042] Figures 1G-1H are schematic diagrams of a set of fingerprint images provided in an embodiment of the present application;

[0043] FIG2 is a schematic diagram of a fingerprint recognition method according to an embodiment of the present application;

[0044] FIG3 is a schematic diagram of AI repair and AI repair model training provided in an embodiment of the present application;

[0045] FIG4 is a flow chart of another fingerprint recognition method provided in an embodiment of the present application;

[0046] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0047] FIG6 is a software architecture diagram of an electronic device provided in an embodiment of the present application;

[0048] FIG7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0049] FIG8 is a flow chart of a fingerprint recognition method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The terms used in the following examples of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to and encompasses any or all possible combinations of one or more of the listed items.

[0051] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0052] Currently, fingerprint recognition has become a commonly used identity authentication method in electronic devices such as mobile phones, tablets, laptops, smart watches, and smart bracelets, for example, device unlocking and payment verification.

[0053] 1A-1D exemplarily illustrate interface diagrams of an electronic device 100 using fingerprint recognition to perform device unlocking, payment verification, etc.

[0054] As shown in FIG1A , when the electronic device 100 is in the screen-off state, the user can place a finger on the fingerprint collection area of ​​the electronic device 100. In response to the user's finger pressing or touching operation, the electronic device 100 can collect the user's fingerprint and perform fingerprint recognition on the collected fingerprint image containing the user's fingerprint. When the fingerprint recognition is successful, the electronic device 100 can light up the display screen and display the main interface, for example, the main interface 10A of the electronic device 100 shown in FIG1B . The main interface of the electronic device 100 can also be called the desktop.

[0055] As shown in FIG1C , when the electronic device 100 displays the lock screen interface 10B, the user can place a finger on the fingerprint collection area of ​​the electronic device 100, for example, the fingerprint collection area 101 in the lock screen interface 10B. In response to the press or touch operation of the user's finger, the electronic device 100 can collect the user's fingerprint and perform fingerprint recognition on the collected fingerprint image containing the user's fingerprint. When the fingerprint recognition is successful, the electronic device 100 can light up the display screen and display the main interface, for example, the main interface 10A of the electronic device 100 shown in FIG1B .

[0056] As shown in FIG1D , the electronic device 100 may display a payment interface 10C. When the user confirms payment, the user may place a finger on the fingerprint collection area of ​​the electronic device 100, such as the fingerprint collection area 101 shown in FIG1D . In response to the user's finger pressing or touching operation, the electronic device 100 may collect the user's fingerprint and perform fingerprint recognition on the collected fingerprint image containing the user's fingerprint. When fingerprint recognition is successful, the electronic device 100 may execute the payment. For example, the electronic device 100 may also display a prompt to execute the payment.

[0057] It will be understood that the main interface 10A, lock screen interface 10B, and payment interface 10C shown in FIG1B-FIG1D are for illustration only. The main interface 10A, lock screen interface 10B, and payment interface 10C may include more or fewer interface elements, and this embodiment of the present application does not limit this.

[0058] However, if a user has just washed their hands and their fingers are damp or sweaty, performing fingerprint recognition on the electronic device 100 with a damp or sweaty finger may result in fingerprint recognition failure. For example, when a user uses a damp or sweaty finger to unlock the electronic device 100 shown in FIG1A or FIG1C , the electronic device 100 may not successfully recognize the fingerprint image of the damp or sweaty finger. Unsuccessful unlocking of the electronic device 100 will not result in the main interface 10A shown in FIG1B . The electronic device 100 may display a user interface 10D as shown in FIG1E , which may be used to notify the user of the fingerprint recognition failure. For another example, when a user uses a damp or sweaty finger to perform fingerprint payment verification on the electronic device 100 shown in FIG1D , the electronic device 100 may not successfully recognize the fingerprint image of the damp or sweaty finger. The payment process fails, and the electronic device 100 may display a fingerprint verification failure prompt message on the payment interface 10C. This prompt message may be prompt message 102 as shown in FIG1F . The prompt content of the prompt information 102 may be “Fingerprint verification failed”, which may affect the user's experience of fingerprint recognition in the electronic device 100 .

[0059] When a user places a wet or sweaty finger on the fingerprint collection area of ​​the electronic device 100, the moisture on the finger may block part of the fingerprint features on the finger, resulting in the loss of some fingerprint features in the fingerprint image collected by the electronic device 100. For example, Figure 1G shows a fingerprint image when the user's finger is dry. Figure 1H shows a fingerprint image collected by the electronic device 100 when the user's finger is wet. The fingerprint image in Figure 1G can be referred to as fingerprint image 1. The fingerprint image in Figure 1H can be referred to as fingerprint image 2. The fingerprint features in fingerprint image 1 are more complete than the fingerprint features in fingerprint image 2.

[0060] Fingerprint features may include, but are not limited to, fingerprint feature points and singular points. Fingerprint feature points include, but are not limited to, endpoints, forks, bifurcations, isolated points, short lines, loops, and bridges. An endpoint indicates the end of a fingerprint ridge. A fork indicates where a fingerprint ridge splits into two or more lines. Singular points include core points and triangulation points. A core point is located at the asymptotic center of a fingerprint ridge. A triangulation point is the center point of a triangular ridge region in a fingerprint image; the three fingerprint lines closest to this point form an approximate triangle.

[0061] In some embodiments of the present application, the electronic device 100 can determine whether a fingerprint image is from a wet finger based on the number of feature points per unit area in the fingerprint image. For example, when the number of feature points per unit area in the fingerprint image is less than a threshold of 1, the electronic device 100 can determine that the fingerprint image is from a wet finger. A wet finger fingerprint image can be referred to as a wet finger image. When the fingerprint image captured by the electronic device 100 is a wet finger image, the electronic device 100 can downsample the template fingerprint in the fingerprint template library. The electronic device 100 then matches the wet finger image with the downsampled template fingerprint. In this way, if user A has a fingerprint image of their right thumb pre-stored in the fingerprint template library of the electronic device 100, and user A uses their wet right thumb to perform fingerprint authentication on the electronic device 100, the electronic device 100 can successfully recognize the fingerprint image of the user's wet right thumb. The fingerprint template library can contain one or more fingerprint template images. The fingerprints contained in one or more fingerprint templates are fingerprints that have been registered and enrolled with the electronic device 100 and have operation permissions.

[0062] A fingerprint template can be a template that uses the user's original fingerprint as the parent, and through some processing, derives one or more irreversible and unrelated fingerprint sub-templates. These sub-templates can replace the fingerprint feature information for fingerprint matching.

[0063] Thus, although the electronic device 100 can successfully identify the fingerprint of the user's wet finger, it may cause the fingerprints of other users whose fingerprint images are not pre-stored in the fingerprint template library to be successfully identified in the electronic device 100. This will reduce the security of fingerprint authentication in the electronic device 100.

[0064] In some embodiments of the present application, the fingerprint collection area of ​​the electronic device 100 may include a button with a water-absorbing film. When a user's finger presses or touches the fingerprint collection area, if the button with the water-absorbing film absorbs water, the electronic device 100 can determine that the user's finger is wet or sweaty. The electronic device 100 can then lower the matching threshold. When the electronic device 100 matches the wet finger image with the template fingerprint, and the resulting match similarity value or overlap value is greater than or equal to the lowered matching threshold, the electronic device 100 can determine that the fingerprint recognition is successful.

[0065] In this way, although electronic device 100 can successfully identify a user's wet fingerprint, it may also successfully identify the fingerprints of other users whose fingerprint images are not pre-stored in the fingerprint template library. This reduces the security of fingerprint authentication in electronic device 100. Furthermore, electronic devices without a water-absorbing film cannot perform fingerprint recognition on wet finger images.

[0066] In order to improve the security of fingerprint identity authentication and improve the fingerprint recognition accuracy of the electronic device 100 for the user's wet finger image, an embodiment of the present application provides a fingerprint recognition method, which may include: first, the electronic device 100 collects a first fingerprint image of the user. Then, the electronic device 100 optimizes the first fingerprint image to obtain an optimized fingerprint image, and the image index in the optimized fingerprint image is higher than the image index in the first fingerprint image. Then, the electronic device 100 matches the optimized fingerprint image with the fingerprint template image. If the match is successful, the electronic device performs a first action. The first action includes the electronic device 100 unlocking the electronic device 100, making a payment, or launching a privacy application.

[0067] In some embodiments of the present application, the image index of the fingerprint image may include one or more of texture consistency, quality score, and foreground area.

[0068] Texture consistency can be used to measure the continuity of valleys or ridges in a fingerprint. Texture consistency can range from 0 to 100. A higher texture consistency value indicates a more continuous valley or ridge pattern in the fingerprint image. Generally, texture consistency values ​​for wet fingerprints are lower than those for dry fingerprints.

[0069] The quality score can be used to evaluate the quality of a fingerprint image. The quality score can range from 0 to 100, with a higher quality score indicating better fingerprint image quality. Generally, the quality score of a fingerprint image from a wet finger is lower than that of a dry finger.

[0070] The foreground area can be used to represent the ratio of the usable portion of the fingerprint image captured by the electronic device 100 to the area of ​​the entire fingerprint image. The usable portion of the fingerprint image includes portions containing fingerprint features, such as valleys and ridges. The foreground area can range from 0 to 1, with larger foreground area values ​​indicating a larger usable portion of the fingerprint image. Generally, the foreground area value of a fingerprint image of a wet finger is lower than that of a dry finger.

[0071] In some embodiments of the present application, the lock screen of electronic device 100 may be a secure lock screen that requires unlocking via a fingerprint, password, pattern, gesture, or other biometric identifier. Other biometric identifiers include, but are not limited to, face and voiceprint. Passwords include, but are not limited to, numbers, letters, or a combination of numbers and letters. For example, the lock screen of electronic device 100 may be lock screen interface 10B as shown in FIG1C .

[0072] FIG2 exemplarily illustrates a fingerprint recognition method provided by an embodiment of the present application. As shown in FIG2 , a fingerprint recognition method provided by an embodiment of the present application may include the following steps:

[0073] S201: The electronic device 100 detects a first operation of a user and collects a fingerprint image 1 of the user.

[0074] In some embodiments of the present application, the first operation may be an operation in which a user presses or touches the fingerprint collection area of ​​the electronic device 100. For example, as shown in FIG1A or FIG1C , the user presses or touches the fingerprint collection area of ​​the electronic device 100 when the screen of the electronic device 100 is off or locked. In response to the user's first operation, the electronic device 100 may collect the user's fingerprint image 1. Exemplarily, the fingerprint image 1 collected by the electronic device 100 may be the fingerprint image shown in FIG1G or FIG1H .

[0075] In some embodiments of the present application, the first operation may also be an operation in which the user presses or touches the fingerprint collection area in the payment interface of the electronic device 100. For example, as shown in FIG1D , the user may press or touch the fingerprint collection area 101 in the payment interface 10C shown in FIG1D .

[0076] In some embodiments of the present application, the first operation may also include the user clicking the payment control on the payment page and then pressing or touching the fingerprint collection area displayed in the payment interface.

[0077] In some embodiments of the present application, the first operation may also include the user clicking the icon of a privacy application and then pressing or touching the fingerprint collection area displayed on the electronic device. Privacy applications are applications that require security verification before they can be launched. Security verification includes but is not limited to fingerprint verification, face verification, password verification, voiceprint verification, etc.

[0078] After the electronic device 100 detects the user's first operation, it can collect the user's fingerprint image 1. The electronic device 100 can match the user's fingerprint image 1 with the fingerprint template in the fingerprint template library. If the match is unsuccessful and the fingerprint image 1 meets condition 1, the electronic device 100 optimizes the fingerprint image 1, for example, by performing AI repair, and then matches the AI ​​repaired image with the fingerprint template in the fingerprint template library. In the embodiment of the present application, the fingerprint image collected by the electronic device can be referred to as the original image, and the fingerprint image after AI repair can be referred to as the AI ​​repaired image.

[0079] S202 : The electronic device 100 pre-processes the fingerprint image 1 to obtain a fingerprint image 2 .

[0080] In some embodiments of the present application, electronic device 100 may preprocess fingerprint image 1 to obtain fingerprint image 2. The purpose of preprocessing is to filter out image noise in fingerprint image 1 and enhance the contrast between valleys and ridges in fingerprint image 1, thereby improving the quality of the fingerprint image. Compared with fingerprint image 1, the fingerprint image 2 after preprocessing has clearer fingerprint lines and less noise.

[0081] In some embodiments of the present application, the preprocessing of the fingerprint image 1 includes but is not limited to smoothing, normalization, filtering, image enhancement, binarization, grayscale conversion, etc. The embodiments of the present application do not limit the specific method of preprocessing.

[0082] S203 : The electronic device 100 extracts features from the fingerprint image 2 to obtain fingerprint feature 1 .

[0083] The electronic device 100 may perform feature extraction on the fingerprint image 2 to obtain a fingerprint feature 1. The fingerprint feature 1 may include fingerprint feature points and / or singular points in the fingerprint image 2.

[0084] In some embodiments of the present application, the electronic device 100 may not execute step S202, and may directly extract features from the fingerprint image 1 to obtain fingerprint features 1. It is understood that the embodiments of the present application do not limit the specific algorithm for feature extraction.

[0085] S204 : The electronic device 100 matches the fingerprint feature 1 with the fingerprint template to obtain a matching result 1 .

[0086] The electronic device 100 may match the fingerprint feature 1 with the fingerprint template in the fingerprint template library to obtain a matching result 1 .

[0087] In some embodiments of the present application, the electronic device 100 may calculate the similarity and / or overlap between the fingerprint feature 1 and the fingerprint templates in the fingerprint template library.

[0088] In some embodiments of the present application, the electronic device 100 can determine vector line segment pairs of the fingerprint image 2 based on the fingerprint feature 1. For example, the electronic device 100 can connect all fingerprint feature points and singular points in the fingerprint feature 1 in pairs until all fingerprint feature points or singular points form line segments with any other points, thereby forming vector line segment pairs of the fingerprint image 2. The electronic device 100 can compare the vector line segment pairs of the fingerprint image 2 with the vector line segment pairs of the fingerprint templates in the fingerprint template library to obtain a similarity result.

[0089] For example, if the fingerprint template library includes a fingerprint template, the fingerprint template may be referred to as fingerprint template 1. Then the electronic device 100 may compare the vector line segment pairs of the fingerprint image 2 with the vector line segment pairs of the fingerprint template 1 to obtain similarity 1.

[0090] In some embodiments of the present application, a user enters a fingerprint once on an electronic device, and the electronic device's fingerprint template library may store three fingerprint templates. For example, if a user enters the fingerprint of their right thumb on an electronic device, the electronic device's fingerprint template library may include three fingerprint templates for that right thumb. The three fingerprint templates may be partial fingerprint images of the right thumb, or one of the three fingerprint templates may be a complete fingerprint image of the right thumb. The three fingerprint templates may be the same or different.

[0091] For example, if the fingerprint template library includes three fingerprint templates, namely fingerprint template 1, fingerprint template 2, and fingerprint template 3, in one possible implementation, the electronic device 100 may compare the vector line segment pairs of fingerprint image 2 with the vector line segment pairs of fingerprint template 1, fingerprint template 2, and fingerprint template 3, respectively, to obtain similarity 1, similarity 2, and similarity 3, respectively.

[0092] In some embodiments of the present application, the electronic device 100 may first compare the vector line segment pairs of the fingerprint image 2 with the vector line segment pairs of the first fingerprint template, for example, the vector line segment pairs of fingerprint template 1, to obtain similarity 1. If similarity 1 is greater than similarity threshold 1, the electronic device 100 may directly determine whether the match is successful based on similarity 1. If similarity 1 is less than similarity threshold 1, the electronic device 100 may compare the vector line segment pairs of the fingerprint image 2 with the vector line segment pairs of the second fingerprint template, for example, the vector line segment pairs of fingerprint template 2, to obtain similarity 2. If similarity 2 is greater than similarity threshold 1, the electronic device 100 may directly determine whether the match is successful based on similarity 2. If similarity 2 is less than similarity threshold 1, the electronic device 100 may compare the vector line segment pairs of the fingerprint image 2 with the vector line segment pairs of the third fingerprint template, for example, the vector line segment pairs of fingerprint template 3, to obtain similarity 3. Similarly, based on the similarity result obtained from the comparison, the electronic device 100 may determine whether it is necessary to compare with the vector line segment pairs of another fingerprint template in the fingerprint template library. When the similarity obtained by comparison is less than the similarity threshold 1, the electronic device 100 may compare the vector line segment pair of the fingerprint image 2 with the vector line segment pair of another fingerprint template until the electronic device 100 compares the vector line segment pair of the fingerprint image 2 with the vector line segment pair of the last fingerprint template to obtain the similarity value.

[0093] In some embodiments of the present application, the first fingerprint template in the fingerprint template library can be the first fingerprint template in the fingerprint template library that is recorded in the order of the user's fingerprints, or it can also be a fingerprint template with the highest priority level in the fingerprint template library according to the priority order. The priority order of the fingerprint template can be set by the user, or it can be determined by the electronic device 100 based on the frequency with which the user uses the fingerprint corresponding to the fingerprint template for identity authentication. Similarly, the second fingerprint template in the fingerprint template library can be the second fingerprint template in the fingerprint template library that is recorded in the order of the user's fingerprints, or it can also be a fingerprint template with a priority level in the fingerprint template library that is second only to the first fingerprint template according to the priority order. The third fingerprint template in the fingerprint template library can be the third fingerprint template in the fingerprint template library that is recorded in the order of the user's fingerprints, or it can also be a fingerprint template with a priority level in the fingerprint template library that is second only to the second fingerprint template according to the priority order.

[0094] In some embodiments of the present application, the aforementioned similarities, for example, similarity 1, similarity 2, and similarity 3, all have a value range of 0-1, that is, a natural number greater than or equal to 0 and less than or equal to 1.

[0095] In some embodiments of the present application, the electronic device 100 can calculate the overlap between the fingerprint image 2 and the fingerprint template, that is, the ratio of the area of ​​the identical portion of the fingerprint image 2 and the fingerprint template to the area of ​​the fingerprint image 2. In some embodiments, the overlap can also be referred to as the overlapping area ratio. The overlap ranges from 0 to 1, that is, a natural number greater than or equal to 0 and less than or equal to 1.

[0096] In some embodiments of the present application, the electronic device 100 can calculate the center point of the fingerprint image 2. For example, the coordinates of the center point can be the average of the coordinates of all fingerprint feature points in the fingerprint image 2. Then, the electronic device 100 rotates the fingerprint image 2 based on the center point of the fingerprint image 2 and the center point of the fingerprint template, and the direction of the rotated fingerprint image 2 is aligned with the direction of the fingerprint template. The direction of the fingerprint image 2 can be the direction of the fingerprint ridges in the fingerprint image 2. The direction of the fingerprint template can be the direction of the fingerprint ridges in the fingerprint template. When the directions of the fingerprint image 2 and the fingerprint template are aligned, the electronic device 100 can calculate the degree of overlap between the fingerprint image 2 and the fingerprint template.

[0097] For example, if the fingerprint template library includes a fingerprint template, the fingerprint template may be referred to as fingerprint template 1. Then the electronic device 100 may calculate the overlap degree 1 between the fingerprint image 2 and the fingerprint template 1.

[0098] If the fingerprint template library includes three fingerprint templates, namely fingerprint template 1, fingerprint template 2 and fingerprint template 3, the electronic device 100 can calculate the overlap 1 of the fingerprint image 2 with fingerprint template 1, the overlap 2 with fingerprint template 2 and the overlap 3 with fingerprint template 3 respectively.

[0099] In some embodiments of the present application, the electronic device 100 may first calculate the degree of overlap 1 between the fingerprint image 2 and the first fingerprint template, for example, fingerprint template 1. If the degree of overlap 1 is greater than the degree of overlap threshold 1, the electronic device 100 may directly determine whether a match is successful based on the degree of overlap 1. If the degree of overlap 1 is less than the degree of overlap threshold 1, the electronic device 100 may calculate the degree of overlap 2 between the fingerprint image 2 and the second fingerprint template, for example, fingerprint template 2. If the degree of overlap 2 is greater than the degree of overlap threshold 1, the electronic device 100 may directly determine whether a match is successful based on the degree of overlap 2. If the degree of overlap 2 is less than the degree of overlap threshold 1, the electronic device 100 may calculate the degree of overlap 2 between the fingerprint image 2 and the third fingerprint template, for example, fingerprint template 2. Similarly, based on the calculated degree of overlap, the electronic device 100 may determine whether it is necessary to calculate the degree of overlap between the fingerprint image 2 and another fingerprint template in the fingerprint template library. When the calculated degree of overlap is less than the degree of overlap threshold 1, the electronic device 100 may calculate the degree of overlap between the fingerprint image 2 and another fingerprint template, until the electronic device 100 calculates the degree of overlap between the fingerprint image 2 and the last fingerprint template.

[0100] S205. The electronic device 100 determines whether the matching is successful. If so, step S206 is executed; if not, step S207 is executed.

[0101] The electronic device 100 may determine whether the matching is successful based on the matching result 1. If the matching is successful, the electronic device 100 may execute step S206. If the matching is unsuccessful, the electronic device 100 may execute step S207.

[0102] Matching result 1 may include one or more similarities and / or one or more overlaps, wherein the one or more similarities may include similarity 1. The one or more overlaps may include overlap 1.

[0103] In some embodiments of the present application, when matching result 1 only includes similarity 1, electronic device 100 may determine that the match is successful if similarity 1 is greater than or equal to similarity threshold 2. If similarity 1 is less than similarity threshold 2, electronic device 100 determines that the match is unsuccessful.

[0104] Similarity threshold 2 may be greater than similarity threshold 1. For example, similarity threshold 2 may be 0.95, and similarity threshold 1 may be 0.8. The embodiment of the present application does not limit the specific values ​​of similarity threshold 2 and similarity threshold 1.

[0105] In some embodiments of the present application, when the matching result 1 includes multiple similarities, the electronic device 100 can calculate the similarity average 1. If the similarity average 1 is greater than or equal to the similarity threshold 2, the electronic device 100 can determine that the match is successful. If the similarity average 1 is less than the similarity threshold 2, the electronic device 100 determines that the match is unsuccessful. For example, the matching result 1 may include similarity 1, similarity 2, and similarity 3. The electronic device 100 can calculate the similarity average 1, which is equal to the sum of similarity 1, similarity 2, and similarity 3 divided by 3. If the similarity average 1 is greater than or equal to the similarity threshold 2, the electronic device 100 can determine that the match is successful. If the similarity average 1 is less than the similarity threshold 2, the electronic device 100 can determine that the match failed.

[0106] In some embodiments of the present application, when matching result 1 includes multiple similarities, electronic device 100 may determine that the match is successful if one or more of the multiple similarities is greater than or equal to similarity threshold 2. If all of the multiple similarities are less than similarity threshold 2, electronic device 100 determines that the match is unsuccessful.

[0107] In some embodiments of the present application, when matching result 1 only includes overlap 1, electronic device 100 determines that the match is successful if overlap 1 is greater than or equal to overlap threshold 2. If overlap 1 is less than overlap threshold 2, electronic device 100 determines that the match is unsuccessful.

[0108] In some embodiments of the present application, overlap threshold 2 may be greater than overlap threshold 1. For example, overlap threshold 2 may be 0.96, and overlap threshold 1 may be 0.8. The embodiments of the present application do not limit the specific values ​​of overlap threshold 2 and overlap threshold 1.

[0109] In some embodiments of the present application, when the matching result 1 includes multiple overlaps, the electronic device 100 can calculate the average overlap 1. If the average overlap 1 is greater than or equal to the overlap threshold 2, the electronic device 100 can determine that the match is successful. If the average overlap 1 is less than the overlap threshold 2, the electronic device 100 determines that the match is unsuccessful. For example, the matching result 1 may include overlap 1, overlap 2, and overlap 3. The electronic device 100 can calculate the average overlap 1, which is equal to the sum of overlap 1, overlap 2, and overlap 3 divided by 3. If the average overlap 1 is greater than or equal to the overlap threshold 2, the electronic device 100 can determine that the match is successful. If the average overlap 1 is less than the overlap threshold 2, the electronic device 100 can determine that the match failed.

[0110] In some embodiments of the present application, when matching result 1 includes multiple overlap degrees, electronic device 100 may determine that the match is successful if one or more of the multiple overlap degrees are greater than or equal to overlap threshold 2. If the multiple overlap degrees are all less than overlap threshold 2, electronic device 100 may determine that the match is unsuccessful.

[0111] In some embodiments of the present application, when matching result 1 includes similarity 1 and overlap 1, if similarity 1 is greater than or equal to similarity threshold 2 and overlap 1 is greater than or equal to overlap threshold 2, electronic device 100 may determine that the match is successful. If similarity 1 is less than similarity threshold 2 or overlap is less than overlap threshold 2, electronic device 100 may determine that the match is unsuccessful.

[0112] S206: The electronic device 100 performs a first action.

[0113] When the user's fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 successfully matches the fingerprint template in the fingerprint template library, the electronic device 100 may perform a first action.

[0114] The first action includes but is not limited to unlocking the lock screen of the electronic device 100, or executing payment, launching a privacy application, or one or more of the above.

[0115] S207. The electronic device 100 determines whether the fingerprint image 1 meets the first condition. If so, step S208 is executed; if not, step S212 is executed.

[0116] After the electronic device 100 determines that the user's fingerprint image 1, or the fingerprint image 2 obtained by preprocessing the fingerprint image 1, does not successfully match the fingerprint template in the fingerprint template library, the electronic device 100 can determine whether the fingerprint image 1, or the fingerprint image 2 obtained by preprocessing the fingerprint image 1, meets the first condition. If the first condition is met, the electronic device 100 can determine that the fingerprint image 1 is a fingerprint image of a wet finger, or is a wet finger image. The electronic device 100 can then optimize the wet finger fingerprint image, for example, through AI repair, that is, the electronic device 100 can execute step S208. If the first condition is not met, the electronic device 100 determines that the fingerprint image 1 is not a wet finger image, and the electronic device 100 can execute step S212.

[0117] The first condition may include one or more of the following:

[0118] Condition ①: The texture consistency of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 1.

[0119] Condition ②: The quality score of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 2.

[0120] Condition ③: The foreground area of ​​the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 is smaller than the threshold 3.

[0121] Condition ④: The similarity between the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 and the fingerprint template is greater than the similarity threshold 3.

[0122] Condition ⑤: The degree of overlap between the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 and the fingerprint template is greater than the overlap threshold 3.

[0123] The threshold 1 is greater than 0 and less than 100. For example, the value of the threshold 1 may be 50. The threshold 1 may also be other values, and the embodiment of the present application does not limit the specific value of the threshold 1.

[0124] The threshold 2 is greater than 0 and less than 100. For example, the value of the threshold 2 may be 40. The threshold 2 may also be other values, and the embodiment of the present application does not limit the specific value of the threshold 2.

[0125] The threshold 3 is greater than 0 and less than 1. For example, the value of the threshold 3 may be 0.9. The threshold 3 may also be other values. The specific value of the threshold 3 is not limited in the embodiment of the present application.

[0126] The similarity threshold 3 may be greater than or equal to the similarity threshold 1 and less than the similarity threshold 2. For example, the similarity threshold 3 may be 0.8, and the specific value of the similarity threshold 3 is not limited in the embodiment of the present application.

[0127] The overlap threshold 3 may be greater than or equal to the overlap threshold 1 and less than the overlap threshold 2. For example, the overlap threshold 3 may be 0.8, and the specific value of the overlap threshold 3 is not limited in this embodiment of the application.

[0128] Among them, the texture consistency in the above condition ①, the quality score in the above condition ②, and the foreground area in the above condition ③ can be called the image index of the fingerprint image. The similarity in the above condition ④ and the overlap in the above condition ⑤ can be called the matching index of the fingerprint image.

[0129] When the fingerprint image 1, or the fingerprint image 2 obtained by pre-processing the fingerprint image 1, meets the first condition, that is, meets one or more of the above conditions ①, ②, ③, ④ and ⑤, the electronic device 100 can determine that the fingerprint image 1 is the user's wet finger image, and the electronic device 100 can optimize the fingerprint image 1, such as AI repair.

[0130] S208 : The electronic device 100 optimizes the fingerprint image 1 to obtain the fingerprint image 3 .

[0131] When the fingerprint image 1 meets the first condition, the electronic device 100 can optimize the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 to obtain the fingerprint image 3.

[0132] In some embodiments of the present application, the image index of fingerprint image 3 is higher than the image index of fingerprint image 1 or fingerprint image 2.

[0133] In some embodiments of the present application, the image indicators of fingerprint image 3 being higher than those of fingerprint image 1 or fingerprint image 2 may include: one or more of the following: the texture consistency of fingerprint image 3 being higher than that of fingerprint image 1 or fingerprint image 2, the quality score of fingerprint image 3 being higher than that of fingerprint image 1 or fingerprint image 2, and the foreground area of ​​fingerprint image 3 being higher than that of fingerprint image 1 or fingerprint image 2. All three of the texture consistency, quality score, and foreground area of ​​fingerprint image 3 may be higher than those of fingerprint image 1 or fingerprint image 2. Alternatively, one or two of the texture consistency, quality score, and foreground area of ​​fingerprint image 3 may be higher than those of fingerprint image 1 or fingerprint image 2. For example, if the texture consistency of fingerprint image 3 is higher than that of fingerprint image 1 or fingerprint image 2, then the quality score and foreground area of ​​fingerprint image 3 are equal to those of fingerprint image 1 or fingerprint image 2.

[0134] In some embodiments of the present application, the electronic device 100 optimizes the fingerprint image 1 to obtain the fingerprint image 3, which may include: the electronic device 100 performs AI repair on the fingerprint image 1 or the fingerprint image 2 to obtain the fingerprint image 3. Specifically, as shown in the AI ​​repair process shown in Figure 3 (a), the electronic device 100 can input the fingerprint image 1 or the fingerprint image 2 into the AI ​​repair model, and the AI ​​repair model can repair the fingerprint image 1 or the fingerprint image 2. Then, the AI ​​repair model can output the fingerprint image 3.

[0135] The training data for this AI inpainting model can be multiple pairs of fingerprint images, each containing wet fingerprint images captured with water and dry fingerprint images captured without water. The AI ​​inpainting model training process can be shown in Figure 3(b). The input to the AI ​​inpainting model can be the wet fingerprint image from training image pair 1, and the output can be the inpainted image 1 obtained by the AI ​​inpainting model from the wet fingerprint image. The inpainted image 1 is then compared with the dry fingerprint image from training image pair 1 to determine the model error. Finally, the model error can be used to calibrate the AI ​​inpainting model.

[0136] In some embodiments of the present application, the AI ​​repair model can be trained by a model server of the electronic device 100 manufacturer. The electronic device 100 can download the trained AI repair model from the model training server. In some embodiments of the present application, the electronic device 100 can download an initial AI repair model from the model server and then train a new AI repair model based on historical data in the electronic device 100. Compared with the initial AI repair model, the new AI repair model can repair the wet finger image more clearly and accurately.

[0137] In some embodiments of the present application, the AI ​​repair model includes but is not limited to a deep neural network model, a convolutional neural network model, a recurrent neural network model, etc. The embodiments of the present application do not limit the specific form of the AI ​​repair model.

[0138] S209 : The electronic device 100 extracts features from the fingerprint image 3 to obtain fingerprint features 2 .

[0139] The electronic device 100 may perform feature extraction on the fingerprint image 3 to obtain the fingerprint feature 2. The fingerprint feature 2 may be a fingerprint feature point and / or a singular point in the fingerprint image 3.

[0140] In some embodiments of the present application, the fingerprint feature points and / or singular points in the fingerprint image 3 may be more accurate than the fingerprint feature points and / or singular points in the fingerprint image 1 or the fingerprint image 2. In some embodiments of the present application, the coordinates of one or more fingerprint feature points extracted by the electronic device 100 from the fingerprint image 3 may be more accurate than the coordinates of the fingerprint feature points extracted from the fingerprint image 1 or the fingerprint image 2.

[0141] S210: The electronic device 100 matches the fingerprint feature 2 with the fingerprint template to obtain a matching result 2.

[0142] The electronic device 100 may match the fingerprint feature 2 with one or more fingerprint templates in the fingerprint template library to obtain a matching result 2 .

[0143] In some embodiments of the present application, the electronic device 100 may calculate the similarity and / or overlap between the fingerprint feature 2 and one or more fingerprint templates in the fingerprint template library.

[0144] That is, the matching result 2 may include one or more similarities and / or one or more overlaps.

[0145] For step S210 , reference may be made to the description of step S204 , which will not be repeated here.

[0146] S211. The electronic device determines whether the matching is successful. If so, step S206 is executed; if not, step S212 is executed.

[0147] The electronic device 100 may determine whether the matching is successful based on the matching result 2. If the matching is successful, the electronic device 100 may execute step S206. If the matching is unsuccessful, the electronic device 100 may execute step S212.

[0148] Matching result 2 may include one or more similarities and / or one or more overlaps, wherein the one or more similarities may include similarity 4, and the one or more overlaps may include overlap 4.

[0149] In some embodiments of the present application, when matching result 2 only includes similarity 4, electronic device 100 may determine that the match is successful if similarity 4 is greater than or equal to similarity threshold 2. If similarity 4 is less than similarity threshold 2, electronic device 100 determines that the match is unsuccessful.

[0150] Regarding the similarity threshold 2, please refer to the description in step S205 for details, which will not be repeated here.

[0151] In some embodiments of the present application, when the matching result 2 includes multiple similarities, the electronic device 100 can calculate the similarity average 2. If the similarity average 2 is greater than or equal to the similarity threshold 2, the electronic device 100 can determine that the match is successful. If the similarity average 2 is less than the similarity threshold 2, the electronic device 100 determines that the match is unsuccessful. For example, the matching result 2 may include similarity 4, similarity 5, and similarity 6. The electronic device 100 can calculate the similarity average 2, which is equal to the sum of similarity 4, similarity 5, and similarity 6 divided by 3. If the similarity average 2 is greater than or equal to the similarity threshold 2, the electronic device 100 can determine that the match is successful. If the similarity average 2 is less than the similarity threshold 2, the electronic device 100 can determine that the match failed.

[0152] In some embodiments of the present application, when matching result 2 includes multiple similarities, electronic device 100 may determine that the match is successful if all of the multiple similarities are greater than or equal to similarity threshold 2. If one or more of the multiple similarities are less than similarity threshold 2, electronic device 100 determines that the match is unsuccessful.

[0153] In some embodiments of the present application, when matching result 2 only includes overlap 4, electronic device 100 determines that the match is successful if overlap 4 is greater than or equal to overlap threshold 2. If overlap 4 is less than overlap threshold 2, electronic device 100 determines that the match is unsuccessful.

[0154] For the overlap threshold 2, please refer to the description in step S205 and will not be repeated here.

[0155] In some embodiments of the present application, when the matching result 2 includes multiple overlaps, the electronic device 100 can calculate the average overlap. If the average overlap is greater than or equal to the overlap threshold 2, the electronic device 100 can determine that the match is successful. If the average overlap is less than the overlap threshold 2, the electronic device 100 determines that the match is unsuccessful. For example, the matching result 2 may include an overlap of 4, an overlap of 5, and an overlap of 6. The electronic device 100 can calculate the average overlap 2, which is equal to the sum of the overlap of 4, the overlap of 5, and the overlap of 6 divided by 3. If the average overlap 2 is greater than or equal to the overlap threshold 2, the electronic device 100 can determine that the match is successful. If the average overlap 2 is less than the overlap threshold 2, the electronic device 100 can determine that the match is unsuccessful.

[0156] In some embodiments of the present application, when matching result 1 includes multiple overlap degrees, electronic device 100 may determine that the match is successful if all of the multiple overlap degrees are greater than or equal to overlap threshold 2. If one or more of the multiple overlap degrees are less than overlap threshold 2, electronic device 100 may determine that the match is unsuccessful.

[0157] In some embodiments of the present application, when matching result 1 includes similarity 4 and overlap 4, if similarity 1 is greater than or equal to similarity threshold 2 and overlap 1 is greater than or equal to overlap threshold 2, electronic device 100 may determine that the match is successful. If similarity 1 is less than similarity threshold 2 or overlap is less than overlap threshold 2, electronic device 100 may determine that the match is unsuccessful.

[0158] S212: The electronic device 100 performs a second action.

[0159] When fingerprint image 1, fingerprint image 2, or fingerprint image 3 does not match the fingerprint template in the fingerprint template library, or the match is unsuccessful, the electronic device 100 may perform a second action.

[0160] The second action includes but is not limited to any of the following:

[0161] ①. The electronic device 100 may display that the fingerprint matching is unsuccessful.

[0162] ②. The electronic device 100 may display a prompt text, which is used to prompt the user to verify the fingerprint again or authenticate the identity through other means.

[0163] ③. The electronic device 100 may display a payment failure.

[0164] ④. The electronic device 100 may prompt the user that the launch of the privacy application has failed.

[0165] In some embodiments of the present application, in steps S202-S204, the process in which the electronic device 100 directly matches the fingerprint image 2 can be referred to as original image matching, or original image matching mode. Alternatively, the process in which the electronic device 100 directly matches the fingerprint image 1 can also be referred to as original image matching, or original image matching mode. In steps S208-S210, the process in which the electronic device 100 matches the optimized fingerprint image, i.e., fingerprint image 3, can be referred to as AI repair matching, or AI repair matching mode.

[0166] In this way, through the method provided in the embodiment of the present application, the electronic device 100 can first match the adopted fingerprint image with the fingerprint template. In the event of a matching failure, the electronic device 100 can determine that the fingerprint image is a wet finger image based on one or more of the image indicators or matching indicators of the fingerprint image. Then, the electronic device 100 can perform AI repair on the wet finger image, and the image indicators of the repaired fingerprint image are higher than the image indicators of the wet finger image. Finally, the electronic device 100 can match the repaired fingerprint image with the fingerprint template. In this way, the fingerprint recognition rate of the user's wet finger image can be improved. The method provided in the embodiment of the present application uses an AI repair algorithm to repair wet or sweaty fingerprint images, which can improve the accuracy and stability of fingerprint recognition. In addition, it can avoid the embarrassment and inconvenience of the user being unable to unlock the device due to wet or sweaty fingers, thereby improving the user experience. The fingerprint recognition method provided in the embodiment of the present application does not need to lower the matching threshold or downsample according to the quality of the collected data, thereby ensuring the security of the device.

[0167] In some embodiments of the present application, the electronic device 100 may not directly match the captured fingerprint image. The electronic device 100 may determine whether the fingerprint image meets the second condition. If the second condition is not met, the electronic device 100 may select the original image matching mode. If the second condition is met, the electronic device 100 may select the AI ​​repaired image matching mode. In the original image matching mode, the electronic device 100 matches the captured fingerprint image with a fingerprint template. In the AI ​​repaired image matching mode, the electronic device 100 may first perform AI repair on the captured fingerprint image and then match the repaired fingerprint image with the fingerprint template. In this way, if the fingerprint image is of a dry finger, the electronic device 100 can directly match the fingerprint image with the fingerprint template, improving fingerprint recognition efficiency. If the fingerprint image is of a wet finger, the electronic device 100 may perform AI repair before matching, improving the accuracy and stability of fingerprint recognition for wet finger images. Furthermore, this can avoid the embarrassment and inconvenience of users being unable to unlock their device due to wet or sweaty fingers, thereby improving the user experience.

[0168] FIG4 exemplarily shows a flow chart of another fingerprint recognition method provided by an embodiment of the present application. As shown in FIG4 , the fingerprint recognition method provided by an embodiment of the present application may include the following steps:

[0169] S401: The electronic device 100 detects a first operation of a user and collects a fingerprint image 1 of the user.

[0170] Step S401 may refer to step S201 and will not be described in detail here.

[0171] S402: The electronic device 100 determines whether the fingerprint image 1 satisfies the second condition. If so, step S409 is executed; if not, step S403 is executed.

[0172] The second condition may include one or more of the following:

[0173] Condition ①: The texture consistency of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 1.

[0174] Condition ②: The quality score of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 2.

[0175] Condition ③: The foreground area of ​​the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 is smaller than the threshold 3.

[0176] When fingerprint image 1, or fingerprint image 2 obtained by preprocessing fingerprint image 1, meets the second condition, that is, meets one or more of the above conditions ①, ②, and ③, electronic device 100 can select AI repair image mode, that is, execute the following steps S409-S412. When fingerprint image 1, or fingerprint image 2 obtained by preprocessing fingerprint image 1, does not meet the second condition, electronic device 100 can select original image matching mode, that is, execute the following steps S403-S406.

[0177] S403 : The electronic device 100 pre-processes the fingerprint image 1 to obtain a fingerprint image 2 .

[0178] S404 : The electronic device 100 extracts features from the fingerprint image 2 to obtain fingerprint feature 1 .

[0179] S405 : The electronic device 100 matches the fingerprint feature 1 with the fingerprint template to obtain a matching result 1 .

[0180] S406: The electronic device 100 determines whether the matching is successful. If so, step S407 is executed; if not, step S408 is executed.

[0181] Steps S403 to S406 may refer to the above-mentioned steps S202 to S205 and will not be described in detail here.

[0182] S407: The electronic device 100 performs a first action.

[0183] Step S407 may refer to the above-mentioned step S206 and will not be described in detail here.

[0184] S408: The electronic device 100 performs a second action.

[0185] Step S408 may refer to the above-mentioned step S212 and will not be described again here.

[0186] S409 : The electronic device 100 optimizes the fingerprint image 1 to obtain the fingerprint image 3 .

[0187] S410 : The electronic device 100 extracts features from the fingerprint image 3 to obtain fingerprint features 2 .

[0188] S411. The electronic device 100 matches the fingerprint feature 2 with the fingerprint template to obtain a matching result 2.

[0189] S412: The electronic device 100 determines whether the matching is successful. If so, step S407 is executed; if not, step S408 is executed.

[0190] Steps S409 to S412 may refer to steps S208 to S211 and will not be described in detail here.

[0191] In some embodiments of the present application, in steps S403-S406, the process in which the electronic device 100 directly matches the fingerprint image 2 can be referred to as original image matching, or original image matching mode. Alternatively, the process in which the electronic device 100 directly matches the fingerprint image 1 can also be referred to as original image matching, or original image matching mode. In steps S409-S412, the process in which the electronic device 100 matches the optimized fingerprint image, i.e., fingerprint image 3, can be referred to as AI repair matching, or AI repair matching mode.

[0192] In the indication recognition method provided in the present application, the electronic device 100 can first calculate the image indicators of the fingerprint image and select the corresponding matching mode according to the indicators. The image indicators may include: calculating fingerprint image indicators: one or more of texture consistency, quality score, and foreground area. Then, the electronic device can select the matching mode according to the image indicators. When the second condition is met, the AI ​​repair matching mode is selected. For other conditions, the original image matching mode is selected. When performing AI image repair matching, the electronic device 100 first performs AI repair on the fingerprint image, and then compares the repaired image with the fingerprint template stored in the device. If the comparison is successful, the device is unlocked.

[0193] In this embodiment of the present application, the user unlocks the phone using both a dry finger and a wet finger. If the wet finger can unlock the phone successfully, the unlocking time is longer than if the phone is wet. If the user unlocks the phone using a fake finger with a special texture and a normal finger, i.e., the user's real finger is wet, only the wet finger can unlock the phone.

[0194] Furthermore, when a user successfully unlocks the phone with a wet finger multiple times, the electronic device 100 can store the image of the user's wet finger in the fingerprint template library. If the number of fingerprint templates stored in the fingerprint template library reaches the upper limit, the electronic device 100 can first delete some infrequently used fingerprint templates and then store the fingerprint image of the user's wet finger in the template library. In this way, when the user subsequently uses the wet finger to unlock the phone with a fingerprint, the electronic device 100 can directly use the original image matching mode to successfully match the phone without the need for AI repair matching. In this way, when a user successfully unlocks the phone with a wet finger multiple times, the unlocking time when using the wet finger again can be significantly reduced.

[0195] In some embodiments of the present application, the first threshold may be threshold 1, the second threshold may be threshold 2, the third threshold may be threshold 3, the fourth threshold may be similarity threshold 3, and the fifth threshold may be overlap threshold 3. The first fingerprint image may be fingerprint image 1 or fingerprint image 2, and the second fingerprint image may be fingerprint image 3.

[0196] The following first introduces an exemplary electronic device 100 provided in an embodiment of the present application.

[0197] FIG5 is a schematic structural diagram of an electronic device 100 provided in an embodiment of the present application.

[0198] The following embodiments are described in detail using electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown in the figure, may combine two or more components, or may have a different component configuration. The various components shown in the figure may be implemented in hardware, including one or more signal processing and / or application-specific integrated circuits, software, or a combination of hardware and software.

[0199] The electronic device 100 may be a mobile phone, tablet computer, laptop computer, smart watch, smart bracelet, or other device that can support fingerprint unlocking, fingerprint identity authentication, fingerprint payment, or the like.

[0200] 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.

[0201] It should be understood that the structure illustrated in the embodiments of the present invention 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 shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

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

[0203] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0204] 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.

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

[0206] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

[0207] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0208] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0209] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0210] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0211] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0212] The SIM interface can be used to communicate with the SIM card interface 195 to implement the function of transmitting data to the SIM card or reading data in the SIM card.

[0213] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0214] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0215] The charging management module 140 is configured to receive charging input from a charger, which may be a wireless charger or a wired charger.

[0216] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, and the wireless communication module 160.

[0217] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0218] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0219] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0220] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0221] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0222] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0223] Electronic device 100 implements 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.

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

[0225] 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.

[0226] 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 also 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.

[0227] 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 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.

[0228] 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.

[0229] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0230] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0231] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0232] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as face information template data, fingerprint information template, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0233] 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.

[0234] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0235] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0236] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0237] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0238] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0239] 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, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity 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 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, a command 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, a command to create a new short message is executed.

[0240] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0241] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0242] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0243] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0244] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0245] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that 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 can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0246] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

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

[0248] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0249] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the 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, in a location different from that of the display screen 194.

[0250] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0251] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0252] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0253] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications.

[0254] FIG6 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

[0255] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other via software interfaces. In some embodiments, the system is divided into four layers: application layer, application framework layer, runtime and system libraries, and kernel layer.

[0256] The application layer can include a series of application packages.

[0257] As shown in FIG6 , the application package may include application programs (also referred to as applications) such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0258] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0259] As shown in FIG6 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0260] 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, take screenshots, etc.

[0261] 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, phone books, etc.

[0262] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0263] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0264] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0265] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically, without requiring user interaction. For example, the Notification Manager can be used to notify users of completed downloads, message reminders, and so on. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog interfaces on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0266] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.

[0267] The core library consists of two parts: one part is the function that the programming language (for example, Java language) needs to call, and the other part is the core library of the system.

[0268] The application layer and application framework layer run in a virtual machine. The virtual machine executes the application layer and application framework layer programming files (for example, Java files) as binary files. The virtual machine performs functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0269] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0270] The surface manager is used to manage the display subsystem and provide the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.

[0271] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0272] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0273] A 2D graphics engine is a drawing engine for 2D drawings.

[0274] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and virtual card driver.

[0275] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0276] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.

[0277] FIG7 shows a schematic structural diagram of the electronic device 100 .

[0278] As shown in Figure 7, the present application provides an electronic device 100, which includes a fingerprint sensor, a processor, and a memory. The fingerprint sensor, the processor, and the memory may be directly or indirectly connected via circuit traces.

[0279] In which, the fingerprint sensor can be used to collect a first fingerprint; the processor can be used to perform fingerprint recognition on the first fingerprint collected by the fingerprint sensor; the processor can be used to determine whether the first fingerprint meets the first condition when it is determined that the first fingerprint does not match the fingerprint template. The processor can also be used to optimize the first fingerprint when the first fingerprint meets the first condition, for example, input the first fingerprint into an AI repair model to obtain a second fingerprint, and the image index of the second fingerprint is higher than the image index of the first fingerprint. The processor can also be used to match the second fingerprint with a fingerprint template. The processor can also be used to unlock the electronic device 100 when it is determined that the first fingerprint or the second fingerprint matches the fingerprint template.

[0280] The memory may be used to store a fingerprint template library, in which fingerprint templates entered by users are stored.

[0281] In some embodiments of the present application, the fingerprint sensor can be set below the display screen of the electronic device 100, or on the side of the electronic device 100, or on the back of the electronic device 100. The embodiments of the present application do not limit the specific position of the fingerprint sensor in the electronic device 100.

[0282] In some embodiments of the present application, the fingerprint sensor may be an optical fingerprint sensor, a capacitive, i.e., semiconductor fingerprint sensor, or a radio frequency fingerprint sensor. The embodiments of the present application do not limit the specific type of the fingerprint sensor.

[0283] In some embodiments of the present application, the first fingerprint may be the fingerprint image 1 or the fingerprint image 2 mentioned above. The second fingerprint may be the fingerprint image 3 mentioned above.

[0284] In some embodiments of the present application, the specific process of the processor performing fingerprint recognition on the first fingerprint may refer to the description in the above steps S202 to S204.

[0285] In some embodiments of the present application, the first condition may refer to the description in the above step S207 and will not be repeated here.

[0286] In some embodiments of the present application, the processor optimizes the first fingerprint to obtain the second fingerprint, and identifies the second fingerprint. For details, please refer to the description in the above steps S208 to S210.

[0287] In some embodiments of the present application, the processor may be further configured to execute payment if it is determined that the first fingerprint matches the fingerprint template.

[0288] In some embodiments of the present application, the processor may be further configured to execute payment if it is determined that the second fingerprint matches the fingerprint template.

[0289] In some embodiments of the present application, the processor may be further configured to identify the first fingerprint if the first fingerprint does not satisfy the second condition. The processor may also be configured to optimize the first fingerprint if the first fingerprint satisfies the second condition, for example, by inputting the first fingerprint into an AI repair model to obtain a second fingerprint, wherein the image index of the second fingerprint is higher than the image index of the first fingerprint. The processor may also be configured to match the second fingerprint with a fingerprint template; the processor may be configured to unlock the electronic device 100 if it is determined that the first fingerprint or the second fingerprint matches the fingerprint template.

[0290] FIG8 shows a flow chart of a fingerprint recognition method. As shown in FIG8 , a fingerprint recognition method provided by an embodiment of the present application may include the following steps:

[0291] S801: The electronic device 100 detects a first operation of a user and collects a first fingerprint image of the user.

[0292] Step S801 may refer to step S201 and will not be described in detail here.

[0293] S802: The electronic device 100 optimizes the first fingerprint image to obtain a second fingerprint image.

[0294] Step S802 may refer to step S208 and will not be described again here.

[0295] S803 : Determine that the second fingerprint image successfully matches the fingerprint template stored in the electronic device 100 , and unlock the electronic device 100 .

[0296] Step S803 may refer to step S211 and step S206 and will not be described in detail here.

[0297] The fingerprint recognition method provided by the embodiments of the present application allows electronic device 100 to optimize fingerprint images of wet fingers, such as by performing AI repair before matching. This improves the accuracy and stability of fingerprint recognition for wet finger images. Furthermore, it avoids the embarrassment and inconvenience of users being unable to unlock their devices due to wet or sweaty fingers, thereby improving the user experience.

[0298] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0299] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0300] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0301] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A fingerprint recognition method, characterized in that: include: The electronic device detects a first operation of the user and collects a first fingerprint image of the user; The electronic device optimizes the first fingerprint image to obtain a second fingerprint image; It is determined that the second fingerprint image successfully matches the fingerprint template stored in the electronic device, and the electronic device is unlocked.

2. The method according to claim 1, characterized in that Before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method further includes: It is determined that the first fingerprint image fails to match the fingerprint template and the first fingerprint image satisfies a first condition.

3. The method according to claim 2, characterized in that The first condition includes: one or more of: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, the foreground area of ​​the first fingerprint image is less than a third threshold, the similarity between the first fingerprint image and the fingerprint template is greater than a fourth threshold, and the overlap between the first fingerprint image and the fingerprint template is greater than a fifth threshold.

4. The method according to any one of claims 1 to 3, characterized in that: The image index of the second fingerprint image is higher than the image index of the first fingerprint image.

5. The method according to claim 4, characterized in that The image index of the second fingerprint image includes one or more of texture consistency of the second fingerprint image, a quality score of the second fingerprint image, and a foreground area of ​​the second fingerprint image; The image index of the first fingerprint image includes one or more of texture consistency of the first fingerprint image, a quality score of the first fingerprint image, and a foreground area of ​​the first fingerprint image.

6. The method according to claim 5, characterized in that The image indicators of the second fingerprint image are higher than those of the first fingerprint image, including: one or more of the following: the texture consistency of the second fingerprint image is higher than the fingerprint consistency of the first fingerprint image, the quality score of the second fingerprint image is higher than the quality score of the first fingerprint image, and the foreground area of ​​the second fingerprint image is higher than the foreground area of ​​the first fingerprint image.

7. The method according to claim 1, characterized in that Before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method further includes: It is determined that the first fingerprint image satisfies a second condition.

8. The method according to claim 7, characterized in that The second condition includes: one or more of: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, and the foreground area of ​​the first fingerprint image is less than a third threshold.

9. A fingerprint recognition method, characterized in that: include: The electronic device detects a first operation of the user and collects a first fingerprint image of the user; The electronic device optimizes the first fingerprint image to obtain a second fingerprint image; It is determined that the second fingerprint image successfully matches the fingerprint template stored in the electronic device, and the electronic device executes payment.

10. The method according to claim 9, characterized in that Before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method further includes: It is determined that the first fingerprint image fails to match the fingerprint template and the first fingerprint image satisfies a first condition.

11. The method according to claim 10, characterized in that The first condition includes: one or more of: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, the foreground area of ​​the first fingerprint image is less than a third threshold, the similarity between the first fingerprint image and the fingerprint template is greater than a fourth threshold, and the overlap between the first fingerprint image and the fingerprint template is greater than a fifth threshold.

12. The method according to any one of claims 9 to 11, characterized in that: The image index of the second fingerprint image is higher than the image index of the first fingerprint image.

13. The method according to claim 12, characterized in that The image index of the second fingerprint image includes one or more of texture consistency of the second fingerprint image, a quality score of the second fingerprint image, and a foreground area of ​​the second fingerprint image; The image index of the first fingerprint image includes one or more of texture consistency of the first fingerprint image, a quality score of the first fingerprint image, and a foreground area of ​​the first fingerprint image.

14. The method according to claim 13, characterized in that The image indicators of the second fingerprint image are higher than those of the first fingerprint image, including: one or more of the following: the texture consistency of the second fingerprint image is higher than the fingerprint consistency of the first fingerprint image, the quality score of the second fingerprint image is higher than the quality score of the first fingerprint image, and the foreground area of ​​the second fingerprint image is higher than the foreground area of ​​the first fingerprint image.

15. The method according to claim 9, characterized in that Before the electronic device optimizes the first fingerprint image to obtain the second fingerprint image, the method further includes: It is determined that the first fingerprint image satisfies a second condition.

16. The method according to claim 15, characterized in that The second condition includes: one or more of: the texture consistency of the first fingerprint image is less than a first threshold, the quality score of the first fingerprint image is less than a second threshold, and the foreground area of ​​the first fingerprint image is less than a third threshold.

17. An electronic device, characterized in that: include: A fingerprint sensor, one or more processors, and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-8 or 9-16.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 8 or 9 to 16.

Citation Information

Patent Citations

  • Fingerprint identification method and related device

    CN109934180A

  • Fingerprint identification method and electronic equipment

    CN113723167A

  • Fingerprint identification method and electronic equipment

    CN115050058A

  • Fingerprint identification method and electronic equipment

    CN116012696A

  • Fingerprint image enhancement method, electronic equipment and computer readable storage medium

    CN116309103A

Cited By

  • User release method and device, computer equipment and storage medium

    CN121747231A