A fingerprint activity detection method based on CKKS homomorphic encryption

By optimizing the ReLU and Sigmoid activation functions and employing the minimum-maximum polynomial approximation method and incremental feature optimization learning mechanism, the computational efficiency and memory consumption issues of the CKKS homomorphic encryption scheme in fingerprint activity detection are solved, achieving high-precision fingerprint activity detection and generalization capability across sensor domains.

CN120750666BActive Publication Date: 2025-11-04NANJING UNIV OF INFORMATION SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511250462.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-03
Publication Date
2025-11-04
Estimated Expiration
2045-09-03

AI Technical Summary

Technical Problem

The existing CKKS homomorphic encryption scheme suffers from low computational efficiency, excessive memory consumption, and slow model training convergence in fingerprint activity detection. Furthermore, high-resolution fingerprint datasets can lead to memory overflow, making it difficult to achieve high-precision activity detection.

Method used

A fingerprint activity detection method based on CKKS homomorphic encryption is designed. By optimizing ReLU and Sigmoid activation functions, the model is improved by using the minimum-maximum polynomial approximation method. A class feature center representation model is constructed, and an incremental feature optimization learning mechanism and an improved loss function fusion strategy are adopted to achieve high discriminative detection across sensor domains.

Benefits of technology

It improves the accuracy of fingerprint activity detection and the generalization ability of the model, reduces memory usage, ensures the privacy and security of fingerprint data, and adapts to diverse detection environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120750666B_ABST
    Figure CN120750666B_ABST
Patent Text Reader

Abstract

The application provides a fingerprint activity detection method based on CKKS homomorphic encryption, comprising the following steps: step 1, establishing a three-party interaction system model composed of a user end, a key distribution center and a cloud server; step 2, after completing identity verification, the user end encrypts the image using a public key, and transmits the ciphertext image to the cloud server through a public channel; step 3, after receiving the ciphertext image, the cloud server uses a second deep learning model to identify the ciphertext image and obtains a ciphertext result; the cloud server transmits the ciphertext result to the user end through the public channel, and the user end uses the private key held to decrypt, and finally obtains the fingerprint activity detection result. The method can accurately and effectively distinguish the activity of the fingerprint without exposing the input fingerprint image information. The core goal of adding the homomorphic encryption technology is to ensure the privacy of the fingerprint data, and effectively distinguish the cheating attacks initiated by the living body fingerprint and the fake fingerprint.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of information security, and particularly relates to a fingerprint activity detection method based on CKKS homomorphic encryption. BACKGROUND

[0002] With the wide popularity of intelligent terminal devices, the security of private data is increasingly concerned. At present, most identity authentication technologies still rely on the authentication mode of "identity information + password", but this mode generally has the risk of password forgetting, leaking and even being stolen. In order to solve these problems, biometric recognition technology has emerged as the times require. Among them, fingerprint, with its uniqueness and convenience, has been widely used in payment verification, access control system, attendance management and many other fields. However, fingerprint authentication is not risk-free. In recent years, with the development of high-resolution simulation technology, 3D printing technology and generative adversarial network technology, criminals can use materials such as silicone and gelatin to forge fingerprints and thus deceive the authentication system. Therefore, fingerprint activity detection technology has been proposed to distinguish the authenticity of fingerprint images and effectively resist the deception attack of forged fingerprints.

[0003] As a user's key biometric information, fingerprint will face great security risks if directly uploaded to the server, and is extremely vulnerable to hacker sniffing, which may lead to user fingerprint privacy leakage. For the sake of convenience, the holder of the fingerprint image is referred to as the client, and the third-party server provider is referred to as the server. If the original fingerprint is directly uploaded to the server, there will be great security risks, which may lead to data leakage. Therefore, it is urgent to design a fingerprint activity detection technology with privacy protection function to effectively prevent the risk of privacy leakage on the server side. Homomorphic encryption technology provides an effective solution, which not only can encrypt fingerprint data, but also supports the third-party server to reason without decryption. In addition, based on the homomorphic property of homomorphic encryption, the server calculates on the encrypted data, and the result after decryption is consistent with the result obtained by the same operation on the plaintext data. This mechanism ensures that the fingerprint is always in an encrypted state throughout the reasoning calculation, and only the data owner can decrypt the calculation result, thus effectively protecting the privacy and security of users.

[0004] The CKKS homomorphic encryption scheme is built on the BGV scheme. Unlike previous homomorphic encryption algorithms that aim to achieve exact results identical to the plaintext, the CKKS algorithm focuses on approximate computation. This algorithm allows for a certain degree of computational error, moderately relaxing the stringent requirement for accuracy. This feature makes the CKKS scheme simpler in design and more efficient in computation compared to other homomorphic encryption schemes based on the LWE / RLWE problem. The CKKS scheme consists of the following seven parts: initialization (Setup), key generation (Key Generation), encryption (Encryption), decryption (Decryption), addition (Addition), multiplication (Multiplication), and rescaling (Rescaling). The CKKS scheme supports homomorphic operations such as addition, scalar multiplication, non-scalar multiplication, and cyclic left shift. Compared to BGV and BFV, CKKS has more advantages in privacy protection applications in the field of deep learning. However, there is still room for improvement and optimization in the CKKS scheme. The most basic operations supported by CKKS are addition and multiplication, which can be combined to calculate the value of the ciphertext polynomial. However, the traditional method of multiplying each term and then adding them together is inefficient and computationally expensive. In addition, the homomorphic encryption process introduces additional noise, which can increase with the depth of the calculation during the decryption phase.

[0005] In 2022, Joon-Woo Lee et al. designed a Residual Network (Resnet20) model that supports the CKKS homomorphic encryption scheme (Reference: Brakerski, Zvika, Gentry, Craig, and Vaikuntanathan, Vinod. Fully Homomorphic Encryption from Ring-LWE and Security for Key Dependent Messages[J]. Cryptology ePrint Archive, 2012, 2012: 220). As the first work to combine complex deep learning networks with homomorphic encryption, this method mainly improved two aspects: 1. The latest approximation method was used to evaluate non-arithmetic functions such as ReLU and normalization exponential function softmax to ensure sufficient accuracy. 2. The bootstrapping technology of the RNS-CKKS scheme was used in this model, which made it possible to evaluate deep learning models on encrypted data. The plaintext accuracy rate on the CIFAR-10 dataset reached , while the ciphertext accuracy rate reached This study demonstrates the potential of applying FHE to advanced deep learning models. However, this method generally reveals several problems in practical applications: First, the CKKS scheme uses floating-point approximation, which leads to the continuous accumulation of rounding errors after each operation. As the inference process progresses, the accuracy of the calculation results continuously decreases, ultimately negatively impacting the classification accuracy of the ResNet20 model. Furthermore, the CKKS scheme does not support the ReLU function, typically using quadratic or cubic polynomials as approximations. However, the gradient of the ReLU function is only 0 or 1, while the gradient of a polynomial function... The gradient, however, changes continuously, and this discrepancy can interfere with the model's training convergence speed and generalization ability. Secondly, in practical applications, the data volume of high-resolution fingerprint datasets is often at least an order of magnitude larger than the datasets used in homomorphic encryption experiments. This type of high-resolution data not only consumes a large amount of memory space but may also cause memory overflow problems. Especially under the CKKS scheme, each floating-point number is encoded into a high-dimensional ciphertext vector, and the model parameters (such as convolution kernels, weights, feature maps, etc.) will expand sharply after encryption, leading to a significant increase in memory consumption. Summary of the Invention

[0006] Purpose of the invention: The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a fingerprint activity detection method based on CKKS homomorphic encryption. The aim is to design a customized protocol to ensure the privacy and security of fingerprint data and to realize the fingerprint activity detection function under encrypted data.

[0007] The method includes the following steps:

[0008] Step 1: Establish a three-party interactive system model consisting of the user terminal, the key distribution center, and the cloud server;

[0009] The user terminal initiates a service request, encrypts the fingerprint image using the public key distributed by the Key Distribution Center (KDC), sends the encrypted image to the cloud server, receives and decrypts the encryption result returned by the cloud server, and finally obtains the plaintext activity detection result.

[0010] The key distribution center generates public and private key pairs for the user terminal and the cloud server, and securely distributes the generated public and private key pairs to the user terminal and the cloud server respectively through a secure channel;

[0011] The cloud server performs reasoning on the input encrypted image under encrypted conditions to determine its authenticity;

[0012] The user terminal and cloud server register with the key distribution center, which generates a public-private key pair and transmits it to the user through a secure channel, and generates an authentication certificate, enabling the user and cloud server to verify each other's identities.

[0013] Step 2, after completing identity verification, the user end encrypts the image using the public key, and transmits the ciphertext image to the cloud server through the public channel;

[0014] Step 3, deploy the first deep learning model trained by the plaintext image on the cloud server, and the second deep learning model supporting the homomorphic encryption scheme; the parameters in the second deep learning model are the same as those in the first deep learning model (generally including the degree of ciphertext polynomial, scale setting, bit length of basic modulus, special modulus, and default modulus);

[0015] After receiving the ciphertext image, the cloud server uses the second deep learning model to identify the ciphertext image and obtains the ciphertext result;

[0016] Subsequently, the cloud server transmits the ciphertext result to the user end through the public channel, and the user end uses the private key held to decrypt and finally obtains the fingerprint activity detection result;

[0017] In step 3, the second deep learning model is a Resnet20 model supporting the CKKS (named after the initials of the four authors Cheon, Kim, Kim, Song) scheme, which optimizes the ReLU and Sigmoid activation function protocols and the maximum pooling protocol of the original Resnet20 model.

[0018] In step 3, the second deep learning model uses the min-max polynomial approximation method to solve the gap problem between linear and nonlinear operations, which specifically includes:

[0019] According to the following formula:

[0020] ,

[0021] Where is a real variable, and the nonlinear part , uses the min-max polynomial generation algorithm for polynomial approximation, which uses the concave-convex discriminant operator :

[0022] ,

[0023] Where is the objective function, is a polynomial;

[0024] The min-max polynomial generation algorithm includes: input: domain , a continuous function f in each interval on D, an approximation parameter , the degree n of the fitting polynomial; wherein represents a real number space; is a union operator, is a real number closed interval; represents a lower bound, represents an upper bound;

[0025] Output: Minimax method approximation of the polynomial p;

[0026] The following steps are performed:

[0027] Step a1, randomly select an initial sampling point sequence strictly increasing; represents the nth+1 sampling point;

[0028] Step a2, for the extremum error parameter E, find the polynomial such that ; i takes values from 1 to n+1;

[0029] Step a3, find all points that satisfy the following conditions: compose the set B from the points;

[0030] Step a4, select points from set B, where represents the nth+1 point, and the sum of the absolute values of the selected points is maximum; the maximum single-point error and the minimum single-point error The calculation formula is:

[0031] ,

[0032] ,

[0033] where represents the maximum value of all values traversed for index i, represents the minimum value of all values traversed for index i;

[0034] Step a5, when the convergence condition is met: , the relative error fluctuation is less than the threshold , it is determined that the approximation effect has stabilized, then the iteration is terminated and the is returned; otherwise, all are replaced by , and step a2 is returned to.

[0035] In step 3, the second deep learning model uses a polynomial algorithm to approximate the sign function to perform polynomial approximation on :

[0036] Input: Parameters A sequence of polynomial degrees ; s is the number of iterations, It is each polynomial The preset number of times;

[0037] Output: A sequence of polynomials satisfy ;in p(x) represents the value when j=0;

[0038] For each j Perform the following operations:

[0039] When j is satisfied When conditions are met, the domain is defined. ;

[0040] Otherwise: Domain For polynomials In the interval The range of values ​​on;

[0041] Generating polynomials Z Where Z represents the minimum-maximum polynomial generation algorithm;

[0042] End the loop; output the polynomial sequence. .

[0043] In step 3, the ReLU activation function in the second deep learning model was improved as follows:

[0044] The input polynomial to the ReLU activation function is a sequence of polynomials generated by an algorithm that produces polynomials that approximate the sign function.

[0045] Input: Ciphertext tensor Fit a series of polynomials of the sign function ; This represents the ciphertext data in the k-th channel of the tensor. These represent the height and width, respectively. This refers to the number of slots configured. Number of channels;

[0046] Output: Activated ciphertext tensor ;

[0047] For each channel index implement:

[0048] Temporary ciphertext variables ;

[0049] For j Perform:

[0050] EvalPoly ;

[0051] wherein EvalPoly denotes computation of a polynomial on ciphertexts;

[0052] ReLU activation implementation wherein @ denotes element-wise multiplication of ciphertexts, and 1 is a constant all-ones ciphertext;

[0053] Returning an output tensor .

[0054] In step 3, in view of the problem of sample data scarcity in fingerprint activity detection, a class feature center representation model is constructed, and a bulldozing distance algorithm is used to construct a high-discriminability measurement space;

[0055] The class feature center representation model establishes a classification decision mechanism based on feature similarity by embedding the class feature of real and fake fingerprints into the measurement space, and specifically includes:

[0056] Calculating class center features: for class m, let the sample set of m be , and the feature extracted from each sample be , then the class center feature of m is : ,

[0057] ,

[0058] wherein represents the qth sample of class m; is the total number of samples of class m; represents a calculation bulldozing distance function, and the bulldozing distance refers to the distance between the sample feature and the class center feature .

[0059] In step 3, in order to improve the generalization performance of the second deep learning model in the cross-sensor scene, an incremental feature optimization learning mechanism is designed, 1 / k (generally taking a value of 3) part of the network is trained in the first stage, 2 / k part is trained in the second stage, and the whole network is finally trained through iteration;

[0060] By feature decoupling and reconstruction strategy (the feature decoupling strategy separates the sensor-specific features and the fake common features in the fingerprint image by introducing a domain discriminant module and an orthogonal constraint; and the feature reconstruction strategy introduces an auto-encoder structure, so that the model maintains the reconstruction ability of the original image structure while extracting discriminant features, thereby enhancing the integrity and stability of feature expression), the sensor-specific features and the fake common features (the sensor-specific features and the fake common features are automatically learned by a deep neural network through feature space division) are separated.

[0061] In step 3, in order to solve the problem of forgetting in the incremental learning process, an improved loss function fusion strategy is proposed: according to the gated recurrent unit (GRU) model, whether forgetting occurs is determined by recording the training data of the Resnet20 model in each round, and by combining the cross-entropy classification loss and the knowledge distillation loss, a dynamic balance optimization objective function is constructed to realize the absorption of new knowledge and the stable maintenance of old knowledge.

[0062] The application further provides an electronic device comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method.

[0063] The application further provides a storage medium storing a computer program or instructions, and when the computer program or instructions are run on a computer, the steps of the method are executed.

[0064] Beneficial effects: the application firstly improves the activation function layer based on the original Resnet20 model by using the min-max polynomial approximation method to improve the classification ability of the neural network, then processes the spatial dimension of the input through layer-by-layer rotation operation, continuously adds and aggregates spatial information, multiplies each pooled tensor with the weight matrix of the full connection layer, and adds the bias to obtain a one-dimensional output vector, which simultaneously realizes the functions of the average pooling layer and the full connection layer, finally designs the Resnet20 deep learning model supporting the CKKS homomorphic encryption scheme, ensures the security in the fingerprint detection process, and effectively improves the detection accuracy. At the same time, the defects of the current model in training and application are considered, the problem of large memory occupation of the model in training is optimized, and the generalization of the model is improved to cope with the diverse detection environment in reality. BRIEF DESCRIPTION OF DRAWINGS

[0065] Figure 1It is a method model diagram of the present application.

[0066] Figure 2 It is a Resnet20 model diagram supporting the CKKS scheme of the present application.

[0067] Figure 3 It is a few sample incremental learning framework.

[0068] Figure 4 It is a GRU model detection framework.

[0069] Figure 5 It is a fingerprint activity detection accuracy comparison diagram of different sensors. DETAILED DESCRIPTION

[0070] The above and / or other aspects of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the accompanying drawings in which:

[0071] The present application provides a fingerprint activity detection method based on CKKS homomorphic encryption, comprising:

[0072] Step 1, a three-party interactive system model composed of a user terminal, a key distribution center and a cloud server is established;

[0073] The user terminal initiates a service request, encrypts the fingerprint image using the public key distributed by the key distribution center KDC (Key Distribution Center), sends the encrypted image to the cloud server, receives and decrypts the encrypted result returned by the cloud server, and finally obtains the plaintext activity detection result;

[0074] The key distribution center generates a public-private key pair for the user terminal and the cloud server, and securely distributes the generated public-private key pair to the user terminal and the cloud server through a secure channel;

[0075] The cloud server performs reasoning on the input encrypted image under the condition of ciphertext, and judges the authenticity;

[0076] The user terminal and the cloud server are registered at the key distribution center, and the key distribution center generates a public-private key pair and transmits it to the user through a secure channel, and generates an authentication certificate, so that the user and the cloud server can verify each other's identity;

[0077] Step 2, after completing the identity verification, the user terminal encrypts the image using the public key, and transmits the ciphertext image to the cloud server through a public channel;

[0078] Step 3, deploying a first deep learning model trained by a plaintext image on the cloud server, and a second deep learning model supporting a homomorphic encryption scheme with the parameters of the first deep learning model as parameters;

[0079] After receiving the ciphertext image, the cloud server uses a second deep learning model to identify the ciphertext image, obtaining a ciphertext result;

[0080] Subsequently, the cloud server transmits the ciphertext result to the user end through a public channel, and the user end uses the private key held to decrypt, finally obtaining the fingerprint activity detection result;

[0081] In step 3, the method designs a Resnet20 model supporting the CKKS scheme on the basis of the original Resnet20, and optimizes the ReLU and Sigmoid activation function protocols and the maximum pooling protocol, as shown in Figure 2 The Resnet20 model supporting the CKKS scheme is designed. The model is composed of a convolutional layer (Conv) for extracting local spatial features of an image, a batch normalization layer (BN) for accelerating training and improving stability, a ReLU activation function layer (ReLU) for introducing nonlinearity and improving the model's expression ability, a boot layer (Boot) unique to the CKKS encryption scheme for refreshing ciphertext noise when the encryption calculation is too deep to ensure the feasibility of continued calculation, an average pooling layer (AP) for dimension reduction and parameter reduction, a fully connected layer (FC) for mapping high-dimensional features to an output space, and a sigmoid activation function layer (Sigmoid) for binary classification output results of living or non-living. A fingerprint image can be identified as living or non-living through this model.

[0082] Figure 2 In the formula, Conv1 represents the first convolutional layer module, Conv2, Conv3 and so on, and Conv2_1 represents the first sub-module in the second convolutional layer module. These sub-modules together constitute the second convolutional layer. Stacking Conv modules can better extract features of a fingerprint.

[0083] The second deep learning model uses the min-max polynomial approximation method to solve the gap problem between linear and nonlinear operations, specifically including:

[0084] According to the following formula:

[0085] ,

[0086] where is a real variable, and the nonlinear part , uses the min-max polynomial generation algorithm for polynomial approximation, and the min-max polynomial generation algorithm uses the concave-convex discriminant operator :

[0087] ,

[0088] where is a target function, is a polynomial;

[0089] The minimum maximum polynomial generation algorithm comprises: input: a domain , a function f continuous in each interval on a D, an approximation parameter , the number n of the fitting polynomial; wherein represents a real number space; is a union operator, is a real number closed interval; represents the lower bound, represents the upper bound;

[0090] Output: the minimum maximum method approximation polynomial p;

[0091] The following steps are performed:

[0092] Step a1, randomly select an initial sampling point sequence strictly increasing; represents the nth+1 sampling point;

[0093] Step a2, for the extreme value error parameter E, find the polynomial such that ; i takes values from 1 to n+1;

[0094] Step a3, find all points that satisfy the following conditions: , the points form a set B;

[0095] Step a4, select points from set B, wherein represents the nth+1 point, and the sum of the absolute values of the selected points is maximum; the maximum single point error and the minimum single point error are calculated as follows:

[0096] ;

[0097] ;

[0098] represents the maximum value of all values traversed for index i, represents the minimum value of all values traversed for index i;

[0099] Step a5, when the convergence condition is met: , the relative error fluctuation is less than a threshold , it is determined that the approximation effect has stabilized, then the iteration is terminated and the result is returned Otherwise, all of them Replace with Return to step a2.

[0100] The second deep learning model uses a polynomial algorithm to generate an approximation of the sign function. Perform polynomial approximation:

[0101] Input: Parameters In this method The polynomial degree sequence is 7, 15, 27. A set of polynomial degree sequences. ; s is the number of iterations, It is each polynomial The preset number of times;

[0102] Output: A sequence of polynomials satisfy ;in p(x) represents the value when j=0;

[0103] For each j Perform the following operations:

[0104] When j is satisfied When conditions are met, the domain is defined. ;

[0105] Otherwise: Domain For polynomials In the interval The range of values ​​on;

[0106] Generating polynomials Z Where Z represents the minimum-maximum polynomial generation algorithm;

[0107] End the loop; output the polynomial sequence. .

[0108] In the second deep learning model, the ReLU activation function was improved as follows:

[0109] The input polynomial to the ReLU activation function is a sequence of polynomials generated by an algorithm that produces polynomials that approximate the sign function.

[0110] Input: Ciphertext tensor Fit a series of polynomials of the sign function ; This represents the ciphertext data in the k-th channel of the tensor. These represent the height and width, respectively. This refers to the number of slots configured. Number of channels;

[0111] Output: activated ciphertext tensor ;

[0112] For each channel index Execute:

[0113] Temporary ciphertext variable ;

[0114] For j Execute:

[0115] EvalPoly ;

[0116] Where EvalPoly represents calculating a polynomial on ciphertexts;

[0117] ReLU activation implementation Where @ represents ciphertext element-wise multiplication, and 1 is a full-1 ciphertext constant;

[0118] Return the output tensor .

[0119] In step 3, first, in view of the problem of sample data scarcity in fingerprint activity detection, a class feature center representation model is constructed, and a bulldozing distance algorithm is used to construct a high-discriminatory measurement space.

[0120] The class feature center representation model establishes a classification decision mechanism based on feature similarity by embedding the true and false fingerprint class features in the space, effectively reduces the dependence of the model on the scale of training data, and realizes high-precision activity detection under the condition of small sample. Class center feature calculation:

[0121] For class m, let the sample set of m be , and the feature extracted from each sample be , then the class center feature is:

[0122] ,

[0123] ,

[0124] Where represents the qth sample of class m; is the total number of samples of class m; represents calculating the bulldozing distance function, and the bulldozing distance is the distance between the sample feature and the class center feature .

[0125] To improve the generalization performance of the model in the cross-sensor scene, the invention designs an incremental feature optimization learning mechanism such asFigure 3 As shown in the initial stage, only 1 / 3 of the network parameters are activated, the model structure is kept simple, and only basic living fingerprint features are learned; in the incremental expansion stage, the residual structure is gradually introduced, 2 / 3 of the parameters are activated, and finally all connections are fully trained, and the task loss is combined to determine whether the model needs to be optimized. In the learning mechanism mentioned above, the minimum maximum polynomial approximation method replaces the original ReLu function, and the average pooling layer replaces the maximum pooling layer, realizing the model training supporting the CKKS homomorphic encryption algorithm. Through the feature decoupling and reconstruction strategy, the sensor-specific features and the common features of the fake are separated, and the effective extraction of the cross-sensor domain invariant features is realized. The method can adaptively eliminate the feature distribution difference between different sensors, and significantly improve the detection generalization of the model in the unknown sensor environment.

[0126] Finally, an improved loss function fusion strategy is proposed to solve the problem of catastrophic forgetting in the incremental learning process. According to the formula Figure 4 As shown in the gating recurrent unit GRU model, first, the collected fingerprint training data is segmented, 80% is used as the training set, and 20% is used as the test set, and batch incremental training is performed. In this process, GRU extracts the time sequence features, records the training data of each round of Resnet20 model, and when the incremental training is completed, the test set is used to test the Resnet20 model to supervise whether the Resnet20 model forgets the original knowledge.

[0127] By combining the cross-entropy classification loss and the knowledge distillation loss, a dynamic balance optimization objective function is constructed to realize the efficient absorption of new knowledge and the stable maintenance of old knowledge. This mechanism ensures that the model continuously optimizes the detection performance during the incremental update process, while maintaining the integrity of the memory of the learned sensor features.

[0128] The technical scheme of the present application solves the problem of model overfitting in the small sample scene and improves the generalization performance of cross-sensor detection by the synergistic innovation of the small sample learning framework and the incremental optimization mechanism, which provides a reliable solution for the practical application of the fingerprint living body detection technology.

[0129] The analysis experiment results of the present embodiment are as follows Figure 5As shown, the accuracy of the activity detection of the fingerprint collected by the Orcathus sensor in the plaintext state is obviously improved compared with the fingerprints collected by the GreenBit and DigitalPersona sensors, which may be due to the higher clarity and higher quality of the details of the fingerprint collected by the Orcathus sensor, so the result of the activity classification is more accurate. The GreenBit and DigitalPersona sensor plaintext classification results are not much different, but both achieve an accuracy rate of more than 96%, which has practical significance. The overall trend of the accuracy rate of the fingerprint activity detection in the ciphertext state is roughly the same as that in the plaintext state, and due to the error caused by homomorphic encryption and homomorphic operation, the accuracy rate is slightly lower than that of the plaintext detection rate, with an average of 2.24% lower, which is within an acceptable range. Combining the plaintext and ciphertext fingerprint activity detection accuracy rates of the three sensors, it can be calculated that the average plaintext activity detection accuracy rate is 97.39%, and the average ciphertext activity detection accuracy rate is 95.15%, which is a high result.

[0130] It can be seen that the accuracy rate of the model is significantly improved in both plaintext and ciphertext, which can further promote the field of fingerprint activity detection, has privacy protection characteristics, and has high practical value.

[0131] In one specific embodiment of the application, the fingerprint image is first compressed in proportion to reduce memory consumption, and then input into the model. The next steps are as follows:

[0132] 1. Extract image features in the convolution layer, add slot structure parameters in the ciphertext tensor, and count the number of cross-step convolution.

[0133] 2. Call the model parameters trained in plaintext, represents the kth feature value, represents the normalized feature value, and Var is the variance operation, which normalizes the tensor data: ,

[0134] 3. Perform polynomial approximation on The parameters are selected as follows: The polynomial degree sequence is 7, 15, and 27. Replace the original ReLU function with the minimum maximum polynomial approximation method to obtain the activated ciphertext tensor.

[0135] 4. In the process of alternately executing the convolution layer and the activation function layer, automatically perform bootstrap operation according to the noise growth.

[0136] 5、The average pooling layer performs an average pooling operation on the input tensor data, and retains the key information of the image. The full connection layer multiplies the input tensor by the weight of the full connection layer and adds the bias. As shown in Table 1, after the last convolutional layer, the proposed network enters the last average pooling layer and the full connection layer. The input channel number and the output channel number of the average pooling layer are all assigned as sixty-four, and the output channel number of the full connection layer is assigned as one, corresponding to the output of one bit of the binary classification problem, so the output of the full connection layer in the method is a ciphertext, that is .

[0137] 6、The input shape of the sigmoid activation function layer is one ciphertext. As the last layer of the proposed network, the sigmoid activation function layer can map the input value to the interval , and the closer the obtained value is to 1, the higher the confidence of the fingerprint being judged as a live body.

[0138] Table 1 Network convolutional layer and channel number parameter table

[0139]

[0140] Table 2 Experimental result table

[0141]

[0142] The Resnet20 residual neural network constructed by the method is used to train the fingerprint data set, and the classification accuracy is tested. The experiment is tested by the sensor for collecting fingerprints, and the three sensors DigitalPersona, Greenbit and Orcathus in the LivDet2019 data set are trained and tested respectively. The experimental results are shown in Table 2. The clear text test accuracy of the DigitalPersona sensor is 96.21%, and the ciphertext test accuracy is 94.07%; the clear text test accuracy of the GreenBit sensor is 96.44%, and the ciphertext test accuracy is 94.04%; the test accuracy of the Orcathus sensor is 99.52%, and the ciphertext test accuracy is 97.35%.

[0143] In the experiment, the LivDet 2019 data set, the MINST data set and the CIFAR-10 data set are used respectively, and three different sensors DigitalPersona, Greenbit and Orcathus are used in the LivDet 2019 data set. At the same time, the method is compared with the work of Lee et al. Through the comparison and analysis of these experimental results, it can be verified that the method proposed in the method can effectively perform the fingerprint activity detection and classification task while ensuring the data security, which embodies the high efficiency and practicability of the method.

[0144] The application provides a fingerprint activity detection method based on CKKS homomorphic encryption. The method and approach for specifically implementing the technical solution are various. The above description is only the preferred embodiment of the application. It should be pointed out that, for ordinary skilled persons in the technical field, some improvements and refinements can be made without departing from the principle of the application. These improvements and refinements should also be regarded as the protection scope of the application. The components not explicitly described in the embodiment can be implemented by using the existing technology.

Claims

1. A method for detecting fingerprint activity based on CKKS homomorphic encryption, characterized in that, The method comprises the following steps: Step 1, a three-party interaction system model composed of a user terminal, a key distribution center and a cloud server is established; The user terminal initiates a service request, encrypts a fingerprint image using a public key distributed by the key distribution center KDC, sends the encrypted image to the cloud server, receives and decrypts the encrypted result returned by the cloud server, and finally obtains the plaintext activity detection result; The key distribution center generates a public-private key pair for the user terminal and the cloud server, and securely distributes the generated public-private key pair to the user terminal and the cloud server through a secure channel; The cloud server performs reasoning on the input encrypted image under the condition of ciphertext, and judges the authenticity; The user terminal and the cloud server are registered at the key distribution center, and a public-private key pair is generated by the key distribution center and transmitted to the user through a secure channel, and an authentication certificate is generated, so that the user and the cloud server can verify each other's identity; Step 2, after completing the identity verification, the user terminal encrypts the image using the public key and transmits the ciphertext image to the cloud server through a public channel; Step 3, a first deep learning model trained by a plaintext image is deployed on the cloud server, and a second deep learning model supporting a homomorphic encryption scheme is also deployed on the cloud server; the parameters in the second deep learning model are the same as those in the first deep learning model; After receiving the ciphertext image, the cloud server uses the second deep learning model to identify the ciphertext image and obtains a ciphertext result; Then, the cloud server transmits the ciphertext result to the user terminal through a public channel, and the user terminal decrypts it using the private key held by the user terminal, and finally obtains the fingerprint activity detection result; In step 3, the second deep learning model is a Resnet20 model supporting the CKKS scheme, and the ReLU and Sigmoid activation function protocols and the maximum pooling protocol of the original Resnet20 model are optimized; In step 3, the second deep learning model uses the minimum-maximum polynomial approximation method to solve the gap problem between linear and nonlinear operations, which specifically includes: According to the following formula: where x is a real variable, the non-linear part The sign(x) is approximated by a polynomial using the min-max polynomial generation algorithm which uses the concavity-convexity discriminator μ p,f (x): Where f(x) is the target function and p(x) is a polynomial; The minimum maximum polynomial generation algorithm includes: input: domain A continuous function f in each interval on D, an approximation parameter δ, the number of fitting polynomials n; wherein Indicates a real number space; Is a union operator, [a i ,b i ] is a real closed interval; a i Indicates the lower limit, b i Indicates the upper limit; Output: the polynomial p that approximates f; The following steps are performed: Step a1, randomly select initial sample point sequence x1, x2, …, x n+1 strictly increasing; x n+1 denotes the n+1th sample point; Step a2. For the extremum error parameter E, find the polynomial p(x) such that p(x i ) = f(x i ) - (-1) i E; i takes values from 1 to n+1; Step a3, find all points that satisfy the following condition: μ p,f (x) (p(x) - f(x)) ≥ |E|, and form a set B from the points. Step a4, selecting n+1 points y1 < y2 < … < yn+1 in set B n+1 where y n+1 represents the n+1th point, and the sum of absolute values of the selected n+1 points is maximum; the maximum single-point error ∈ max and the minimum single-point error ∈ min The calculation formula is: ∈ max = max i |p(y i )-f(y i )|, ∈ min = min i |p(y i )-f(y i )|, max i represents the maximum value taken over all values of index i traversed, min i represents the minimum value taken over all values of index i traversed; Step a5, when the convergence condition is satisfied: The relative error fluctuation is less than a threshold 10 -3 The approximation effect is stable, then terminate the iteration and return p(x); otherwise, replace all x i with y i , and go back to step a2.

2. The method of claim 1, wherein, In step 3, the second deep learning model uses a polynomial approximation algorithm to generate a polynomial that approximates the sign function to approximate sign(x): Input: a parameter a, a set of polynomial degree sequences {d j} 0≤j≤s-1 ; s is the number of iterations, d j is a preset degree set of each polynomial p j ​ Output: a set of polynomial sequences {p j} 0≤j≤s-1 satisfies p s-1 (x),..., p0(x) = sign(x); where p0(x) denotes p(x) for j = 0; For each j∈{0,1,...,s-1}, perform the following operations: When the condition j = 0 is satisfied, the domain D0= [-1,-2 -α ]∪[2 -α ,1]; Otherwise: the domain D j is the polynomial p {j-1} on the interval D j-1 the range of values; Generating polynomial p j = Z(D j , sign, 1000, d j ); where Z denotes the minimal max- polynomial generating algorithm; End the loop; The output polynomial sequence {p j} 0≤j≤s-1 .

3. The method of claim 2, wherein, In step 3, the second deep learning model improves the ReLU activation function as follows: The column of polynomials input to the ReLU activation function is a polynomial sequence generated by the polynomial approximation algorithm that generates a polynomial that approximates the sign function; Input: ciphertext tensor Tensorct = ({ct k} 0≤k≤c-1 ,h,w,slotstr,c), a column of polynomials {p j} 0≤j≤s-1 ; ct k represents the ciphertext data of the kth channel in the tensor, h and w represent the height and width respectively, slotstr is the number of slots configured, and c is the number of channels. Output: the activated ciphertext tensor Tensorct'; For each channel index k∈{0,1,...,c-1}, perform: Temporary ciphertext variable ct' k = ct k ; For j∈{0,1,...,s-1}, perform: ct' k = EvalPoly(ct' k , p j ); Where EvalPoly represents calculating a polynomial on ciphertext; ReLU activation implements ct' k = (0.5 @ ct k ) * (1 + ct' k ), where @ denotes element-wise multiplication of ciphertexts, and 1 is an all-ones ciphertext constant; Return the output tensor Tensor ct' = ({ct' k} 0≤k≤c-1 , h, w, slots tr, c).

4. The method of claim 3, wherein, In step 3, to solve the problem of sample data scarcity in fingerprint activity detection, a class feature center representation model is constructed, and a bulldozing distance algorithm is used to construct a high-discriminability metric space; The class feature center representation model establishes a classification decision mechanism based on feature similarity by embedding the authenticity fingerprint class features into the metric space, and specifically comprises: Computing class center feature: for class m, let the sample set of m be X m = {x1, x2,... x q}, and the feature extracted from each sample be f(x q ), then the class center feature pmis: d(f(x),pm) = ||f(x)-pm||2, where x q represents the qth sample of the category m; n m is the total number of samples of the category m; d(f(x), pm) represents a calculation of the push map distance function, and the push distance refers to the distance between the sample feature f(x) and the category center feature pm.

5. The method of claim 4, wherein, In step 3, an incremental feature optimization learning mechanism is designed, and 1 / k of the network is trained in the first stage, and 2 / k of the network is trained in the second stage, and the whole network is finally trained through iteration. Through the feature decoupling and reconstruction strategy, the sensor-specific features and the fake common features are separated, and the effective extraction of the cross-sensor domain invariant features is realized.

6. The method of claim 5, wherein, In step 3, an improved loss function fusion strategy is proposed to solve the forgetting problem in the incremental learning process: according to the gated recurrent unit (GRU) model, whether forgetting occurs is determined by recording the training data of the Resnet20 model in each round, and through the dual constraints of the cross-entropy classification loss and the knowledge distillation loss, a dynamic balance optimization objective function is constructed to realize the absorption of new knowledge and the stable maintenance of old knowledge.

7. An electronic device, comprising: The processor and the memory are included, and the memory stores program codes, which, when executed by the processor, cause the processor to execute the steps of the method according to any one of claims 1 to 6.

8. A storage medium, characterized by The computer program or instructions are stored, and when the computer program or instructions are run on the computer, the steps of the method according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Multi-party privacy protection machine learning method based on homomorphic encryption and trusted hardware

    CN113553610A

  • CKKS-based ciphertext neural network construction method and system

    CN117195972A