Federal learning method and device and storage medium

By using fully homomorphic encryption technology in the federated learning process, the security risks of sensitive data transmission in distributed machine learning are solved, and the secure transmission and aggregation of model parameters is realized, ensuring the security of data and models, and adapting to the attack threat of quantum computing.

CN120409730APending Publication Date: 2025-08-01DATANG MOBILE COMM EQUIP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410139356.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In distributed machine learning, especially in the federated learning process of intrusion detection models, there are security risks of sensitive data transmission, including the possibility of model update data leakage and privacy leakage, especially in the era of quantum computing, traditional encryption methods cannot effectively protect data security.

Method used

Fully homomorphic encryption is used to transmit and aggregate model parameters, receive initial model parameters through software-defined security nodes, conduct local training, and conduct multiple rounds of federated learning with the aggregation nodes. Fully homomorphic encryption technology is used to ensure that the model parameters remain ciphertext state during transmission and aggregation, and prevent plaintext data leakage.

Benefits of technology

It effectively prevents potential inference attacks, ensures data security and model security in the federated learning process, adapts to attack threats from quantum computing, and ensures the security of data and models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409730A_ABST
    Figure CN120409730A_ABST
Patent Text Reader

Abstract

The invention provides a federated learning method and device and a storage medium. The method comprises the following steps: receiving an initial model parameter of a federated learning model sent by an aggregation node through any one of a plurality of software-defined security nodes; applying the initial model parameter to a local federated learning model, and based on local training data, performing multi-round federated learning with an aggregation node by adopting a fully homomorphic encryption mode to obtain a target model parameter; and applying the target model parameters to a local federated learning model. In the federated learning process, model updating data such as model parameters are transmitted and aggregated in a fully homomorphic encryption mode, an aggregation node cannot obtain a plaintext of the model updating data, and training data does not need to be transmitted, so that potential inference attacks are prevented, and data security and model security in the federated learning process are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a federated learning method, apparatus, and storage medium. Background Art

[0002] With the rapid growth of data sources, distributed machine learning is regarded as one of the methods to solve large-scale data processing problems. Distributed machine learning mainly relies on the computing and storage capabilities of terminal devices and edge servers.

[0003] However, in the process of distributed machine learning, the transmission of sensitive data is still involved in computing offloading and data processing in edge servers. In particular, for intrusion detection models, such as machine learning models for detecting DDoS (Distributed Denial of Service) attacks, the transmission of relevant security data or model update data may be involved during the learning process, posing a risk of being attacked by inference, resulting in the leakage of model update data and privacy. Summary of the Invention

[0004] This application provides a federated learning method, apparatus, and storage medium to ensure the security of data and privacy during the federated learning process.

[0005] In a first aspect, this application provides a federated learning method, which is applied to any one of multiple software-defined security nodes. The method includes:

[0006] Receiving initial model parameters of a federated learning model sent by an aggregation node;

[0007] Applying the initial model parameters to a local federated learning model, and performing multiple rounds of federated learning with the aggregation node based on local training data using fully homomorphic encryption to obtain target model parameters;

[0008] Applying the target model parameters to the local federated learning model.

[0009] Optionally, the step of performing multiple rounds of federated learning with the aggregation node based on local training data using fully homomorphic encryption to obtain target model parameters includes:

[0010] Training the local federated learning model according to the local training data to obtain first model parameters after training;

[0011] Performing fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and sending the first ciphertext model parameters to the aggregation node;

[0012] Receive the second encrypted model parameters sent by the aggregation node, where the second encrypted model parameters are obtained by the aggregation node performing a homomorphic aggregation operation on the first encrypted model parameters of the multiple software-defined security nodes;

[0013] Decrypt the second encrypted model parameters using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0014] Repeat the above operations until a preset termination condition is reached.

[0015] Optionally, before encrypting the first model parameters using the preset public key homomorphically, it further includes:

[0016] Receive the preset public key and the preset private key sent by the key management node through a preset secure channel.

[0017] Optionally, the key management node is a unified data management (UDM) network element of the core network, a key server, or a key management network element in the communication network.

[0018] Optionally, the federated learning model is an intrusion detection model in the communication network; correspondingly, after applying the target model parameters to the local federated learning model, it further includes:

[0019] Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

[0020] In a second aspect, the present application provides a federated learning method applied to an aggregation node. The method includes:

[0021] Obtain the initial model parameters of the federated learning model, and send the initial model parameters to multiple software-defined security nodes;

[0022] Perform multiple rounds of federated learning with the aggregation node using homomorphic encryption, so that the multiple software-defined security nodes obtain target model parameters and apply them to the local federated learning models of the software-defined security nodes.

[0023] Optionally, the performing multiple rounds of federated learning with the aggregation node using homomorphic encryption includes:

[0024] Receive the first encrypted model parameters sent by the software-defined security node, where the first encrypted model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on local training data to obtain first model parameters, and then performing homomorphic encryption using a preset public key;

[0025] Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0026] Repeat the above operations until a preset termination condition is reached.

[0027] Optionally, the performing a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node includes:

[0028] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node using homomorphic operation rules.

[0029] In a third aspect, the present application provides a federated learning device, including:

[0030] An initialization unit, configured to receive initial model parameters of a federated learning model sent by an aggregation node, and apply the initial model parameters to the local federated learning model;

[0031] A federated learning unit, configured to perform multiple rounds of federated learning with the aggregation node using fully homomorphic encryption based on local training data to obtain target model parameters;

[0032] An application unit, configured to apply the target model parameters to the local federated learning model.

[0033] Optionally, when the federated learning unit performs multiple rounds of federated learning with the aggregation node using fully homomorphic encryption based on local training data to obtain target model parameters, it is configured to:

[0034] Train the local federated learning model according to the local training data to obtain first trained model parameters;

[0035] Perform fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node;

[0036] Receive second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing a homomorphic aggregation operation on the first ciphertext model parameters of the multiple software-defined security nodes;

[0037] Decrypt the second ciphertext model parameters using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0038] Repeat the above operations until a preset termination condition is reached.

[0039] Optionally, before homomorphically encrypting the first model parameters using the preset public key, the federated learning unit is further configured to:

[0040] Receive the preset public key and the preset private key sent by the key management node through a preset secure channel.

[0041] Optionally, the key management node is a unified data management (UDM) network element of the core network, a key server, or a key management network element in a communication network.

[0042] Optionally, the federated learning model is an intrusion detection model in a communication network; correspondingly, after applying the target model parameters to the local federated learning model, the application unit is further configured to:

[0043] Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

[0044] Fourthly, the present application provides a federated learning device, including:

[0045] An initialization unit, configured to obtain initial model parameters of a federated learning model and send the initial model parameters to a software-defined security node;

[0046] A federated learning unit, configured to perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner, so that the software-defined security node obtains target model parameters and applies them to the local federated learning model of the software-defined security node.

[0047] Optionally, when performing multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner, the federated learning unit is configured to:

[0048] Receive first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on local training data to obtain first model parameters, and then performing fully homomorphic encryption using the preset public key;

[0049] Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using the preset private key to obtain second model parameters, and the second model parameters are applied to the local federated learning model.

[0050] Repeat the above operations until a preset termination condition is reached.

[0051] Optionally, when performing homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node, the federated learning unit is configured to:

[0052] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node by using homomorphic operation rules.

[0053] In a fifth aspect, the present application provides a software-defined security node, including a memory, a transceiver, and a processor:

[0054] The memory is configured to store a computer program; the transceiver is configured to transmit and receive data under the control of the processor; the processor is configured to read the computer program in the memory and perform the following operations:

[0055] Receive the initial model parameters of the federated learning model sent by the aggregation node;

[0056] Apply the initial model parameters to the local federated learning model, and perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters;

[0057] Apply the target model parameters to the local federated learning model.

[0058] Optionally, when performing multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters, the processor is configured to:

[0059] Train the local federated learning model according to the local training data to obtain the first trained model parameters;

[0060] Perform fully homomorphic encryption on the first model parameters by using a preset public key to obtain first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node;

[0061] Receive the second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing homomorphic aggregation operation on the first ciphertext model parameters of multiple software-defined security nodes;

[0062] Perform decryption on the second ciphertext model parameters by using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0063] Repeat the above operations until a preset termination condition is reached.

[0064] Optionally, before fully homomorphically encrypting the first model parameters using the preset public key, the processor is further configured to:

[0065] Receive the preset public key and the preset private key sent by the key management node through a preset secure channel.

[0066] Optionally, the key management node is a unified data management (UDM) network element of the core network, a key server, or a key management network element in a communication network.

[0067] Optionally, the federated learning model is an intrusion detection model in a communication network; correspondingly, after applying the target model parameters to the local federated learning model, the processor is further configured to:

[0068] Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

[0069] In a sixth aspect, the present application provides an aggregation node, including a memory, a transceiver, and a processor:

[0070] The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations:

[0071] Obtain the initial model parameters of the federated learning model and send the initial model parameters to the software-defined security node;

[0072] Perform multiple rounds of federated learning with the aggregation node using fully homomorphic encryption, so that the software-defined security node obtains the target model parameters and applies them to the local federated learning model of the software-defined security node.

[0073] Optionally, when performing multiple rounds of federated learning with the aggregation node using fully homomorphic encryption, the processor is configured to:

[0074] Receive the first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on local training data, and then performing fully homomorphic encryption using the preset public key;

[0075] Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain second model parameters, and the second model parameters are applied to the local federated learning model;

[0076] Repeat the above operations until a preset termination condition is reached.

[0077] Optionally, when the processor performs a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node, it is used to:

[0078] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node using homomorphic operation rules.

[0079] In a seventh aspect, the present application provides a non-transitory readable storage medium storing a computer program for causing a processor to execute the method described in the first aspect or the second aspect.

[0080] The federated learning method, device, and storage medium provided by the present application enable any one of multiple software-defined security nodes to receive initial model parameters of a federated learning model sent by an aggregation node; apply the initial model parameters to the local federated learning model, and perform multiple rounds of federated learning with the aggregation node using fully homomorphic encryption based on local training data to obtain target model parameters; and apply the target model parameters to the local federated learning model. During the federated learning process, model update data such as model parameters is transmitted and aggregated in a fully homomorphic encryption manner, and the aggregation node cannot obtain the plaintext of the model update data, nor is it necessary to transmit training data, thereby preventing potential inference attacks and ensuring data security and model security during the federated learning process.

[0081] It should be understood that the content described in the above invention content part is not intended to limit the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] To more clearly illustrate the technical solutions in the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0083] Figure 1System architecture diagram of the federated learning method provided by an embodiment of the present application;

[0084] Figure 2 Flowchart of the federated learning method provided by an embodiment of the present application;

[0085] Figure 3 Flowchart of the federated learning method provided by another embodiment of the present application;

[0086] Figure 4 Signaling diagram of the federated learning method provided by an embodiment of the present application;

[0087] Figure 5 Structure diagram of the software-defined security node provided by an embodiment of the present application;

[0088] Figure 6 Structure diagram of the aggregation node provided by an embodiment of the present application;

[0089] Figure 7 Structure diagram of the federated learning device provided by an embodiment of the present application;

[0090] Figure 8 Structure diagram of the federated learning device provided by another embodiment of the present application. Detailed implementation manners

[0091] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0092] In the embodiments of the present application, the term "plurality" refers to two or more, and other quantifiers are similar thereto.

[0093] In the prior art, in the process of distributed machine learning, computing offloading and data processing in the edge server still involve the transmission of sensitive data. Especially for intrusion detection models, such as machine learning models for detecting DDoS attacks, the transmission of relevant security data or model update data may be involved during the learning process, and there is a risk of being attacked by inference, resulting in the leakage of model update data and privacy leakage.

[0094] Among them, the working principle of traditional intrusion detection mainly relies on a set of predefined rules or a set of attack signatures that can identify known malicious behaviors to monitor network traffic. The system matches network traffic with known attack patterns to identify potential security threats. Traditional IDS (Intrusion Detection System) needs to continuously update its rule base to effectively detect new attacks and threats, which is a relatively continuous process.

[0095] With the development of artificial intelligence (AI) / machine learning (ML) technology, many AI / ML-based works for intrusion detection have been proposed. Usually, machine learning algorithms (models) are invoked to identify traffic to improve the detection ability of complex attacks and new security threats. In existing solutions, machine learning models such as random forest, support vector machine SVM, deep autoencoder DAE, and recurrent neural network RNN are used to enhance the efficiency and accuracy of IDS intrusion detection.

[0096] However, in a distributed scenario, the training of machine learning models can adopt distributed training (such as federated learning) and centralized training. Among them, federated learning involves the process of local nodes uploading model update data to the aggregation node, which has the security risk of model gradient leakage and is vulnerable to related model attacks by attackers, such as model stealing and reverse reduction attacks; while using centralized training lacks protection for data security and privacy, and there are problems of data leakage and privacy leakage. Even if key encryption is used during data transmission, in the era of quantum computers, traditional key systems are not secure, and classical RSA, AES, and ECC keys can be easily cracked by attackers with quantum computing capabilities.

[0097] In addition, the intrusion detection system based on federated learning is not designed for communication networks.

[0098] To solve the above technical problems, the embodiments of the present application provide a federated learning method. Any software-defined security node among multiple software-defined security nodes receives the initial model parameters of the federated learning model sent by the aggregation node; applies the initial model parameters to the local federated learning model, and based on local training data, performs multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner to obtain target model parameters; applies the target model parameters to the local federated learning model. During the federated learning process, model update data such as model parameters is transmitted and aggregated in a fully homomorphic encryption manner, and the aggregation node cannot obtain the plaintext of the model update data, nor does it need to transmit training data, thus preventing potential inference attacks and ensuring data security and model security during the federated learning process, and can defend against attacks by quantum computing.

[0099] Among them, Software Defined Security (SDS) is a security model in which security functions are deconstructed from hardware systems and implemented through software. It involves software control and management of information security and usually runs in a Software Defined Network (SDN) environment. It can be said to be a security model based on SDN. SDS centralizes security management, and these security measures are implemented and controlled through software. SDS has flexibility similar to SDN and has the ability to adjust security measures according to continuously updated threats.

[0100] Fully homomorphic Encryption (FHE) is a cryptographic algorithm that allows entities to perform calculations on encrypted data without decrypting it. In other words, homomorphic encryption can directly operate on ciphertexts and obtain the final result. In a standard FHE implementation of federated learning, all parties jointly agree on a private key to encrypt all model updates before sending them to the aggregator. FHE is a lattice-based public key encryption system that allows arbitrary operations on encrypted messages. FHE is a public key encryption system, which means that a public key can be used to encrypt messages and a secret key can be used to decrypt ciphertexts. Through FHE, we can directly perform operations on ciphertexts, mainly including addition and multiplication. Given two ciphertexts, these functions output a ciphertext whose underlying message is the addition and multiplication of the underlying messages in the inputs.

[0101] The federated learning method provided by the embodiments of this application is applicable to a system framework as Figure 1 shown, including an aggregation node and multiple software-defined security nodes (only 3 are shown in the figure). The aggregation node is used to undertake the initialization task, parameter distribution task of the federated learning model, and the aggregation task of the model parameters after training of each software-defined security node. The software-defined security node, as a local node of the federated learning, performs local model training based on local training data and sends the trained model parameters to the aggregation node; in addition, the system framework may further include a key management node, which is used to generate a pair of FHE public and private key pairs (including a public key and a private key) according to the full-key homomorphic encryption method and send them to each software-defined security node.

[0102] Optionally, any feasible secure channels can be adopted between multiple software-defined security nodes, the aggregation node, and the key management node to transmit relevant data to ensure the security of the transmission process.

[0103] The specific federated learning process includes that the aggregation node can initialize the federated learning model to obtain the initial model parameters and send them to each software-defined security node. Each software-defined security node applies the initial model parameters to the local federated learning model and performs multiple rounds of federated learning with the aggregation node based on the local training data using fully homomorphic encryption to obtain the target model parameters. Each software-defined security node applies the target model parameters to the local federated learning model.

[0104] The federated learning model in the embodiments of the present application can be an intrusion detection model, and of course, it can also be any other model. The software-defined security node, aggregation node, and key management node in the embodiments of the present application can be any terminal device, server, or other electronic device.

[0105] The technical solutions provided in the embodiments of the present application can be applicable to multiple systems. For example, the applicable systems can be Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunications System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems, and their evolved communication systems, etc. These multiple systems can include terminal devices and network devices. The system can also include a core network part, such as an Evolved Packet System (EPS), 5G System (5GS), 6G System, etc.

[0106] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0107] Among them, the method and the device are based on the same inventive concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can be referred to each other, and the repeated parts will not be described again.

[0108] Figure 2The flowchart of a federated learning method provided in this embodiment is as follows. Figure 2 As shown in the figure, this embodiment provides a federated learning method, which is applied to any software-defined security node among multiple software-defined security nodes. The specific steps of the federated learning method provided in this embodiment are as follows:

[0109] S201. Receive the initial model parameters of the federated learning model sent by the aggregation node.

[0110] In this embodiment, the aggregation node can undertake the initialization task and parameter distribution task of the global federated learning model. That is, at the beginning, the aggregation node can initialize the global federated learning model to obtain the initial model parameters required for federated learning, and send the initial model parameters to multiple software-defined security nodes respectively. The specific initialization process and the method of obtaining the initial model parameters can adopt any possible way, which is not limited in this embodiment.

[0111] Optionally, the federated learning model in this embodiment can be an intrusion detection model, specifically an intrusion detection model in a communication network, which is used to detect intrusions in the network traffic of the communication network. The above-mentioned intrusion detection model can be any possible model, which is not limited in this embodiment. Of course, the federated learning method in this embodiment can also be applied to other scenarios, and the federated learning model can also be any other model that requires federated learning, which is not limited here.

[0112] Optionally, in order to further ensure the security of transmission, in this embodiment, the initial model parameters can be transmitted through a first preset security channel. The first preset security channel is a secure transmission channel between the aggregation node and any software-defined security node. That is, the aggregation node can send the initial model parameters to the software-defined security node through the first preset security channel between it and any software-defined security node. The first preset security channel can be implemented by any possible secure communication channel, which is not limited in this embodiment. Of course, the initial model parameters can also be transmitted without using the first preset security channel, and any transmission channel can be used.

[0113] S202. Apply the initial model parameters to the local federated learning model, and perform multiple rounds of federated learning with the aggregation node based on the local training data by using the fully homomorphic encryption method to obtain the target model parameters.

[0114] In this embodiment, after the software-defined security node receives the initial model parameters sent by the aggregation node, the initial model parameters can be applied to the local federated learning model, and then based on the local training data, multiple rounds of federated learning are performed with the aggregation node using fully homomorphic encryption. The local training data is used for the software-defined security node to train the local federated learning model, and the local training data does not leave the software-defined security node. The trained model parameters can be sent to the aggregation node through fully homomorphic encryption for aggregation on the aggregation node. When the aggregation node aggregates, a homomorphic aggregation operation is used to obtain the aggregation result, and the aggregation result is still in ciphertext form. The aggregation node cannot know the plaintext of the model parameters, thus ensuring the security of the model gradient data (i.e., model parameters), which is not easily stolen and reverse-reduced attacked. The federated learning process can include multiple rounds until a preset termination condition is reached, such as reaching a predetermined number of rounds, or the central node actively requests the aggregation node to package the federated learning model, or the aggregation node determines that each software-defined security node has completed the collection of model parameters. Of course, it can also be to meet other stop conditions, which are not limited here.

[0115] Optionally, when performing multiple rounds of federated learning with the aggregation node using fully homomorphic encryption based on the local training data to obtain the target model parameters, it specifically may include:

[0116] S2021. Train the local federated learning model according to the local training data to obtain the first trained model parameters;

[0117] S2022. Perform fully homomorphic encryption on the first model parameters using a preset public key to obtain the first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node;

[0118] S2023. Receive the second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing a homomorphic aggregation operation on the first ciphertext model parameters of multiple software-defined security nodes;

[0119] S2024. Decrypt the second ciphertext model parameters using a preset private key to obtain the second model parameters, and apply the second model parameters to the local federated learning model;

[0120] S2025. Repeat the above operations until a preset termination condition is reached.

[0121] In this embodiment, the initial model parameters are directly sent by the aggregation node to each software-defined security node. In the first round of federated learning, each software-defined security node applies the initial model parameters to the local training data, and then trains the local federated learning model based on the local training data to obtain the first model parameters after training. After the training of each round is completed, each software-defined security node homomorphically encrypts its own first model parameters after training using a preset public key to obtain the first ciphertext model parameters, and each software-defined security node sends its own first ciphertext model parameters to the aggregation node;

[0122] After receiving the first ciphertext model parameters of each software-defined security node, the aggregation node can perform a homomorphic aggregation operation on the first ciphertext model parameters. The homomorphic aggregation operation is to aggregate the first ciphertext model parameters of each software-defined security node using the homomorphic operation rules. Optionally, the aggregation operation includes but is not limited to federated averaging, or FedProx (Federated Proximal) for heterogeneous networks, or SCAFFOLD (Stochastic Controlled Averaging for Federated Learning) of federated learning, etc. The specific aggregation operation process is not limited in this embodiment.

[0123] After the aggregation node completes the homomorphic aggregation operation, the second ciphertext model parameters are obtained. The aggregation node cannot know the plaintext model parameters corresponding to the second ciphertext model parameters. However, after the aggregation node sends the second ciphertext model parameters to each software-defined security node, each software-defined security node can decrypt the second ciphertext model parameters using the preset private key to obtain the plaintext of the second model parameters, and apply the second model parameters to the local federated learning model;

[0124] Then, the next round of federated learning can be entered. Each software-defined security node can re-train the local federated learning model based on the local training data to obtain the new first model parameters after training; homomorphically encrypt the new first model parameters using the preset public key to obtain the new first ciphertext model parameters, and send the new first ciphertext model parameters to the aggregation node; the aggregation node performs a homomorphic aggregation operation on the new first ciphertext model parameters of each software-defined security node to obtain the new second ciphertext model parameters, and after sending the new second ciphertext model parameters to each software-defined security node, each software-defined security node can decrypt the new second ciphertext model parameters using the preset private key to obtain the plaintext of the new second model parameters, and apply the new second model parameters to the local federated learning model, thus completing a round of federated learning.

[0125] By analogy, multiple rounds of federated learning can be carried out until a preset termination condition is reached, such as reaching a predetermined number of rounds or meeting other stopping conditions, which are not limited here. When the preset termination condition is reached, the final target model parameters can be obtained.

[0126] Optionally, to further ensure the security of transmission, when the software-defined security node sends the first encrypted model parameters to the aggregation node, the first encrypted model parameters can be sent to the aggregation node through the above-mentioned first preset secure channel; similarly, when the aggregation node sends to the software-defined security node, the second encrypted model parameters can also be sent to the software-defined security node through the first preset secure channel, that is, the software-defined security node can receive the second encrypted model parameters sent by the aggregation node through the first preset secure channel, thereby ensuring the security of the transmission process. Of course, since the first encrypted model parameters and the second encrypted model parameters have ensured data security through encryption, the first preset secure channel may not be used for transmission, and any transmission channel can be used.

[0127] S203. Apply the target model parameters to the local federated learning model.

[0128] In this embodiment, after the software-defined security node obtains the final target model parameters, the target model parameters can be applied to the local federated learning model, and then the local federated learning model can be run on the software-defined security node. Specifically, if the local federated learning model is an intrusion detection model in a communication network, intrusion detection is performed on the network traffic on the software-defined security node.

[0129] The federated learning method of this embodiment receives the initial model parameters of the federated learning model sent by the aggregation node through any one of multiple software-defined security nodes; applies the initial model parameters to the local federated learning model, and performs multiple rounds of federated learning with the aggregation node based on local training data using the fully homomorphic encryption method to obtain the target model parameters; applies the target model parameters to the local federated learning model. During the federated learning process, model update data such as model parameters is transmitted and aggregated in the form of fully homomorphic encryption, and the aggregation node cannot obtain the plaintext of the model update data, nor is it necessary to transmit the training data, thereby preventing potential inference attacks and ensuring data security and model security during the federated learning process, and can defend against attacks against quantum computing.

[0130] Based on any of the above embodiments, the key management node can pre-generate a pair of FHE public and private key pairs according to the fully homomorphic encryption method, including the above-mentioned preset public key and preset private key, and send the preset public key and preset private key to each software-defined security node for fully homomorphic encrypting the first model parameters using the preset public key and decrypting the second ciphertext model parameters using the preset private key.

[0131] Optionally, when sending the preset public key and preset private key to each software-defined security node, the key management node can send the preset public key and preset private key to each software-defined security node through a preset secure channel (which can be denoted as the second preset secure channel) to ensure the security of the preset public key and preset private key, where the second preset secure channel is a secure transmission channel between the key management node and each software-defined security node.

[0132] Optionally, the key management node can be a unified data management (UDM) network element, a key server, or a key management network element in the core network of a communication network. Of course, it can also be any other possible device.

[0133] Figure 3 It is a flowchart of a federated learning method provided in this embodiment. As Figure 3 shown, this embodiment provides a federated learning method applied to an aggregation node. The specific steps of the federated learning method provided in this embodiment are as follows:

[0134] S301. Obtain the initial model parameters of the federated learning model and send the initial model parameters to the software-defined security node;

[0135] S302. Perform multiple rounds of federated learning with the aggregation node using the fully homomorphic encryption method, so that the software-defined security node obtains the target model parameters and applies them to the local federated learning model of the software-defined security node.

[0136] Optionally, there can be multiple software-defined security nodes, and the aggregation node can implement the above-mentioned federated learning process with multiple software-defined security nodes.

[0137] Optionally, the performing multiple rounds of federated learning with the aggregation node using the fully homomorphic encryption method includes:

[0138] Receiving the first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on the local training data to obtain the first model parameters, and then performing fully homomorphic encryption using the preset public key;

[0139] Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain second model parameters, and the second model parameters are applied to the local federated learning model;

[0140] Repeat the above operations until a preset termination condition is reached.

[0141] Optionally, the aggregation node can obtain the first ciphertext model parameters of multiple software-defined security nodes. Furthermore, the aggregation node can perform a homomorphic aggregation operation on the first ciphertext model parameters of multiple software-defined security nodes, and then send the second ciphertext model parameters to multiple software-defined security nodes respectively.

[0142] Optionally, the initial model parameters can be sent to the software-defined security node through a first preset security channel; the first ciphertext model parameters sent by the software-defined security node can also be received through the first preset security channel; correspondingly, the second ciphertext model parameters are sent to the software-defined security node through the first preset security channel. One or more of the above initial model parameters, first ciphertext model parameters, and second ciphertext model parameters can also be transmitted through any transmission channel.

[0143] Optionally, the performing a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node includes:

[0144] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node using homomorphic operation rules.

[0145] The federated learning method provided in this embodiment is a method embodiment on the aggregation node side. Its principle and technical effects can be referred to the above embodiments and will not be elaborated here.

[0146] The above process of the embodiment of the present application will be introduced in detail below with specific examples.

[0147] Figure 4 For the signaling diagram of a federated learning method of an embodiment of the present application, as Figure 4 shown, assuming there are three software-defined security nodes SDS1, software-defined security node SDS2, and software-defined security node SDS3, the specific steps of this federated learning method are as follows:

[0148] 1) Model initialization: The aggregation node initializes the global federated learning model and the parameters W0 required for federated learning, and sends the initial model parameters W0 to each software-defined security node SDS1, SDS2, and SDS3 through a secure channel;

[0149] 2) Public and private key pair generation: The key management node generates a pair of FHE public and private keys (including public key Pk and private key Sk) according to the fully homomorphic encryption method FHE_KeyGen().

[0150] 3) Key distribution: The key management node sends the public and private key pair (Pk, Sk) to each software-defined security node SDS1, SDS2, SDS3 through a secure channel for their use.

[0151] 4) Local SDS node model training: Each software-defined security node SDS1, SDS2, SDS3 uses local training data to independently train a local federated learning model and obtains updated first model parameters W1, W2, W3.

[0152] 5) Data encryption: At the end of this round of model training, the updated first model parameters are encrypted using the public key. The encryption process is as follows:

[0153] SDS1: Enc(W1) ← encrypt{Pk * W1},

[0154] SDS2: Enc(W2) ← encrypt{Pk * W2},

[0155] SDS3: Enc(W3) ← encrypt{Pk * W3}

[0156] Where Enc(W1), Enc(W2), Enc(W3) are the first ciphertext model parameters of fully homomorphic encryption, and encrypt is the fully homomorphic encryption algorithm.

[0157] 6) Sending encrypted data: Each software-defined security node SDS1, SDS2, SDS3 sends Enc(W1), Enc(W2), Enc(W3) to the aggregation node respectively.

[0158] 7) Homomorphic aggregation: After the aggregation node receives Enc(W1), Enc(W2), Enc(W3) sent by each software-defined security node SDS1, SDS2, SDS3, the aggregation node performs necessary homomorphic aggregation operations in the encrypted state, Enc(ΔW0) ← Agg(Enc(W1) + Enc(W2) + Enc(W3)); where Enc(ΔW0) is the second ciphertext model parameter obtained after the aggregation operation, that is, the global model parameter, and Agg is the homomorphic aggregation operation.

[0159] 8) Distributing new model parameters: The aggregation node distributes Enc(ΔW0) to each software-defined security node SDS1, SDS2, SDS3.

[0160] 9) Local model update: After each software-defined security node SDS1, SDS2, SDS3 receives Enc(ΔW0), it uses the private key Sk to decrypt and obtain the second model parameter ΔW0 as follows:

[0161] ΔW0 ← decryptSk{Enc(ΔW0)}, and update this parameter in the local federated learning model;

[0162] 10) Repeat the above steps until the predetermined number of training rounds is reached or other stop conditions are met.

[0163] Figure 5 It is a structural diagram of a software-defined security node according to an embodiment of the present application. The software-defined security node can execute the processing flow provided by the method embodiment on the software-defined security node side, such as Figure 5 As shown, the software-defined security node 500 includes a memory 501, a transceiver 502, and a processor 503.

[0164] The transceiver 502 is used to receive and send data under the control of the processor 503.

[0165] Among them, in Figure 5 The bus architecture may include any number of interconnected buses and bridges. Specifically, various circuits represented by one or more processors 503 represented by the processor 503 and the memory 501 represented by the memory 501 are linked together. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art. Therefore, they will not be further described herein. The bus interface provides an interface. The transceiver 502 can be multiple elements, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on the transmission medium, and these transmission mediums include wireless channels, wired channels, optical fiber cables, etc. The processor 503 is responsible for managing the bus architecture and general processing, and the memory 501 can store the data used by the processor 503 when performing operations.

[0166] [[ID=2,3]]The processor 503 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor 503 may also adopt a multi-core architecture.

[0167] The processor 503 is used to read the computer program in the memory 501 and perform the following operations:

[0168] Receive the initial model parameters of the federated learning model sent by the aggregation node;

[0169] Apply the initial model parameters to the local federated learning model, and perform multiple rounds of federated learning with the aggregation node based on local training data using fully homomorphic encryption to obtain target model parameters;

[0170] Apply the target model parameters to the local federated learning model.

[0171] Optionally, when performing multiple rounds of federated learning with the aggregation node based on local training data using fully homomorphic encryption to obtain target model parameters, the processor 503 is configured to:

[0172] Train the local federated learning model according to the local training data to obtain the trained first model parameters;

[0173] Perform fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node;

[0174] Receive the second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing homomorphic aggregation operations on the first ciphertext model parameters of the multiple software-defined security nodes;

[0175] Decrypt the second ciphertext model parameters using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0176] Repeat the above operations until a preset termination condition is reached.

[0177] Optionally, before performing fully homomorphic encryption on the first model parameters using a preset public key, the processor 503 is further configured to:

[0178] Receive the preset public key and the preset private key sent by the key management node through a preset secure channel.

[0179] Optionally, the key management node is a unified data management UDM network element, a key server, or a key management network element in the core network of the communication network.

[0180] Optionally, the federated learning model is an intrusion detection model in the communication network; correspondingly, after applying the target model parameters to the local federated learning model, the processor 503 is further configured to:

[0181] Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

[0182] It should be noted here that the above software-defined security node provided by the embodiment of the present invention can implement all the method steps implemented by the method embodiment on the software-defined security node side, and can achieve the same technical effects. Therefore, the same parts and beneficial effects as those in the method embodiment will not be specifically described in this embodiment.

[0183] Figure 6 This is a structural diagram of an aggregation node according to an embodiment of the present application. The aggregation node can execute the processing flow provided by the method embodiment on the aggregation node side, such as Figure 6 As shown, the aggregation node 600 includes a memory 601, a transceiver 602, and a processor 603.

[0184] The transceiver 602 is used to receive and send data under the control of the processor 603.

[0185] Among them, in Figure 6 , the bus architecture may include any number of interconnected buses and bridges. Specifically, various circuits represented by one or more processors 603 represented by the processor 603 and the memory 601 represented by the memory 601 are linked together. The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art. Therefore, they will not be further described herein. The bus interface provides an interface. The transceiver 602 may be multiple components, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on the transmission medium, and these transmission mediums include wireless channels, wired channels, optical fiber cables, etc. The processor 603 is responsible for managing the bus architecture and general processing, and the memory 601 can store the data used by the processor 603 when executing operations.

[0186] The processor 603 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor 603 may also adopt a multi-core architecture.

[0187] The processor 603 is used to read the computer program in the memory 601 and perform the following operations:

[0188] Obtain the initial model parameters of the federated learning model and send the initial model parameters to the software-defined security node;

[0189] Perform multiple rounds of federated learning with the aggregation node in the fully homomorphic encryption manner, so that the software-defined security node obtains the target model parameters and applies them to the local federated learning model of the software-defined security node.

[0190] Optionally, when performing multiple rounds of federated learning with the aggregation node in the fully homomorphic encryption manner, the processor 603 is configured to:

[0191] Receive the first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on the local training data to obtain the first model parameters, and then performing fully homomorphic encryption using a preset public key;

[0192] Perform homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain the second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain the second model parameters, and the second model parameters are applied to the local federated learning model;

[0193] Repeat the above operations until a preset termination condition is reached.

[0194] Optionally, when performing homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node, the processor 603 is configured to:

[0195] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node according to the homomorphic operation rules.

[0196] It should be noted here that the above-mentioned aggregation node provided in the embodiment of the present invention can implement all the method steps implemented in the method embodiment on the aggregation node side, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiment will not be specifically described in this embodiment.

[0197] Figure 7 This is the structural diagram of the federated learning device provided in the embodiment of the present application. The federated learning device provided in this embodiment can execute the processing flow provided in the method embodiment on the software-defined security node side, as Figure 7 shown. The federated learning device 700 includes: an initialization unit 701, a federated learning unit 702, and an application unit 703.

[0198] An initialization unit 701, configured to receive initial model parameters of a federated learning model sent by an aggregation node, and apply the initial model parameters to a local federated learning model;

[0199] A federated learning unit 702, configured to perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters;

[0200] An application unit 703, configured to apply the target model parameters to the local federated learning model.

[0201] Optionally, when the federated learning unit 702 performs multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters, it is configured to:

[0202] Train the local federated learning model according to the local training data to obtain first model parameters after training;

[0203] Perform fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node;

[0204] Receive second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing a homomorphic aggregation operation on the first ciphertext model parameters of multiple software-defined security nodes;

[0205] Decrypt the second ciphertext model parameters using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model;

[0206] Repeat the above operations until a preset termination condition is reached.

[0207] Optionally, before performing fully homomorphic encryption on the first model parameters using the preset public key, the federated learning unit 702 is further configured to:

[0208] Receive the preset public key and the preset private key sent by a key management node through a preset secure channel.

[0209] Optionally, the key management node is a unified data management (UDM) network element of a core network, a key server, or a key management network element in a communication network.

[0210] Optionally, the federated learning model is an intrusion detection model in a communication network; correspondingly, after the application unit 703 applies the target model parameters to the local federated learning model, it is further configured to:

[0211] Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

[0212] The federated learning device provided by the embodiment of the present application can be specifically used to execute the method embodiment on the software-defined security node side, and the specific functions are not described herein again.

[0213] Figure 8 It is a structural diagram of the federated learning device provided by the embodiment of the present application. The federated learning device provided by this embodiment can execute the processing flow provided by the method embodiment on the aggregation node side, such as Figure 8 As shown, the federated learning device 800 includes: an initialization unit 801 and a federated learning unit 802.

[0214] The initialization unit 801 is used to obtain the initial model parameters of the federated learning model and send the initial model parameters to the software-defined security node;

[0215] The federated learning unit 802 is used to perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner, so that the software-defined security node obtains the target model parameters and applies them to the local federated learning model of the software-defined security node.

[0216] Optionally, when the federated learning unit 802 performs multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner, it is used to:

[0217] Receive the first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on the local training data to obtain the first model parameters, and then performing fully homomorphic encryption using a preset public key;

[0218] Perform homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain the second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain the second model parameters, and the second model parameters are applied to the local federated learning model;

[0219] Repeat the above operations until a preset termination condition is reached.

[0220] Optionally, when the federated learning unit 802 performs homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node, it is used to:

[0221] Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node by using the homomorphic operation rule.

[0222] The federated learning device provided in the embodiment of the present application can be specifically used to execute the method embodiment on the aggregation node side, and the specific functions will not be elaborated here.

[0223] It should be noted that the division of units in the embodiment of the present application is illustrative, only a logical function division, and there may be other division methods in actual implementation. In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit exists physically alone, or two or more units are integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0224] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application.

[0225] It should be noted here that the above device provided in the embodiment of the present invention can implement all the method steps implemented by the above method embodiment, and can achieve the same technical effect. The same parts and beneficial effects as those in the method embodiment will not be specifically elaborated in this embodiment.

[0226] In addition, an embodiment of the present application further provides a non-transitory readable storage medium. The non-transitory readable storage medium stores a computer program, and the computer program is used to cause a processor to execute the method embodiment on the software-defined security node side or the aggregation node side. The non-transitory readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical discs (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid state drives (SSD)).

[0227] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0228] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer-executable instructions. These computer-executable instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0229] These processor-executable instructions can also be stored in a processor-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the processor-readable memory generate a manufactured article including instruction means, and the instruction means realizes the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0230] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A federated learning method, characterized in that, Applied to any one of multiple software-defined security nodes, the method includes: Receiving initial model parameters of a federated learning model sent by an aggregation node; Applying the initial model parameters to a local federated learning model, and performing multiple rounds of federated learning with the aggregation node based on local training data in a fully homomorphic encryption manner to obtain target model parameters; Applying the target model parameters to the local federated learning model.

2. The method according to claim 1, characterized in that, The performing multiple rounds of federated learning with the aggregation node based on local training data in a fully homomorphic encryption manner to obtain target model parameters includes: Training the local federated learning model according to the local training data to obtain first model parameters after training; Performing fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and sending the first ciphertext model parameters to the aggregation node; Receiving second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing homomorphic aggregation operations on the first ciphertext model parameters of the multiple software-defined security nodes; Decrypting the second ciphertext model parameters using a preset private key to obtain second model parameters, and applying the second model parameters to the local federated learning model; Repeating the above operations until a preset termination condition is reached.

3. The method according to claim 1 or 2, characterized in that Before performing fully homomorphic encryption on the first model parameters using the preset public key, it further includes: Receiving the preset public key and the preset private key sent by a key management node through a preset secure channel.

4. The method according to claim 3, characterized in that The key management node is a unified data management (UDM) network element of the core network, a key server, or a key management network element in a communication network.

5. The method according to claim 1, characterized in that The federated learning model is an intrusion detection model in a communication network; correspondingly, after applying the target model parameters to the local federated learning model, it further includes: Running the local federated learning model on the software-defined security node to perform intrusion detection on network traffic on the software-defined security node.

6. A federated learning method, characterized in that, Applied to an aggregation node, the method includes: Obtaining initial model parameters of a federated learning model, and sending the initial model parameters to software-defined security nodes; Performing multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner, so that the software-defined security node obtains target model parameters and applies them to the local federated learning model of the software-defined security node.

7. The method according to claim 6, wherein The performing multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner includes: Receiving first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to a local federated learning model respectively, training the local federated learning model based on local training data, and then performing fully homomorphic encryption using a preset public key; Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using a preset private key to obtain second model parameters, and the second model parameters are applied to the local federated learning model; Repeat the above operations until a preset termination condition is reached.

8. The method according to claim 7, wherein The performing a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node includes: Performing an aggregation operation on the first ciphertext model parameters of the software-defined security node using homomorphic operation rules.

9. A federated learning device, characterized in that, Including: An initialization unit, configured to receive initial model parameters of a federated learning model sent by an aggregation node, and apply the initial model parameters to the local federated learning model; A federated learning unit, configured to perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters; An application unit, configured to apply the target model parameters to the local federated learning model.

10. A federated learning device, characterized in that, Including: An initialization unit, configured to obtain initial model parameters of a federated learning model and send the initial model parameters to a software-defined security node; A federated learning unit, configured to perform multiple rounds of federated learning with an aggregation node in a fully homomorphic encryption manner, so that the software-defined security node obtains target model parameters and applies them to the local federated learning model of the software-defined security node.

11. A software-defined security node, characterized in that, Including a memory, a transceiver, and a processor: The memory is used to store a computer program; the transceiver is used to send and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations: Receive initial model parameters of a federated learning model sent by an aggregation node; Apply the initial model parameters to the local federated learning model, and perform multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters; Apply the target model parameters to the local federated learning model.

12. The software-defined security node according to claim 11, wherein When the processor performs multiple rounds of federated learning with the aggregation node in a fully homomorphic encryption manner based on local training data to obtain target model parameters, it is used to: Train the local federated learning model according to the local training data to obtain trained first model parameters; Perform fully homomorphic encryption on the first model parameters using a preset public key to obtain first ciphertext model parameters, and send the first ciphertext model parameters to the aggregation node; Receive second ciphertext model parameters sent by the aggregation node, where the second ciphertext model parameters are obtained by the aggregation node performing a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node; Decrypt the second ciphertext model parameters using a preset private key to obtain second model parameters, and apply the second model parameters to the local federated learning model; Repeat the above operations until a preset termination condition is reached.

13. The software-defined security node according to claim 11 or 12, characterized in that, Before fully homomorphically encrypting the first model parameters using the preset public key, the processor is further configured to: Receive the preset public key and the preset private key sent by the key management node through a preset secure channel.

14. The software-defined security node according to claim 13, wherein The key management node is a unified data management (UDM) network element of the core network, a key server, or a key management network element in the communication network.

15. The software-defined security node according to claim 11, characterized in that, The federated learning model is an intrusion detection model in the communication network; correspondingly, after applying the target model parameters to the local federated learning model, the processor is further configured to: Run the local federated learning model on the software-defined security node to perform intrusion detection on the network traffic on the software-defined security node.

16. An aggregation node, characterized in that, Including a memory, a transceiver, and a processor: The memory is used to store computer programs; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations: Obtain the initial model parameters of the federated learning model and send the initial model parameters to the software-defined security node; Perform multiple rounds of federated learning with the aggregation node using the fully homomorphic encryption method, so that the software-defined security node obtains the target model parameters and applies them to the local federated learning model of the software-defined security node.

17. The aggregation node according to claim 16, characterized in that, When performing multiple rounds of federated learning with the aggregation node using the fully homomorphic encryption method, the processor is configured to: Receive the first ciphertext model parameters sent by the software-defined security node, where the first ciphertext model parameters are obtained by the software-defined security node applying the initial model parameters to the local federated learning model respectively, training the local federated learning model based on local training data to obtain the first model parameters, and then performing fully homomorphic encryption using the preset public key. Perform a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node to obtain second ciphertext model parameters, and send the second ciphertext model parameters to the software-defined security node, where the second ciphertext model parameters are used to be decrypted by the software-defined security node using the preset private key to obtain second model parameters, and the second model parameters are applied to the local federated learning model. Repeat the above operations until a preset termination condition is reached.

18. The aggregation node according to claim 17, wherein When performing a homomorphic aggregation operation on the first ciphertext model parameters of the software-defined security node, the processor is configured to: Perform an aggregation operation on the first ciphertext model parameters of the software-defined security node using homomorphic operation rules.

19. A non-transitory readable storage medium, characterized in that, The non-transitory readable storage medium stores computer programs, and the computer programs are used to cause the processor to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Safe distributed federation deep learning method

    CN112232527A

  • Longitudinal federated learning privacy protection method and system based on multi-key homomorphic encryption

    CN115455476A

  • Transverse federated learning security aggregation method, system and device for privacy protection and medium

    CN116644454A