Fingerprint identification method, electronic equipment and storable medium
By optimizing the fingerprint image of the user's wet fingers, the problem that electronic devices cannot accurately identify fingerprints under wet or sweat conditions is solved, improving the recognition accuracy and reducing equipment costs.
Patent Information
- Application Number
- CN202311162041.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-29
- Filing Date
- 2023-09-08
- Publication Date
- 2025-02-28
AI Technical Summary
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.
By detecting the user's fingerprint image, if the image's texture consistency, quality score or foreground area is found to be poor, and the similarity or overlap with the fingerprint template meets certain thresholds, the fingerprint image is optimized, such as AI repair, to improve its image index, thereby improving the accuracy of fingerprint recognition.
This method can improve the accuracy of the recognition of the fingerprint image of the wet finger by the electronic device, reduce the cost and complexity of the device, and protect the security of the device without the need for additional hardware support.
Smart Images

Figure CN119541005A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal and fingerprint recognition, and in particular to a fingerprint recognition method, an electronic device and a storable medium. Background Art
[0002] At present, with the increasing development of fingerprint recognition technology, the application of fingerprint recognition technology is becoming more and more extensive. Fingerprint recognition technology can not only be applied to access control and attendance systems. Fingerprint recognition technology can also be applied to mobile phones, tablet computers, laptops, cars, and bank payments. Mobile phones, tablet computers and other electronic devices can collect user fingerprints to unlock the device and verify payment.
[0003] 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.
[0004] 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. Summary of the invention
[0005] The present application provides a fingerprint recognition method, an electronic device and a storable medium. Through the fingerprint recognition method, the accuracy of fingerprint recognition of a wet finger fingerprint image by an electronic device can be improved.
[0006] In a first aspect, the present application provides a fingerprint recognition method, which may include: an electronic device detects a first operation of a 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 a fingerprint template saved by the electronic device, and unlocks the electronic device.
[0007] In this way, when the user uses a wet finger to perform fingerprint unlocking, the electronic device can optimize the collected fingerprint image of the wet finger, and then perform fingerprint recognition on the optimized fingerprint image. In this way, the accuracy of fingerprint recognition of the wet finger fingerprint image by the electronic device can be improved. In addition, the user can also unlock the electronic device with a wet finger, which can improve the user experience.
[0008] 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 the first fingerprint image satisfies a first condition.
[0009] 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.
[0010] In this way, the first condition can be used to determine whether the collected user fingerprint image is a wet finger fingerprint image. If so, the wet finger fingerprint image can be optimized. In this way, without the need for additional hardware support, users can also use wet fingers to unlock the fingerprint, thereby reducing device cost and complexity. In addition, there is no need to lower the judgment threshold of fingerprint matching, and the security of the device can be protected while ensuring wet finger unlocking.
[0011] In a possible implementation manner, the image index of the second fingerprint image is higher than the image index of the first fingerprint image.
[0012] 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.
[0013] In a possible implementation, the image indicators of the second fingerprint image are higher than the image indicators of the first fingerprint image, including: 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. One or more of the following.
[0014] In this way, optimizing the first fingerprint image can improve the image index of the first fingerprint image. 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 satisfies a second condition.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] In a second aspect, a fingerprint recognition method is provided, which may include: an electronic device detects a first operation of a 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 a fingerprint template saved by the electronic device, and the electronic device executes payment.
[0019] In this way, when a user uses a wet finger to make a fingerprint payment, the electronic device can optimize the collected fingerprint image of the wet finger, and then perform fingerprint recognition on the optimized fingerprint image. In this way, the accuracy of fingerprint recognition of the wet finger fingerprint image by the electronic device can be improved. In addition, the user can also make a fingerprint payment with a wet finger, which can improve the user experience.
[0020] 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 the first fingerprint image satisfies a first condition.
[0021] 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.
[0022] In this way, the first condition can be used to determine whether the collected user fingerprint image is a wet finger fingerprint image. If so, the wet finger fingerprint image can be optimized. In this way, without the need for additional hardware support, users can also use wet fingers to make fingerprint payments, thereby reducing device cost and complexity. In addition, there is no need to lower the judgment threshold of fingerprint matching, and the security of the device can be protected while ensuring that wet fingers can make fingerprint payments.
[0023] In a possible implementation manner, the image index of the second fingerprint image is higher than the image index of the first fingerprint image.
[0024] 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.
[0025] In a possible implementation, the image indicators of the second fingerprint image are higher than the image indicators of the first fingerprint image, including: 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. One or more of the following.
[0026] In this way, optimizing the first fingerprint image can improve the image index of the first fingerprint image.
[0027] 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 satisfies a second condition.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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, one or more memories are coupled to one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when one or more processors execute the computer instructions, the electronic device executes a method in any possible implementation of any of the above aspects.
[0032] In a fourth aspect, a computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes a method in any possible implementation of any of the above aspects.
[0033] 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 is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions to execute a method as described in any possible implementation of the first aspect above.
[0034] In a sixth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method in any possible implementation of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1A It is a schematic diagram of fingerprint unlocking of an electronic device when the screen is off provided by an embodiment of the present application;
[0036] Figure 1B is a schematic diagram of the main interface of an electronic device provided in an embodiment of the present application;
[0037] Figure 1C is a schematic diagram of a lock screen of an electronic device provided in an embodiment of the present application;
[0038] Figure 1D is a schematic diagram of a payment interface of an electronic device provided in an embodiment of the present application;
[0039] Figure 1E-1F It is a schematic diagram of a user interface of a group of fingerprint verification failures of an electronic device provided by an embodiment of the present application;
[0040] Figure 1G-1H is a set of fingerprint image schematic diagrams provided in an embodiment of the present application;
[0041] Figure 2 This is a schematic diagram of a fingerprint recognition method provided by an embodiment of the present application;
[0042] Figure 3 It is a schematic diagram of AI repair and AI repair model training provided in an embodiment of the present application;
[0043] Figure 4 This is a flow chart of another fingerprint recognition method provided by an embodiment of the present application;
[0044] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0045] Figure 6 is a software architecture diagram of an electronic device provided in an embodiment of the present application;
[0046] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0047] Figure 8 It is a flow chart of a fingerprint recognition method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.
[0049] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
[0050] Currently, fingerprint recognition has become a commonly used identity authentication method in electronic devices such as mobile phones, tablets, laptops, smart watches, smart bracelets, etc., for example, device unlocking, payment verification, etc.
[0051] Figure 1A-Figure 1D The schematic diagram of the interface of the electronic device 100 using fingerprint recognition to unlock the device, verify payment, etc. is shown exemplarily.
[0052] like Figure 1A As shown, 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 pressing or touching 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, Figure 1B The main interface 10A of the electronic device 100 is shown. The main interface of the electronic device 100 may also be referred to as a desktop.
[0053] like Figure 1C As shown, 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 pressing or touching 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, Figure 1B A main interface 10A of the electronic device 100 is shown.
[0054] like Figure 1DAs shown, 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, for example, Figure 1D In response to the pressing or touching 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 execute the payment. Exemplarily, the electronic device 100 can also display a prompt to execute the payment.
[0055] Understandably, Figure 1B-Figure 1D The main interface 10A, lock screen interface 10B, and payment interface 10C shown are for illustration only. The main interface 10A, lock screen interface 10B, and payment interface 10C may include more or fewer interface elements, and the embodiment of the present application is not limited to this.
[0056] However, when the user has just washed his hands and his fingers are wet or sweaty, the user uses the wet or sweaty fingers to perform fingerprint recognition in the electronic device 100, which may cause fingerprint recognition failure. Figure 1A or Figure 1C When performing fingerprint unlocking in the electronic device 100 shown in FIG. 1 , the electronic device 100 cannot successfully recognize the fingerprint image of a wet finger or a sweaty finger. The electronic device 100 fails to unlock and will not enter the Figure 1B The electronic device 100 may display the main interface 10A as shown. Figure 1E The user interface 10D shown in FIG. 1 can be used to prompt the user that the fingerprint recognition fails. For example, when the user uses a wet or sweaty finger to Figure 1D When the electronic device 100 shown performs fingerprint payment verification, the electronic device 100 cannot successfully recognize the fingerprint image of a wet finger or a sweaty finger. If the electronic device 100 fails to pay, the electronic device 100 may display a prompt message indicating that the fingerprint verification failed in the payment interface 10C. The prompt message may be as follows: Figure 1F The prompt information 102 shown in FIG. The prompt content of the prompt information 102 may be “Fingerprint verification failed”. This will affect the user's experience of fingerprint recognition in the electronic device 100.
[0057] 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 part of the fingerprint features in the fingerprint image collected by the electronic device 100. For example, Figure 1G The fingerprint image of the user's finger is shown when there is no water. Figure 1HThe figure shows the fingerprint image collected by the electronic device 100 when the user's finger is wet. Figure 1G The fingerprint image in can be called fingerprint image 1. Figure 1H The fingerprint image in can be called fingerprint image 2. The fingerprint features in fingerprint image 1 are more complete than the fingerprint features in fingerprint image 2.
[0058] Fingerprint features may include but are not limited to fingerprint feature points and singular points. Among them, fingerprint feature points include but are not limited to endpoints, forks, divergence points, isolated points, short lines, loop points, and bridges. An endpoint indicates the end of a fingerprint pattern. A fork indicates that a fingerprint pattern is divided into two or more lines here. Among them, singular points include core points and triangulation points. The core point is located at the progressive center of the fingerprint pattern. The triangulation point is the center point of the triangulation area in the fingerprint image, and the three fingerprint patterns closest to the point form an approximate triangle.
[0059] In some embodiments of the present application, the electronic device 100 can determine whether the fingerprint image is a fingerprint image of a finger with water on it according to the number of feature points per unit area in the fingerprint image. Exemplarily, when the number of feature points per unit area in the fingerprint image is less than a threshold value of 1, the electronic device 100 can determine that the fingerprint image is a fingerprint image of a finger with water on it. Here, the fingerprint image of a finger with water on it can be referred to as a wet finger image. When the fingerprint image collected by the electronic device 100 is a wet finger image, the electronic device 100 can downsample the template fingerprint in the fingerprint template library. Then, the electronic device 100 matches the wet finger image with the downsampled template fingerprint. In this way, when user A pre-stores a fingerprint image of the right thumb in the fingerprint template library of the electronic device 100, and user A uses a wet right thumb to perform fingerprint identity authentication on the electronic device 100, the electronic device 100 can successfully identify the fingerprint image of the user's wet right thumb. Here, the fingerprint template library can pre-store one or more fingerprint template images. The fingerprints contained in the one or more fingerprint templates are fingerprints with operation permissions that have been registered and registered in the electronic device 100.
[0060] The fingerprint template can be based on the user's original fingerprint as the master, and through some processing, it can derive one or more irreversible and unrelated fingerprint sub-prints. These sub-prints can replace the fingerprint feature information for fingerprint matching.
[0061] 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 identity authentication through fingerprints in the electronic device 100.
[0062] In some embodiments of the present application, the fingerprint collection area of the electronic device 100 may have a push button with a water-absorbing film. When the user's finger presses or touches the fingerprint collection area, if the push button with the water-absorbing film absorbs water, the electronic device 100 can determine that the user's finger is wet or sweaty. Then, the electronic device 100 can lower the matching threshold. When the electronic device 100 matches the wet finger image with the template fingerprint, and the matching similarity value or overlap value obtained is greater than or equal to the lowered matching threshold, the electronic device 100 can determine that the fingerprint recognition is successful.
[0063] In this way, 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 identity authentication through fingerprints in the electronic device 100. In addition, electronic devices without a water-absorbing film cannot perform fingerprint identification on wet finger images.
[0064] 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. Next, the electronic device 100 matches the optimized fingerprint image with the fingerprint template image, and if the match is successful, the electronic device performs a first action. The first action includes any one of the electronic device 100 unlocking the electronic device 100, paying, or starting a privacy application.
[0065] 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.
[0066] The texture consistency can be used to measure whether the valley or ridge trend of the fingerprint is continuous. The value range of texture consistency can be: 0-100. The larger the texture consistency value of the fingerprint image, the more continuous the valley or ridge trend of the fingerprint in the fingerprint image. Generally, the texture consistency value of the fingerprint image of the water finger is lower than the texture consistency value of the fingerprint image of the waterless finger.
[0067] The quality score can be used to evaluate the quality of the fingerprint image. The value range of the quality score can be: 0-100, and the larger the quality score, the better the quality of the fingerprint image. Generally, the quality score value of the fingerprint image of the water finger is lower than the quality score value of the fingerprint image of the water-free finger.
[0068] The foreground area can be used to represent the area ratio of the usable part of the fingerprint image collected by the electronic device 100 relative to the entire fingerprint image. The usable part of the fingerprint image includes the part containing fingerprint features, for example, the part with fingerprint valleys and ridges. The value range of the foreground area can be: 0-1, and the larger the value of the foreground area, the more usable parts there are in the fingerprint image. Generally, the value of the foreground area of the fingerprint image of the finger with water is lower than the value of the foreground area of the fingerprint image of the finger without water.
[0069] In some embodiments of the present application, the lock screen of the electronic device 100 may be a security lock screen that needs to be unlocked by 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, and numbers and letters. For example, the lock screen of the electronic device 100 may be as follows: Figure 1C The lock screen interface 10B is shown.
[0070] Figure 2 A fingerprint recognition method provided by an embodiment of the present application is exemplarily shown. Figure 2 As shown, a fingerprint recognition method provided in an embodiment of the present application may include the following steps:
[0071] S201. The electronic device 100 detects a first operation of a user and collects a fingerprint image 1 of the user.
[0072] In some embodiments of the present application, the first operation may be an operation in which the user presses or touches the fingerprint collection area of the electronic device 100. Figure 1A or Figure 1C As shown in FIG. 1 , the user presses or touches the fingerprint collection area in the electronic device 100 when the electronic device 100 is off or locked. In response to the user's first operation, the electronic device 100 can collect the user's fingerprint image 1. For example, the fingerprint image 1 collected by the electronic device 100 can be as follows: Figure 1G or Figure 1H The fingerprint image shown in .
[0073] 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. Figure 1D As shown, users can Figure 1D , pressing or touching the fingerprint collection area 101 in the payment interface 10C is shown.
[0074] In some embodiments of the present application, the first operation may also include the user clicking the payment control in the payment page and then pressing or touching the fingerprint collection area displayed in the payment interface.
[0075] In some embodiments of the present application, the first operation may also include the user clicking the icon of the privacy application and then pressing or touching the fingerprint collection area displayed in the electronic device. The privacy application is an application that requires security verification before it can be started. Security verification includes but is not limited to fingerprint verification, face verification, password verification, voiceprint verification, etc.
[0076] After the electronic device 100 detects the user's first operation, the user's fingerprint image 1 can be collected. The electronic device 100 can match the user's fingerprint image 1 with the fingerprint template in the fingerprint template library. When the match is unsuccessful and the fingerprint image 1 meets condition 1, the electronic device 100 optimizes the fingerprint image 1, for example, performs AI repair, and then matches the AI repair image with the fingerprint template in the fingerprint template library. In an embodiment of the present application, the fingerprint image collected by the electronic device can be called the original image, and the fingerprint image after AI repair can be called the AI repair image.
[0077] S202 : The electronic device 100 preprocesses the fingerprint image 1 to obtain the fingerprint image 2 .
[0078] In some embodiments of the present application, the electronic device 100 may preprocess the fingerprint image 1 to obtain the fingerprint image 2. The purpose of the preprocessing is to filter out the image noise of the fingerprint image 1 and enhance the contrast of the valleys and ridges of the fingerprint in the fingerprint image 1, thereby improving the quality of the fingerprint image. Compared with the fingerprint image 1, the fingerprint image 2 after preprocessing has clearer fingerprint lines and less noise.
[0079] In some embodiments of the present application, the preprocessing of the fingerprint image 1 includes but is not limited to smoothing, normalizing, filtering, image enhancement, binarization, grayscale conversion, etc. The embodiments of the present application do not limit the specific method of preprocessing.
[0080] S203 : The electronic device 100 extracts features from the fingerprint image 2 to obtain fingerprint features 1 .
[0081] The electronic device 100 may perform feature extraction on the fingerprint image 2 to obtain the fingerprint feature 1. The fingerprint feature 1 may include fingerprint feature points and / or singular points in the fingerprint image 2.
[0082] In some embodiments of the present application, the electronic device 100 may not perform 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.
[0083] S204 , the electronic device 100 matches the fingerprint feature 1 with the fingerprint template to obtain a matching result 1 .
[0084] The electronic device 100 can match the fingerprint feature 1 with the fingerprint template in the fingerprint template library to obtain a matching result 1.
[0085] 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.
[0086] In some embodiments of the present application, the electronic device 100 may determine the vector line segment pairs of the fingerprint image 2 based on the fingerprint feature 1. For example, the electronic device 100 may 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 may 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 similarity results.
[0087] 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.
[0088] In some embodiments of the present application, a user enters a fingerprint once in an electronic device, and three fingerprint templates may be stored in the fingerprint template library of the electronic device. For example, if a user enters a fingerprint of the right thumb in an electronic device, the fingerprint template library of the electronic device may include three fingerprint templates of the 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.
[0089] For example, if the fingerprint template library includes three fingerprint templates, namely fingerprint template 1, fingerprint template 2 and fingerprint template 3. In a possible implementation, 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 template 1, fingerprint template 2 and fingerprint template 3, respectively, and obtain similarity 1, similarity 2, and similarity 3, respectively.
[0090] In some embodiments of the present application, the electronic device 100 may first compare the vector line segment pair of the fingerprint image 2 with the first fingerprint template, for example, the vector line segment pair of the fingerprint template 1, to obtain similarity 1. If the similarity 1 is greater than the similarity threshold 1, the electronic device 100 may directly determine whether the match is successful based on the similarity 1. If the similarity 1 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 second fingerprint template, for example, the vector line segment pair of the fingerprint template 2, to obtain similarity 2. If the similarity 2 is greater than the similarity threshold 1, the electronic device 100 may directly determine whether the match is successful based on the similarity 2. If the similarity 2 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 third fingerprint template, for example, the vector line segment pair of the fingerprint template 3, to obtain similarity 3. By analogy, the electronic device 100 may determine whether it is necessary to compare with the vector line segment pair of another fingerprint template in the fingerprint template library based on the similarity result obtained by the comparison. 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.
[0091] In some embodiments of the present application, the first fingerprint template in the fingerprint template library may be the first fingerprint template in the fingerprint template library that is recorded in the order of the user's recorded fingerprints, or may 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 may be set by the user, or may be determined by the electronic device 100 based on the frequency of the user using the fingerprint corresponding to the fingerprint template for identity authentication. Similarly, the second fingerprint template in the fingerprint template library may be the second fingerprint template in the fingerprint template library that is recorded in the order of the user's recorded fingerprints, or may 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 may be the third fingerprint template in the fingerprint template library that is recorded in the order of the user's recorded fingerprints, or may 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.
[0092] In some embodiments of the present application, the similarities mentioned above, 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.
[0093] 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 same part 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 called the overlap 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.
[0094] 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 according to 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 lines in the fingerprint image 2. The direction of the fingerprint template can be the direction of the fingerprint lines in the fingerprint template. When the direction of the fingerprint image 2 is aligned with the direction of the fingerprint template, the electronic device 100 can calculate the overlap between the fingerprint image 2 and the fingerprint template.
[0095] Exemplarily, 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.
[0096] 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 the fingerprint template 1, the overlap 2 with the fingerprint template 2 and the overlap 3 with the fingerprint template 3 respectively.
[0097] In some embodiments of the present application, the electronic device 100 may first calculate the overlap 1 between the fingerprint image 2 and the first fingerprint template, for example, the fingerprint template 1. If the overlap 1 is greater than the overlap threshold 1, the electronic device 100 may directly determine whether the match is successful based on the overlap 1. If the overlap 1 is less than the overlap threshold 1, the electronic device 100 may calculate the overlap 2 between the fingerprint image 2 and the second fingerprint template, for example, the fingerprint template 2. If the overlap 2 is greater than the overlap threshold 1, the electronic device 100 may directly determine whether the match is successful based on the overlap 2. If the overlap 2 is less than the overlap threshold 1, the electronic device 100 may calculate the overlap 2 between the fingerprint image 2 and the third fingerprint template, for example, the fingerprint template 2. By analogy, the electronic device 100 may determine whether it is necessary to calculate the overlap between the fingerprint image 2 and another fingerprint template in the fingerprint template library based on the calculated overlap result. When the calculated overlap is less than the overlap threshold 1, the electronic device 100 may calculate the overlap between the fingerprint image 2 and another fingerprint template until the electronic device 100 calculates the overlap between the fingerprint image and the last fingerprint template.
[0098] S205. The electronic device 100 determines whether the matching is successful. If so, step S206 is executed; if not, step S207 is executed.
[0099] 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.
[0100] 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.
[0101] In some embodiments of the present application, when matching result 1 only includes similarity 1, the 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, the electronic device 100 determines that the match is unsuccessful.
[0102] 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.
[0103] 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, and 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, and the similarity average 1 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 fails.
[0104] In some embodiments of the present application, when the matching result 1 includes multiple similarities, the electronic device 100 may determine that the match is successful if one or more of the multiple similarities is greater than or equal to the similarity threshold 2. If all of the multiple similarities are less than the similarity threshold 2, the electronic device 100 determines that the match is unsuccessful.
[0105] In some embodiments of the present application, when the matching result 1 only includes the overlap degree 1, if the overlap degree 1 is greater than or equal to the overlap degree threshold 2, the electronic device 100 determines that the match is successful. If the overlap degree 1 is less than the overlap degree threshold 2, the electronic device 100 determines that the match is unsuccessful.
[0106] 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.
[0107] 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, and 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 fails.
[0108] In some embodiments of the present application, when the matching result 1 includes multiple overlaps, the electronic device 100 may determine that the match is successful if one or more of the multiple overlaps are greater than or equal to the overlap threshold 2. If the multiple overlaps are less than the overlap threshold 2, the electronic device 100 may determine that the match is unsuccessful.
[0109] In some embodiments of the present application, when the 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, the electronic device 100 can determine that the match is successful. If similarity 1 is less than similarity threshold 2, or overlap is less than overlap threshold 2, the electronic device 100 can determine that the match is unsuccessful.
[0110] S206: The electronic device 100 performs a first action.
[0111] 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.
[0112] The first action includes but is not limited to unlocking the lock screen of the electronic device 100, or executing payment, launching one or more of a privacy application.
[0113] S207. The electronic device 100 determines whether the fingerprint image 1 satisfies the first condition. If so, step S208 is executed; if not, step S212 is executed.
[0114] When 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 becomes a wet finger image. Then the electronic device 100 can optimize the fingerprint image of the wet finger, for example, 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.
[0115] The first condition may include one or more of the following:
[0116] Condition ①: The texture consistency of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 1.
[0117] Condition ②: The quality score of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 2.
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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 specific value of the threshold 1 is not limited in the embodiment of the present application.
[0122] 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 specific value of the threshold 2 is not limited in the embodiment of the present application.
[0123] 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, and the specific value of the threshold 3 is not limited in the embodiment of the present application.
[0124] 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.
[0125] 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 the embodiment of the present application.
[0126] Among them, the texture consistency in the above condition ①, the quality score in the condition ②, and the foreground area in the condition ③ can be called the image index of the fingerprint image. The similarity in the condition ④ and the overlap in the condition ⑤ can be called the matching index of the fingerprint image.
[0127] When the fingerprint image 1, or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 satisfies the first condition, that is, satisfies one or more of the above conditions ①, ②, ③, ④ and ⑤, the electronic device 100 can determine that the fingerprint image 1 is an image of the user's wet finger, and the electronic device 100 can optimize the fingerprint image 1, such as AI repair.
[0128] S208 . The electronic device 100 optimizes the fingerprint image 1 to obtain the fingerprint image 3 .
[0129] When the fingerprint image 1 satisfies the first condition, the electronic device 100 may optimize the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 to obtain the fingerprint image 3.
[0130] 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.
[0131] In some embodiments of the present application, the image index of the fingerprint image 3 being higher than the image index of the fingerprint image 1 or the fingerprint image 2 may include: the texture consistency of the fingerprint image 3 is higher than the texture consistency of the fingerprint image 1 or the fingerprint image 2, the quality score of the fingerprint image 3 is higher than the quality score of the fingerprint image 1 or the fingerprint image 2, and the foreground area of the fingerprint image 3 is higher than the foreground area of the fingerprint image 1 or the fingerprint image 2. Three of the texture consistency, quality score, and foreground area of the fingerprint image 3 may all be higher than the fingerprint image 1 or the fingerprint image 2. Alternatively, one or two of the texture consistency, quality score, and foreground area of the fingerprint image 3 are higher than the fingerprint image 1 or the fingerprint image 2. For example, the texture consistency of the fingerprint image 3 is higher than the texture consistency of the fingerprint image 1 or the fingerprint image 2, and then the quality score and foreground area of the fingerprint image 3 are equal to the quality score and foreground area of the fingerprint image 1 or the fingerprint image 2.
[0132] 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, Figure 3 As shown in the AI repair process shown in Figure (a), the electronic device 100 can input the fingerprint image 1 or the fingerprint image 2 into the AI repair model, the AI repair model can repair the fingerprint image 1 or the fingerprint image 2, and then the AI repair model can output the fingerprint image 3.
[0133] The training data of the AI repair model can be multiple pairs of fingerprint images, where the fingerprint image pairs include wet finger images collected when the fingers are wet, and dry finger images collected when the fingers are dry. The AI repair model training process can be as follows: Figure 3 As shown in (b) in FIG. 1 , the input of the AI repair model can be the wet finger image in the training image pair 1, and the output can be the repaired image 1 obtained by the AI repair model repairing the wet finger image. Then, the repaired image 1 is compared with the dry finger image in the training image pair 1 to obtain the model error. Finally, the model error can be used to correct the AI repair model.
[0134] In some embodiments of the present application, the AI repair model can be trained by a model server of the manufacturer of the electronic device 100. 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 the initial AI repair model from the model server, and then train a new AI repair model based on the 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.
[0135] 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.
[0136] S209 , the electronic device 100 extracts features from the fingerprint image 3 to obtain fingerprint features 2 .
[0137] 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 in the fingerprint image 3 and / or a singular point.
[0138] 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 from the fingerprint image 3 by the electronic device 100 may be more accurate than the coordinates of the fingerprint feature points extracted from the fingerprint image 1 or the fingerprint image 2.
[0139] S210: The electronic device 100 matches the fingerprint feature 2 with the fingerprint template to obtain a matching result 2.
[0140] The electronic device 100 can match the fingerprint feature 2 with one or more fingerprint templates in the fingerprint template library to obtain a matching result 2.
[0141] 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.
[0142] That is, the matching result 2 may include one or more similarities and / or one or more overlaps.
[0143] The description of step S210 may refer to step S204 and will not be repeated here.
[0144] S211, the electronic device determines whether the matching is successful, if so, executes step S206; if not, executes step S212.
[0145] 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.
[0146] The matching result 2 may include one or more similarities and / or one or more overlaps. The one or more similarities may include similarity 4. The one or more overlaps may include overlap 4.
[0147] In some embodiments of the present application, when matching result 2 only includes similarity 4, the 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, the electronic device 100 determines that the match is unsuccessful.
[0148] Regarding the similarity threshold 2, please refer to the description in step S205 for details, which will not be repeated here.
[0149] 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, and 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, and the similarity average 2 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 fails.
[0150] In some embodiments of the present application, when the matching result 2 includes multiple similarities, the electronic device 100 may determine that the match is successful if the multiple similarities are all greater than or equal to the similarity threshold 2. If one or more of the multiple similarities are less than the similarity threshold 2, the electronic device 100 determines that the match is unsuccessful.
[0151] In some embodiments of the present application, when the matching result 2 only includes the overlap degree 4, if the overlap degree 4 is greater than or equal to the overlap degree threshold 2, the electronic device 100 determines that the match is successful. If the overlap degree 4 is less than the overlap degree threshold 2, the electronic device 100 determines that the match is unsuccessful.
[0152] For the overlap threshold 2, please refer to the description in step S205, which will not be repeated here.
[0153] In some embodiments of the present application, when the matching result 2 includes multiple overlaps, the electronic device 100 can calculate the average overlap, and 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 overlap 4, overlap 5, and overlap 6. The electronic device 100 can calculate the average overlap 2, which is equal to the sum of overlap 4, overlap 5, and overlap 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 fails.
[0154] In some embodiments of the present application, when the matching result 1 includes multiple overlaps, the electronic device 100 may determine that the match is successful if the multiple overlaps are all greater than or equal to the overlap threshold 2. If one or more of the multiple overlaps are less than the overlap threshold 2, the electronic device 100 may determine that the match is unsuccessful.
[0155] In some embodiments of the present application, when the 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, the electronic device 100 can determine that the match is successful. If similarity 1 is less than similarity threshold 2, or overlap is less than overlap threshold 2, the electronic device 100 can determine that the match is unsuccessful.
[0156] S212: The electronic device 100 performs a second action.
[0157] 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 fails, the electronic device 100 may perform a second action.
[0158] The second action includes but is not limited to any of the following:
[0159] ①. The electronic device 100 may display that the fingerprint matching is unsuccessful.
[0160] ②. The electronic device 100 can display a prompt text, which is used to prompt the user to verify the fingerprint again or authenticate the identity through other methods.
[0161] ③. The electronic device 100 may display payment failure.
[0162] ④. The electronic device 100 may prompt the user that the launch of the privacy application has failed.
[0163] 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 called 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 called 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., the fingerprint image 3, can be called AI repair matching, or AI repair matching mode.
[0164] 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 case of a match 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 indicator of the repaired fingerprint image is higher than the image indicator 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 a wet or sweaty fingerprint image, 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, and improve the user's experience. The fingerprint recognition method provided in the embodiment of the present application does not need to reduce the matching threshold or downsample according to the quality of the collected data, thereby ensuring the security of the device.
[0165] In some embodiments of the present application, the electronic device 100 may not directly match the collected fingerprint image. The electronic device 100 may determine whether the fingerprint image meets the second condition. When the second condition is not met, the electronic device 100 may select the original image matching mode. When the second condition is met, the electronic device 100 may select the AI repair image matching mode. Among them, the original image matching mode is that the electronic device 100 matches the collected fingerprint image with the fingerprint template. The AI repair image matching mode may be that the electronic device 100 first performs AI repair on the collected fingerprint image, and matches the repaired fingerprint image with the fingerprint template. In this way, when the fingerprint image is a fingerprint image of a finger without water, the electronic device 100 can directly match the fingerprint image with the fingerprint template, which can improve the efficiency of fingerprint recognition. When the fingerprint image is a fingerprint image of a finger with water, the electronic device 100 can perform AI repair before matching, which can improve the accuracy and stability of fingerprint recognition of wet finger images. In addition, it can avoid the embarrassment and inconvenience of users being unable to unlock the device due to wet or sweaty fingers, and improve the user experience.
[0166] Figure 4The flowchart of another fingerprint recognition method provided by the embodiment of the present application is exemplarily shown. Figure 4 As shown, the fingerprint recognition method provided in the embodiment of the present application may include the following steps:
[0167] S401: The electronic device 100 detects a first operation of a user and collects a fingerprint image 1 of the user.
[0168] Step S401 may refer to step S201 and will not be described in detail here.
[0169] S402, the electronic device 100 determines whether the fingerprint image 1 satisfies the second condition, if yes, executes step S409; if not, executes step S403.
[0170] The second condition may include one or more of the following:
[0171] Condition ①: The texture consistency of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 1.
[0172] Condition ②: The quality score of fingerprint image 1 or fingerprint image 2 obtained by preprocessing fingerprint image 1 is less than threshold 2.
[0173] 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.
[0174] When the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 meets the second condition, that is, meets one or more of the above conditions ①, ②, and ③, the electronic device 100 can select the AI repair image mode, that is, execute the following steps S409-S412. When the fingerprint image 1 or the fingerprint image 2 obtained by preprocessing the fingerprint image 1 does not meet the second condition, the electronic device 100 can select the original image matching mode, that is, execute the following steps S403-S406.
[0175] S403 : The electronic device 100 preprocesses the fingerprint image 1 to obtain the fingerprint image 2 .
[0176] S404 : The electronic device 100 extracts features from the fingerprint image 2 to obtain fingerprint features 1 .
[0177] S405 . The electronic device 100 matches the fingerprint feature 1 with the fingerprint template to obtain a matching result 1 .
[0178] S406. The electronic device 100 determines whether the matching is successful. If so, step S407 is executed; if not, step S408 is executed.
[0179] Steps S403 to S406 may refer to the above-mentioned steps S202 to S205, which will not be described in detail here.
[0180] S407: The electronic device 100 performs a first action.
[0181] Step S407 may refer to the above-mentioned step S206 and will not be described in detail here.
[0182] S408: The electronic device 100 performs a second action.
[0183] Step S408 may refer to the above-mentioned step S212 and will not be described in detail here.
[0184] S409 : The electronic device 100 optimizes the fingerprint image 1 to obtain the fingerprint image 3 .
[0185] S410 : The electronic device 100 extracts features from the fingerprint image 3 to obtain fingerprint features 2 .
[0186] S411. The electronic device 100 matches the fingerprint feature 2 with the fingerprint template to obtain a matching result 2.
[0187] S412: The electronic device 100 determines whether the matching is successful, and if so, executes step S407; if not, executes step S408.
[0188] Steps S409 to S412 may refer to steps S208 to S211 and will not be described in detail here.
[0189] 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 called 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 called 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., the fingerprint image 3, can be called AI repair matching, or AI repair matching mode.
[0190] 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 a matching mode based on the image indicators. When the second condition is met, the AI repair matching mode is selected, and the original image matching mode is selected for other conditions. 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.
[0191] In the embodiment of the present application, the user unlocks the phone using a dry finger and a wet finger respectively. If the wet finger can unlock the phone successfully and the unlocking time is longer than the dry finger unlocking time. When the user uses a fake finger with a special texture and a normal finger, that is, the user's real finger is unlocked with water, only the normal finger can unlock the phone with water.
[0192] Furthermore, when the user's wet finger successfully unlocks the phone multiple times, the electronic device 100 can store the fingerprint 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 for fingerprint unlocking, the electronic device 100 can also successfully match the original image matching mode directly without the need for AI repair matching. In this way, when the user successfully unlocks the phone multiple times using a wet finger, the unlocking time for unlocking the phone again using a wet finger can be significantly reduced.
[0193] 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.
[0194] The following first introduces an exemplary electronic device 100 provided in an embodiment of the present application.
[0195] Figure 5 It is a schematic diagram of the structure of the electronic device 100 provided in an embodiment of the present application.
[0196] The embodiment is described in detail below by taking the electronic device 100 as an example. It should be understood that the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0197] The electronic device 100 may be a mobile phone, a tablet computer, a laptop computer, a smart watch, a smart bracelet, or the like that can support fingerprint unlocking or fingerprint identity authentication, fingerprint payment, or the like.
[0198] 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.
[0199] It is to be understood that the structure illustrated in the embodiment 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 in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0200] 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 processor (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), etc. Different processing units may be independent devices or integrated into one or more processors.
[0201] 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.
[0202] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0203] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0204] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0205] 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 achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
[0206] 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 to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0207] The UART interface is a universal serial data bus for asynchronous communication. The 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 generally 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 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
[0208] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0209] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the 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.
[0210] 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.
[0211] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0212] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic 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 in the above embodiments, or a combination of multiple interface connection methods.
[0213] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.
[0214] 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 power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0215] 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.
[0216] 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 the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0217] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., 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.
[0218] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a 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.
[0219] 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 integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0220] 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 the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR 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).
[0221] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0222] The display screen 194 is used to display images, videos, etc. The 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0223] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0224] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0225] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.
[0226] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0227] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0228] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0229] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0230] 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.
[0231] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0232] 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 arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0233] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.
[0234] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0235] Microphone 170C, also called "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 microphone 170C to input the sound signal into 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 sound source, realize directional recording function, etc.
[0236] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0237] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
[0238] The gyro 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 gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro 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 gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0239] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
[0240] 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 leather 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 according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.
[0241] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0242] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
[0243] 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 holds 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.
[0244] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0245] 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.
[0246] 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 a 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 avoid abnormal shutdown of the electronic device 100 due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 performs a boost on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0247] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and 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 acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0248] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0249] 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.
[0250] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
[0251] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out 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.
[0252] Figure 6 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0253] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: application layer, application framework layer, runtime and system library, and kernel layer.
[0254] The application layer can include a series of application packages.
[0255] like Figure 6 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications (also referred to as applications).
[0256] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0257] like Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0258] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0259] 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.
[0260] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0261] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0262] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0263] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications from applications running in the background, or a notification that appears on the screen in the form of a dialogue interface. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0264] The runtime includes the core library and the virtual machine. The runtime is responsible for the scheduling and management of the system.
[0265] 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.
[0266] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the programming files of the application layer and the application framework layer (for example, java files) as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0267] The system library may 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.
[0268] The surface manager is used to manage the display subsystem and provides the fusion of two-dimensional (2D) and three-dimensional (3D) layers for multiple applications.
[0269] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0270] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0271] A 2D graphics engine is a drawing engine for 2D drawings.
[0272] 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.
[0273] The following is an illustrative description of the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.
[0274] 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, timestamp of the touch operation, 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 static images or videos through the camera 193.
[0275] Figure 7 A schematic structural diagram of an electronic device 100 is shown.
[0276] like Figure 7 As shown, 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 through circuit traces.
[0277] Among them, 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 the 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 the 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.
[0278] The memory may be used to store a fingerprint template library, in which fingerprint templates entered by users are stored.
[0279] In some embodiments of the present application, the fingerprint sensor may be disposed below the display screen of the electronic device 100, or may be disposed on the side of the electronic device 100, or may be disposed 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.
[0280] In some embodiments of the present application, the fingerprint sensor may be an optical fingerprint sensor, a capacitor, i.e., a 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.
[0281] 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.
[0282] 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.
[0283] 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.
[0284] 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.
[0285] In some embodiments of the present application, the processor may also be configured to execute payment if it is determined that the first fingerprint matches the fingerprint template.
[0286] In some embodiments of the present application, the processor may also be configured to execute payment if it is determined that the second fingerprint matches the fingerprint template.
[0287] In some embodiments of the present application, the processor may also be used to identify the first fingerprint when the first fingerprint does not meet the second condition. The processor may also be used to optimize the first fingerprint when the first fingerprint meets the second condition, for example, inputting the first fingerprint into the 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 may also be used to match the second fingerprint with a fingerprint template; the processor may be used to unlock the electronic device 100 when it is determined that the first fingerprint or the second fingerprint matches the fingerprint template.
[0288] Figure 8 FIG. 1 shows a flow chart of a fingerprint recognition method. Figure 8 As shown, a fingerprint recognition method provided in an embodiment of the present application may include the following steps:
[0289] S801: The electronic device 100 detects a first operation of a user and collects a first fingerprint image of the user.
[0290] Step S801 may refer to step S201 and will not be described in detail here.
[0291] S802: The electronic device 100 optimizes the first fingerprint image to obtain a second fingerprint image.
[0292] Step S802 may refer to step S208 and will not be described in detail here.
[0293] S803 , determining that the second fingerprint image successfully matches the fingerprint template stored in the electronic device 100 , and unlocking the electronic device 100 .
[0294] Step S803 may refer to step S211 and step S206, which will not be described in detail here.
[0295] By using the fingerprint recognition method provided in the embodiment of the present application, when the fingerprint image is a fingerprint image of a finger with water on it, the electronic device 100 can be optimized, for example, matching after AI repair, which can improve the accuracy and stability of fingerprint recognition of wet finger images. In addition, it can avoid the embarrassment and inconvenience of users being unable to unlock the device due to wet or sweaty fingers, thereby improving the user experience.
[0296] 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 aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned 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.
[0297] 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 (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.
[0298] 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 devices. 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 site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. 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 contains one or more available media integration. 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), etc.
[0299] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
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.