Fingerprint identification method and device, electronic equipment, storage medium and program product
By filtering the global feature vector and local feature matrix of fingerprint images for matching, the problem of low fingerprint recognition efficiency in existing technologies is solved, and more efficient fingerprint recognition is achieved.
Patent Information
- Application Number
- CN202510510036.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2045-04-22
AI Technical Summary
In existing fingerprint recognition technologies, the low recognition efficiency is caused by storing multiple image features of the same finger, requiring the matching of a large number of image features one by one.
By extracting the global feature vectors of the fingerprint image to be identified and the global feature vectors of the template fingerprint image, specific global feature vectors within the distance threshold are selected, and matching is performed using the local feature matrix to reduce unnecessary feature matching times.
It improves the efficiency of fingerprint recognition, especially significantly increasing the recognition speed on low-computing-power devices, and reducing the number of times local feature matrices need to be matched.
Smart Images

Figure CN120452032B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more particularly to a fingerprint recognition method, apparatus, electronic device, storage medium, and program product. Background Technology
[0002] Fingerprint recognition technology, as one of the commonly used biometric technologies, is widely used in scenarios such as judicial evidence collection, attendance tracking, access control, and login authentication for personal electronic devices.
[0003] Currently, fingerprint recognition typically uses small-area fingerprint sensors to collect fingerprints. Considering that a small-area fingerprint sensor can only collect a portion of a single finger's fingerprint at a time, during the fingerprint registration stage, the fingerprint image of different areas of the finger can be obtained by pressing the small-area fingerprint sensor multiple times with the same finger, and the image features of all collected fingerprint images are stored. During the fingerprint recognition stage, the features of the collected fingerprint images can be matched one by one with the stored image features to achieve fingerprint recognition.
[0004] However, since multiple image features of the same finger are stored during the fingerprint registration stage, the number of stored image features may reach dozens, hundreds, or even more in actual application scenarios. This means that the fingerprint recognition stage generally has to match a large number of image features one by one, resulting in low efficiency of fingerprint recognition. Summary of the Invention
[0005] In view of the above, embodiments of this application provide a fingerprint recognition method, apparatus, electronic device, storage medium, and program product to at least partially solve the above problems.
[0006] According to a first aspect of the embodiments of this application, a fingerprint recognition method is provided, comprising: determining a portion of the second global feature vectors as specific global feature vectors based on a first global feature vector of a fingerprint image to be recognized and second global feature vectors of a plurality of template fingerprint images, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; and determining a recognition result for recognizing the fingerprint image to be recognized based on a first local feature matrix of the fingerprint image to be recognized and a second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0007] According to a second aspect of the embodiments of this application, a fingerprint recognition device is provided, comprising: a determining unit, configured to determine a portion of the second global feature vectors as specific global feature vectors based on a first global feature vector of a fingerprint image to be recognized and second global feature vectors of a plurality of template fingerprint images, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to a corresponding distance threshold; and a recognizing unit, configured to determine a recognition result for recognizing the fingerprint image to be recognized based on a first local feature matrix of the fingerprint image to be recognized and a second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0008] According to a third aspect of the embodiments of this application, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the method of the first aspect described above.
[0009] According to a fourth aspect of the embodiments of this application, a computer storage medium is provided, on which a computer program is stored, the program being executed by a processor using the method described in the first aspect.
[0010] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including computer instructions that instruct a computing device to perform the method of the first aspect described above.
[0011] According to the fingerprint recognition scheme provided in this application, a portion of the second global feature vectors can be determined as specific global feature vectors based on the first global feature vector of the fingerprint image to be recognized and the second global feature vectors of multiple template fingerprint images. Then, based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrices of the template fingerprint images corresponding to each specific global feature vector, the recognition result for recognizing the fingerprint image to be recognized is determined. Thus, the second global feature vectors can be pre-screened based on the first global feature vector, and then the second local feature matrices corresponding to the selected second global feature vectors can be matched one-to-one with the first local feature matrix. Compared to matching all second local feature matrices with the first local feature matrix one-to-one, this application can reduce the number of matching operations for local feature matrices and improve the efficiency of fingerprint recognition. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0013] Figure 1 This is a flowchart of a fingerprint recognition method according to an embodiment of this application;
[0014] Figure 2 This is a schematic diagram of the processing logic of a global feature extraction model according to an embodiment of this application;
[0015] Figure 3 This is a schematic diagram of a fingerprint recognition device according to an embodiment of this application;
[0016] Figure 4 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0017] Application Environment of this Application
[0018] This application proposes a fingerprint recognition scheme. The entire fingerprint recognition scheme is relatively universal and can be used for fingerprint identification during identity verification, such as in scenarios like judicial evidence collection, attendance tracking, access control, or login to personal electronic devices, to verify identity. This fingerprint recognition scheme can be executed by data centers, servers, personal computers, Internet of Things (IoT) devices, embedded devices, etc. The fingerprint recognition scheme is independent of the hardware deployed on the computing device executing it.
[0019] Fingerprint recognition methods
[0020] Based on the above application environment, this application provides a fingerprint recognition method, which will be described in detail below through multiple embodiments.
[0021] Figure 1 This is a flowchart of a fingerprint recognition method according to an embodiment of this application. Figure 1 As shown, the fingerprint recognition method includes the following steps:
[0022] Step 101: Based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, determine some of the second global feature vectors as specific global feature vectors.
[0023] Among them, the distance between a specific global feature vector and the first global feature vector is less than or equal to the corresponding distance threshold.
[0024] In one specific implementation, before acquiring the fingerprint image to be identified through the small-area fingerprint sensor, multiple fingers can be registered for fingerprints. For example, N3 fingers can be pressed on the small-area fingerprint sensor N4 times respectively, so that the small-area fingerprint sensor can acquire Nu (Nu = N3 * N4) template fingerprint images. Then, local feature extraction and global feature extraction are performed on each template fingerprint image to obtain the second local feature matrix and the second global feature vector of each template fingerprint image in the Nu template fingerprint images.
[0025] In the process of fingerprint recognition, a fingerprint image to be recognized can be acquired first through a small-area fingerprint sensor. Then, local feature extraction and global feature extraction are performed on the fingerprint image to be recognized to obtain the first local feature matrix and the second global feature vector. The second global feature vector that is closer to the first global feature vector is then determined as the specific global feature vector, so as to select the feature global feature vector from all the second global feature vectors.
[0026] Local feature extraction can be achieved by extracting local features from the fingerprint image to be extracted, based on a small-area fingerprint recognition algorithm feature extractor. Global feature extraction can be achieved by obtaining the corresponding global feature vector based on the local feature matrix. Specifically, it can be implemented through global feature extraction models, Vector of Locally Aggregated Descriptors (VLAD) algorithms, Bag of Words (BoW) algorithms, or methods based on Vector of Locally Aggregated Descriptors Network (VLADNet) / Graph Neural Network (GNN), etc.
[0027] Step 102: Determine the recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0028] In one specific implementation, after determining some of the second global feature vectors as specific global feature vectors, if there is a second local feature matrix in the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector that matches the first local feature matrix, then the recognition result of recognizing the fingerprint image to be recognized can be determined as successful; otherwise, the recognition result of recognizing the fingerprint image to be recognized can be determined as failed.
[0029] In this embodiment, based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, some of the second global feature vectors are determined as specific global feature vectors. Then, based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrices of the template fingerprint images corresponding to each specific global feature vector, the identification result of the fingerprint image to be identified is determined. Thus, the second global feature vectors can be pre-screened based on the first global feature vector, and then the second local feature matrices corresponding to the selected second global feature vectors are matched one-to-one with the first local feature matrix. Compared to matching all second local feature matrices with the first local feature matrix one-to-one, this application reduces the number of matching operations for local feature matrices, improving the efficiency of fingerprint recognition.
[0030] Furthermore, the fingerprint recognition method in this application can be flexibly applied in various application environments and has plug-and-play characteristics; compared with the scheme that determines whether two fingerprint images are similar based on whether they belong to the same finger, the fingerprint recognition method in this application can recognize small-area fingerprints and has a wider range of applications.
[0031] It should be noted that, compared to local feature matrices, global feature vectors have less data volume, and therefore the processing speed of global feature vectors is faster. This makes the pre-screening of the second global feature vector based on the first global feature vector in this application faster. Therefore, on the same computing entity (such as a microcontroller unit (MCU) or system on chip (SOC), the efficiency of fingerprint recognition using the fingerprint recognition method in this application is higher than that of fingerprint recognition using the scheme in the background art. In particular, for some low-computing-power computing entities (such as control units), the efficiency of fingerprint recognition using the fingerprint recognition method in this application is much higher than that of fingerprint recognition using the scheme in the background art.
[0032] In one possible implementation, the fingerprint recognition method further includes the following specific processing: extracting local features from the fingerprint image to be recognized to obtain a first local feature matrix; inputting the first local feature matrix into a trained global feature extraction model to obtain a first global feature vector output by the global feature extraction model.
[0033] Therefore, by inputting the first local feature matrix into the global feature extraction model, the first global feature vector can be obtained directly, which is convenient, fast, and improves efficiency.
[0034] In one possible implementation, the fingerprint recognition method further includes the following specific processing: performing local feature extraction on the x-th template fingerprint image among the multiple template fingerprint images to obtain the second local feature matrix of the x-th template fingerprint image, where 1≤x≤m, and m is the number of template fingerprint images among the multiple template fingerprint images; inputting the second local feature matrix of the x-th template fingerprint image into the trained global feature extraction model to obtain the second global feature vector of the x-th template fingerprint image output by the global feature extraction model.
[0035] Therefore, by inputting each second local feature matrix into the global feature extraction model, the second global feature vector of each template fingerprint image can be obtained directly, which is convenient, fast, and improves efficiency.
[0036] In one possible implementation, the processing steps of the above global feature extraction model are as follows:
[0037] After receiving the target local feature matrix input into the global feature extraction model, the target local feature matrix is input into the first multilayer perceptron and the second multilayer perceptron included in the global feature extraction model, respectively, to obtain a first matrix output by the first multilayer perceptron and a second matrix output by the second multilayer perceptron. The target local feature matrix is either the first local feature matrix or any second local feature matrix, and at least some parameters of the first and second multilayer perceptrons are different. The parameter matrix is input into the third multilayer perceptron included in the global feature extraction model to obtain a third matrix output by the third multilayer perceptron. The parameter matrix is a trained parameter of the global feature extraction model. An attention weight matrix is determined based on the first and third matrices. The target global feature vector corresponding to the target local feature matrix is determined based on the attention weight matrix and the second matrix. When the target local feature matrix is the first local feature matrix, the target global feature vector is the first global feature vector; when the target local feature matrix is any second local feature matrix, the target global feature vector is the second global feature vector of the template fingerprint image corresponding to any second local feature matrix.
[0038] Each of the first, second, and third multilayer perceptrons includes two linear mapping layers and one ReLU activation layer. The number of columns in the output matrix of the multilayer perceptron is less than the number of columns in the output matrix. The structures of the first, second, and third multilayer perceptrons can be the same, but at least some parameters of any two different multilayer perceptrons can be different. The specific structures and parameters of the first, second, and third multilayer perceptrons can be set according to actual needs, and this application embodiment does not limit this.
[0039] In one specific implementation, such as Figure 2 As shown, after inputting the target local feature matrix Fn into the global feature extraction model, Fn can be input into the first multilayer perceptron MLP1 and the second multilayer perceptron MLP2 respectively, so that MLP1 outputs a first matrix with fewer columns than Fn. And make MLP2 output a second matrix with fewer columns than Fn. Simultaneously, the parameter matrix P (P is a trained parameter of the global feature extraction model; that is, during the training of the global feature extraction model, an initially randomly generated trained parameter will be continuously adjusted until the global feature extraction model is trained, at which point the current trained parameter is P) can be input into the third multilayer perceptron MLP3, so that MLP3 outputs a third matrix Q with fewer columns than P. Then, according to... Multiplying Q and processing it using the function σ() yields the attention weight matrix A. n Then according to A n and Perform multiplication operations and use the functions φ() and φ() to perform multiplication operations. Processing yields the target global feature vector g. n .
[0040] In this embodiment, an attention mechanism is introduced into the global feature extraction model, which can focus on the key information in the target local feature matrix, helping the model to better understand the key features in the target local feature matrix, thereby improving the model's performance and accuracy. At the same time, the model can input the local feature matrix of existing small-area fingerprint recognition algorithms, and can also reduce the influence of whether the finger is rotated when the fingerprint image is collected, solving the problems of fingerprint alignment and missing details of small-area fingerprints in related solutions.
[0041] In one possible implementation, the formula for determining the attention weight matrix based on the first and third matrices is as follows:
[0042]
[0043] in, This is the fourth matrix. Let Q be the first matrix and Q be the third matrix. T Let A be the transpose of Q. n Let A be the attention weight matrix, σ() be the normalization exponential function (e.g., the normalization exponential function (softmax function)) used to normalize the matrix column-wise, and A be the attention weight matrix. n The element a in the i-th row and j-th column ij and The element in the i-th row and j-th column Satisfy the following formula:
[0044]
[0045] Where Kn is The number of rows, 1≤i≤Kn, and exp is an exponential function with the natural constant e as the base.
[0046] In one possible implementation, the formula for determining the target global feature vector corresponding to the target local feature matrix based on the attention weight matrix and the second matrix is as follows:
[0047]
[0048] Among them, G n Let A be the fifth matrix. n This is the attention weight matrix. For A n The transpose of the matrix, For the second matrix, The original global vector is given, φ() is a function used to transform a two-dimensional matrix into a one-dimensional vector, and g is the vector. n For the target global feature vector, g is a function used to perform L2 normalization on vectors. n The t-th element g in t and The t-th element in Satisfy the following formula:
[0049]
[0050] Among them, Dg is The number of elements in is The dimension of g n The dimensions are equal, 1≤t≤Dg.
[0051] In one possible implementation, the training process of the global feature extraction model is as follows: an initial global feature extraction model is obtained; multiple fingerprint image sample groups are obtained, wherein each fingerprint image sample group includes multiple fingerprint image samples corresponding to the same finger, and different fingerprint image sample groups correspond to different fingers; among the fingerprint image samples included in the multiple fingerprint image sample groups, any two fingerprint image samples that have successfully matched features, correspond to the same finger, and whose overlapping area ratio is greater than a threshold are grouped into a corresponding fingerprint image pair; at least some of the fingerprint image pairs are grouped into a fingerprint image pair set; based on the fingerprint image pair set, the initial global feature extraction model is trained to obtain the trained global feature extraction model.
[0052] The ratio threshold is 50% to 80%, such as 60% or 70%.
[0053] For example, the specific process of obtaining a set of fingerprint image pairs can be as follows: N2 fingerprint images from N1 fingers are acquired using a small-area fingerprint sensor as fingerprint image samples, resulting in N1 fingerprint image sample groups. Each fingerprint image sample group includes N2 fingerprint image samples, that is, Nv (Nv = N1 * N2) fingerprint image samples are obtained. Then, based on the small-area fingerprint algorithm feature extractor, local feature extraction is performed on each of the Nv fingerprint image samples to obtain a local fingerprint feature library. The local fingerprint feature library includes the local feature matrices of the Nv fingerprint image samples. Then, for any two fingerprint image samples in the same fingerprint image sample group... The fingerprint image samples Im and In are processed as follows: The local feature matrix of Im and the local feature matrix of In are matched using a feature recognition function to obtain the matching result and the area ratio of the overlapping region of Im and In. If the matching result indicates a successful match and the area ratio of the overlapping region of Im and In is greater than the ratio threshold, then Im and In are combined into a fingerprint image pair. If the matching result indicates a failed match, or the area ratio of the overlapping region of Im and In is less than or equal to the ratio threshold, then Im and In are not determined as a fingerprint image pair. Next, the obtained multiple fingerprint image pairs can be combined into a fingerprint image pair set.
[0054] Optionally, after collecting N2 fingerprint images of N1 fingers as fingerprint image samples using a small-area fingerprint sensor, the images can be randomly rotated and some image areas can be randomly set to invalid values to perform data augmentation, so that there are more fingerprint image samples in each fingerprint image sample.
[0055] In this embodiment, the global feature extraction model is trained based on a set of fingerprint image pairs. Each fingerprint image pair in the set includes two fingerprint image samples belonging to the same finger and having a large overlapping area. This provides a large number of training sample pairs when training the global feature extraction model, allowing the model to be fully trained and improving the accuracy of the trained global feature extraction model.
[0056] In one possible implementation, the above-mentioned training of the initial global feature extraction model based on the fingerprint image set to obtain the trained global feature extraction model includes the following steps:
[0057] Step 201: Randomly select B fingerprint image pairs from the fingerprint image pair set, where B ≥ 2; Step 202: Train the initial global feature extraction model based on the B fingerprint image pairs; Step 203: Determine the loss value based on the loss function. If the loss value meets the training termination condition, the current global feature extraction model is determined as the trained global feature extraction model. Optionally, in step 203, if the loss value does not meet the training termination condition, the process returns to step 201.
[0058] In the process of training the initial global feature extraction model based on B fingerprint image pairs, the AdamW (Adam with Weight Decay) algorithm can be used to adjust the parameters of the initially randomly generated training parameters and the parameters of the linear mapping layer based on the B fingerprint image pairs, so as to optimize the global feature extraction model.
[0059] The formula for the loss function is as follows:
[0060]
[0061] L is the loss value, g p To input the local feature matrix of the first fingerprint image sample in the p-th fingerprint image pair out of B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs the global feature vector. To input the local feature matrix of the second fingerprint image sample in the p-th fingerprint image pair out of B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs the global feature vector. To input the local feature matrix of the second fingerprint image sample in the q-th fingerprint image pair out of B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs the global feature vector. For g p and distance, For g p and The distance is given by , where e is the natural constant and log() is the logarithmic function.
[0062]
[0063] in, for L2 norm, for The L2 norm.
[0064] In this embodiment, the loss value can be calculated based on two fingerprint image samples belonging to the same fingerprint image pair and two fingerprint image samples not belonging to the same fingerprint image pair. This allows the loss function to consider more factors, improves the accuracy of the loss value, and makes the trained global feature extraction model more accurate.
[0065] The loss function can also be a triplet loss function or a lifted structure loss function, etc., and this application does not limit it to this embodiment.
[0066] In one possible implementation, step 101 includes: among the second global feature vectors of multiple template fingerprint images, the top NS1 second global feature vectors with the smallest distance to the first global feature vector are determined as specific global feature vectors, where 1≤NS1≤NUM, the specific value of NS1 can be set according to actual needs. Generally, the larger NS1 is, the more accurate the fingerprint recognition result, and the smaller NS1 is, the higher the efficiency of fingerprint recognition. NUM is the number of template fingerprint images in the multiple template fingerprint images, and the distance between the second global feature vector and the first global feature vector is the L2 norm of the difference between the second global feature vector and the first global feature vector.
[0067] In this implementation, the aforementioned distance threshold is: the distance between the second global feature vector that has the largest distance from the first global feature vector and the first global feature vector among the top NS1 second global feature vectors that have the smallest distance from the first global feature vector.
[0068] In this embodiment, the top NS1 second global feature vectors with the smallest distance from the first global feature vector are directly determined as specific global feature vectors. Compared with the next implementation, the processing logic in this implementation is simpler and more efficient.
[0069] In another possible implementation, the template fingerprint image is an image of at least a portion of the fingerprint of a corresponding single finger. The fingers corresponding to at least a portion of the template fingerprint images are different, and the fingers corresponding to at least a portion of the template fingerprint images are the same. Based on this, step 101 above includes: determining a portion of the second global feature vectors as specific global feature vectors according to the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images. This includes: among the second global feature vectors of the template fingerprint image corresponding to the y-th finger, determining the top NS2 second global feature vectors with the smallest distance from the first global feature vector as specific global feature vectors. Here, the y-th finger is the y-th finger among the fingers corresponding to the multiple template fingerprint images, 1≤y≤n, n is the number of fingers corresponding to the multiple template fingerprint images, 1≤NS2≤Nmin, and the specific value of NS2 can be set according to actual needs. Generally, the larger NS2 is, the more accurate the fingerprint recognition result, and the smaller NS2 is, the higher the fingerprint recognition efficiency. Nmin is the minimum value of the number of template fingerprint images corresponding to each finger among the multiple template fingerprint images.
[0070] In this implementation, the distance threshold corresponding to each feature global feature vector is: the distance between the second global feature vector that is closest to the first global feature vector and the first global feature vector among the NS2 second global feature vectors corresponding to the feature global feature vector; wherein, the NS2 second global feature vectors corresponding to the feature global feature vector are: the top NS2 second global feature vectors that are closest to the first global feature vector among the second global feature vectors of all template fingerprint images corresponding to the finger of the feature global feature vector.
[0071] In this embodiment, in the second global feature vector of the template fingerprint image corresponding to the y-th finger, the first NS2 second global feature vectors with the smallest distance from the first global feature vector are determined as specific global feature vectors. Compared with the previous implementation, the number of specific global feature vectors corresponding to different fingers is the same in this implementation, which reduces the possibility that the second global feature vector corresponding to the second local feature matrix that matches the first local feature matrix is not determined as a specific global feature vector, thereby improving the accuracy of fingerprint recognition.
[0072] In one possible implementation, step 102 includes: performing feature matching between the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector and the first local feature matrix; if there is a second local feature matrix that successfully matches the first local feature matrix, the recognition result is determined to be successful; if there is no second local feature matrix that successfully matches the first local feature matrix, the recognition result is determined to be unsuccessful.
[0073] For example, the above feature matching can be achieved using a feature matching function.
[0074] In this embodiment of the application, by determining the recognition result through the local feature matrix, a more accurate match can be achieved between the fingerprint image to be recognized and the template fingerprint image, thereby making fingerprint recognition more accurate.
[0075] Regarding fingerprint efficiency, when registering fingerprint information for 20 fingers, the fingerprint recognition time using the fingerprint recognition method of this application is approximately 181 milliseconds, while the fingerprint recognition time using the fingerprint recognition method in the background art is approximately 1320 milliseconds. When registering fingerprint information for 50 fingers, the fingerprint recognition time using the fingerprint recognition method of this application is approximately 223 milliseconds, while the fingerprint recognition time using the fingerprint recognition method in the background art is approximately 3300 milliseconds. It can be seen that the fingerprint recognition method of this application improves the efficiency of fingerprint recognition.
[0076] Fingerprint recognition device
[0077] Corresponding to the above method embodiments, Figure 3 A schematic diagram of a fingerprint recognition device according to an embodiment of this application is shown, such as... Figure 3 As shown, the fingerprint recognition device 300 includes:
[0078] The determining unit 301 is used to determine a portion of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to the corresponding distance threshold.
[0079] The recognition unit 302 is used to determine the recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector.
[0080] In this embodiment, the determining unit 301 can determine some of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images. The identifying unit 302 can determine the identification result of the fingerprint image to be identified based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector. Therefore, the second global feature vectors can be pre-screened based on the first global feature vector, and then the second local feature matrix corresponding to the selected second global feature vector can be matched one by one with the first local feature matrix. Compared to matching all the second local feature matrices with the first local feature matrix one by one, this application can reduce the number of matching times for the local feature matrices and improve the efficiency of fingerprint recognition.
[0081] It should be noted that the fingerprint recognition device in this embodiment is used to implement the corresponding fingerprint recognition method in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0082] electronic devices
[0083] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Specific embodiments of this application do not limit the specific implementation of the electronic device. Figure 4 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communication bus 408. Wherein:
[0084] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.
[0085] Communication interface 404 is used to communicate with other electronic devices or servers.
[0086] The processor 402 is used to execute program 410, which can specifically execute the relevant steps in any of the aforementioned fingerprint recognition method embodiments.
[0087] Specifically, program 410 may include program code that includes computer operation instructions.
[0088] Processor 402 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0089] RISC-V is an open-source instruction set architecture based on the Reduced Instruction Set Computing (RISC) principle. It can be applied to various aspects of microcontrollers and FPGA chips, specifically in areas such as IoT security, industrial control, mobile phones, and personal computers. Because its design considers small size, speed, and low power consumption, it is particularly suitable for modern computing devices such as warehouse-scale cloud computers, high-end mobile phones, and tiny embedded systems. With the rise of AIoT (Artificial Intelligence of Things), the RISC-V instruction set architecture is receiving increasing attention and support and is expected to become the next generation of widely used CPU architecture.
[0090] The computer operation instructions in this application embodiment can be computer operation instructions based on the RISC-V instruction set architecture. Correspondingly, the processor 402 can be designed based on the RISC-V instruction set. Specifically, the processor chip in the electronic device provided in this application embodiment can be a chip designed using the RISC-V instruction set. This chip can execute executable code based on the configured instructions, thereby implementing the fingerprint recognition method in the above embodiment.
[0091] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0092] Specifically, program 410 can be used to cause processor 402 to execute the fingerprint recognition method in any of the foregoing embodiments.
[0093] The specific implementation of each step in procedure 410 can be found in the corresponding steps and units described in any of the foregoing fingerprint recognition method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0094] Computer storage media
[0095] This application also provides a computer-readable storage medium storing instructions for causing a machine to perform the power consumption analysis method as described herein. Specifically, a system or apparatus equipped with a storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer (or CPU or MPU) of the system or apparatus to read and execute the program code stored in the storage medium.
[0096] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of this application.
[0097] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0098] Computer program products
[0099] This application also provides a computer program product, including computer instructions that instruct a computing device to perform any corresponding operation in the above-described plurality of method embodiments.
[0100] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0101] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.
[0102] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0103] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0104] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for specific applications, but such implementations should not be considered beyond the scope of the embodiments of this application.
[0105] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.
Claims
1. A fingerprint recognition method, characterized in that, include: Based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, some of the second global feature vectors are respectively determined as specific global feature vectors, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to the corresponding distance threshold. Based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each specific global feature vector, the identification result of the fingerprint image to be identified is determined. The method further includes: performing local feature extraction on the fingerprint image to be identified to obtain a first local feature matrix; inputting the first local feature matrix into a trained global feature extraction model to obtain the first global feature vector output by the global feature extraction model; or, performing local feature extraction on the x-th template fingerprint image among the plurality of template fingerprint images to obtain the second local feature matrix of the x-th template fingerprint image, where x≤m, m is the number of template fingerprint images among the plurality of template fingerprint images; inputting the second local feature matrix of the x-th template fingerprint image into a trained global feature extraction model to obtain the second global feature vector of the x-th template fingerprint image output by the global feature extraction model. The processing procedure of the global feature extraction model is as follows: After receiving the target local feature matrix input into the global feature extraction model, the target local feature matrix is input into the first multilayer perceptron and the second multilayer perceptron included in the global feature extraction model, respectively, to obtain a first matrix output by the first multilayer perceptron and a second matrix output by the second multilayer perceptron. The target local feature matrix is either the first local feature matrix or any second local feature matrix, and at least some parameters of the first multilayer perceptron and the second multilayer perceptron are different. The parameter matrix is input into the third multilayer perceptron included in the global feature extraction model to obtain the third matrix output by the third multilayer perceptron, wherein the parameter matrix is a training parameter of the global feature extraction model; Based on the first matrix and the third matrix, determine the attention weight matrix; Based on the attention weight matrix and the second matrix, the target global feature vector corresponding to the target local feature matrix is determined, wherein when the target local feature matrix is the first local feature matrix, the target global feature vector is the first global feature vector, and when the target local feature matrix is any second local feature matrix, the target global feature vector is the second global feature vector of the template fingerprint image corresponding to any second local feature matrix.
2. The method according to claim 1, characterized in that, The formula for determining the attention weight matrix based on the first matrix and the third matrix is as follows: ; ; in, This is the fourth matrix. Let Q be the first matrix, and Q be the third matrix. T Let Q be the transpose of Q. Let be the attention weight matrix, and σ() be the normalization exponential function used to normalize the matrix column-wise. The element in the i-th row and j-th column and The element in the i-th row and j-th column Satisfy the following formula: ; Where Kn is The number of rows, 1≤i≤Kn, and exp is an exponential function with the natural constant e as the base.
3. The method according to claim 1, characterized in that, The formula for determining the target global feature vector corresponding to the target local feature matrix based on the attention weight matrix and the second matrix is as follows: ; ; ; in, This is the fifth matrix. Let be the attention weight matrix. for The transpose of the matrix, This is the second matrix. This is the original global vector. This is a function used to transform a two-dimensional matrix into a one-dimensional vector. The target global feature vector, This is a function used to perform L2 normalization on vectors. The t-th element in and The t-th element in Satisfy the following formula: ; Wherein, Dg is The number of elements in the array, 1≤t≤Dg.
4. The method according to claim 1, characterized in that, The step of determining a portion of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images includes: In the second global feature vectors of the plurality of template fingerprint images, the first NS1 second global feature vectors that have the smallest distance from the first global feature vector are respectively determined as the specific global feature vectors, where 1≤NS1≤NUM, and NUM is the number of template fingerprint images in the plurality of template fingerprint images.
5. The method according to claim 1, characterized in that, The template fingerprint image is an image of at least a portion of the fingerprint of a corresponding single finger, wherein at least a portion of the template fingerprint images correspond to different fingers, and at least a portion of the template fingerprint images correspond to the same fingers; The step of determining a portion of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images includes: In the second global feature vector of the template fingerprint image corresponding to the y-th finger, the first NS2 second global feature vectors with the smallest distance from the first global feature vector are respectively determined as the specific global feature vectors, where the y-th finger is the y-th finger among the fingers corresponding to the plurality of template fingerprint images, y≤n, n is the number of fingers corresponding to the plurality of template fingerprint images, 1≤NS2≤Nmin, and Nmin is the minimum value of the number of template fingerprint images corresponding to each finger among the plurality of template fingerprint images.
6. The method according to claim 1, characterized in that, The step of determining the recognition result of the fingerprint image to be recognized based on the first local feature matrix of the fingerprint image to be recognized and the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors includes: The second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors is respectively matched with the first local feature matrix; If a second local feature matrix exists that successfully matches the features of the first local feature matrix, then the recognition result is determined to be a successful recognition. If there is no second local feature matrix that successfully matches the features of the first local feature matrix, then the recognition result is determined to be a recognition failure.
7. The method according to claim 1, characterized in that, The training process of the global feature extraction model is as follows: Obtain the initial global feature extraction model; Multiple fingerprint image sample groups are acquired, wherein each fingerprint image sample group includes multiple fingerprint image samples of the same finger, and different fingerprint image sample groups correspond to different fingers; Among the fingerprint image samples included in the plurality of fingerprint image sample groups, any two fingerprint image samples that have successfully matched features, correspond to the same finger, and have an overlapping area ratio greater than a threshold are combined to form a corresponding fingerprint image pair. At least a portion of the fingerprint image pairs are combined to form a fingerprint image pair set; Based on the set of fingerprint image pairs, the initial global feature extraction model is trained to obtain the trained global feature extraction model.
8. The method according to claim 7, characterized in that, The step of training the initial global feature extraction model based on the fingerprint image pair set to obtain the trained global feature extraction model includes: B fingerprint image pairs are randomly selected from the set of fingerprint image pairs, where B ≥ 2; The initial global feature extraction model is trained based on the B fingerprint image pairs; Determine the loss value based on the loss function; If the loss value meets the training termination condition, then the current global feature extraction model is determined as the global feature extraction model that has been trained. The formula for the loss function is as follows: ; L is the loss value. After inputting the local feature matrix of the first fingerprint image sample in the p-th fingerprint image pair of the B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs a global feature vector. After inputting the local feature matrix of the second fingerprint image sample from the p-th fingerprint image pair out of the B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs a global feature vector. After inputting the local feature matrix of the second fingerprint image sample from the q-th fingerprint image pair out of the B fingerprint image pairs into the current global feature extraction model, the global feature extraction model outputs a global feature vector. for and distance, for and The distance is given by , where e is the natural constant and log() is the logarithmic function.
9. A fingerprint recognition device, characterized in that, include: The determining unit is configured to determine a portion of the second global feature vectors as specific global feature vectors based on the first global feature vector of the fingerprint image to be identified and the second global feature vectors of multiple template fingerprint images, wherein the distance between the specific global feature vector and the first global feature vector is less than or equal to the corresponding distance threshold. The identification unit is used to determine the identification result of the fingerprint image to be identified based on the first local feature matrix of the fingerprint image to be identified and the second local feature matrix of the template fingerprint image corresponding to each of the specific global feature vectors; The determining unit is further configured to perform local feature extraction on the fingerprint image to be identified to obtain the first local feature matrix, input the first local feature matrix into a trained global feature extraction model, and obtain the first global feature vector output by the global feature extraction model; or, perform local feature extraction on the x-th template fingerprint image among the plurality of template fingerprint images to obtain the second local feature matrix of the x-th template fingerprint image, where x≤m, m is the number of template fingerprint images among the plurality of template fingerprint images, input the second local feature matrix of the x-th template fingerprint image into a trained global feature extraction model, and obtain the second global feature vector of the x-th template fingerprint image output by the global feature extraction model; The processing procedure of the global feature extraction model is as follows: After receiving the target local feature matrix input into the global feature extraction model, the target local feature matrix is input into the first multilayer perceptron and the second multilayer perceptron included in the global feature extraction model, respectively, to obtain a first matrix output by the first multilayer perceptron and a second matrix output by the second multilayer perceptron. The target local feature matrix is either the first local feature matrix or any second local feature matrix, and at least some parameters of the first multilayer perceptron and the second multilayer perceptron are different. The parameter matrix is input into the third multilayer perceptron included in the global feature extraction model to obtain the third matrix output by the third multilayer perceptron, wherein the parameter matrix is a training parameter of the global feature extraction model; Based on the first matrix and the third matrix, determine the attention weight matrix; Based on the attention weight matrix and the second matrix, the target global feature vector corresponding to the target local feature matrix is determined, wherein when the target local feature matrix is the first local feature matrix, the target global feature vector is the first global feature vector, and when the target local feature matrix is any second local feature matrix, the target global feature vector is the second global feature vector of the template fingerprint image corresponding to any second local feature matrix.
10. An electronic device, characterized in that, include: The processor, memory, communication interface, and communication bus communicate with each other through the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the method as described in any one of claims 1-8.
11. A computer storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.
12. A computer program product, characterized in that, Includes computer instructions that instruct a computing device to perform the method as described in any one of claims 1-8.
