A layered federated security aggregation method based on cloud-edge collaboration
By employing a layered federated security aggregation method that integrates cloud and edge computing, and utilizing a two-layer anomaly detection and dynamic weight allocation mechanism, the problems of computational latency, reliability, and privacy leakage in the cloud-edge-device environment are solved, achieving efficient security aggregation and privacy protection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF COMP TECH & APPL
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional federated learning frameworks suffer from high computational latency, low reliability, and poor scalability in cloud-edge-device environments, and hierarchical federated learning faces risks of poisoning attacks and privacy leaks.
A layered federated security aggregation method based on cloud-edge collaboration is adopted. Through a two-layer anomaly detection mechanism and a cloud-edge collaborative two-way authentication mechanism, combined with dynamic weight allocation, user authentication and service control access are achieved, model/data poisoning attacks are defended, and privacy is protected.
Effectively defend against poisoning attacks, enhance edge network security and privacy protection capabilities, and reduce the risk of privacy leaks caused by external adversaries obtaining model parameters.
Smart Images

Figure CN122138167A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network security technology, specifically relating to a layered federated security aggregation method based on cloud-edge collaboration. Background Technology
[0002] Traditional federated learning frameworks typically employ a star topology, where a group of distributed devices communicate directly with a central server (usually a cloud server) and collaboratively train a global model according to predefined aggregation rules (ARGs). However, centralized architectures have significant limitations: first, long-distance communication between end devices and the cloud server leads to high computational latency; second, the risk of a single point of failure in the central server reduces system reliability; and finally, as the number of participating devices increases, system scalability is severely constrained. Therefore, with the significant improvement in the computing power of end devices, direct data processing at the network edge has become a common solution for achieving low-latency communication and high-efficiency response.
[0003] Figure 1 The basic architecture of hierarchical federated learning is demonstrated, which adopts a three-layer distributed structure: the first layer consists of end devices that generate data and perform local model training; the second layer is the edge aggregation layer, which is responsible for collecting and aggregating model updates from the end devices; and the third layer is the cloud server, whose main function is to receive intermediate aggregation results from the edge server and perform global model aggregation.
[0004] Hierarchical federated learning exhibits significant advantages in communication efficiency, computational performance, and adaptability to diverse edge environments; however, its hierarchical architecture introduces new security challenges. Malicious edge endpoints can launch data poisoning or model poisoning attacks by uploading carefully crafted local model updates, thereby disrupting the model aggregation process and impairing the performance of the global model. Although existing research has proposed various defense mechanisms against traditional federated learning, and some work has begun to explore novel attack methods and defense strategies in cloud-edge-device architectures, while existing methods have achieved some success in traditional federated learning environments, their adaptability and effectiveness in hierarchical edge networks remain significantly limited. Summary of the Invention
[0005] (a) Technical problems to be solved The technical problem to be solved by this invention is to design an efficient and robust defense strategy that aims to effectively mitigate the impact of poisoning attacks on hierarchical federated learning systems in a cloud-edge-device environment, while reducing the risk of privacy leakage caused by external adversaries obtaining model parameters through eavesdropping.
[0006] (II) Technical Solution To address the aforementioned technical problems, this invention provides a layered federated security aggregation method based on cloud-edge collaboration, which is based on a central server. , One edge server and This method is implemented using individual end devices, where each edge server and each end device are participating entities. Each edge server can connect to multiple end devices within its wireless range, and the end devices cannot share data. In this method, the central server initializes common parameters for the participating entities, and the end devices register using their own identity identifiers. After successful registration, the central server sends verification parameters to the edge servers. Multiple end devices participate in federated learning training, submitting training parameters to the edge servers. The edge servers perform authentication, then perform edge training, and finally the central server performs secure aggregation.
[0007] (III) Beneficial Effects This invention provides a hierarchical federated security aggregation method based on cloud-edge collaboration. This method effectively defends against model / data poisoning attacks through a two-layer anomaly detection mechanism, and combines a cloud-edge collaborative two-way authentication mechanism to achieve trusted user identity verification and service access control, simultaneously improving edge network security and privacy protection capabilities. This method can effectively mitigate the impact of poisoning attacks on hierarchical federated learning systems in a cloud-edge-device environment, while also reducing the risk of privacy leaks caused by external adversaries obtaining model parameters through eavesdropping. Attached Figure Description
[0008] Figure 1 It demonstrates the basic architecture of hierarchical federated learning; Figure 2 This is a flowchart of the HisHFL scheme of the present invention. Detailed Implementation
[0009] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0010] This invention, through in-depth analysis of the risk of model parameter leakage, concludes that adversaries can infer user privacy information through model parameters or gradients. Particularly in high-speed and distributed edge computing environments, the cost for adversaries to obtain a single model is significantly reduced. This research gap highlights the necessity of exploring novel defense mechanisms. Based on this, this invention designs an efficient and robust defense strategy aimed at effectively mitigating the impact of poisoning attacks on hierarchical federated learning systems in cloud-edge-device environments, while simultaneously reducing the privacy leakage risk caused by external adversaries obtaining model parameters through eavesdropping.
[0011] Specifically, this invention proposes a hierarchical federated security aggregation method based on cloud-edge collaboration—HisHFL (Hierarchical Federated Secure Aggregation Framework Based on Cloud-EdgeCollaboration). This method effectively defends against model / data poisoning attacks through a two-layer anomaly detection mechanism, and combines a cloud-edge collaborative two-way authentication mechanism to achieve trusted user identity verification and service access control, simultaneously improving edge network security and privacy protection capabilities. The main contents of this method are summarized as follows: 1) Cloud-Edge Collaborative Security Aggregation Method: This invention proposes a layered federated security aggregation scheme—HisHFL—based on historical model information and cloud-edge collaboration. The system implementing this method is called the HisHFL system. This method innovatively integrates three main parts: ① The edge layer uses a dynamic anomaly detection mechanism based on time series analysis to analyze the historical model update trajectory of the client (end device) in real time and detect malicious models. ② A two-way privacy-preserving authentication mechanism based on the cloud-edge collaborative architecture uploads the encrypted authentication identifier and model to the edge layer, and combines it with the central server to perform trusted verification of the user's identity. Only after successful verification can the user be authorized to access the service resources of the edge server. ③ The central aggregation layer adopts a dynamic weight allocation mechanism, adjusting the aggregation weight in real time based on the model update stability score of the edge server.
[0012] 2) Two-layer historical information anomaly detection: The HisHFL framework innovatively designs a two-layer historical model information anomaly detection architecture: At the edge layer, by vertically analyzing the client's historical model update trajectory, a fine-grained credibility assessment mechanism is constructed, which can efficiently identify and eliminate poisoned model updates submitted by malicious clients; At the central aggregation layer, by horizontally comparing the historical model update information of different edge servers, edge servers with more model changes and less stable performance are given lower weights, thereby achieving accurate differentiation between malicious clients and benign clients, suppressing the influence of unstable nodes and optimizing the global model convergence efficiency.
[0013] The HisHFL system employs a two-layer robust aggregation architecture. The edge layer executes a poisoning detection mechanism based on vertical historical information, followed by edge aggregation. The central server utilizes horizontal model anomaly scoring to perform dynamic weight allocation, and then performs central aggregation based on these weights. Furthermore, addressing the security requirements of hierarchical federated learning systems, HisHFL incorporates a security authentication module to protect the data and model security of authorized devices. This module aims to effectively prevent unauthorized access and malicious operations through strict user authentication and access control, ensuring the system's security and reliability.
[0014] The HisHFL system consists of a central server. , One edge server and Individual devices The participating entities consist of edge servers and end devices, with the m-th edge server... Connecting end devices within wireless range Data cannot be shared between end devices. The HisHFL system mainly includes the following processes: During the registration phase, the central server initializes common parameters for participating entities, and the end devices use their own identity identifiers. After successful registration, the central server will send verification parameters. For edge servers.
[0015] During the training phase, local training is performed on the terminal device. ), to obtain model parameters Use it to calculate verification parameters Edge server pass After successful verification, a local model is obtained; the edge server uses the previous round of historical local models to calculate anomaly scores. Robust aggregation is performed using the scoring to obtain the edge model. Send to the central server Central server Using the previous historical global model Calculate the aggregate weights related to trust level Based on the above weights The aggregation yields a weighted global model, thus completing the aggregation process between the edge servers and the central server.
[0016] In the above process, multiple edge devices participate in federated learning training, submit parameters to the edge server, the edge server performs authentication, and then performs edge training. After the edge server is trained, it submits the parameters to the central server, and the central server performs security aggregation.
[0017] This invention relates to a federated learning algorithm with multi-round collaborative training, which optimizes the model through a closed-loop process of "model distribution - local training - parameter aggregation". The entire algorithm implemented by this method is as follows: First, the end device registers... Figure 2 Mid-process When the algorithm needs to be started, local training begins, and then the obtained model parameters and authentication identifier are sent to the edge server. Figure 2 Mid-process The edge server performs filtering, aggregation, and selection to obtain the edge model. Figure 2 Mid-process , Then the edge models are sent to the central server, which aggregates them to obtain a globally usable model. Figure 2 Mid-process To facilitate understanding, the single-round execution flow will be explained in detail below. This single-round flow is the core basic unit constituting the entire multi-round algorithm, and the complete algorithm's execution logic is the iterative loop of this single-round flow. Specifically: (1) Registration stage: System initialization: Central server It is a trusted edge server. It is one of the fixed participating entities, and the central server uses a homomorphic encryption algorithm. For each edge server Generate public and private keys Generate hash function and generator ,Will It is sent to each edge server through a secure channel, m=1,...,M.
[0018] Registration phase: Before training begins, the i-th terminal device Request to prepare for registration, i=1,...,N, based on the device identifier. Calculate its own verification parameters Verification parameters The information is sent to the central server, which uses the device's identity-related secret value (verification code). Calculate authentication mark , will the certification mark Send to edge server Edge server save Registration complete (as shown in the image, this process indicates...) ).
[0019] (2) Edge aggregation stage: Step 21 - Initialization Phase: Central Server Initialize global model According to the index of the edge server Edge servers Initialize the edge model When the terminal device starts training, the terminal device... Send a request to the edge server within the communication range. Response, to end device Send current edge model (T represents the current round).
[0020] Step 22 - Local Training and Authentication on End Devices: Each end device participating in federated learning completes iterative training and parameter updates on its local dataset according to the specifications of the federated averaging algorithm, thus obtaining local model parameters. Use the public key of the end device within the scope. Calculate the identity identifier according to the following formula Send to the edge server Steps 21 and 22 are shown in the diagram. ; Step 23 - Edge Server Verification and Trust Score Calculation: The edge server receives the verification parameters obtained from the end device in the above steps. Then, a request is sent to the central server, which then determines the order based on the edge server's response. Index calculation and send this parameter To edge servers Edge server Use your own private key Decryption and Then verify according to the following formula. Is it equal to : If the verification passes, the local model parameters sent by the terminal device will be accepted. Perform the following steps, or return to step 21.
[0021] Edge server The distribution change is obtained by calculating the historical model of the same index in the current round and the previous round using the following formula. .
[0022] Expanding the above formula in detail, we get the following formula: in Representing the Gaussian kernel function: The server normalizes all client longitudinal variation values into an anomaly score: ' Step 24 - Dynamic Clustering Detection: Based on the distribution changes calculated in Step 23 The outlier scores are obtained by normalizing them. Then, the gap statistics are calculated for a set of normalized outlier scores to determine the optimal number of clusters K for this group.
[0023] Step 25 - Edge Server Aggregation: If the number of clusters Then, the local model parameters for all end devices... The data was divided into two groups using a binary K-means clustering algorithm. This binary K-means algorithm identifies malicious scores. End devices exceeding a set threshold are marked as malicious. The model parameters of these malicious end devices in the current aggregation round are discarded. Local model update parameters are collected from the remaining benign end devices and compiled into a new set of local model parameters. Edge Server Based on this new set of local model parameters, a weighted federated average algorithm is used for aggregation to obtain the marginal model. ;if Then, edge aggregation is performed directly using the federated averaging algorithm (this process is...). Figure 2 middle , ).
[0024] (3) Central server aggregation stage Central Aggregation Initialization: Central Server Initialize the global model Sending data to various edge servers, the complete process is shown in the diagram. : Step 31 - Edge Layer Model Update: After the completion of this round of edge aggregation, multiple edge servers... After a certain number of updates are completed by the end devices within its coverage area, the edge servers participating in this round will correspond to multiple edge models. Submitted to the central server .
[0025] Step 32 - Aggregation Ratio Calculation: Based on the edge model and the previous round's global model, calculate the similarity between the current round's model and the previous round's historical global model using the cosine similarity method according to the following formula, to accurately calculate the aggregation ratio of the edge model. (This can be represented as a weighted aggregation parameter related to trust level). This determines the participation weight of the models involved in the central server aggregation phase.
[0026] Specifically, when the aggregation ratio of a certain edge model A larger value indicates that the marginal model performs well in the historical global model similarity evaluation system, thus indicating a high level of trust. For such high-trust models, the central server will allocate a larger participation ratio, enabling them to play a greater role in the new round of model aggregation and have a more significant impact on the final generated global model.
[0027] Step 33 - Central Cloud Server Layer Aggregation: After the calculation in Step 32 is completed, the central server aggregates the ratios of all benign model parameters. The federated average algorithm is used to calculate the aggregation, and the following formula is used to obtain the global model for round T+1. (Default from the first) (The aggregation begins in each round). At this point, the global model update for round T is complete. Then, multiple rounds of iterative updates will be performed as needed until the global model converges.
[0028] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A hierarchical federated security aggregation method based on cloud-edge collaboration, characterized in that, This method is based on a central server , One edge server and This method is implemented using individual end devices, where each edge server and each end device are participating entities. Each edge server can connect to multiple end devices within its wireless range, and the end devices cannot share data. In this method, the central server initializes common parameters for the participating entities, and the end devices register using their own identity identifiers. After successful registration, the central server sends verification parameters to the edge servers. Multiple end devices participate in federated learning training, submitting training parameters to the edge servers. The edge servers perform authentication, then perform edge training, and finally the central server performs secure aggregation.
2. The method as described in claim 1, characterized in that, This method includes a registration phase and a training phase, wherein the registration phase includes the following steps: Initialization: Central Server It is a trusted edge server. It is one of the fixed participating entities, and the central server uses a homomorphic encryption algorithm. For each edge server Generate public and private keys Generate hash function and generator ,Will Send it to each edge server via a secure channel; Registration steps: Before training begins, the i-th terminal device... Request to prepare for registration, i=1,...,N, based on the device identifier. Calculate its own verification parameters Verification parameters The information is sent to the central server, which uses the secret value associated with the device's identity. Calculate authentication identifier , will the certification mark Send to edge server Edge server save Registration complete.
3. The method as described in claim 2, characterized in that, The training phase includes the edge aggregation phase: Step 21 - Initialization Phase: Central Server Initialize global model According to the index of the edge server Edge servers Initialize the edge model When the terminal device starts training, the terminal device Send a request to the edge server within the communication range. Response, to end device Send current edge model T represents the current round; Step 22 - Local Training and Authentication on End Devices: Each end device participating in federated learning performs iterative training and parameter updates on its local dataset according to the federated averaging algorithm, obtaining the local model parameters. Use the end device public key Calculate the identity identifier according to the following formula Send to the edge server ; Step 23 - Edge Server Verification and Trust Score Calculation: The edge server verifies the trust score upon receiving verification parameters from the end device. Then, a request is sent to the central server, which then determines the response based on the edge server's... Index calculation and send this parameter To edge servers Edge server Use your own private key Decryption and Then verify Is it equal to If the verification passes, the local model parameters sent by the terminal device will be accepted. Perform the following steps, otherwise return to step 21; Edge server The distribution change is obtained by calculating the historical model of the same index in the current round and the previous round using the following formula. ; in, Indicates the empty set; Step 24 - Dynamic Clustering Detection: Based on the distribution changes calculated in Step 23 The outlier scores are obtained by normalizing them. Then, the gap statistics are calculated for a set of normalized outlier scores to determine the optimal number of clusters K for this group. Step 25 - Edge Server Aggregation: If the number of clusters Then, the local model parameters for all end devices... The binary K-means clustering algorithm was applied to divide the data into two groups; this binary K-means algorithm identified malicious scores. End devices exceeding a set threshold are marked as malicious. The model parameters of these malicious devices in the current aggregation round are discarded. Local model update parameters are collected from the remaining benign end devices and compiled into a new set of local model parameters. (Edge server) Based on this new set of local model parameters, a weighted federated average algorithm is used for aggregation to obtain the marginal model. ;if Then, the federated averaging algorithm is used to directly perform edge aggregation.
4. The method as described in claim 3, characterized in that, In step 24, the distribution will change. The normalization calculation yielded the following outlier scores: ’ 。 5. The method as described in claim 3, characterized in that, The training phase also includes a central server aggregation phase: First, perform central aggregation initialization: Central Server Initialize the global model Send it to each edge server, and then perform the following steps: Step 31 - Edge Layer Model Update: After the completion of this round of edge aggregation phase, multiple edge servers... Based on the end devices within its coverage area completing a certain number of updates, the edge servers participating in this round will correspond to multiple edge models. Submitted to the central server ; Step 32 - Aggregation Ratio Calculation: Based on the edge model and the previous round's global model, calculate the similarity between the current round's model and the previous round's historical global model using the cosine similarity method according to the following formula, and calculate the aggregation ratio of the edge model. , This determines the participation weight of the models involved in the central server aggregation phase; Step 33 - Central Cloud Server Layer Aggregation: After the calculation in Step 32 is completed, the central server sets the aggregation ratio. The federated average algorithm is used to calculate the aggregation, and the following formula is used to obtain the global model for round T+1. ; 。 6. The method as described in claim 5, characterized in that, When the aggregation ratio of a certain edge model A larger value indicates that the marginal model has a higher level of trust in the historical global model similarity evaluation system.
7. The method as described in claim 5, characterized in that, Polymerization ratio It is represented as a weighted aggregation parameter related to trust level.
8. The method as described in claim 5, characterized in that, After the Tth round of global model update is completed, multiple rounds of iterative updates will be performed as needed until the global model converges.
9. A system for implementing the method as described in any one of claims 1 to 8, characterized in that, Includes a central server , One edge server .
10. The system as described in claim 9, characterized in that, The system adopts a two-layer robust aggregation structure. The edge server executes a poisoning detection mechanism based on vertical historical information and then performs edge aggregation. The central server uses horizontal model anomaly scoring to perform dynamic weight allocation and performs central aggregation based on the allocated weights.