Federal learning-based identity authentication method and device, medium and program product
Through the federated learning identity authentication method, training data sets and models are built locally, selective encrypted transmission and differential privacy protection are carried out, solving the problems of user privacy leakage and insufficient security in the centralized solution, and achieving high security and high accuracy identity authentication.
Patent Information
- Application Number
- CN202510583680.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-12
AI Technical Summary
The existing centralized identity authentication scheme has the problems of user privacy leakage risks and insufficient security, especially during data upload and model training, user data is easily stolen and models are easily targeted.
The identity authentication method based on federated learning is adopted to build training data sets and models locally, perform selective encryption transmission, use homomorphic encryption aggregation and differential privacy protection technology, combined with bit-by-bit scrambling processing, and generate global model parameter sets, and authenticate through real-time feature matching.
It enhances security during data transmission, reduces the risk of privacy leakage, improves the generalization ability of the model and the accuracy and reliability of identity authentication, reduces the risk of data leakage, and enhances user trust.
Smart Images

Figure CN120474679A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of privacy protection technology, and in particular to an identity authentication method, device, medium, and program product based on federated learning. Background Art
[0002] Identity authentication is a core technology in network security. With the development of distributed systems and artificial intelligence, traditional static authentication methods are no longer able to meet the security requirements of modern network environments. Common authentication technologies include passwords and biometrics. The former is simple to implement but vulnerable to brute force and social engineering attacks, while the latter offers high security but carries the risk of privacy breaches.
[0003] Some dynamic authentication technologies incorporate machine learning, collecting user behavior data to train models on a central server and determining identity based on behavioral patterns. However, this centralized solution has significant drawbacks. Users are required to upload their behavior data to the server, which poses a serious risk of privacy leakage. Moreover, the central server is easily targeted by attacks. Once compromised, all user data will be exposed. In addition, the model training process may also cause the leakage of sensitive user information. Summary of the Invention
[0004] In view of this, the embodiments of the present disclosure provide an identity authentication method, device, medium and program product based on federated learning, which can complete the identity authentication of each client user under the premise of protecting the privacy of each data in the federated learning process.
[0005] In a first aspect, the embodiments of the present disclosure provide an identity authentication method based on federated learning, which adopts the following technical solutions:
[0006] Obtaining original behavior data of local users, and building a local training data set based on the original behavior data;
[0007] Building a local model, training the local model based on the local training data set, and obtaining a local model parameter set;
[0008] Selectively encrypting and transmitting the local model parameter set to generate an encrypted parameter package;
[0009] Aggregate the encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set;
[0010] Performing differential privacy protection on the aggregated encryption parameter set to obtain a confidential parameter set;
[0011] Performing bit-by-bit scrambling on the confidentiality parameter set to obtain a global model parameter set;
[0012] Collecting real-time behavior data of users, and obtaining a real-time feature vector set based on the real-time behavior data;
[0013] Feature matching is performed on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user, and based on the trust score and a preset score threshold, an identity authentication result for each client user is obtained.
[0014] Optionally, obtaining original behavior data of local users and constructing a local training data set based on the original behavior data includes:
[0015] Collect original behavior data of local users and build original data sets;
[0016] Preprocessing the original data set to obtain a feature vector set;
[0017] constructing random noise for each eigenvector in the eigenvector set using a Laplace mechanism, and adding the random noise to the eigenvector;
[0018] Format the feature vector with added noise to obtain the local training dataset.
[0019] Optionally, the training the local model based on the local training data set to obtain a local model parameter set includes:
[0020] Initialize the local model and configure the Adam optimizer, as well as set the batch size based on the local device memory;
[0021] Divide the local training data set into a training set and a validation set, extract preset scale data from the training set, and initialize the current round to 0;
[0022] Extracting data from the preset scale data according to the batch size, training the initialized local model based on the extracted data, and obtaining the gradient of the model parameters;
[0023] Use the Adam optimizer to update the model parameters according to the calculated gradient;
[0024] Evaluate the current local model using the validation set, obtain multiple evaluation values and validation set losses, and increase the current round by 1;
[0025] When the validation set loss decreases in N consecutive rounds and the decrease is greater than a preset decrease threshold, the preset scale data is updated and the current local model is continued to be trained according to the new preset scale data;
[0026] When each of the evaluation values meets the corresponding evaluation threshold, the training is stopped, the parameters of the current local model are obtained and a local model parameter set is formed.
[0027] Optionally, the selectively encrypting and transmitting the local model parameter set to generate an encrypted parameter package includes:
[0028] performing an importance analysis on the local model parameter set to obtain a comprehensive contribution of each parameter in the local model parameter set to the local model, and dividing the local model parameter set into a key parameter set and a non-key parameter set based on the comprehensive contribution;
[0029] A master key pair is regularly generated by a third-party organization, and the third-party organization and the client generate a temporary session key for key parameter encryption based on a key exchange protocol;
[0030] The third party encrypts the temporary session key using the public key in the master key pair to obtain an encrypted session key, and sends the encrypted session key generated by the third party and the private key in the master key pair to the client;
[0031] Obtaining a decrypted temporary session key based on the received private key and the encrypted session key, performing block encryption on the key parameter set based on the decrypted temporary session key, and generating encrypted data blocks in real time;
[0032] deriving a session key based on the received private key, and generating an encryption key based on the session key and a shared key derivation function;
[0033] Using a stream cipher algorithm, selectively encrypting the non-critical parameter set based on the encryption key to generate encryption parameters in real time;
[0034] The generated encrypted data block and encryption parameters are compressed to generate an encryption parameter package.
[0035] Optionally, performing homomorphic encryption aggregation on the encryption parameter packages of multiple clients to generate an aggregated encryption parameter set includes:
[0036] Receive the encrypted parameter package sent by each client, perform integrity verification on the encrypted parameter package, and obtain a valid parameter set;
[0037] Aggregation and homomorphic encryption operations are performed on the valid parameter set to output an aggregated encryption parameter set.
[0038] Optionally, performing differential privacy protection on the aggregated encryption parameter set to obtain a confidentiality parameter set includes:
[0039] Obtaining the local sensitivity and global sensitivity of each parameter in the aggregated encryption parameter set;
[0040] Based on the local sensitivity and the global sensitivity, construct a parameter sensitivity graph, where each node in the parameter sensitivity graph represents a parameter in the aggregated encryption parameter set, and the edges in the parameter sensitivity graph represent the association between nodes;
[0041] Dividing the parameters represented by each node in the parameter sensitivity graph into a plurality of parameter groups based on the correlation degree;
[0042] Allocating a privacy budget to each parameter group using a proportional allocation method;
[0043] Noise is injected into each of the parameter groups based on the privacy budget, and the parameter groups into which noise is successfully injected are combined into a confidential parameter set.
[0044] Optionally, performing feature matching on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user includes:
[0045] Performing feature matching on the global model parameter set and the real-time feature vector set to obtain a matching score for each client user;
[0046] Based on the scoring model and the matching score, a trust score for each client user is obtained.
[0047] In a second aspect, the present disclosure also provides an identity authentication system based on federated learning, which adopts the following technical solutions:
[0048] A construction module is used to obtain original behavior data of local users and construct a local training data set based on the original behavior data;
[0049] A training module is used to build a local model, train the local model based on the local training data set, and obtain a local model parameter set;
[0050] A transmission module, configured to selectively encrypt and transmit the local model parameter set to generate an encrypted parameter package;
[0051] Aggregation module, used to aggregate the encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set;
[0052] A protection module, configured to perform differential privacy protection on the aggregated encryption parameter set to obtain a confidentiality parameter set;
[0053] A scrambling module, configured to perform bit-by-bit scrambling on the confidentiality parameter set to obtain a global model parameter set;
[0054] A collection module, configured to collect real-time behavior data of users and obtain a real-time feature vector set based on the real-time behavior data;
[0055] The authentication module is used to perform feature matching on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user, and obtain an identity authentication result for each client user based on the trust score and a preset score threshold.
[0056] In a third aspect, the embodiments of the present disclosure further provide a computer device that adopts the following technical solution:
[0057] The computer device comprises:
[0058] at least one processor; and,
[0059] a memory communicatively connected to the at least one processor; wherein,
[0060] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the above-mentioned federated learning-based identity authentication methods.
[0061] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned federated learning-based identity authentication methods.
[0062] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above methods when executed by a processor.
[0063] The federated learning-based identity authentication method provided by the disclosed embodiments acquires and constructs a training dataset locally, then performs model training locally without uploading the original data. Through selective encryption, only the encrypted model parameters are transmitted, rather than the original behavioral data. Even if the data is intercepted during transmission, attackers cannot obtain valuable user privacy information. This enhances data security during transmission, reduces the possibility of data leakage during transmission, and addresses the potential theft of data during transmission in centralized solutions. Homomorphic encryption aggregation allows parameter packages from multiple clients to be aggregated in an encrypted state without decrypting them, thus avoiding potential privacy leaks during the data aggregation phase. It also fully utilizes data from multiple clients to optimize the model, improving its generalization capabilities and addressing the security risks associated with centralized data aggregation in centralized solutions. Differential privacy protection technology protects data privacy by adding noise to the data. By performing differential privacy protection on the aggregated encrypted parameter set, it further enhances data privacy, making it difficult for attackers to infer sensitive information about individual users from the final confidential parameter set. Even if an attacker obtains the confidential parameter set, they cannot accurately restore each user's original data. Bit-by-bit scrambling increases the complexity and randomness of the data, further protecting the privacy of the confidential parameter set. Even if the scrambled global model parameter set is leaked, it is difficult for an attacker to extract meaningful information. This approach provides additional security for the data, reduces the risk of data leakage, and improves the security of the entire system. Real-time collection of user behavior data and the generation of feature vectors provide a timely reflection of the user's current behavior. Compared to static authentication, this dynamic authentication method can authenticate based on real-time user behavior, improving accuracy and timeliness. Identity authentication through feature matching and trust scoring comprehensively considers a user's historical and real-time behavior, improving accuracy and reliability. Compared to traditional single-factor authentication, this multi-factor authentication method is more secure. Furthermore, because data privacy is fully protected throughout the process, users can use this authentication method with greater confidence, addressing the low user trust level associated with existing centralized solutions due to data security issues.
[0064] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0066] Figure 1 A flowchart of an identity authentication method based on federated learning provided in an embodiment of the present disclosure;
[0067] Figure 2 A flowchart of a method for constructing a local training dataset provided in an embodiment of the present disclosure;
[0068] Figure 3 A flowchart of a local training method provided in an embodiment of the present disclosure;
[0069] Figure 4 A flowchart of a selective encryption transmission method provided by an embodiment of the present disclosure;
[0070] Figure 5 A schematic diagram of the process of the homomorphic encryption aggregation method provided in an embodiment of the present disclosure;
[0071] Figure 6 A flowchart of a differential privacy protection method provided in an embodiment of the present disclosure;
[0072] Figure 7 A flowchart of a bit-by-bit scrambling processing method provided in an embodiment of the present disclosure;
[0073] Figure 8 A schematic diagram of a flow chart of a feature matching method provided in an embodiment of the present disclosure;
[0074] Figure 9 A block diagram of the principle of the identity authentication system based on federated learning provided in an embodiment of the present disclosure;
[0075] Figure 10 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0076] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0077] It should be clear that the following embodiments of the present disclosure are described through specific concrete examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0078] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on this disclosure, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0079] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The illustrations only show components related to the present disclosure and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0080] Additionally, in the following description, specific details are provided to provide a thorough understanding of the examples. However, one skilled in the art will appreciate that the aspects described can be practiced without these specific details.
[0081] Reference Figure 1 The present disclosure provides an identity authentication method based on federated learning, comprising the following steps:
[0082] S1: Obtain the original behavior data of local users and build a local training dataset based on the original behavior data;
[0083] S2: Build a local model, train the local model based on the local training dataset, and obtain the local model parameter set;
[0084] S3: Selectively encrypt and transmit the local model parameter set to generate an encrypted parameter package;
[0085] S4: Aggregate the encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set;
[0086] S5: Perform differential privacy protection on the aggregated encryption parameter set to obtain a confidential parameter set;
[0087] S6: Scramble the confidential parameter set bit by bit to obtain the global model parameter set;
[0088] S7: Collect the user's real-time behavior data and obtain a real-time feature vector set based on the real-time behavior data;
[0089] S8: Perform feature matching on the global model parameter set and the real-time feature vector set to obtain the trust score of each client user, and obtain the identity authentication result of each client user based on the trust score and the preset score threshold.
[0090] The identity authentication method based on federated learning provided by the present disclosure obtains and constructs a training data set locally, and then performs model training locally without uploading the original data. Through selective encryption transmission, only the encrypted model parameters are transmitted instead of the original behavioral data. Even if the data is intercepted during transmission, the attacker cannot obtain valuable user privacy information, which enhances the security of the data during transmission, reduces the possibility of data leakage during the transmission stage, and makes up for the defect that the data may be stolen during transmission in the centralized solution.
[0091] Homomorphic encryption aggregation allows aggregation operations on parameter packages of multiple clients in an encrypted state without decrypting them, avoiding potential privacy leaks during the data aggregation phase. At the same time, it can fully utilize the data of multiple clients to optimize the model, improve the generalization ability of the model, and solve the security risks brought about by centralized data aggregation in centralized solutions.
[0092] Differential privacy protection technology protects the privacy of data by adding noise to the data. It performs differential privacy protection based on the aggregated encryption parameter set, further enhancing the privacy of the data and making it difficult for attackers to infer the sensitive information of a single user from the final confidentiality parameter set. Even if the attacker obtains the confidentiality parameter set, he cannot accurately restore the original data of each user.
[0093] The bit-by-bit scrambling process increases the complexity and randomness of the data, further protecting the privacy of the confidential parameter set. Even if the global model parameter set is leaked after scrambling, it is difficult for attackers to obtain meaningful information from it. This processing method provides additional security for the data, reduces the risk of data leakage, and improves the security of the entire system.
[0094] By collecting user behavior data in real time and obtaining feature vectors, we can promptly reflect the user's current behavior status. Compared with static authentication methods, this dynamic authentication method can authenticate the user's identity based on their real-time behavior, improving the accuracy and timeliness of authentication.
[0095] Identity authentication through feature matching and trust scoring comprehensively considers a user's historical and real-time behavior, improving its accuracy and reliability. Compared to traditional single-factor authentication methods, this multi-factor authentication approach is more secure. Furthermore, because data privacy is fully protected throughout the entire process, users can use this authentication method with greater confidence, resolving the issue of low user trust caused by data security issues in existing centralized solutions.
[0096] In S1, refer to Figure 2 The flowchart of the local training dataset construction method shown in the figure "Obtaining the original behavior data of local users and constructing a local training dataset based on the original behavior data" includes the following steps:
[0097] S11: Collect the original behavior data of local users and build the original dataset;
[0098] S12: Preprocess the original data set to obtain a feature vector set;
[0099] S13: Use the Laplace mechanism to construct random noise for each eigenvector in the eigenvector set, and add the random noise to the eigenvector;
[0100] S14: Format the feature vector with added noise to obtain a local training data set.
[0101] In S11, raw behavioral data refers to the behavioral data accumulated by the local user over a period of time collected by the client when the system is first started for large-scale data initialization training, as well as the current behavioral data of the user accumulated in the subsequent continuous advancement of federated learning. The raw behavioral data includes keyboard input features, mouse movement features, and operation timing features. Among them, keyboard input features refer to the behavioral data generated by the local user by operating the keyboard. Keyboard input features include key duration, key interval time, key pressure, etc.; mouse movement features refer to the behavioral data generated by the local user by operating the mouse. Mouse movement features include movement trajectory coordinate sequence, speed, acceleration, etc.; operation timing features refer to the behavioral data of the local user in terms of time sequence and time interval during a series of operations. These data reflect the rhythm and pattern of the local user's operations. Operation timing features include command execution order, operation interval, etc. These data are collected in real time by the client's sensors and monitoring programs and stored according to a unified data structure to form the raw data set.
[0102] In S12, preprocessing includes data cleaning, data dimensionality reduction, and feature extraction. Data cleaning includes outlier marking, noise elimination, and random perturbation filtering. Outlier marking uses a box plot method to identify outliers of numerical features. A box plot is a statistical chart used to display data distribution. It is based on the quartiles of the data. The quartiles divide the original data set into four equal parts. Q1 is the first quartile (lower quartile), indicating that 25% of the data is less than this value; Q3 is the third quartile (upper quartile), indicating that 75% of the data is less than this value; IQR is the interquartile range, that is, IQR = Q3-Q1, which measures the distribution range of the middle 50% of the data. The upper and lower thresholds are obtained through the first quartile, third quartile, and interquartile range, and data points that exceed the upper threshold or are less than the lower threshold are marked.
[0103] The calculation formula for the upper threshold is as follows:
[0104] U=Q3+1.5IQR;
[0105] Among them, U is the upper threshold.
[0106] The calculation formula for the lower threshold is as follows:
[0107] L = Q1-1.5IQR;
[0108] Where L is the lower threshold.
[0109] Denoising refers to using a moving average filter to remove high-frequency noise from the original dataset, while filtering out random disturbances refers to using a Kalman filter to process random disturbances in the operational time series data within the original dataset. This preprocessing method cleans the original dataset, improving its quality and reliability.
[0110] Feature extraction involves extracting valid features from the cleaned raw dataset to form a valid feature set. This includes extracting keystroke dynamics, such as flight time and dwell time, from keyboard input features, extracting trajectory features from keyboard input features using Fourier descriptors, and extracting statistical and frequency domain features from the time series features of the raw dataset. Data dimensionality reduction involves using the principal component analysis (PCA) algorithm to reduce the dimensionality of the features in the valid feature set, resulting in a compact set of feature vectors.
[0111] In S13, the Laplace mechanism is used to calculate the sensitivity Δf of each eigenvector in the eigenvector set. Based on the preset privacy budget ε, random noise (also known as a random number) that conforms to the Laplace distribution Lap(Δf / ε) is generated for each eigenvector. The random noise is added to each element of the eigenvector one by one to complete the noise addition, thereby achieving differential privacy protection. This ensures that even if an attacker obtains the data of all other users, he cannot accurately infer the true data of the target user.
[0112] In S14, formatting includes normalization, one-hot encoding, sampling and padding, labeling, metadata definition and data integration. Among them, normalization means that if the feature vector with noise is a numerical feature, the numerical feature is normalized using the Min-Max or Z-score standardization method to scale it to a preset numerical range; one-hot encoding means that if the feature vector with noise is a categorical feature, it is converted into a binary vector, each category corresponds to a binary bit, only the bit corresponding to the category is 1, and the rest are 0; sampling and padding means that if the feature vector with noise is a time series feature, it is subjected to fixed-length sampling and padding operations. This is because time series features usually have different lengths, and sampling and padding are performed to ensure that the length of each sample is consistent; labeling means assigning corresponding labels to each feature vector based on specific business needs and the nature of the feature vector set; metadata definition refers to the process of describing and standardizing the overall information and feature information of the feature vector set in detail. Meta information includes the description of the feature vector set, the meaning of the features, the description of the labels, etc. A dictionary or other data structure can be used to store the metadata. Data integration is the process of merging labeled feature vectors and defined metadata to form a standardized local training dataset, which is saved as a JSON file.
[0113] Through the above processing of raw behavior data, each client converts the original local user behavior data into a local training dataset that is both privacy-protecting and suitable for machine learning, laying the foundation for subsequent federated learning and ensuring a balance between data availability and security.
[0114] In S2, each client builds its own local model. The local model is a neural network architecture whose design is based on the feature dimensions of the local training dataset. It uses a multi-layer perceptron (MLP) as the basic architecture, and the number of input layer nodes matches the feature dimensions.
[0115] The local model consists of an input layer, a three-layer hidden layer structure, and an output layer. The input layer is the starting part of the model to receive data. Its design is based on the characteristic dimensions of the local training dataset. Its main function is to receive data and pass it to the subsequent hidden layer. The three-layer hidden layer structure refers to the use of three hidden layers, with 256, 128, and 64 neurons in each layer, respectively. Nonlinear transformations are introduced through the ReLU activation function to enhance the expressive power of the model. At the same time, a Dropout layer is added after each hidden layer to prevent overfitting of the model. The output layer is designed according to the binary classification requirements of identity authentication, and the Sigmoid function is used to convert the output into authentication probability.
[0116] The following are the details of each layer structure: The input of the input layer is the local training dataset. Assuming that the feature dimension of the local training dataset is n, the input is a vector x = (x1, x2, ..., x n ), the output is a feature vector x of length n, which serves as the input of the first hidden layer.
[0117] The first hidden layer multiplies the input feature vector x by a 256xn weight matrix W1 and adds a 256-length bias vector b1, resulting in the intermediate result z1 = W1x + b1. The ReLU function is applied to each element in z1, resulting in the activated result a1 = ReLU(z1). With a probability of 0.3, some elements in a1 are randomly set to 0, resulting in the dropout vector a′1. This step is intended to prevent overfitting and make the model more robust. The length of the vector a′1 output by the first hidden layer is 256.
[0118] The second hidden layer multiplies vector a′1 by a 128x156 weight matrix W2 and adds a 128-byte bias vector b2, resulting in the intermediate result z2 = W2a′1 + b2. A ReLU function is applied to each element in z2, resulting in the activated result a2 = ReLU(z2). With a probability of 0.3, some elements in a2 are randomly set to 0, resulting in the dropout vector a′2, whose length is 128.
[0119] The third hidden layer multiplies vector a′2 by a 64x128 weight matrix W3 and adds a 64-bit bias vector b3, resulting in the intermediate result z3 = W3a′2 + b3. A ReLU function is applied to each element in z3, resulting in the activated result a3 = ReLU(z3). With a probability of 0.3, some elements in a3 are randomly set to 0, resulting in the dropout vector a′3, whose length is 64.
[0120] The output layer multiplies vector a′3 by a 1×64 weight matrix W4 and adds a bias vector b4, resulting in the intermediate result z4 = W4a′3 + b4. A sigmoid function is applied to z4, mapping the output value to the interval [0, 1], resulting in the final output y = Sigmoid(z4). Here, y is a scalar value representing the probability of identity authentication. When y is close to 1, authentication is successful; when y is close to 0, authentication fails.
[0121] Based on the above, the architectural design of this method not only ensures the expressiveness of the model but also avoids excessive computational complexity.
[0122] Reference Figure 3 The flowchart of the local training method shown in the figure, "Training a local model based on a local training dataset to obtain a local model parameter set," includes the following steps:
[0123] S21: Initialize the local model and configure the Adam optimizer, as well as set the batch size based on the local device memory;
[0124] S22: Divide the local training data set into a training set and a validation set, extract a preset scale of data from the training set, and initialize the current round to 0;
[0125] S23: extracting data from the preset scale data according to the batch size, training the initialized local model based on the extracted data, and obtaining the gradient of the model parameters;
[0126] S24: Use the Adam optimizer to update the model parameters according to the calculated gradient;
[0127] S25: Use the validation set to evaluate the current local model, obtain multiple evaluation values and validation set losses, and increase the current round by 1;
[0128] S26: When the validation set loss decreases in N consecutive rounds and the decrease is greater than the preset decrease threshold, the preset scale data is updated and the current local model is continued to be trained according to the new preset scale data;
[0129] S27: When each evaluation value meets the corresponding evaluation threshold, stop training, obtain the parameters of the current local model and form a local model parameter set.
[0130] In S21, the local model is deployed and the weight matrices and bias vectors of each layer are initialized. The Adam optimizer is deployed locally, with an initial learning rate set to 0.001 and a cross-entropy loss function selected. To address sample imbalance, class weight adjustment is introduced to ensure the local model's training effectiveness on samples from different categories. Each client uses a mini-batch training method, with the batch size dynamically adjusted based on the local device memory to ensure that each mini-batch of data can be processed normally in the device memory and avoid memory overflow.
[0131] In S22, incremental training preparation is performed on the basis of mini-batch training. First, a small amount of data is extracted from the training set for rapid model tuning. The small amount of data selected should be representative and cover the main characteristics of the data. This small amount of data is the preset size data. The current round refers to the number of cycles in epochs, which is initially 0.
[0132] In S23, training begins by extracting a mini-batch of data from the preset data set according to the batch size. This data is then fed into the local model for forward propagation, obtaining the model output. Based on the model output and the true labels, the loss is calculated using the preset cross-entropy loss function. Backward propagation then occurs, calculating the gradients of the model parameters based on the cross-entropy loss function. During this process, gradient clipping is applied to limit the maximum gradient norm to 1.0 to prevent gradient explosion.
[0133] In S24, a learning rate decay strategy can also be configured. After updating the model parameters, the current round is checked to see if it is a multiple of 50. If so, the learning rate is decayed to 0.9 times the original round. A model checkpoint saving mechanism is also set to save the training state regularly (for example, every 10 rounds), including model parameters and optimizer state, so that training can be resumed after interruption.
[0134] In S25, in local training, evaluation indicators include accuracy, recall rate, etc. Based on these indicators, the current local model is evaluated using the validation set to calculate multiple evaluation values.
[0135] In S26, N can be set to 5. If the validation set loss decreases by more than the preset decrease threshold in five consecutive rounds, it means that the validation set loss has improved in five consecutive rounds. The preset scale of data is added. Each additional data should have a similar distribution to the previously used data to ensure the stability of the local model. If the validation set loss does not improve in five consecutive rounds, the training is terminated early.
[0136] In S27, after each round of training, each evaluation value obtained is checked to see if it reaches the corresponding evaluation threshold. If so, the local model is determined to be eligible for global aggregation, training is stopped, and the parameters of the current local model, including the weight matrix and bias vector, are extracted. These parameters are used to form a local model parameter set. If any evaluation value does not reach its corresponding evaluation threshold, training continues or the model parameters are adjusted.
[0137] In S3, refer to Figure 4 The flowchart of the selective encryption transmission method shown in the figure, "Selectively encrypt and transmit the local model parameter set to generate an encrypted parameter package," includes the following steps:
[0138] S31: performing importance analysis on the local model parameter set, obtaining a comprehensive contribution of each parameter in the local model parameter set to the local model, and dividing the local model parameter set into a key parameter set and a non-key parameter set based on the comprehensive contribution;
[0139] S32: A master key pair is regularly generated by a third-party organization, and the third-party organization and the client generate a temporary session key for key parameter encryption based on a key exchange protocol;
[0140] S33: The third-party institution encrypts the temporary session key using the public key in the master key pair to obtain an encrypted session key. The encrypted session key generated by the third-party institution and the private key in the master key pair are sent to the client.
[0141] S34: Based on the received private key and the encrypted session key, a decrypted temporary session key is obtained, and the key parameter set is block-encrypted based on the decrypted temporary session key to generate encrypted data blocks in real time;
[0142] S35: deriving a session key based on the received private key, and generating an encryption key based on the session key and a shared key derivation function;
[0143] S36: Use a stream cipher algorithm to selectively encrypt non-critical parameter sets based on the encryption key and generate encryption parameters in real time;
[0144] S37: Compress the generated encrypted data block and encryption parameters to generate an encryption parameter package.
[0145] In S31, a gradient-based importance assessment method is first used to quantify the sensitivity of each parameter to the model output by calculating the impact of perturbations on the loss function for each parameter in the local model parameter set. This process directly reflects the immediate impact of the parameter during model training. Then, an assessment method based on the Fisher information matrix is applied to calculate the parameter's contribution to the model's predictive ability. This is a statistically based parameter importance assessment that considers the parameter's long-term impact on model prediction, not just its direct contribution to the current loss function. Furthermore, the positional weight of the parameter in the network structure is considered. Specifically, the positional weight is assigned based on the layer to which the parameter belongs in the local model. This is because, generally, the closer a parameter is to the output layer, the greater its impact on the model and the more important it is. Therefore, parameters closer to the output layer are assigned higher weights, with the positional weights increasing from the input layer to the first hidden layer, the second hidden layer, the third hidden layer, and finally the output layer. The parameter's sensitivity to the model output, its contribution to the model's predictive ability, and its positional weight are weighted together to obtain the parameter's overall contribution to the local model. Each parameter is ranked by its overall contribution, with the top 20% of parameters classified as critical and the remaining 80% as non-critical. This multi-dimensional evaluation method allows the local model parameter set to be rationally divided into critical and non-critical sets based on their importance within the local model, providing support for the subsequent hierarchical key architecture.
[0146] In S32-S36, the critical parameter set and the non-critical parameter set are encrypted separately, and the two use encryption methods of different strengths. The critical parameters use a longer key length and a more complex encryption algorithm, while the non-critical parameter set uses a simpler encryption algorithm.
[0147] In S32, each client agrees on a trusted third-party organization. The third-party organization uses elliptic curve cryptography (ECC) and selects the NIST P-256 curve to generate a master key pair. This curve has sufficient security strength to ensure the security of the generated master key pair. Furthermore, a new master key pair is regenerated at preset intervals. This periodic generation method implements a key update mechanism to enhance security. Furthermore, the third-party organization and the client use a key exchange protocol (such as RSA-2048) to each calculate the same temporary session key.
[0148] In S33-S34, the master key pair consists of a private key and a public key. The third-party organization uses the public key to encrypt the temporary session key previously generated through the key exchange protocol using an appropriate asymmetric encryption algorithm (such as RSA-2048). The encryption process converts the temporary session key into ciphertext, resulting in the encrypted session key, enhancing the security of the temporary session key during transmission. The third-party organization encapsulates the encrypted session key and the private key from the master key pair and sends the encapsulated encrypted session key and the private key from the master key pair to the client via a secure and reliable communication channel, such as a TLS-encrypted network connection.
[0149] After the client receives the encrypted session key and the private key from the master key pair from a third-party organization, it first verifies the integrity of the data and the authenticity of the source. This can be done by checking the signature of the data or using pre-shared verification information. After verification, the data is stored locally. The client uses the locally stored private key and the corresponding asymmetric decryption algorithm (corresponding to the algorithm used by the third-party organization for encryption, such as RSA-2048) to decrypt the encrypted session key and obtain the decrypted temporary session key. The decrypted temporary session key is compared with the temporary session key previously generated through the key exchange protocol. If the comparison is consistent, it means that the decrypted temporary session key is reliable. This verification method can ensure that the temporary session key has not been replaced by the attacker during the key exchange process.
[0150] The key parameter set contains the parameter matrix and other related metadata, configuration information, and other information. The parameter matrix is the core data component. Whether the parameter matrix is large is determined based on the number of rows and columns in the parameter matrix. For example, in practical applications, a threshold can be pre-set; when the number of elements in the parameter matrix (number of rows multiplied by number of columns) exceeds this threshold, the matrix is considered large. Large matrices are divided into blocks of appropriate sizes for parallel encryption. The block size can be determined based on factors such as the performance of the specific encryption algorithm and system resources. Besides the parameter matrix, other parameters in the key parameter set are also divided into blocks based on factors such as encryption algorithm performance and system resources. These blocks are encrypted using the decrypted temporary session key to generate encrypted data blocks. Since the blocks of the key parameter set are generated one by one, once a new block is generated, it is immediately encrypted using the decrypted temporary session key. Therefore, encrypted data blocks are generated in real time. This hybrid encryption scheme achieves asymmetric encryption of key parameters, resulting in longer key lengths and a more complex encryption algorithm, greatly ensuring security. Combined with block encryption, it also improves subsequent data transmission efficiency.
[0151] In S35-S36, HKDF (HMAC-based key derivation function) is used for key expansion to derive the session key from the client's locally stored private key. This, combined with the shared key derivation function (S2KDF), allows for dynamic generation of required encryption keys based on specific application scenarios and security requirements. Specifically, specific encryption keys can be further derived from the session key based on different input and context information. This approach ensures key diversity and security through a layered key derivation mechanism, while reducing the complexity of key management and avoiding the security risks associated with static keys.
[0152] Encryption uses the ChaCha20-Poly1305 stream cipher, which offers superior performance compared to AES in resource-constrained environments such as mobile devices, prioritizing performance. Furthermore, a selective encryption mechanism encrypts only the high-order bits of parameters, while using XOR obfuscation on the low-order bits. Combined with the ChaCha20-Poly1305 stream encryption, this method allows for simultaneous encryption and transmission, reducing memory usage. This encryption method is relatively simple and efficient. Since non-critical parameters have relatively little impact on system operation and require less security, keys generated using this derivation method meet security requirements.
[0153] In S37, an adaptive compression algorithm is used to losslessly compress the generated encrypted data blocks and encryption parameters to generate an encrypted parameter package. For example, a special encoding method such as run-length encoding (RLE) or Huffman encoding is used for the sparse parameter matrix (whether it is a key parameter or a non-key parameter), thereby reducing data storage space and improving transmission efficiency.
[0154] In the process of generating the encryption parameter package, a hierarchical data packet structure is constructed. The hierarchical data packet structure includes a metadata area, in which information such as the encryption algorithm and compression method of the key parameters and non-key parameters in the entire data packet is recorded. For key parameters, the algorithm used for block encryption (such as AES-256-GCM) and the block size are recorded; for non-key parameters, the stream encryption algorithm (such as ChaCha20-Poly1305) is recorded, and the type of compression algorithm and related parameters are also recorded. The hierarchical data packet structure also includes a data area, in which preset identifiers can be used to distinguish between key parameters and non-key parameters. For example, specific header information is added before the key parameter data block, and an identifier byte is set at the starting position of the non-key parameter stream.
[0155] If the generated encrypted parameter package occupies more memory than the preset memory value, it is considered a large parameter package and is segmented into fixed-size data blocks. This facilitates transmission across the network and also facilitates error recovery. For example, if a data block is lost or damaged during transmission, only that block can be retransmitted without retransmitting the entire parameter package. A checksum is added to each segmented data block to verify data integrity at the receiving end. At the same time, each data block is assigned a unique sequence number to ensure that the receiving end can reassemble the data packet in the correct order, ensuring the orderly transmission of the parameter package.
[0156] This method of packaging together critical and non-critical parameters, processed using different encryption methods, enables unified management and transmission of different parameter types. The client can send all relevant parameters to the central server at once, reducing communication complexity and overhead. Compression and parameter fragmentation reduce data transmission volume and improve transmission efficiency. Furthermore, the addition of checksums and sequence numbers ensures data integrity and order, reducing the probability of transmission errors and further improving transmission efficiency. The parameter fragmentation mechanism ensures that in the event of a transmission error, only the damaged data block needs to be retransmitted, rather than the entire parameter package, significantly improving error recovery.
[0157] In summary, this encrypted transmission method not only achieves differentiated protection during parameter transmission, ensuring the highest level of security for critical parameters, but also uses lightweight protection for non-critical parameters to improve performance. The entire process ensures security while avoiding unnecessary performance overhead, providing reliable input for subsequent homomorphic encryption aggregation.
[0158] In S4, the secure communication protocol between the client and the central server utilizes a multi-layered security mechanism. TLS 1.3 ensures communication encryption and achieves mutual authentication between the client and the central server. A heartbeat mechanism monitors the connection status between the client and the central server, automatically disconnecting if an anomaly is detected. A resumable transmission mechanism is implemented to address transmission interruptions caused by network instability. To protect the model from contamination attacks, a Byzantine fault-tolerance mechanism is integrated, capable of detecting and filtering malicious updates. Furthermore, a communication compression mechanism is implemented, using sparsification and quantization techniques to reduce transmission overhead.
[0159] Under the above secure communication framework between the client and the central server, each client can pass its own encryption parameter package to the central server. Figure 5 The flowchart of the homomorphic encryption aggregation method shown in the figure, "aggregating the encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set," includes the following steps:
[0160] S41: Receive the encrypted parameter package sent by each client, verify the integrity of the encrypted parameter package, and obtain a valid parameter set;
[0161] S42: Perform aggregation and homomorphic encryption operations on the valid parameter set, and output the aggregated encryption parameter set.
[0162] In S41, a TCP persistent connection pool is established on the central server to support concurrent parameter reception. This reduces the overhead of establishing and disconnecting connections by reusing connections, improving data transmission efficiency. Zero-copy technology is also used to avoid multiple data copies between user and kernel space, further optimizing data transmission. To enable asynchronous parameter reception, a message queue (such as Apache Kafka) is used to manage encrypted parameter packets sent from different clients. Each client is allocated a separate message channel, effectively buffering encrypted parameter packets sent by the client and reducing server load.
[0163] During the encryption parameter packet reception process, an adaptive receive window dynamically adjusts the reception rate based on system load to ensure stable system operation. Each received encryption parameter packet undergoes real-time integrity checks, including header verification, sequence number checking, and checksum verification, to ensure that the encryption parameter packet has not been tampered with or damaged during transmission. If a transmission error is detected, the Automatic Repeat Request (ARQ) mechanism is immediately activated, requesting the client to resend the erroneous encryption parameter packet.
[0164] A LRU strategy is used to prioritize the least recently used parameter packages, reducing disk I / O operations and enabling parameter package cache management. A parameter synchronization mechanism addresses client clock skew, ensuring the correct order of encrypted parameter package receipt. Detailed receipt logs are also recorded, including information such as the parameter package receipt time, sending client, and processing results, facilitating fault tracking and troubleshooting.
[0165] Through this reception strategy, the central server's parameter reception module successfully built a distributed streaming processing architecture. A series of safeguards implemented during the reception process comprehensively ensured the efficiency, accuracy, and stability of encrypted parameter package reception. Furthermore, supplementary management and logging measures enabled efficient cache utilization, accurate parameter synchronization, and rapid fault tracing.
[0166] After receiving the encrypted parameter package, the central server performs integrity verification on it, gradually eliminating anomalous ones. The only valid parameter set that remains is the valid parameter set. This integrity verification includes cryptographic validation, format verification, range checking, and consistency verification. Cryptographic verification verifies the integrity of each parameter in the encrypted parameter package using a Merkle tree. While checking the validity of the digital signature, the Merkle tree structure efficiently determines whether the parameters have been tampered with, thereby confirming the authenticity of the encrypted parameter package and initially filtering out those that may come from untrusted sources. Format verification uses a Byzantine fault-tolerance mechanism to ensure that the parameter dimensions and data types of the encrypted parameter package meet expectations while filtering out maliciously updated encrypted parameter packages. This ensures that the received encrypted parameter package is correct in its basic format and free of malicious interference. Range checking applies statistical methods to detect anomalous parameter distributions within the encrypted parameter package, identifying outliers and potential poisoning attacks, and further eliminating anomalous encrypted parameter packages based on data distribution characteristics. Consistency verification involves calculating the gradient norm of parameter updates in the encrypted parameter package to limit the update range and tracking the verification progress of the encrypted parameter package by maintaining a verification state machine. This process ensures that the encrypted parameter package updates conform to the predetermined learning rules, guarantees its correctness at the logical and rule levels, and ensures the orderly progress of the entire verification process. If the update range or logic of the encrypted parameter package is found to not conform to the predetermined rules, it will be marked as an anomaly and excluded. Through this series of operations, abnormal encrypted parameter packages can be accurately eliminated and a reliable and valid parameter set can be obtained.
[0167] In S42, a contribution weighting mechanism is introduced through the FedAvg algorithm. This mechanism calculates aggregation weights based on the data quality and quantity in each client's valid parameter set. Data quality can be evaluated from multiple dimensions, such as accuracy, completeness, and reasonable distribution, while data quantity is reflected in the size of the parameters in the valid parameter set. Reasonable weight distribution can make subsequent aggregation results more realistic and fully reflect the true contribution of each client. For example, in a federated learning scenario involving data from multiple sensors, the valid parameter sets corresponding to sensors with high data quality and a large number of parameters should be given greater weight during aggregation.
[0168] To address client heterogeneity, the central server continuously monitors client performance during interaction. When significant performance differences are detected, the aggregation interval is dynamically adjusted. For example, for clients with weaker computing power or poor network conditions, the aggregation period is appropriately extended. This adaptive aggregation period allows sufficient time for local processing of the encryption parameter set. Furthermore, since the effective parameter sets of different clients vary, this can cause fluctuations in the aggregation process. Dynamically decaying momentum aggregation is applied to mitigate this issue and make the aggregation process more stable. Through these operations, the effective parameter sets of each client are aggregated to obtain a preliminary aggregated parameter set.
[0169] Before homomorphic encryption of the aggregated parameter set, an adaptive quantization scheme is implemented to balance computational accuracy and performance. The number of quantization bits is dynamically determined based on the numerical distribution of the aggregated parameter set and the accuracy requirements of the business. A larger number of quantization bits is used for parameters in the aggregated parameter set with large numerical variations and high accuracy requirements; a smaller number of quantization bits is used for parameters with relatively stable numerical values and lower accuracy requirements. For example, in federated learning for image recognition, high-precision quantization is used for key feature parameters that have a significant impact on recognition results, while low-precision quantization is used for parameters with less impact. This ensures the accuracy of computational results while reducing computational effort and storage requirements, improving overall performance.
[0170] The adaptively quantized aggregate parameter set is homomorphically encrypted using the Cheon-Kim-Kim-Song (CKKS) scheme. This homomorphic encryption property transforms the parameters in the aggregate parameter set into elements of a polynomial ring, laying the foundation for subsequent computations using homomorphic encryption. To improve computational efficiency, during the aggregation process, large-scale matrix operations within the aggregate parameter set are decomposed into multiple smaller operations, which are then executed in parallel to fully utilize computing resources such as multi-core processors. Aggregation is then performed using matrix addition and multiplication, all of which are efficiently completed within a parallel framework. Furthermore, random rotation techniques are used to enhance aggregation security. Random rotations are performed on the decomposed small-scale matrix data, making it more difficult for attackers to decrypt the encrypted information.
[0171] As homomorphic encryption operations progress, noise may accumulate. This requires an automatic re-encryption mechanism. When noise reaches a certain threshold, the encrypted data is automatically re-encrypted, preventing noise from adversely affecting the encryption results of the valid parameter set and ensuring the quality of the encrypted data. Layered homomorphic encryption is employed, dividing the encryption process into multiple layers based on the different levels and complexity of the aggregated parameter set. Targeted optimizations are performed for deep circuits, ensuring efficient encryption operations even in complex computing environments. This is particularly suitable for processing large valid parameter sets.
[0172] Implement a verification mechanism for calculation results and check the results after homomorphic encryption and aggregation operations. The correctness of the aggregation results can be ensured by comparing with known verification data or verification algorithms. The verification content includes whether the numerical range and logical relationship of each parameter in the aggregation parameter set are in line with expectations. This process can effectively identify and eliminate errors that may occur in homomorphic encryption or aggregation operations, thereby ensuring the accuracy and reliability of the final results. The fault-tolerant mechanism takes into account the possibility that some clients may fail, such as network interruption, equipment failure, etc. When a client failure is detected, the aggregation strategy can be automatically adjusted and re-aggregated according to the valid parameter sets of the remaining normal clients to ensure that the system can still operate normally in this case without affecting the final output of the aggregated encryption parameter set, and ensure that the processing results of the valid parameter set are not affected by the abnormality of individual clients.
[0173] This method aggregates the valid parameter sets of each client first, then implements an adaptive quantization scheme, performs homomorphic encryption operations, and then performs automatic re-encryption and layered homomorphic encryption optimization. Finally, it verifies the results and performs fault-tolerant processing to finally complete the homomorphic encryption operations on the valid parameter sets and output a reliable aggregated encryption parameter set. This method can complete parameter aggregation while protecting privacy, which not only protects the parameter privacy of each client, but also ensures the correctness of the aggregation results. The entire step can be set up in a modular manner, and the various components interact through standard interfaces to facilitate system maintenance and upgrades. At the same time, through fine-grained logging and monitoring mechanisms, the system operation status can be tracked and monitored, and performance optimization is carried out throughout the entire process, maximizing computing efficiency while ensuring security.
[0174] In S5, refer to Figure 6 The flowchart of the differential privacy protection method shown in the figure, "Performing differential privacy protection on the aggregated encryption parameter set to obtain the confidential parameter set", includes the following steps:
[0175] S51: Obtain the local sensitivity and global sensitivity of each parameter in the aggregated encryption parameter set;
[0176] S52: Based on the local sensitivity and the global sensitivity, a parameter sensitivity graph is constructed, where each node in the parameter sensitivity graph represents each parameter in the aggregated encryption parameter set, and the edges in the parameter sensitivity graph represent the correlation between the nodes;
[0177] S53: Dividing the parameters represented by each node in the parameter sensitivity graph into multiple parameter groups based on the correlation degree;
[0178] S54: Allocate privacy budget to each parameter group using proportional allocation method;
[0179] S55: Inject noise into each parameter group based on the privacy budget, and combine the parameter groups with successful noise injection into a confidential parameter set.
[0180] In S51, a preset number of samples are randomly extracted from the aggregated encryption parameter set, and the value of the parameter in each sample is changed. Then, the change in the global model output is observed, and the local sensitivity of each parameter within the sample range is estimated through multiple sampling and calculations. The global model refers to the model of the central server, and the structure of the model is consistent with the local model structure of each client. For example, the local model is f, and the parameter in the randomly extracted sample is θ. Then, a small perturbation is made to it, that is, θ+∈, where ∈ is the increased perturbation. Observe the change in the model output: Δf=f(θ+∈)+f(θ), where Δf is the change value of the global model output, f(θ+∈) is the global model output after changing the parameter θ, and f(θ) is the global model output when the parameter θ is not changed. The local sensitivity of the parameter θ is equal to the ratio between the absolute value of Δf and ∈.
[0181] Determine the maximum possible range of parameter variation based on the model's characteristics and business rules. For example, for a parameter representing commodity price, determine its theoretical maximum and minimum values based on market conditions and business settings. Use these values to determine the parameter's maximum range. Within this maximum range, change the parameter's value and calculate the maximum change in the global model output. This maximum change is the parameter's global sensitivity.
[0182] In S52, each parameter in the aggregate encryption parameter set is used as a node. For any two nodes (parameters), the correlation between them is calculated. The correlation is calculated as follows:
[0183] G=α×(J1*J2 / (J1+J2))+β×Q1*Q2 / (Q1+Q2));
[0184] Among them, G is the correlation between the two nodes; α and β are weight coefficients, which can be adjusted according to actual conditions, for example, α = 0.6, β = 0.4; J1 and J2 are the local sensitivities of the two nodes respectively; Q2 and Q2 are the overall sensitivities of the two nodes respectively.
[0185] If the correlation is greater than the preset correlation threshold (such as 0.5), an edge is established between the two nodes, and the weight of the edge is the calculated correlation. In this way, a parameter sensitivity graph is constructed to intuitively display the dependency between parameters.
[0186] In S53, each node in the parameter sensitivity graph is traversed, with the node being traversed being the current node. A determination is made as to whether the current node has been grouped. If the current node has been grouped, the next node is traversed. If the current node has not been grouped, other ungrouped nodes are identified. Among these other ungrouped nodes, nodes whose correlation with the current node exceeds a preset grouping threshold (e.g., 0.8) are obtained. These obtained nodes are then assigned together with the current node to a new group, thereby forming a new parameter group. By this method, after traversing all nodes in the parameter sensitivity graph, multiple independent parameter groups can be obtained.
[0187] In S54, a proportional allocation method is used to allocate a privacy budget to each parameter group. Specifically, the comprehensive sensitivity of all parameters within each parameter group is calculated. The comprehensive sensitivity is obtained by taking the weighted average of local and global sensitivities. The total privacy budget is allocated based on the proportion of each parameter group's comprehensive sensitivity to the total comprehensive sensitivity of all parameter groups. For example, if a parameter group's comprehensive sensitivity accounts for 30%, 30% of the privacy budget is allocated to that group. The greater the comprehensive sensitivity, the more important the parameters within the parameter group. Therefore, this method can allocate more privacy budget to important parameters.
[0188] In S55, batch sampling techniques are used to generate multiple Gaussian-distributed random numbers using the Box-Muller transform method. The number of random numbers is equal to the number of parameter groups. Parallelization techniques (such as multithreading or GPU acceleration) are used during the generation process. The random numbers are the injected noise. The accuracy of the noise distribution is verified through noise calibration mechanisms, such as statistical tests (such as the Kolmogorov-Smirnov test), to ensure that the generated noise distribution conforms to the characteristics of the Gaussian distribution. Furthermore, by maintaining the noise seed, the noise generated each time is reproducible.
[0189] Each random number is sorted from smallest to largest, and each parameter group is sorted from largest to smallest according to its privacy budget. Random numbers are then injected into the corresponding parameter groups in the order in which they are sorted, acting as noise for that parameter group. This ensures that important parameters receive less noise, while less important parameters receive more noise. During the noise injection process, a detailed injection log is created, recording information such as the random number injected into each parameter group, the injection time, and the injection status, to facilitate subsequent process audits. If a failure occurs during the injection process (such as data errors or system anomalies), a rollback mechanism is used to restore the parameter group to its pre-injection state. The parameter group can be backed up before injection. If the injection fails, the parameter group data can be restored from the backup and the noise injection can be repeated.
[0190] After the noise injection is completed, the injected noise can be verified through a multi-dimensional evaluation index system, such as the principle that the noise standard deviation is proportional to the comprehensive sensitivity and privacy budget, stress testing of the attack model library, performance impact assessment, automated privacy measurement tools, and experimental attack protection strength assessment (including membership inference attacks and model inversion attacks). A detailed verification report is generated to ensure that the injected noise is within an acceptable range. If the injected noise is found to be non-compliant during the verification process (e.g., the noise standard deviation deviates too much from the theoretical value, the attack success rate is too high, the privacy measurement result does not meet the standard, etc.), new noise is regenerated and injected until the injected noise meets the standard.
[0191] After noise injection and verification, the parameter consolidation phase begins, achieving final data normalization. Verified noisy parameter groups are formatted and standardized to ensure compatibility with other system components. These standardized parameter groups are combined into confidential parameter sets, employing a parameter compression mechanism to reduce storage and transmission overhead. Furthermore, complete metadata is generated to record privacy-preserving configuration information. This consolidation process encompasses parameter format conversion, metadata organization structure design, parameter indexing, version control, and integrity verification.
[0192] In S6, refer to Figure 7 The flowchart of the bit-by-bit scrambling method shown in the figure, "Scrambling the confidentiality parameter set bit-by-bit to obtain the global model parameter set," includes the following steps:
[0193] S61: Obtain a pseudo-random sequence through a random sequence generator;
[0194] S62: performing bit decomposition based on the confidentiality parameter set, and generating a full parameter set based on the bit-decomposed confidentiality parameter set and the pseudo-random sequence;
[0195] S63: Perform perturbation processing on the full parameter set to generate a perturbation bit sequence set;
[0196] S64: reorganize the parameters of the disturbance bit sequence to generate a global model parameter set.
[0197] Before pseudo-random sequence generation begins in S61, the entire random sequence generation system must be initialized, including loading necessary libraries and setting initial parameters. This lays the foundation for the subsequent random number generation process. After initialization, a hardware random number generator (HRNG) is used to collect physical random sources, such as thermal noise, quantum effects, system time, process status, and the time interval between mouse and keyboard inputs. Random numbers are generated based on these multiple physical random sources. The collected random data is input into a Von Neumann corrector to eliminate potential bias and ensure randomness quality. The corrected random numbers are then expanded using a cryptographically secure pseudo-random number generator (CSPRNG). The ChaCha20 algorithm is then used to achieve high-performance sequence generation based on the expanded random numbers to obtain the pseudo-random sequence. The generated pseudo-random sequence is verified using the NIST SP800-22 randomness test suite to determine whether it meets randomness standards. Once verified, the generated pseudo-random sequence is stored in a cache. When requested, the pseudo-random sequence is preferentially retrieved from the cache, reducing the overhead of repeated generation. During the operation of the random sequence generation system, statistical analysis and real-time feedback mechanisms are used to continuously track the randomness of the random sequence, promptly identify and correct potential randomness issues, and ensure that the system can always generate high-quality pseudo-random sequences. In certain specific cases, it is necessary to dynamically adjust the frequency and method of entropy collection based on the operating status and needs of the entire random sequence generation system. For example, when the system faces higher security requirements or the frequency of random sequence use increases significantly, it is necessary to increase the frequency of entropy collection or adopt a more reliable physical random source collection method. In addition, when users need to generate the same pseudo-random sequence, they can achieve this by setting the same initial conditions (such as seed value). Because the generation of pseudo-random sequences is based on a deterministic algorithm, the same initial conditions will cause the algorithm to generate the same sequence. This is very useful in some application scenarios that require repeatable results.
[0198] In S62, parameters in the confidential parameter set that conform to the IEEE 754 floating-point format are first parsed, separating them into sign, exponent, and mantissa bits. This allows for a preliminary binary representation of the parameters, generating binary bit parameters. During this process, the bit representation precision is determined based on the parameter's importance. Key parameters are represented using more bits to maintain higher precision, while non-key parameters are appropriately reduced. To improve the operational efficiency of bit decomposition, hardware resources such as multi-core processors or GPUs are utilized for parallel processing. Bit compression encoding methods such as Huffman coding and run-length coding are employed to compress the binary bit parameters obtained through bit decomposition, thereby reducing storage overhead. A bit index structure is established using hash tables, tree structures, and other methods. This structure supports fast bit-level operations. The establishment of bit indexes facilitates efficient subsequent access to bit data at specific locations. Frequently used bit-level data is stored in a cache, implementing bit-level caching. This reduces recalculation and access time, improving overall processing efficiency.
[0199] This method uses operations such as bitwise exclusive OR (XOR) to combine a pseudorandom sequence with the bit-decomposed confidentiality parameter set, introducing randomness into the bit-level representation. This method leverages the properties of the pseudorandom sequence to enhance the security of the initially generated bit-level representation, improving data security and ultimately obtaining secure bit-level representation parameters. When combining the pseudorandom sequence with the bit-decomposed confidentiality parameter set, operations such as bitwise exclusive OR (XOR) are performed on the resulting binary bit parameters. Specifically, the pseudorandom sequence and the binary bit parameters are matched bit by bit, and an XOR operation is performed bit by bit. For example, if a bit in the binary bit parameter is 0 and the corresponding bit in the pseudorandom sequence is 1, the XOR operation results in a 1 for that bit; if a bit in the binary bit parameter is 1 and the corresponding bit in the pseudorandom sequence is 1, the XOR operation results in a 0 for that bit. In this way, the pseudorandom sequence is integrated into the binary bit parameters, introducing randomness into the bit-level representation. A bit-level representation correctness verification mechanism is established to check the generated bit-level representation to ensure it meets the expected format and precision requirements. If not, the relevant processing is required. Establish a bit-level metadata management system to record relevant information of bit-level representation, such as bit decomposition method, quantization accuracy, compression encoding method, etc. These metadata will help with subsequent management and maintenance work, such as providing necessary reference when data needs to be adjusted or restored.
[0200] For parameters in the confidential parameter set that do not conform to the IEEE 754 floating-point format, other appropriate methods will be used to process them. These processed parameters are called non-bit-level representation parameters. For example, if these parameters are in binary form, they are retained directly; if they are other data types, special encoding or conversion operations are required to make them compatible with the secure bit-level representation parameters generated previously. The secure bit-level representation parameters are combined with the non-bit-level representation parameters to form a new set, which is the full parameter set. When the confidential parameter set is partially updated, the system only performs bit decomposition and fusion operations on the updated part to achieve incremental bit decomposition processing, avoiding repeated processing of the entire data set, thereby reducing unnecessary computational overhead.
[0201] In S63, all parameters in the full parameter set are uniformly converted into binary bit sequences to facilitate subsequent bit-level operations. The bits in each binary bit sequence are assigned importance levels based on factors such as the parameter's business significance and its impact on the system. For example, bits representing critical control information are defined as important bits, while bits used for auxiliary information are defined as less important bits. Bits of different importance levels are assigned corresponding perturbation strengths. For important bits, strong perturbation is used to ensure data security and anti-attack resistance; for less important bits, weak perturbation is used to minimize excessive impact on the data while maintaining a certain degree of randomness.
[0202] Bit-level obfuscation technology scrambles the order of binary bits to increase the randomness and resilience of the data. Specifically, a permutation table is used to rearrange the original binary bit sequence of each parameter after conversion according to the rules of the permutation table. After this step, each parameter obtains an obfuscated binary bit sequence. Each obfuscated binary bit sequence is perturbed according to the previously assigned perturbation strength. For strong perturbations, a linear feedback shift register (LFSR) is used to generate the perturbation sequence and perform an XOR operation with the original sequence. For weak perturbations, a simple modulo-2 addition is used. After the perturbation process, each parameter generates a corresponding perturbed bit sequence, and all these perturbed bit sequences together constitute a perturbed bit sequence set.
[0203] During the disturbance process, in order to control the loss of accuracy caused by the disturbance, the position and intensity of each parameter disturbance are recorded. When data recovery is required, reverse compensation can be performed based on these records. Different reversible transformation methods are used for disturbances of different intensities to ensure the accuracy of data recovery. The disturbance effect is evaluated by calculating indicators such as entropy and correlation to detect whether the bit sequence set after the disturbance has achieved the expected security and uniformity. The disturbance intensity of important and minor bits can also be dynamically adjusted based on user feedback results, thereby further optimizing the disturbance effect and ensuring data security and recoverability. Through this method, the full parameter set can be effectively disturbed to generate a disturbed bit sequence set with high security and randomness, while ensuring that the data can be accurately restored when necessary.
[0204] In S64, a suitable bit reorganization algorithm is selected based on the rules for converting parameters into binary sequences during the previous disturbance processing. For example, if the IEEE754 standard is used to convert floating-point numbers into binary, then during the reorganization, each disturbance bit sequence in the disturbance bit sequence set is restored to a floating-point number according to the standard to obtain floating-point parameters. The floating-point parameters are verified to ensure that the value range, logical relationship, etc. of the floating-point parameters meet the preset constraints. If a floating-point parameter that does not meet the preset constraints is found, the abnormal information is recorded, and it can be corrected or marked as an invalid parameter. The metadata information is recorded. The metadata information includes the name, meaning, generation time, version number, and relevant information of the disturbance processing (such as disturbance intensity, disturbance algorithm, etc.) of the parameter. Each floating-point parameter and metadata information is encapsulated into a complete parameter package. The data structure of the parameter package is JSON. The parameter package is the global model parameter set.
[0205] Based on the above, this method significantly improves data security, increases the difficulty of data cracking by mixing pseudo-random sequences and perturbation processing, while ensuring data availability and recoverability. It can accurately recover the global model parameter set from the perturbed bit sequence and supports dynamic adjustment and incremental updates.
[0206] In S7, the central server trains the global model using the global model parameter set. After training is complete, the updated parameters are fed back to the client, allowing the client to continue training its local model. In this way, the system continuously iterates, thereby improving the model's performance and generalization capabilities. Simultaneously, the client continuously collects and preprocesses the real-time behavior data of local users, extracting multiple feature vectors. To distinguish these from the feature vectors in step S1, these feature vectors are referred to as real-time feature vectors. Each client then uploads the real-time feature vectors to the central server, which combines the real-time feature vectors uploaded by each client into a real-time feature vector set. During the real-time feature vector upload process, encryption is still used for transmission, and a secure computing environment (TEE) is created on the central server. Subsequent feature matching is performed between the real-time feature vector set and the global model parameter set in the secure computing environment to ensure data security. The preprocessing principles of the real-time behavior dataset are the same as those of the original dataset in S1 and will not be repeated here.
[0207] In S8, refer to Figure 8 The flow chart of the feature matching method presented, "matching the global model parameter set and the real-time feature vector set to obtain the trust score of each client user," includes the following steps:
[0208] S81: Perform feature matching on the global model parameter set and the real-time feature vector set to obtain a matching score for each client user;
[0209] S82: Based on the scoring model and the matching score, obtain the trust score of each client user.
[0210] In S81, the client user refers to the local user of each client. For each client user's real-time feature vector in the real-time feature vector set, the LSH algorithm is used to quickly locate a set of candidate vectors that may match it in the global model parameter set. A similarity metric, such as Euclidean distance or cosine similarity, is used to calculate the preliminary similarity between the real-time feature vector and the vectors in the candidate vector set. Candidates whose preliminary similarity exceeds a first similarity threshold are screened from the candidate vector set to form a preliminary candidate matching set corresponding to each client user.
[0211] After the above-mentioned coarse-grained matching, different feature weights are assigned to the key vectors (that is, key parameters) and non-key vectors (that is, non-key parameters) in the preliminary candidate matching set. The preliminary similarity is adjusted using the feature weights, that is, the new similarity between the real-time feature vector and each vector in the preliminary candidate matching set is recalculated using a weighted method. Vectors whose new similarity exceeds the second similarity threshold are screened out from the preliminary candidate matching set, and these vectors are combined into a final matching set. For the real-time feature vector of each client user, the vector with the highest new similarity is selected from its corresponding final matching set as the best match, and the new similarity value corresponding to the best match is the matching score of the client user.
[0212] To speed up matching, we can employ parallel computing techniques, using multi-core processors or distributed computing frameworks to divide the real-time feature vector set into multiple subsets. Simultaneously, we can perform matching calculations on the feature vectors of different subsets against the global model parameter set. For example, we can use Python's multiprocessing library or distributed computing platforms (such as Hadoop and Spark) to implement parallel processing. We can also establish a cache system to record real-time feature vectors that have already been matched and their corresponding matching results. When encountering the same or similar feature vectors again, we can directly retrieve the matching score from the cache, avoiding repeated calculations and improving the system's response speed.
[0213] In S82, in one implementation, different models are suitable for different data features and business scenarios. For example, random forests excel at processing high-dimensional data and preventing overfitting, gradient boosted trees are advantageous at mining weak features in data and improving prediction accuracy, and deep neural networks are adept at handling complex nonlinear relationships. Therefore, based on actual business needs, one of these models, random forests, gradient boosted trees, or deep neural networks, is selected to build a scoring model.
[0214] After selecting a model, it is trained using historical data to learn the inherent connection between the match score and the trust score. Once the model is trained, the match score for each client user is passed as input to the scoring model. Based on previously learned patterns, the scoring model analyzes and predicts the input match score, and then outputs the corresponding trust score for that client user.
[0215] Since the predictions of the scoring model may be affected by factors such as data distribution and model bias, the directly obtained trust score distribution may not be reasonable and consistent. In order to solve this problem, a scoring calibration mechanism is needed. For example, isotonic regression or Platt scaling methods can be used to calibrate the trust score output by the model. In specific operations, the calibration model is fitted with the data of the test set. The test set data can reflect the performance of the model on untrained data. By fitting the calibration model, a suitable mapping relationship is found to convert the trust score originally output by the model into a score that is more in line with the actual distribution. Afterwards, this calibration model is applied to the actual predicted score to ensure that the final output trust score distribution is consistent, thereby improving the reliability and usability of the score.
[0216] In another implementation, multiple basic models, such as random forests, gradient boosting trees, and deep neural networks, are trained separately. These models are then combined into an ensemble, known as the scoring model. The predictions from each basic model for the same input are then arithmetic averaged to produce the output. For each client user, their match score is input into the ensemble's scoring model, which then predicts the trust score for that client user based on the input match score.
[0217] To make the predictions of scoring models more valuable, uncertainty estimates and confidence intervals are required. Different approaches are used for different underlying models: For deep neural networks, the Monte Carlo Dropout method is used. Multiple forward propagations are performed during the prediction phase to obtain multiple predictions. The mean and standard deviation of these distributions are calculated to obtain uncertainty estimates and confidence intervals. For random forests and gradient boosting trees, the Bayesian method is used. Model parameters are sampled as random variables. The predicted distribution is derived from the sampling results and confidence intervals are calculated. For scoring models, the confidence intervals are weighted averaged according to the weights of the underlying models to obtain the final confidence interval.
[0218] The trust score represents the average trust level of client users, while the confidence interval reflects the reliability of the trust score. If the width of the confidence interval is greater than the preset width threshold, it indicates that the scoring model's generalization ability may be poor. It is necessary to restructure the scoring model, increase training data, or optimize feature engineering. After optimizing the scoring model, recalculate the trust score to obtain a more accurate and reliable trust score result that more truly reflects the client user's trust level.
[0219] The preset scoring threshold can be a fixed threshold or a dynamic threshold. If it is a dynamic threshold, it is obtained by constructing a time series model based on historical data. This model can predict the changing trends of authentication scenarios. These predictions can provide trend references for subsequent threshold adjustments, making the threshold adjustments more forward-looking. After completing the risk level assessment, the corresponding risk level of each authentication scenario is clearly defined. Based on this, corresponding threshold strategies are formulated for different risk levels. For example, relatively high thresholds are set for high-risk scenarios, while lower thresholds are set for low-risk scenarios. This achieves differentiated threshold management and completes a risk-based threshold tiering mechanism. To ensure that thresholds can be updated reasonably, a preset threshold update strategy is required. During the update process, the thresholds are adjusted based on the prediction results and risk level provided by the time series model, and a threshold smoothing mechanism is implemented. This mechanism can prevent drastic fluctuations in the thresholds, ensure the stability of the threshold adjustment process, and ensure that the threshold changes at different stages are smoother and more reasonable. At the same time, the system must support scenario-adaptive adjustment, which means that the threshold can be dynamically optimized based on real-time changes in the authentication scenario. This ensures the effectiveness and adaptability of the threshold in different scenarios, regardless of the complex and changing authentication scenario, allowing for more accurate scoring. Furthermore, by maintaining a threshold change log that details the time, reason, and specific values before and after each threshold adjustment, this log data can provide rich material for subsequent analysis, helping to further optimize threshold strategies and continuously improve the dynamic threshold acquisition and adjustment mechanism.
[0220] In the first implementation, it is determined whether the client user's trust score is greater than a preset score threshold; if so, the client user's identity authentication result is determined to be passed; if not, the client user's identity authentication result is determined to be failed.
[0221] In another implementation, a decision model is constructed, incorporating multiple factors, such as the client user's trust score, risk level, and historical record, as input factors. These input factors are then weighted to determine the weight each factor contributes to the final decision, enabling a more accurate and comprehensive assessment of their impact. Leveraging a multi-factor fusion decision framework, the decision model comprehensively considers input factors, such as trust score, risk level, and historical record, according to pre-calculated weights. The decision logic, based on a rules engine, processes and judges this comprehensive information, outputting the client user's identity authentication result based on pre-defined rules. During the decision-making process, the system tracks and records each step, and a decision explanation mechanism is designed to provide a clear explanation of the output authentication result. Furthermore, the model supports a manual intervention interface, allowing for manual adjustment of decisions when necessary. A maintained decision audit log can be used for subsequent review and optimization of the decision-making process, thereby continuously improving the reliability and accuracy of the decision model.
[0222] After the central server obtains the authentication results for each client user, it operates in two modes, each catering to different business scenarios. In the first mode, the central server sends the authentication results belonging to the same client to the client. The client then grants the corresponding business functions and resource access rights to the authenticated user. For example, on an online learning platform, authenticated users can access the course page, watch instructional videos, and download learning materials. Furthermore, the client updates the user's authentication status to "Passed" and displays this information on the client interface to enhance the user experience and trust. The client denies business functions and resource access rights to users who fail authentication. For example, in an internal enterprise office system, unauthenticated users cannot log in to the system or access files and data. The client provides the user with a clear prompt explaining the reason for the authentication failure and directs them to re-authenticate, such as prompting them to re-enter their password. In the second mode, the central server does not send the authentication results to the client but instead processes the results independently, managing and adjusting user permissions based on the authentication results. For users who pass authentication, appropriate access rights are assigned; for users who fail authentication, their access rights are restricted or revoked. For example, in a large distributed system, a central server can control user access rights to different nodes and services. Another example is a financial transaction system. For users who pass authentication, the central server can initiate subsequent transaction processes; for users who fail authentication, the transaction is terminated and the user is prompted to reauthenticate.
[0223] In summary, this method employs a multi-layered privacy protection mechanism to comprehensively protect data and models, encompassing selective encryption, homomorphic encryption, differential privacy, and bit-by-bit scrambling. The selective encryption strategy effectively reduces computational overhead and improves system efficiency. The combination of homomorphic encryption and differential privacy ensures data anonymity while enabling secure model aggregation. The innovative introduction of a bit-by-bit scrambling mechanism further enhances the security of model parameters. Furthermore, a dynamic threshold adjustment mechanism is designed to improve the accuracy and adaptability of identity authentication.
[0224] Reference Figure 9 The present disclosure provides an identity authentication system based on federated learning, comprising:
[0225] Construction module 101, used to obtain original behavior data of local users and construct a local training data set based on the original behavior data;
[0226] The training module 102 is used to build a local model, train the local model based on a local training data set, and obtain a local model parameter set;
[0227] The transmission module 103 is used to selectively encrypt and transmit the local model parameter set to generate an encrypted parameter package;
[0228] Aggregation module 104, configured to aggregate encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set;
[0229] The protection module 105 is used to perform differential privacy protection on the aggregated encryption parameter set to obtain a confidentiality parameter set;
[0230] The scrambling module 106 is used to perform bit-by-bit scrambling on the confidentiality parameter set to obtain a global model parameter set;
[0231] The collection module 107 is used to collect the user's real-time behavior data and obtain a real-time feature vector set based on the real-time behavior data;
[0232] The authentication module 108 is used to perform feature matching on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user, and obtain an identity authentication result for each client user based on the trust score and a preset score threshold.
[0233] The various variations and specific examples of the federated learning-based identity authentication method provided above are also applicable to the federated learning-based identity authentication system provided in the present disclosure. Through the above detailed description of the federated learning-based identity authentication method, those skilled in the art can clearly understand the implementation method of the federated learning-based identity authentication system. For the sake of brevity, they will not be described in detail here.
[0234] The computer device according to an embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache). The non-volatile memory may include, for example, read-only memory (ROM), a hard disk, a flash memory, etc.
[0235] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In one embodiment of the present disclosure, the processor is configured to execute the computer-readable instructions stored in the memory, causing the computer device to perform all or part of the steps of the aforementioned federated learning-based identity authentication method of each embodiment of the present disclosure.
[0236] Those skilled in the art should understand that in order to solve the technical problem of how to obtain a good user experience, this embodiment may also include well-known structures such as a communication bus and an interface, and these well-known structures should also be included in the scope of protection of this disclosure.
[0237] like Figure 10 The present invention provides a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Figure 10 The computer device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0238] like Figure 10 As shown, the computer device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). Various programs and data required for the operation of the computer device are also stored in the RAM. The processor, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0239] Typically, the following devices can be connected to the I / O interface: input devices such as sensors or visual information acquisition devices; output devices such as display screens; storage devices such as tapes and hard disks; and communication devices. The communication device can allow the computer device to communicate with other devices (such as edge computing devices) wirelessly or by wire to exchange data. Figure 10A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0240] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by the processor, all or part of the steps of the federated learning-based identity authentication method of the embodiment of the present disclosure are executed.
[0241] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.
[0242] According to an embodiment of the present disclosure, a computer-readable storage medium stores non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the aforementioned federated learning-based identity authentication method of each embodiment of the present disclosure are executed.
[0243] The above-mentioned computer-readable storage media include, but are not limited to, optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or mobile hard disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROM (e.g., ROM cartridges).
[0244] For detailed description of this embodiment, please refer to the corresponding description in the aforementioned embodiments, which will not be repeated here.
[0245] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this disclosure are merely illustrative and not restrictive, and should not be construed as necessarily possessed by each embodiment of the present disclosure. Furthermore, the specific details disclosed above are provided for illustrative purposes and to facilitate understanding, rather than as limitations. These details do not limit the present disclosure to necessarily being implemented using these specific details.
[0246] In the present disclosure, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. The block diagrams of the devices, devices, equipment, and systems involved in the present disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, devices, equipment, and systems can be connected, arranged, or configured in any manner. Words such as "including," "comprising," "having," and the like are open-ended words, meaning "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0247] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.
[0248] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0249] Various changes, substitutions, and modifications may be made to the technology described herein without departing from the teachings defined by the appended claims. Moreover, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of things, means, methods, and actions described above. Currently existing or later developed processes, machines, manufactures, compositions of things, means, methods, or actions that perform substantially the same function or achieve substantially the same results as the corresponding aspects described herein may be utilized. Accordingly, the appended claims include within their scope such processes, machines, manufactures, compositions of things, means, methods, or actions.
[0250] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0251] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. An identity authentication method based on federated learning, characterized in that: include: Obtaining original behavior data of local users, and building a local training data set based on the original behavior data; Building a local model, training the local model based on the local training data set, and obtaining a local model parameter set; Selectively encrypting and transmitting the local model parameter set to generate an encrypted parameter package; Aggregate the encryption parameter packages of multiple clients through homomorphic encryption to generate an aggregated encryption parameter set; Performing differential privacy protection on the aggregated encryption parameter set to obtain a confidential parameter set; Performing bit-by-bit scrambling on the confidentiality parameter set to obtain a global model parameter set; Collecting real-time behavior data of users, and obtaining a real-time feature vector set based on the real-time behavior data; Feature matching is performed on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user, and based on the trust score and a preset score threshold, an identity authentication result for each client user is obtained.
2. The identity authentication method based on federated learning according to claim 1, characterized in that: The obtaining of original behavior data of local users and constructing a local training data set based on the original behavior data includes: Collect original behavior data of local users and build original data sets; Preprocessing the original data set to obtain a feature vector set; constructing random noise for each eigenvector in the eigenvector set using a Laplace mechanism, and adding the random noise to the eigenvector; Format the feature vector with added noise to obtain the local training dataset.
3. The identity authentication method based on federated learning according to claim 2, characterized in that: The training of the local model based on the local training data set to obtain a local model parameter set includes: Initialize the local model and configure the Adam optimizer, as well as set the batch size based on the local device memory; Divide the local training data set into a training set and a validation set, extract preset scale data from the training set, and initialize the current round to 0; Extracting data from the preset scale data according to the batch size, training the initialized local model based on the extracted data, and obtaining the gradient of the model parameters; Use the Adam optimizer to update the model parameters according to the calculated gradient; Evaluate the current local model using the validation set, obtain multiple evaluation values and validation set losses, and increase the current round by 1; When the validation set loss decreases in N consecutive rounds and the decrease is greater than a preset decrease threshold, the preset scale data is updated and the current local model is continued to be trained according to the new preset scale data; When each of the evaluation values meets the corresponding evaluation threshold, the training is stopped, the parameters of the current local model are obtained and a local model parameter set is formed.
4. The identity authentication method based on federated learning according to claim 1, characterized in that: The selectively encrypting and transmitting the local model parameter set to generate an encrypted parameter package includes: performing an importance analysis on the local model parameter set to obtain a comprehensive contribution of each parameter in the local model parameter set to the local model, and dividing the local model parameter set into a key parameter set and a non-key parameter set based on the comprehensive contribution; A master key pair is regularly generated by a third-party organization, and the third-party organization and the client generate a temporary session key for key parameter encryption based on a key exchange protocol; The third party encrypts the temporary session key using the public key in the master key pair to obtain an encrypted session key, and sends the encrypted session key generated by the third party and the private key in the master key pair to the client; Obtaining a decrypted temporary session key based on the received private key and the encrypted session key, performing block encryption on the key parameter set based on the decrypted temporary session key, and generating encrypted data blocks in real time; deriving a session key based on the received private key, and generating an encryption key based on the session key and a shared key derivation function; Using a stream cipher algorithm, selectively encrypting the non-critical parameter set based on the encryption key to generate encryption parameters in real time; The generated encrypted data block and encryption parameters are compressed to generate an encryption parameter package.
5. The identity authentication method based on federated learning according to claim 4, characterized in that: The encryption parameter packages of multiple clients are aggregated by homomorphic encryption to generate an aggregated encryption parameter set, including: Receive the encrypted parameter package sent by each client, perform integrity verification on the encrypted parameter package, and obtain a valid parameter set; Aggregation and homomorphic encryption operations are performed on the valid parameter set to output an aggregated encryption parameter set.
6. The identity authentication method based on federated learning according to claim 1, characterized in that: The performing differential privacy protection on the aggregated encryption parameter set to obtain a confidentiality parameter set includes: Obtaining the local sensitivity and global sensitivity of each parameter in the aggregated encryption parameter set; Based on the local sensitivity and the global sensitivity, construct a parameter sensitivity graph, where each node in the parameter sensitivity graph represents a parameter in the aggregated encryption parameter set, and the edges in the parameter sensitivity graph represent the association between nodes; Dividing the parameters represented by each node in the parameter sensitivity graph into a plurality of parameter groups based on the correlation degree; Allocating a privacy budget to each parameter group using a proportional allocation method; Noise is injected into each of the parameter groups based on the privacy budget, and the parameter groups into which noise is successfully injected are combined into a confidential parameter set.
7. The identity authentication method based on federated learning according to claim 1, characterized in that: The performing feature matching on the global model parameter set and the real-time feature vector set to obtain a trust score for each client user includes: Performing feature matching on the global model parameter set and the real-time feature vector set to obtain a matching score for each client user; Based on the scoring model and the matching score, a trust score for each client user is obtained.
8. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the identity authentication method based on federated learning as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which are used to enable a computer to execute the identity authentication method based on federated learning as described in any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Multi-party collaborative privacy computing-oriented trusted execution method and device and storage medium
CN121056187A
Trust-based data inspection method and system in crowd sensing
CN121580445A
Trust-based data verification method and system in crowd sensing
CN121580445B