Model Training Methods and Systems Based on Federated Learning and Homomorphic Encryption

By using homomorphic encryption and anomaly detection techniques in federated learning, the problems of privacy leakage and insufficient model accuracy in traditional federated learning are solved, enabling secure and efficient model training in encrypted form and improving the overall accuracy and privacy protection capabilities of the model.

CN123074677APending Publication Date: 2026-11-10PUTIAN EASTERN COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611196916.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Traditional federated learning schemes suffer from privacy risks and insufficient model accuracy during model training. In particular, the model parameters or gradient information of local computing nodes are easily reverse-engineered by attackers during the uploading process, and the addition of noise reduces model accuracy.

Method used

A model training method based on federated learning and homomorphic encryption is adopted. By homomorphically encrypting the local model parameter updates, the central server aggregates them in encrypted form to ensure data privacy and security. Abnormal data is filtered out through anomaly detection and parameter difference detection to improve model accuracy.

Benefits of technology

While ensuring data privacy, the training accuracy of the model was improved, and the leakage of local model parameter updates was avoided, thus achieving a balance between privacy protection and model accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074677A_ABST
    Figure CN123074677A_ABST
Patent Text Reader

Abstract

This invention relates to the field of data security technology and discloses a model training method and system based on federated learning and homomorphic encryption. The method includes: receiving encrypted model update data sent by each local computing node, wherein the encrypted model update data is obtained by the local computing node homomorphically encrypting the local model parameter update amount using a homomorphic public key, and the local model parameter update amount is obtained by the local computing node training its local model based on the initial global model parameters issued by a central server; performing homomorphic aggregation processing on all the encrypted model update data to obtain encrypted global model update data; and distributing the encrypted global model update data to each local computing node so that the local computing nodes can train their local models based on the encrypted global model update data to obtain a target global model. By implementing the method of this application, the problems of privacy leakage risks and insufficient model accuracy that may exist in multi-source data collaborative modeling can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, specifically to a model training method and system based on federated learning and homomorphic encryption. Background Technology

[0002] With the rapid development of big data and artificial intelligence technologies, many data holding institutions urgently need to collaborate on data from multiple institutions for collaborative modeling in business scenarios such as customer behavior risk identification, comprehensive customer credit scoring, and abnormal behavior screening to improve the accuracy and generalization ability of their models. However, because the raw data involves a large amount of customer privacy and sensitive information, hastily sharing the data may lead to privacy leaks.

[0003] Related technologies have been introduced into federated learning schemes. Federated learning, as a distributed machine learning framework, allows multiple local computing nodes to collaboratively train a global model by exchanging model parameters or gradient information without sharing the original data, providing an effective way to solve the aforementioned problems. However, traditional federated learning schemes still have the following technical problems in practical applications: Each local computing node needs to upload its locally trained model parameters or gradients to a central server for aggregation. Attackers can analyze the model parameters or gradient information to infer the characteristics of the local training data of the local computing nodes, leading to the leakage of user privacy. Secondly, although some schemes use techniques such as differential privacy to add noise, the introduction of noise will reduce model accuracy, making it difficult to achieve a good balance between privacy protection and model utility. Summary of the Invention

[0004] This invention provides a model training method and system based on federated learning and homomorphic encryption to address the potential privacy risks and insufficient model accuracy issues in collaborative modeling of multi-source data.

[0005] In a first aspect, the present invention provides a model training method based on federated learning and homomorphic encryption, applied to a central server. The method includes: receiving encrypted model update data sent by each local computing node, wherein the encrypted model update data is obtained by the local computing node using a homomorphic public key to homomorphically encrypt the local model parameter update amount, and the local model parameter update amount is obtained by the local computing node training the local model based on the initial global model parameters issued by the central server; performing homomorphic aggregation processing on all the encrypted model update data to obtain encrypted global model update data; and distributing the encrypted global model update data to each local computing node so that the local computing node trains the local model based on the encrypted global model update data to obtain a target global model, which is used for risk assessment.

[0006] In one optional implementation, homomorphic aggregation is performed on all encrypted model update data to obtain encrypted global model update data, including: performing anomaly detection on any encrypted model update data to obtain anomaly detection results; based on the anomaly detection results, selecting target encrypted model update data that passes the anomaly detection from multiple encrypted model update data; and performing weighted homomorphic aggregation on all target encrypted model update data to obtain encrypted global model update data.

[0007] In one optional implementation, anomaly detection is performed on the encrypted model update data to obtain anomaly detection results, including: obtaining verification information corresponding to the encrypted model update data; using the verification information to perform validity verification on the encrypted model update data to obtain a verification result; if the verification result indicates that the encrypted model update data passes the validity verification, then gradient anomaly detection is performed on the encrypted model update data to obtain anomaly detection results; wherein, the verification information includes the node identifier of the local computing node and the encrypted timestamp corresponding to the encrypted model update data.

[0008] In an optional implementation, the method further includes: if the anomaly detection result indicates that the encrypted model update data has failed the gradient anomaly detection, then add a target marker to the target local computing node corresponding to the encrypted model update data; if the total number of target markers corresponding to the target local computing node is greater than or equal to the marker threshold, then no longer receive the encrypted model update data sent by the local computing node.

[0009] In one optional implementation, encrypted global model update data is distributed to each local computing node so that the local computing nodes can train their local models based on the encrypted global model update data to obtain the target global model. This includes: acquiring parameter difference quantification indicators sent by each local computing node, wherein the parameter difference quantification indicators characterize the parameter differences between the local model in the current training round and the local model in the previous training round; averaging all parameter difference quantification indicators to obtain the global parameter difference mean; if the global parameter difference mean is greater than a convergence threshold, then the encrypted global model update data is distributed to each local computing node so that the local computing nodes can continue to train their local models based on the encrypted global model update data; if the global parameter difference mean is less than or equal to the convergence threshold, then the encrypted global model update data is distributed to each local computing node so that the local computing nodes can obtain the target global model based on the encrypted global model update data.

[0010] Secondly, this invention provides a model training method based on federated learning and homomorphic encryption, applied to a local computing node. The method includes: receiving initial global model parameters from a central server and obtaining a local model based on these parameters; iteratively training the local model using local training data to obtain model update parameters; determining the local model parameter update amount using the difference between the model update parameters and the initial global model parameters; encrypting the local model parameter update amount using a homomorphic public key issued by a key management center to obtain encrypted model update data; and sending the encrypted model update data to the central server, so that the central server performs homomorphic aggregation processing on all encrypted model update data to obtain a target global model, which is used for risk assessment.

[0011] In an optional implementation, the method further includes: receiving encrypted global model update data sent by a central server, wherein the encrypted global model update data is obtained by the central server performing homomorphic aggregation processing on all encrypted model update parameters; sending the encrypted global model update data to a key management center, so that the key management center decrypts the encrypted global model update data based on the homomorphic private key to obtain the global model update amount, and the homomorphic private key and the homomorphic public key constitute a homomorphic encryption key pair; receiving the global model update amount sent by the key management center; training a local model based on the global model update amount to obtain a parameter difference quantization index; and sending the parameter difference quantization index to the central server, so that the central server determines whether the model has converged based on all parameter difference quantization indices.

[0012] In an optional implementation, the method further includes: receiving the current training round from the central server; performing a continuity detection on the current training round to obtain a continuity detection result; if the continuity detection result indicates that the current training round and the previous training round are consecutively numbered, then sending the encrypted global model update data to the key management center.

[0013] In an optional implementation, the method further includes: sending the verification information of the local computing node to the central server, so that the central server can perform validity checks on the encryption model update parameters based on the verification information; wherein, the verification information includes the node identifier of the local computing node and the timestamp corresponding to the encryption model update data.

[0014] Thirdly, this invention provides a model training system based on federated learning and homomorphic encryption. The system includes a key management center, multiple local computing nodes, and a central server. The key management center generates homomorphic encryption key pairs, including a homomorphic public key and a homomorphic private key, and sends the homomorphic public key to each local computing node. The central server initializes initial global model parameters and sends these parameters to each local computing node. Each local computing node receives the initial global model parameters from the central server and obtains a local model based on them. Iterative training is performed on the local model using local training data to obtain model update parameters. The difference between the model update parameters and the initial global model parameters is used to determine the amount of local model parameter updates. The amount of local model parameter updates is encrypted using the homomorphic public key issued by the key management center to obtain encrypted model update data. The encrypted model update data is sent to the central server, which performs homomorphic aggregation processing on all encrypted model update data to obtain a target global model, which is used for risk assessment.

[0015] Fourthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform a model training method based on federated learning and homomorphic encryption as described in the first aspect or any corresponding embodiment.

[0016] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute a model training method based on federated learning and homomorphic encryption according to the first aspect or any corresponding embodiment described above.

[0017] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute a model training method based on federated learning and homomorphic encryption as described in the first aspect or any corresponding embodiment thereof.

[0018] The model training method based on federated learning and homomorphic encryption provided in this invention first encrypts the local model parameter updates of local computing nodes to obtain encrypted model update data, and then sends the encrypted model update data to a central server. The central server can then homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted form to obtain encrypted global model update data. After receiving the global model update data from the central server, the local computing nodes can continue training their local models based on the global model update data to obtain the final target global model. Because the central server can homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted form, leakage of local model parameter updates uploaded by local computing nodes to the server can be avoided, and no noise needs to be added, which can improve model accuracy. This achieves a good balance between model accuracy and data leakage, thus solving the problems of privacy leakage risks and insufficient model accuracy that may exist in multi-source data collaborative modeling. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first process of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention; Figure 3 This is a second flowchart illustrating a first flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention. Figure 4 This is a third flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention. Figure 5 This is a fourth flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention. Figure 6 This is a structural block diagram of a model training device based on federated learning and homomorphic encryption according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0023] As an optional application scenario of this invention, such as Figure 1 As shown, the model training system based on federated learning and homomorphic encryption may include a key management center 101, multiple local computing nodes 102, and a central server 103. The key management center 101, the multiple local computing nodes 102, and the central server 103 can communicate and connect with each other via a network.

[0024] For example, the key management center 101 can be various types of security systems or servers capable of providing homomorphic key generation and management, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, stand-alone physical servers, server clusters, or distributed systems, etc.

[0025] For example, local computing node 102 may be a local computer device or server of a data holding organization, etc.

[0026] For example, the central server 103 can be various types of computing systems or servers capable of providing computing power, including but not limited to mainframes, edge computing nodes, computing devices in cloud environments, etc.

[0027] For example, the network can be a wired network or a wireless network, examples of which include, but are not limited to, the Internet, corporate intranets, local area networks (LANs), wide area networks (WANs), mobile communication networks, and combinations thereof. It should be noted that... Figure 1 This is merely an example of an application scenario and does not limit the scope of protection of this invention.

[0028] To address the potential privacy risks and insufficient model accuracy issues in collaborative modeling of multi-source data, this invention provides an embodiment of a model training method based on federated learning and homomorphic encryption. It should be noted that the steps shown in the flowcharts can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be executed in a different order than that presented here.

[0029] This embodiment provides a model training method based on federated learning and homomorphic encryption, which can be used on a central server. Figure 2 This is a flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Receive encrypted model update data sent by each local computing node. The encrypted model update data is obtained by the local computing node using a homomorphic public key to homomorphically encrypt the local model parameter update amount. The local model parameter update amount is obtained by the local computing node training the local model based on the initial global model parameters issued by the central server.

[0030] Local computing nodes can represent the local computer devices, servers, etc., of various data-holding institutions participating in the modeling process, such as banks. Furthermore, local computing nodes store local training data. During the collaborative modeling process involving multiple local computing nodes, the local training data for a single local computing node may or may not be the same across different training rounds.

[0031] The local model can be a replica model stored on the corresponding local computing node. Specifically, for the first training epoch, the local model can be built based on a preset model architecture and the initial global model parameters issued by the central server. For the second training epoch, the local model corresponding to the local computing node can be built by combining the previous epoch's data with the encrypted global model update data issued by the central server, and so on.

[0032] Homomorphic encryption is a special encryption algorithm where ciphertext can be directly weighted and aggregated, with the result equivalent to encrypting the aggregated plaintext. The key management center can generate a homomorphic encryption key pair based on a partial homomorphic encryption algorithm from Paillier (Pailliercryptosystem) or an approximate hierarchical homomorphic encryption algorithm (Cheon-Kim-Kim-Song, CKKS). This homomorphic encryption key includes a public key and a private key. The public key is used by each local computing node to encrypt the local model parameter updates, while the private key is used to decrypt the aggregated encrypted global model update data. The key management center can assign a unique local computing node identifier to each local computing node for identification during subsequent communication and aggregation.

[0033] Subsequently, the key management center can securely distribute the public key and the node identifier of the local computing node to each local computing node through a pre-established secure channel, such as using Transport Layer Security / Secure Sockets Layer (TLS / SSL) or Internet Protocol Security (IPSec) protocols, while the homomorphic private key is stored by the key management center. For example, the key management center can use a Hardware Security Module (HSM) to physically store the homomorphic private key and configure strict access control policies to allow only authorized decryption operations, thereby preventing the private key from being stolen or misused.

[0034] In addition, the key management center generates a unified parameter set, which includes parameters required by the encryption algorithm such as key length, modulus, homomorphic operation parameters such as weight coefficients during aggregation, truncation threshold, and convergence judgment parameters such as global parameter difference threshold and maximum number of iterations. This parameter set is then distributed to the central server and all local computing nodes to ensure that the encryption methods and judgment standards used by all parties are consistent throughout the training process, laying a unified cryptographic foundation for subsequent secure federated learning.

[0035] After completing global initialization, the central server generates initial global model parameters. This information is then broadcast to all local compute nodes as the starting point for joint training. For each local compute node, the initial global model parameters are received. Then, the local dataset corresponding to the local computing node is used. For the initial global model parameters The corresponding local model is trained to obtain the model update parameters. Then, the stochastic gradient descent algorithm can be used to iteratively calculate and output the local model parameter update amounts, i.e., the gradient information. This gradient information reflects the direction of contribution of the local training data corresponding to the local computing node to model optimization.

[0036] Subsequently, to prevent the plaintext gradient from leaking local data privacy during the upload process, each local computing node calls the homomorphic public key pk, which is pre-distributed by the key management center, to process the calculated gradient information. Perform homomorphic encryption to obtain the encryption gradient data in the ciphertext state. ,in, These are the standard cryptographic function notations in cryptography. for The abbreviation indicates that encryption is performed using a homomorphic public key (pk). This operation ensures that even if the ciphertext is intercepted during transmission, it is impossible to reverse engineer any original gradient values. Subsequently, each local compute node encrypts its own gradient data along with a unique local compute node identifier. (i=1,2,…,n, where n is the total number of local computing nodes) and the current timestamp are uploaded to the central server via a secure transmission protocol (such as TLS / SSL) to provide reliable input for subsequent ciphertext aggregation.

[0037] Step S202: Perform homomorphic aggregation on all encrypted model update data to obtain encrypted global model update data.

[0038] Optionally, homomorphic aggregation is based on homomorphic encryption. Leveraging the characteristic of homomorphic encryption that it supports direct computation of ciphertext, weighted summation of gradient ciphertexts can be performed without decryption. The encrypted global model update data is a unified global gradient ciphertext generated by homomorphically weighted aggregation of gradient ciphertexts uploaded by all local computing nodes, thus maintaining its ciphertext format.

[0039] The central server, based on the preset weight coefficients of each local computing node (which can be dynamically adjusted according to the local data volume, data quality, or historical contribution of each local computing node), utilizes the additive homomorphic property of homomorphic encryption to perform a weighted summation operation on the encryption gradient of each local computing node in the ciphertext state. That is, it performs homomorphic scalar multiplication and homomorphic addition operations on the ciphertext of each encryption gradient to generate a weighted aggregated encryption global gradient, which is the encryption global model update data.

[0040] Step S203 involves distributing the encrypted global model update data to each local computing node, enabling the local computing nodes to train their local models based on the encrypted global model update data to obtain the target global model. The target global model is used for risk assessment.

[0041] The central server distributes the aggregated encrypted global model update data, along with the current iteration round number, to each local computing node via a secure transmission channel. Local computing nodes update their local models based on the encrypted global model data, iterating repeatedly until training is complete, generating the final target global model. This model is specifically designed for various business risk assessment tasks, such as customer credit scoring, fraud prevention, abnormal transaction identification, and customer behavior risk screening.

[0042] The model training method based on federated learning and homomorphic encryption provided in this invention involves local computing nodes encrypting their local model parameter updates to obtain encrypted model update data, which is then sent to a central server. The central server can then homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted form to obtain encrypted global model update data. After receiving the global model update data from the central server, local computing nodes can continue training their local models based on this data, thereby obtaining the final target global model. Because the central server can homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted form, leakage of local model parameter updates uploaded to the server by local computing nodes can be avoided. Furthermore, no noise needs to be added, which can improve model accuracy. This achieves a good balance between model accuracy and data leakage, thus solving the problems of privacy leakage risks and insufficient model accuracy that may exist in multi-source data collaborative modeling.

[0043] This embodiment provides a model training method based on federated learning and homomorphic encryption, which can be used on a central server. Figure 3 This is a flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Receive encrypted model update data sent by each local computing node. The encrypted model update data is obtained by the local computing node homomorphically encrypting the local model parameter update amount using a homomorphic public key. The local model parameter update amount is obtained by the local computing node training its local model based on the initial global model parameters issued by the central server. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0044] Step S302: Perform homomorphic aggregation on all encrypted model update data to obtain encrypted global model update data.

[0045] Specifically, step S302 includes: Step S3021: For any encryption model update data, perform anomaly detection on the encryption model update data and obtain the anomaly detection result.

[0046] Anomaly detection here can verify the identity and legality of the encrypted model update data, as well as the data content, to ensure that the encrypted model update data is secure and can participate in homomorphic aggregation operations.

[0047] In some optional implementations, step S3022 above includes: Step a1: Obtain the verification information corresponding to the encrypted model update data. This verification information includes the node identifier of the local computing node and the encrypted timestamp corresponding to the encrypted model update data.

[0048] Step a2: Use the verification information to verify the validity of the encrypted model update data and obtain the verification result.

[0049] Step a3: If the verification result indicates that the encrypted model update data passes the validity verification, then gradient anomaly detection is performed on the encrypted model update data to obtain the anomaly detection result.

[0050] As a concrete example, verification information can be reported to the server individually by each local computing node. Alternatively, each local computing node, after encrypting the local model parameter updates using a homomorphic public key to obtain encrypted model update data, can package the verification information and the encrypted model update data together into an encrypted data packet, and send the encrypted data packet to the central server. The central server can then use the encrypted data packet to obtain the verification information.

[0051] After obtaining the verification information corresponding to the encrypted model update data, the central server can perform format verification and validity verification on the encrypted model update data based on the node identifier and encrypted timestamp of the local computing node included in the verification information. By comparing the node identifier of the local computing node with the registration list, the server determines the legitimacy of the local computing node corresponding to the encrypted model update. At the same time, the server checks whether the encrypted timestamp is within the preset valid window to resist replay attacks. Encrypted model update data with invalid node identifiers or expired encrypted timestamps are discarded, and only the encrypted model update data that has passed verification is retained to enter the aggregation process.

[0052] For example, gradient detection can be performed on the updated data of the encrypted model from two aspects: gradient norm detection and gradient direction detection.

[0053] Specifically, in terms of gradient norm detection, after receiving the encrypted model update data uploaded by each local computing node, the central server first calculates the L2 norm (i.e., the square root of the sum of the squares of the gradient values ​​in each dimension) of the gradient vector of each local computing node based on the encrypted model update data, obtaining a set of norm values. Then, it calculates the median and median absolute difference (MAD) of the gradient norms of all local computing nodes, and sets the norm threshold to the median plus N times the median difference (N is usually 3-5, and can be dynamically adjusted according to the training rounds). When the gradient norm of a local computing node exceeds this threshold, it indicates that the overall magnitude of its gradient is abnormally large or small, possibly indicating malicious poisoning or data deviation from the normal distribution, and it is immediately marked as an abnormal candidate.

[0054] Specifically, in gradient direction detection, the central server calculates the cosine similarity between every two local computing nodes, thereby obtaining the angle between a given local computing node and the average gradient direction of the other local computing nodes. Specifically, it first calculates the gradient center vectors (i.e., the mean of each dimension) of all local computing nodes, then calculates the cosine similarity between the gradient of the given local computing node and its center vector, and obtains the angle value using the inverse cosine. If the angle exceeds a preset angle threshold (usually set to 45 degrees or 60 degrees, which can be adjusted according to the number of local computing nodes), it indicates that the gradient direction of that local computing node significantly deviates from the mainstream direction, potentially attempting to guide the model away from the correct optimization path, and is thus marked as an anomalous candidate.

[0055] Step S3022: Based on the anomaly detection results, select the target encrypted model update data that has passed the anomaly detection from multiple encrypted model update data.

[0056] For example, if the anomaly detection result corresponding to an encrypted model update data indicates that the encrypted model update data has passed the anomaly detection, then the encrypted model update data can be identified as the target encrypted model update data to participate in subsequent homomorphic aggregation operations.

[0057] In some alternative implementations, the method further includes the step of: Step b1: If the anomaly detection result indicates that the encrypted model update data has failed the gradient anomaly detection, then add a target marker to the target local computing node corresponding to the encrypted model update data.

[0058] Step b2: If the total number of target tags corresponding to the target local computing node is greater than or equal to the tag threshold, then the encrypted model update data sent by the local computing node will no longer be received.

[0059] The target local computing node can be the local computing node corresponding to the encrypted model update data that failed gradient anomaly detection. A target marker can be used to identify when the central server received the anomalous encrypted model update data sent by the target local computing node. The target marker can be any form of marker, and this application does not impose any specific limitations on it.

[0060] As a specific example, the specific value of the marking threshold can be 3, but is not limited to 3, and can be any other suitable value. This application does not impose specific limitations on this, and it can be flexibly adjusted according to the actual situation.

[0061] As a concrete example, the central server maintains a continuous anomaly counter for each local computing node: if a target label is added in a training epoch, the counter is incremented by 1; otherwise, it is reset to zero. When the counter accumulates to exceed a preset labeling threshold (e.g., three consecutive epochs of anomalies), the local computing node is deemed untrustworthy. The central server permanently removes it from all subsequent training epochs and sends an alarm message containing the anomaly node's identifier and the reason for removal to other local computing nodes via a secure channel, enabling them to understand the network status and take appropriate measures. The above anomaly detection process is performed before encrypted aggregation and only performs statistical calculations based on encrypted gradient data, without involving any plaintext data exchange; therefore, it does not introduce any additional privacy leakage risks.

[0062] Step S3023: Perform weighted homomorphic aggregation on all target encryption model update data to obtain global encryption model update data. See the previous text for details.

[0063] Anomaly detection is performed on the encrypted model update data reported by each local computing node, and the encrypted model update data that passes the anomaly detection is identified as the target encrypted model update data. Furthermore, weighted homomorphic aggregation is performed on all target encrypted model update data to obtain the global encrypted model update data. This enables the filtering of illegal encrypted model update data and the control of local computing nodes that are maliciously attacked.

[0064] Step S303: The encrypted global model update data is distributed to each local computing node so that the local computing node can train the local model based on the encrypted global model update data to obtain the target global model, which is used for risk assessment.

[0065] Specifically, step S303 includes: Step S3031: Obtain the parameter difference quantification index sent by each local computing node. The parameter difference quantification index is used to characterize the parameter difference between the local model in the current training round and the local model in the previous training round of the corresponding local computing node.

[0066] After completing iterative training of the local model, the local computing node can independently calculate the quantitative index of parameter differences between the current round of local model and the previous round of local model, i.e. The parameter difference quantification index is then uploaded to the central server. This index quantifies the overall change in model weights on the local computing node during this training round.

[0067] Step S3032: Average all parameter difference quantification indicators to obtain the global parameter difference mean.

[0068] Optionally, after receiving the parameter difference quantification metrics reported by all local computing nodes, the central server calculates the arithmetic mean of all parameter difference quantification metrics and uses it as the global parameter difference mean. The global parameter difference mean can characterize the overall update level of this round of training.

[0069] Step S3033: If the mean difference of global parameters is greater than the convergence threshold, the encrypted global model update data is sent to each local computing node so that the local computing node can continue to train the local model based on the encrypted global model update data.

[0070] Optionally, the convergence threshold can be preset. This application does not further limit the convergence threshold, and it can be flexibly set according to the actual situation.

[0071] If the mean difference of global parameters is greater than the convergence threshold, it indicates that the local model corresponding to each local computing node has not been fully fitted and still has room for optimization. The central server then distributes the encrypted global model update data for the current training round to each local computing node so that the local computing nodes can continue to train the local model based on the encrypted global model update data.

[0072] Step S3034: If the mean difference of global parameters is less than or equal to the convergence threshold, the encrypted global model update data is sent to each local computing node so that the local computing node can obtain the target global model based on the encrypted global model update data.

[0073] If the mean difference in global parameters is less than or equal to the convergence threshold, it indicates that the local models corresponding to each local computing node have stabilized. Further iterations will have negligible impact on model performance, at which point the model training can be considered converged, and training is complete. Subsequently, the central server can send the encrypted global model update data for the current training round to each local computing node. Each local computing node can then combine the encrypted global model update data with the existing local model architecture to construct the final trained target global model.

[0074] The model training method based on federated learning and homomorphic encryption provided in this embodiment allows each local computing node to report parameter difference quantification indicators to the central server. The central server then averages all parameter difference quantification indicators to obtain the global parameter difference mean. This global parameter difference mean can then be used to accurately determine whether the local model corresponding to each local computing node has converged. If it has not converged, the next round of training can be triggered promptly. If it has converged, the encrypted global model update data can be promptly distributed to each local computing node.

[0075] This embodiment provides a model training method based on federated learning and homomorphic encryption, which can be used on local computing nodes. Figure 4 This is a flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps: Step S401: Receive the initial global model parameters sent by the central server, and obtain the local model based on the initial global model parameters.

[0076] Optionally, the global model parameters can be initialized by the central server. and the initial global model parameters The initial global model parameters are then distributed to each local compute node. For any given local compute node, upon receiving the initial global model parameters from the central server... Then, based on these initial global model parameters... And a local model is obtained by building a preset model architecture.

[0077] Step S402: Use local training data to iteratively train the local model to obtain the model update parameters.

[0078] For any local compute node, the local compute node can utilize the local dataset. The local model is trained to obtain the updated local model; then, the model parameters corresponding to the updated local model can be determined as the model update parameters.

[0079] Step S403: Determine the amount of local model parameter update by using the difference between the model update parameters and the initial global model parameters.

[0080] As a concrete example, the difference between the updated model parameters and the initial global model parameters can be used to determine the amount of local model parameter updates. Additionally, in some cases, stochastic gradient descent can be used to calculate the local model parameter updates, i.e., the gradient information (including weight gradients and bias gradients).

[0081] Step S404: Using the homomorphic public key issued by the key management center, the local model parameter update is encrypted to obtain encrypted model update data. See the previous text for details.

[0082] Step S405: Send the encrypted model update data to the central server so that the central server can perform homomorphic aggregation processing on all the encrypted model update data to obtain the target global model, which is used for risk assessment.

[0083] The local computing node encrypts the local model parameter update to obtain encrypted model update data, and sends the encrypted model update data to the central server. In this way, the central server can perform homomorphic aggregation on the encrypted model update data uploaded by all local computing nodes in encrypted state to obtain encrypted global model update data. After receiving the global model update data sent by the central server, the local computing node can continue to train the local model based on the global model update data, thereby obtaining the final target global model.

[0084] The model training method based on federated learning and homomorphic encryption provided in this embodiment can avoid leakage of local model parameter updates uploaded by local computing nodes to the server because the central server can homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted state. Moreover, it does not require adding noise, which can improve model accuracy. Thus, a good balance can be achieved between model accuracy and data leakage, thereby solving the problems of privacy leakage risk and insufficient model accuracy that may exist when multi-source data collaborative modeling.

[0085] This embodiment provides a model training method based on federated learning and homomorphic encryption, which can be used on local computing nodes. Figure 5 This is a flowchart of a model training method based on federated learning and homomorphic encryption according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps: Step S501: Receive the initial global model parameters sent by the central server, and obtain the local model based on the initial global model parameters. For details, please refer to [link to relevant documentation]. Figure 4 Step S401 of the illustrated embodiment will not be described again here.

[0086] Step S502: Using local training data, iteratively train the local model to obtain the model update parameters. For details, please refer to [link to relevant documentation]. Figure 4 Step S402 of the illustrated embodiment will not be described again here.

[0087] Step S503: Determine the amount of local model parameter update using the difference between the updated model parameters and the initial global model parameters. For details, please refer to [link to relevant documentation]. Figure 4Step S403 of the illustrated embodiment will not be described again here.

[0088] Step S504: Using the homomorphic public key issued by the key management center, encrypt the local model parameter update data to obtain encrypted model update data. For details, please refer to [link to relevant documentation]. Figure 4 Step S404 of the illustrated embodiment will not be described again here.

[0089] Step S505: The encrypted model update data is sent to the central server, so that the central server performs homomorphic aggregation processing on all the encrypted model update data to obtain the target global model, which is used for risk assessment. For details, please refer to [link to relevant documentation]. Figure 4 Step S405 of the illustrated embodiment will not be described again here.

[0090] In some alternative implementations, the method further includes: Step S506: Receive encrypted global model update data from the central server. This encrypted global model update data is obtained by the central server performing homomorphic aggregation processing on all encrypted model update parameters. The process of the central server performing homomorphic aggregation processing on all encrypted model update parameters can be found above.

[0091] Step S507: Send the encrypted global model update data to the key management center so that the key management center can decrypt the encrypted global model update data based on the homomorphic private key to obtain the global model update amount, and the homomorphic private key and the homomorphic public key constitute a homomorphic encryption key pair.

[0092] After receiving the encrypted global model update data from the local computing node, the key management center first performs dual authentication on the local computing node's authorization credentials and node identifier to confirm its legitimate decryption permissions. Then, it uses the homomorphic private key `sk` stored in the hardware security module to homomorphically decrypt the encrypted global model update data, obtaining the plaintext global model update. Subsequently, the key management center returns the decrypted global model update to the corresponding local computing node via a secure channel.

[0093] Step S508: Receive the global model update amount sent by the key management center.

[0094] Step S509: Based on the global model update amount, train the local model to obtain the parameter difference quantification index.

[0095] Step S510: The parameter difference quantification index is sent to the central server, which then determines whether the model has converged based on all the parameter difference quantification indices. See the previous text for details.

[0096] After receiving the global model update, the local computing node can perform gradient descent updates of the local model parameters according to the preset learning rate η, that is... Complete the current round of local model iteration and obtain the updated local model parameters. This leads to the updated local model. Throughout this process, the homomorphic private key is always kept independently by the key management center and is not exposed to the outside world. The local computing nodes and the central server have no access to the decryption key, thus ensuring decryption efficiency while achieving strict access control and security isolation of gradient information.

[0097] After building the updated local model, the local computing node can continue training the updated model based on the local training data, thus obtaining the model update parameters for this training epoch. Then, by analyzing the parameter differences between the current epoch and the previous epoch, a parameter difference quantification index is obtained. Subsequently, the local computing node can send the parameter difference quantification index, the encrypted model update data, and the verification information mentioned above to the central server. The central server can determine whether the local models for each local computing node have converged based on the parameter difference quantification index; and perform anomaly detection on the encrypted model update data based on the verification information, etc.

[0098] In some alternative implementations, the method further includes: Step c1: Receive the current training round from the central server.

[0099] Step c2: Before sending the encrypted global model update data to the key management center, perform a continuity check on the current training round to obtain the continuity check result.

[0100] Step c3: If the continuity detection result indicates that the current training round and the previous training round are consecutively numbered, then the encrypted global model update data is sent to the key management center.

[0101] Optionally, the current training round is the sequence number of the current federated iteration marked by the central server, such as round 2, round 3, etc., with the global training round number incremented by 1 after each round. Number continuity detection is a necessary security check logic used to determine if the current round number is equal to the previous round number + 1, preventing issues such as old round message replay, message out-of-order delivery, and forged round number attacks. The continuity detection result includes two states: continuous and discontinuous. Continuous means the current round number is exactly the previous round number sequence + 1; discontinuous means that issues such as skipped numbers, duplicate round numbers, or rollback of old round numbers have occurred, indicating that the current message is abnormal.

[0102] Each local compute node first receives the encrypted global model update data from the central server and performs a continuity check on the iteration round number carried within it. This verifies the continuity of the current iteration round number 't' to ensure the temporal consistency of the training process and prevent abnormal updates caused by replay attacks or out-of-order data. After successful verification, each local compute node packages the encrypted global gradient along with its own local compute node identifier and authorization credentials into a data packet and submits it to the key management center via a secure channel such as TLS / SSL.

[0103] After receiving the current training round number from the central server, the local computing node first checks whether the number immediately follows the valid round number of the previous round and outputs the continuity detection result. If the round number of the current round is sequentially increasing compared to the previous round, it means that the numbers are consecutive, and the received encrypted global model update data is sent to the key management center for decryption.

[0104] In some alternative implementations, the method further includes: Step d1 involves sending the verification information of the local computing node to the central server, so that the central server can perform validity checks on the encryption model update parameters based on the verification information; wherein, the verification information includes the node identifier of the local computing node and the timestamp corresponding to the encryption model update data.

[0105] As mentioned earlier, verification information can be reported to the server individually by each local computing node. Of course, for each local computing node, after encrypting the local model parameter update amount using a homomorphic public key to obtain encrypted model update data, it can package the verification information and the encrypted model update data together to obtain an encrypted data packet, and send the encrypted data packet to the central server. The central server can then use the encrypted data packet to obtain the verification information.

[0106] The model training method based on federated learning and homomorphic encryption provided in this embodiment involves local computing nodes receiving encrypted global model update data from the central server. First, they perform a sequential numbering check based on the current training round. Only if the round numbers are consecutive is the encrypted global model update data sent to the key management center. The key management center decrypts the data using a paired homomorphic private key to obtain the global model update amount. The local nodes then update their local models based on the global model update amount, calculate the parameter difference quantification index, and report it to the central server. The central server then uses the indices of all nodes to determine whether the model has converged. Because the central server can homomorphically aggregate the encrypted model update data uploaded by all local computing nodes in encrypted form, the leakage of local model parameter update amounts uploaded by local computing nodes to the server can be avoided.

[0107] This embodiment also provides a model training device based on federated learning and homomorphic encryption, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0108] This embodiment provides a model training device based on federated learning and homomorphic encryption, applied to a central server, such as... Figure 6 As shown, the device includes: The data receiving module 601 is used to receive encrypted model update data sent by each local computing node. The encrypted model update data is obtained by the local computing node using homomorphic public key to homomorphically encrypt the local model parameter update amount. The local model parameter update amount is obtained by the local computing node training the local model based on the initial global model parameters issued by the central server.

[0109] The data aggregation module 602 is used to perform homomorphic aggregation processing on all encrypted model update data to obtain encrypted global model update data.

[0110] The data sending module 603 is used to send encrypted global model update data to each local computing node, so that the local computing node can train the local model based on the encrypted global model update data to obtain the target global model, which is used for risk assessment.

[0111] In some optional implementations, the data aggregation module 602 includes: an anomaly detection submodule, used to perform anomaly detection on any encrypted model update data and obtain anomaly detection results; a data filtering submodule, used to filter target encrypted model update data that passes anomaly detection from multiple encrypted model update data based on the anomaly detection results; and a homomorphic aggregation submodule, used to perform weighted homomorphic aggregation on all target encrypted model update data to obtain encrypted global model update data.

[0112] In some optional implementations, the anomaly detection submodule includes: an information acquisition unit for acquiring verification information corresponding to the encrypted model update data; a data verification unit for using the verification information to perform validity verification on the encrypted model update data and obtain a verification result; and a gradient detection unit for performing gradient anomaly detection on the encrypted model update data and obtaining an anomaly detection result if the verification result indicates that the encrypted model update data has passed the validity verification.

[0113] In some optional implementations, the device further includes: a node marking module, used to add a target mark to the target local computing node corresponding to the encrypted model update data if the anomaly detection result indicates that the encrypted model update data has failed the gradient anomaly detection; and a data rejection module, used to stop receiving the encrypted model update data sent by the local computing node if the total number of target marks corresponding to the target local computing node is greater than or equal to the marking threshold.

[0114] In some optional implementations, the data sending module 603 includes: a difference acquisition submodule, used to acquire parameter difference quantification indicators sent by each local computing node, wherein the parameter difference quantification indicators are used to characterize the parameter difference between the local model of the corresponding local computing node in the current training round and the local model in the previous training round; a mean processing submodule, used to average all parameter difference quantification indicators to obtain the global parameter difference mean; a parameter convergence submodule, used to send encrypted global model update data to each local computing node if the global parameter difference mean is greater than the convergence threshold, so that the local computing node can continue to train the local model based on the encrypted global model update data; and a parameter update submodule, used to send encrypted global model update data to each local computing node if the global parameter difference mean is less than or equal to the convergence threshold, so that the local computing node can obtain the target global model based on the encrypted global model update data.

[0115] This embodiment provides a model training device based on federated learning and homomorphic encryption, applied to a local computing node. The device includes: a parameter receiving module for receiving initial global model parameters from a central server and obtaining a local model based on these parameters; a first training module for iteratively training the local model using local training data to obtain model update parameters; a parameter update amount determination module for determining the local model parameter update amount using the difference between the model update parameters and the initial global model parameters; a parameter update amount encryption module for encrypting the local model parameter update amount using a homomorphic public key issued by a key management center to obtain encrypted model update data; and an encrypted data sending module for sending the encrypted model update data to the central server, enabling the central server to perform homomorphic aggregation processing on all encrypted model update data to obtain a target global model, which is used for risk assessment.

[0116] In some optional embodiments, the device further includes: a global data receiving module for receiving encrypted global model update data sent by a central server, wherein the encrypted global model update data is obtained by the central server performing homomorphic aggregation processing on all encrypted model update parameters; a global data sending module for sending the encrypted global model update data to a key management center, so that the key management center can decrypt the encrypted global model update data based on the homomorphic private key to obtain the global model update quantity, and the homomorphic private key and the homomorphic public key constitute a homomorphic encryption key pair; an update quantity receiving module for receiving the global model update quantity sent by the key management center; a second training module for training a local model based on the global model update quantity to obtain parameter difference quantification indicators; and a difference quantity sending module for sending the parameter difference quantification indicators to the central server, so that the central server can determine whether the model has converged based on all parameter difference quantification indicators.

[0117] In some optional embodiments, the device further includes: a training round receiving module for receiving the current training round from the central server; a number continuity detection module for performing number continuity detection on the current training round to obtain a continuity detection result; and an encrypted data sending module, which, if the continuity detection result indicates that the current training round and the previous training round have consecutive numbers, sends encrypted global model update data to the key management center.

[0118] In some optional embodiments, the device further includes: a verification information sending module, used to send verification information of the local computing node to the central server, so that the central server can perform validity detection on the encryption model update parameters based on the verification information; wherein, the verification information includes the node identifier of the local computing node and the timestamp corresponding to the encryption model update data.

[0119] This embodiment also provides a model training system based on federated learning and homomorphic encryption. The system includes a key management center, a central server, and local computing nodes. The key management center generates homomorphic encryption key pairs, including a homomorphic public key and a homomorphic private key, and sends the homomorphic public key to each local computing node. The central server initializes initial global model parameters and sends these parameters to each local computing node. Each local computing node receives the initial global model parameters from the central server and obtains a local model based on them. Iterative training is performed on the local model using local training data to obtain updated model parameters. The difference between the updated model parameters and the initial global model parameters is used to determine the amount of local model parameter updates. The updated local model parameters are encrypted using the homomorphic public key from the key management center to obtain encrypted model update data. This encrypted model update data is sent to the central server, which performs homomorphic aggregation processing on all the encrypted model update data to obtain a target global model, which is used for risk assessment.

[0120] This application combines federated learning with homomorphic encryption, allowing each local computing node to upload only encrypted model parameters or gradient information, while the original training data remains locally and does not need to be shared with any third party. Simultaneously, the central server can only access the encrypted data throughout the training process and cannot obtain the plaintext gradient information from any local computing node, fundamentally eliminating the privacy risks of inferring the original training data through gradient analysis.

[0121] This application performs anomaly detection on the cryptographic gradients of each local computing node before aggregation. It identifies potentially malicious local computing nodes or those with abnormal data quality using multi-dimensional indicators such as gradient norm and gradient direction. Local computing nodes marked as abnormal are removed from the current aggregation round, and nodes exhibiting multiple consecutive anomalies are permanently removed, effectively preventing malicious attacks such as poisoning attacks from damaging the global model performance.

[0122] This application employs a technical solution where a key management center uniformly generates and manages homomorphic encryption key pairs, and each local computing node shares the same public key for encryption, while the key management center uniformly uses the private key for decryption. This avoids the complex key negotiation and synchronization problems in multi-key scenarios. Compared to existing technologies where each local computing node generates its own key and key conversion is required during aggregation, this invention significantly reduces communication overhead and computational complexity. Furthermore, the key management center stores the private key through a hardware security module and sets strict access control policies, effectively preventing the risk of private key leakage.

[0123] The present application introduces a hash verification mechanism in the decryption step of the key management center. By comparing the hash value calculated for the decrypted global gradient with the expected value, potential tampering behavior that may exist in the central server or during transmission can be effectively detected. Meanwhile, the present invention stores training logs on the blockchain for evidence preservation, and utilizes the tamper-proof characteristic of the blockchain to provide traceable and auditable evidence records for the entire model training process. When model performance anomalies or security disputes occur, the problematic link and the responsible party can be quickly located through the blockchain records.

[0124] Figure 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

[0125] Hereinafter, specific reference is made to Figure 7 , which shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present invention. The electronic device may include a processor (such as a central processing unit, a graphics processing unit, etc.) 701, which may execute various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a memory 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0126] Generally, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch panel, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a memory 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device to perform wireless or wired communication with other devices to exchange data. Although Figure 7 shows an electronic device having various apparatuses, it should be understood that it is not required to implement or possess all the illustrated apparatuses, and alternatively, more or fewer apparatuses may be implemented or possessed.

[0127] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a memory 708, or installed from a ROM 702. When the computer program is executed by the processor 701, it performs the functions defined in the model training method based on federated learning and homomorphic encryption according to embodiments of the present invention.

[0128] Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0129] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, it implements the model training method based on federated learning and homomorphic encryption shown in the above embodiments.

[0130] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0131] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A model training method based on federated learning and homomorphic encryption, applied to a central server, characterized in that, The method includes: The system receives encrypted model update data sent by each local computing node. The encrypted model update data is obtained by the local computing node using a homomorphic public key to perform homomorphic encryption on the local model parameter update amount. The local model parameter update amount is obtained by the local computing node training the local model based on the initial global model parameters issued by the central server. Homomorphic aggregation is performed on all the encrypted model update data to obtain encrypted global model update data; The encrypted global model update data is distributed to each of the local computing nodes so that the local computing nodes can train the local model based on the encrypted global model update data to obtain the target global model, which is used for risk assessment.

2. The method according to claim 1, characterized in that, The process of performing homomorphic aggregation on all the encrypted model update data to obtain encrypted global model update data includes: For any one of the encryption model update data, perform anomaly detection on the encryption model update data to obtain anomaly detection results; Based on the anomaly detection results, target encrypted model update data that passes the anomaly detection is selected from multiple encrypted model update data; Weighted homomorphic aggregation is performed on all the target encryption model update data to obtain the global encryption model update data.

3. The method according to claim 2, characterized in that, The step of performing anomaly detection on the encrypted model update data to obtain anomaly detection results includes: Obtain the verification information corresponding to the updated data of the encryption model; Using the verification information, the validity of the encrypted model update data is verified to obtain the verification result; If the verification result indicates that the encrypted model update data passes the validity verification, then gradient anomaly detection is performed on the encrypted model update data to obtain the anomaly detection result; The verification information includes the node identifier of the local computing node and the encryption timestamp corresponding to the encryption model update data.

4. The method according to claim 3, characterized in that, The method further includes: If the anomaly detection result indicates that the encrypted model update data has failed the gradient anomaly detection, then a target marker is added to the target local computing node corresponding to the encrypted model update data; If the total number of target tags corresponding to the target local computing node is greater than or equal to the tag threshold, then the encryption model update data sent by the local computing node will no longer be received.

5. The method according to claim 1, characterized in that, The step of distributing the encrypted global model update data to each of the local computing nodes, so that the local computing nodes can train the local model based on the encrypted global model update data to obtain the target global model, includes: Obtain the parameter difference quantification index sent by each of the local computing nodes, wherein the parameter difference quantification index is used to characterize the parameter difference between the local model of the corresponding local computing node in the current training round and the local model in the previous training round. The average value of the global parameter difference is obtained by averaging all the aforementioned parameter difference quantification indicators. If the mean difference of the global parameters is greater than the convergence threshold, the encrypted global model update data is sent to each of the local computing nodes so that the local computing nodes can continue to train the local model based on the encrypted global model update data. If the mean difference of the global parameters is less than or equal to the convergence threshold, the encrypted global model update data is distributed to each local computing node so that the local computing node obtains the target global model based on the encrypted global model update data.

6. A model training method based on federated learning and homomorphic encryption, applied to local computing nodes, characterized in that, The method includes: Receive the initial global model parameters sent by the central server, and obtain the local model based on the initial global model parameters; The local model is iteratively trained using local training data to obtain model update parameters; The local model parameter update amount is determined by using the difference between the model update parameters and the initial global model parameters; Using the homomorphic public key issued by the key management center, the local model parameter update amount is encrypted to obtain encrypted model update data; The encrypted model update data is sent to the central server, so that the central server performs homomorphic aggregation processing on all the encrypted model update data to obtain a target global model, which is used for risk assessment.

7. The method according to claim 6, characterized in that, The method further includes: The system receives encrypted global model update data sent by the central server, wherein the encrypted global model update data is obtained by the central server through homomorphic aggregation processing of all the encrypted model update parameters; The encrypted global model update data is sent to the key management center so that the key management center can decrypt the encrypted global model update data based on the homomorphic private key to obtain the global model update amount, and the homomorphic private key and the homomorphic public key constitute a homomorphic encryption key pair; Receive the global model update amount sent by the key management center; Based on the global model update amount, the local model is trained to obtain a parameter difference quantification index; The parameter difference quantification index is sent to the central server, and the central server determines whether the model has converged based on all the parameter difference quantification indices.

8. The method according to claim 7, characterized in that, The method further includes: Receive the current training round issued by the central server; Perform a continuity test on the current training round to obtain the continuity test result; If the continuity detection result indicates that the current training round and the previous training round are consecutively numbered, then the encrypted global model update data is sent to the key management center.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The verification information of the local computing node is sent to the central server, so that the central server can perform validity checks on the encryption model update parameters based on the verification information; The verification information includes the node identifier of the local computing node and the timestamp corresponding to the encryption model update data.

10. A model training system based on federated learning and homomorphic encryption, characterized in that, The system includes a key management center, multiple local computing nodes, and a central server; wherein... The key management center is used to generate homomorphic encryption key pairs including homomorphic public keys and homomorphic private keys, and to send the homomorphic public keys to each local computing node; The central server is used to initialize the initial global model parameters and send the initial global model parameters to each of the local computing nodes. The local computing node is configured to receive initial global model parameters from the central server and obtain a local model based on the initial global model parameters; iteratively train the local model using local training data to obtain model update parameters; determine the local model parameter update amount using the difference between the model update parameters and the initial global model parameters; encrypt the local model parameter update amount using a homomorphic public key issued by the key management center to obtain encrypted model update data; and send the encrypted model update data to the central server so that the central server performs homomorphic aggregation processing on all the encrypted model update data to obtain a target global model, which is used for risk assessment.