Decentralized hierarchical federated learning method and system, and edge server

By aggregating gradient ciphertexts through edge server clusters and secure multi-party computation protocols, the problems of data leakage and model pollution in federated learning are solved, enabling a more efficient and secure model training process, and improving the enthusiasm of participants through incentive mechanisms.

WO2026130579A1PCT designated stage Publication Date: 2026-06-25CETC BIGDATA RES INST CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CETC BIGDATA RES INST CO LTD
Filing Date
2025-12-31
Publication Date
2026-06-25

AI Technical Summary

Technical Problem

In federated learning, traditional methods suffer from data leakage and model contamination issues. Especially when the central server is untrusted, model parameters are easily intercepted or tampered with, leading to privacy breaches and affecting the learning process.

Method used

A decentralized hierarchical federated learning approach is adopted, which utilizes an edge server cluster to aggregate gradient ciphertext through a secure multi-party computation protocol. This approach combines encryption algorithms to protect data privacy and introduces an incentive mechanism to enhance the enthusiasm of the participants.

Benefits of technology

It effectively prevents the leakage and tampering of model parameters during transmission, improves the security and data privacy of model aggregation, and enhances the efficiency and quality of model training through incentive mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025147739_25062026_PF_FP_ABST
    Figure CN2025147739_25062026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present invention are a decentralized hierarchical federated learning method and system, and an edge server. The method comprises: a plurality of edge servers respectively receiving gradient ciphertexts sent by different participant clients; the plurality of edge servers aggregating the received gradient ciphertexts on the basis of a secure multi-party computation protocol, so as to obtain an aggregated model ciphertext, wherein the secure multi-party computation protocol refers, in a mutually untrusted multi-user network, to a plurality of edge servers respectively holding different gradient ciphertexts jointly performing computation to obtain an aggregated model ciphertext based on these gradient ciphertexts, and each edge server only partially obtaining data in the aggregated model ciphertext, and not leaking its own gradient ciphertext to other edge servers; and the edge servers issuing the aggregated model ciphertext to the participant clients. By using the solution of the present invention, the security of model aggregation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Decentralized hierarchical federated learning methods and systems, edge servers Technical Field

[0001] This invention relates to the field of federated learning technology, specifically to a decentralized hierarchical federated learning method and system, and an edge server. Background Technology

[0002] In today's information technology era, data has become a valuable resource driving innovation in artificial intelligence and machine learning models. With the rapid development of big data, data privacy and security issues have become increasingly prominent. How to fully utilize these dispersed data resources while protecting user privacy has become a pressing problem in the field of machine learning. Federated learning is a solution that has emerged in this context.

[0003] Federated learning is a novel distributed machine learning paradigm that allows multiple participants to collaboratively train a machine learning model without sharing the original data. This approach effectively addresses the shortcomings of traditional centralized machine learning methods in terms of data privacy and security, while improving data utilization efficiency and providing new possibilities for the training and application of machine learning models.

[0004] However, while protecting data privacy, federated learning also faces new challenges. During the federated learning process, clients need to upload locally computed model parameters to a central server for aggregation. In this process, model parameters may be intercepted or tampered with, leading to privacy leaks or model contamination. Furthermore, the untrustworthiness of the central server is a significant issue that federated learning needs to address. If the central server is attacked or abused, it could severely impact the entire learning process. Summary of the Invention

[0005] This invention provides a decentralized hierarchical federated learning method and system, and an edge server, to improve the security of model aggregation.

[0006] Therefore, the present invention provides the following technical solution:

[0007] This invention provides a decentralized hierarchical federated learning method, the method comprising:

[0008] Multiple edge servers receive gradient ciphertext sent by clients from different participating parties; these multiple edge servers form a server cluster and are arranged in sequence.

[0009] The multiple edge servers aggregate the received gradient ciphertexts based on a secure multi-party computation protocol to obtain an aggregated model ciphertext. The secure multi-party computation protocol refers to a multi-user network where multiple edge servers, each holding different gradient ciphertexts, jointly compute an aggregated model ciphertext based on these gradient ciphertexts. Each edge server only obtains a portion of the data in the aggregated model ciphertext and does not disclose its own gradient ciphertext to other edge servers.

[0010] The edge server sends the encrypted aggregation model to the participating client.

[0011] The multiple edge servers aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain the aggregated model ciphertext, which includes:

[0012] The first server among the plurality of edge servers selects a random number, adds the random number to the gradient ciphertext it receives, and transmits the accumulated gradient to the other servers among the plurality of edge servers. The other servers then add the gradient ciphertext they receive to the accumulated gradient in turn, until the last server adds the gradient ciphertext it receives and returns it to the first server.

[0013] The first server subtracts the random number from the received accumulated gradient, and then divides it by the number of edge servers to obtain the aggregated model ciphertext;

[0014] The first server publishes the aggregated model ciphertext to the other servers.

[0015] Optionally, the first server can be any one of the plurality of edge servers.

[0016] Optionally, the method further includes: the participating client using local data to train the model based on any of the following algorithms to obtain the gradient data: distributed gradient descent algorithm, linear regression algorithm, and logistic regression algorithm.

[0017] Optionally, the method further includes: the participating client sampling any one of the following encryption algorithms to encrypt the gradient data: Paillier homomorphic encryption algorithm, threshold Paillier homomorphic encryption algorithm, identity-based homomorphic encryption algorithm, and lattice-based homomorphic encryption algorithm.

[0018] Optionally, the method further includes:

[0019] The edge server determines the contribution of the participating client;

[0020] Rewards will be distributed to the corresponding participants based on their contributions.

[0021] Optionally, the edge server determines the contribution of the participating client by including:

[0022] The edge server computing participant client marginal loss :

[0023] ;

[0024] in, and They represent and Loss on the validation set; This represents the global model obtained by aggregating the local models of all participating clients. This indicates that by aggregating the participating client... The global model obtained from the local models of all participating clients:

[0025] ;

[0026] ;

[0027] According to the participating client marginal loss Determine its contribution level; the greater the marginal loss, the greater the contribution.

[0028] Optionally, the method further includes:

[0029] According to the clients of each participating party marginal loss Select clients to participate in the next round of model training;

[0030] The edge server sends the aggregated model ciphertext to the participating client in the following ways:

[0031] The encrypted aggregated model is then sent to the selected clients.

[0032] Optionally, the method further includes:

[0033] The participating client uses its private key to decrypt the ciphertext of the aggregated model to obtain the updated model;

[0034] The updated model is then trained again based on local data to obtain a new gradient ciphertext.

[0035] The new gradient ciphertext is uploaded to the edge server.

[0036] The present invention also provides an edge server, wherein the edge server is any one server in a server cluster composed of multiple edge servers arranged in sequence; the edge server includes:

[0037] The receiving module is used to receive gradient ciphertext sent by the participating client.

[0038] The aggregation module is used to aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain the aggregated model ciphertext. The secure multi-party computation protocol refers to a multi-user network that does not trust each other, in which multiple edge servers holding different gradient ciphertexts jointly compute the aggregated model ciphertext based on these gradient ciphertexts. Each edge server only obtains a part of the data in the aggregated model ciphertext and does not disclose the gradient ciphertext it holds to other edge servers.

[0039] When the edge server acts as the first server, the aggregated model ciphertext is obtained as follows: Select a random number, add the random number to the received gradient ciphertext to obtain the accumulated gradient and pass it to other servers, so that other servers add the received gradient ciphertext to the accumulated gradient in turn, and receive the accumulated gradient returned by the last server, subtract the random number from the accumulated gradient, and then divide by the number of edge servers to obtain the aggregated model ciphertext, and publish the aggregated model ciphertext to other servers;

[0040] When the edge server is another server besides the first server, the aggregated model ciphertext is obtained in the following way: receiving the accumulated gradient sent by the previous server, adding the received gradient ciphertext to the accumulated gradient and sending it to the next server or the first server, and receiving the aggregated model ciphertext published by the first server.

[0041] The model distribution module is used to distribute the encrypted aggregated model to the participating client.

[0042] Optionally, the edge server further includes a reward processing module, used to determine the contribution level of the participating client and distribute rewards to the participating client based on the contribution level.

[0043] The present invention also provides a decentralized hierarchical federated learning system, the system comprising: a central server and a plurality of edge servers;

[0044] The central server is used to initialize the federated learning system and set system parameters, secure multi-party computation protocol, and encryption algorithm.

[0045] The multiple edge servers are used to receive gradient ciphertext sent by different participating clients, aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain aggregated model ciphertext, and then send the aggregated model ciphertext to the participating clients. The gradient ciphertext is obtained by the participating clients using local data to train the model and encrypting the obtained gradient data using the encryption algorithm.

[0046] The present invention also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the steps of the decentralized hierarchical federated learning method.

[0047] This invention provides a decentralized hierarchical federated learning method and system, along with an edge server. Utilizing encryption algorithms and secure multi-party computation technology, it achieves secure encryption of gradient data from participating clients and model aggregation between edge servers, thereby solving the data leakage and model pollution problems inherent in traditional federated learning. In federated learning, participating clients obtain gradient data through local data training. This gradient data contains sensitive information from the participating clients' data. To protect this information from leakage, participating clients use encryption algorithms to encrypt the gradient data into ciphertext before uploading it to the edge server, thus protecting data privacy.

[0048] Furthermore, the encrypted gradient ciphertext is uploaded to the nearest edge server. The edge servers then perform model aggregation based on a secure multi-party computation (MPC) protocol. MPC technology enables multiple edge servers to jointly verify and aggregate models without decryption, generating ciphertext of the aggregated model. This effectively prevents model parameters from being intercepted or tampered with during transmission, improving the security of model aggregation.

[0049] Furthermore, to incentivize client participation, the model incorporates an incentive mechanism. By evaluating the contributions of each participating client and distributing rewards appropriately, the model's enthusiasm is enhanced, which in turn improves training efficiency.

[0050] Furthermore, the clients participating in the next round of model training can be selected based on the marginal loss, which can better ensure the quality of model training. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0052] Figure 1 is a flowchart of a decentralized hierarchical federated learning method provided in an embodiment of the present invention;

[0053] Figure 2 is another flowchart of the decentralized hierarchical federated learning method provided in the embodiment of the present invention;

[0054] Figure 3 is a schematic diagram of an edge server provided in an embodiment of the present invention;

[0055] Figure 4 is a schematic diagram of a decentralized hierarchical federated learning system provided in an embodiment of the present invention. Detailed Implementation

[0056] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

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

[0058] To address the challenges of protecting data privacy in existing federated learning, this invention provides a decentralized hierarchical federated learning method and system. By utilizing encryption algorithms and secure multi-party computation technology, it achieves secure encryption of gradient data from participating clients and model aggregation between edge servers, thereby solving the data leakage and model pollution problems existing in traditional federated learning and protecting the privacy of participating client data.

[0059] Figure 1 shows a flowchart of a decentralized hierarchical federated learning method provided in an embodiment of the present invention, which includes the following steps:

[0060] Step 101: Multiple edge servers receive gradient ciphertext sent by clients from different participating parties.

[0061] It should be noted that the multiple edge servers form a server cluster and are arranged in sequence.

[0062] The gradient ciphertext is encrypted data obtained by encrypting the gradient data obtained from local data used by the participating client for model training. Model training can employ, but is not limited to, any of the following algorithms: distributed gradient descent, linear regression, and logistic regression.

[0063] Taking the distributed gradient descent algorithm as an example, the model training process is as follows:

[0064] (1) Participating client The initial model is acquired through network communication. Based on the available data, the initial model is trained using the stochastic gradient descent algorithm. The loss function value is calculated according to the following formula. :

[0065]

[0066] Where ω is the model weight, It is a loss function used to calculate the difference between the output of the initial model and the real data samples. This represents the size of the entire data sample. Participant Pi in the training process calculates local gradient descent. Train a local model on a local dataset :

[0067] ;

[0068] Where η is the learning rate of distributed gradient descent.

[0069] Encrypting gradient data can be achieved using, but is not limited to, any of the following algorithms: distributed gradient descent, linear regression, and logistic regression.

[0070] It should be noted that the algorithms used for model training and the encryption algorithms can be preset by the central server, and this embodiment of the invention does not limit this.

[0071] Alternatively, the initial model and the participants in federated learning can be determined by the central server. For example, each participant can register with the central server through a client, and the central server determines whether the client that submitted the registration application is eligible to participate in federated learning based on certain criteria (such as the participant's computing resources and network conditions). The initial model is then sent to the edge servers, which in turn send it to the corresponding participating client clients that have successfully registered.

[0072] The participating client uploads the encrypted gradient ciphertext to the nearest edge server.

[0073] Edge servers are a distributed computing architecture where data processing occurs at the edge of the network, close to the data source. These servers are designed to improve response speed and reduce bandwidth usage, and are typically deployed where users access the network, such as at the edge of a telecom operator's network, or directly within the user's device. The main functions of edge servers include: reducing latency, minimizing bandwidth usage, reducing reliance on central servers, fault tolerance and resilience, real-time data processing and analysis, and resource conservation.

[0074] In this embodiment of the invention, a distributed computing architecture composed of multiple edge servers is used, which enables participating clients to upload encrypted gradient ciphertext to the nearest edge server, thereby improving data transmission and processing efficiency, and effectively enhancing data security and privacy protection, as well as improving the security of gradient ciphertext transmission.

[0075] It should be noted that an edge server can receive gradient ciphertext sent by one or more participating client clients.

[0076] Step 102: Multiple edge servers aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain aggregated model ciphertext.

[0077] The secure multi-party computation protocol refers to a multi-user network where multiple edge servers, each holding different gradient ciphertexts, jointly compute an aggregate model ciphertext based on these gradient ciphertexts. Each edge server only obtains a portion of the aggregate model ciphertext and does not disclose its own gradient ciphertext to other edge servers.

[0078] For example, there are Each participating client Each holds the gradient ciphertext Send to Several different edge servers, which utilize configuration functions The ciphertext of the aggregation model was calculated together. , Only results were obtained And not to disclose For other participating parties.

[0079] Specifically, in a non-limiting embodiment, Edge servers The gradient ciphertexts received by each party are as follows: The first server Choose a random number r and send the received gradient ciphertext. Adding a random number r as the accumulated gradient is... This is passed to other servers among multiple edge servers, allowing each server to sequentially add its received gradient ciphertext to the accumulated gradient, until the last server adds its received gradient ciphertext and returns it to the first server.

[0080] (1) Edge server Will Send to edge server ;

[0081] (2) Edge server Will Send to edge server ;

[0082] (3) Edge server Continue performing the same operation;

[0083] (4) Edge server Will Send to edge server ;

[0084] (5) Edge server Will Subtract the random number r and then divide by the number of participating buses n to obtain the aggregated model ciphertext. .

[0085] (6) Edge server To edge servers The encrypted aggregation model is published.

[0086] It should be noted that the first server mentioned above can be any one of multiple edge servers, and the order in which different servers transmit the ciphertext of the aggregation model can be agreed upon in advance, such as by the central server in the system configuration. This embodiment of the invention does not limit this.

[0087] In the example above, each edge server receives gradient ciphertext sent by one participating client. When multiple participating clients are located on the same edge server, that edge server can also simultaneously receive gradient ciphertext from multiple participating clients. Accordingly, when multiple edge servers jointly compute the aggregated model ciphertext using a defined function as described above, each edge server needs to add the accumulated gradients received from other servers to the gradient ciphertext from all participating clients it has received before sending it to the next server.

[0088] Of course, other secure multi-party computation methods can also be used, as long as each edge server only obtains a portion of the data in the aggregated model ciphertext and does not leak the gradient ciphertext it holds to other edge servers.

[0089] Step 103: The edge server sends the encrypted aggregation model to the participating client.

[0090] Accordingly, each participating client uses its private key to decrypt the aggregated model ciphertext to obtain the updated model; the updated model is then trained again based on local data to obtain new gradient ciphertext, which is then uploaded to the edge server.

[0091] The decentralized hierarchical federated learning method provided by this invention utilizes encryption algorithms and secure multi-party computation technology to achieve secure encryption of gradient data from participating clients and model aggregation between edge servers, thereby solving the data leakage and model pollution problems existing in traditional federated learning and effectively protecting data privacy.

[0092] Figure 2 shows another flowchart of the decentralized hierarchical federated learning method provided in this embodiment of the invention.

[0093] Compared with the embodiment shown in Figure 1, in this embodiment, the method further includes the following steps:

[0094] Step 104: The edge server determines the contribution of the participating client.

[0095] For example, in a non-limiting embodiment, each edge server can assess the contribution of the corresponding participant based on marginal loss as a basis for reward distribution.

[0096] Edge servers can compute participant clients in the following ways. marginal loss :

[0097] ;

[0098] in, and They represent and Loss on the validation set; This represents the global model obtained by aggregating the local models of all participating clients. This indicates that by aggregating the participating client... The global model obtained from the local models of all participating clients:

[0099] ;

[0100] ;

[0101] According to the participating client marginal loss Determine its contribution level; the greater the marginal loss, the greater the contribution.

[0102] Step 105: Distribute rewards to the corresponding participants based on their contribution levels.

[0103] The decentralized hierarchical federated learning method provided in this invention ensures the quality and efficiency of model training by evaluating the contributions of each participating client and distributing rewards reasonably.

[0104] Furthermore, regarding the marginal loss calculated above... You can also set a corresponding threshold δ to filter. The participating client can participate in the next round of model training, thereby better ensuring the quality of the model.

[0105] It should be noted that the above thresholds Dynamic adjustments are required. In other words, after obtaining the corresponding gradient data in each round of model training, the gradient data is encrypted and sent to the edge server. The edge server needs to redetermine the threshold δ to ensure that the selected participating clients have good data quality and model training capabilities, thereby ensuring the quality of the model obtained from joint training.

[0106] Accordingly, the present invention also provides an edge server, as shown in FIG3, which is a schematic diagram of an edge server provided in an embodiment of the present invention.

[0107] The edge server 300 is any one of the servers in a server cluster composed of multiple edge servers arranged in sequence, and includes the following modules:

[0108] The receiving module 301 is used to receive gradient ciphertext sent by the participating party's client;

[0109] The aggregation module 302 is used to aggregate the received gradient ciphertext based on the secure multi-party computation protocol to obtain the aggregated model ciphertext. The secure multi-party computation protocol refers to a multi-user network that does not trust each other, in which multiple edge servers holding different gradient ciphertexts jointly calculate the aggregated model ciphertext based on these gradient ciphertexts. Each edge server only obtains a part of the data in the aggregated model ciphertext and does not disclose the gradient ciphertext it holds to other edge servers.

[0110] When the edge server acts as the first server, the aggregated model ciphertext is obtained as follows: Select a random number, add the random number to the received gradient ciphertext to obtain the accumulated gradient and pass it to other servers, so that other servers add the received gradient ciphertext to the accumulated gradient in turn, and receive the accumulated gradient returned by the last server, subtract the random number from the accumulated gradient, and then divide by the number of edge servers to obtain the aggregated model ciphertext, and publish the aggregated model ciphertext to other servers;

[0111] When the edge server is another server besides the first server, the aggregated model ciphertext is obtained in the following way: receiving the accumulated gradient sent by the previous server, adding the received gradient ciphertext to the accumulated gradient and sending it to the next server or the first server, and receiving the aggregated model ciphertext published by the first server.

[0112] The model distribution module 303 is used to distribute the aggregated model ciphertext to the participating client.

[0113] The edge server provided by this invention adopts a distributed structure and aggregates the received gradient data from participating clients based on a secure multi-party computation method, effectively protecting the privacy of the data of each participating party.

[0114] In another non-limiting embodiment, the edge server 300 may further include a reward processing module (not shown) for determining the contribution level of the participating client and distributing rewards to the participating client based on the contribution level.

[0115] The reward processing module can determine the contribution of participating customers based on marginal loss. The calculation method of marginal loss can be referred to the description in the previous embodiments of the present invention, and will not be repeated here.

[0116] In another non-limiting embodiment, the edge server 300 may further include a filtering module (not shown) for filtering clients participating in the next round of model training based on the marginal loss of each participating client, such as participating clients. marginal loss Greater than or equal to the set threshold Then the participating client As a participating client in the next round of model training, otherwise this participating client There will be no further round of model training.

[0117] Accordingly, the model distribution module 303 only distributes the aggregated model ciphertext to the selected clients who will participate in the next round of model training. That is, if the selection module determines that the corresponding participating client is eligible to participate in the next round of model training, the model distribution module 303 will distribute the aggregated model ciphertext to that participating client; otherwise, it will not distribute the aggregated model ciphertext to that participating client.

[0118] By screening participating clients as described above, model quality can be better guaranteed.

[0119] Accordingly, this embodiment of the invention also provides a decentralized hierarchical federated learning system, as shown in Figure 4, which is a schematic diagram of a decentralized hierarchical federated learning system provided in this embodiment of the invention.

[0120] In this example, the decentralized hierarchical federated learning system 40 includes a central server 400 and multiple edge servers 30. Wherein:

[0121] The central server 400 is used to initialize the federated learning system, setting system parameters, secure multi-party computation protocol, and encryption algorithm.

[0122] Multiple edge servers 300 are used to receive gradient ciphertext sent by different participating clients, aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain aggregated model ciphertext, and send the aggregated model ciphertext to the participating clients; the gradient ciphertext is obtained by the participating clients using local data to train the model and encrypting the obtained gradient data using the encryption algorithm.

[0123] Each of the aforementioned edge servers 300 can receive gradient ciphertext sent by one or more participating clients. Multiple different edge servers 300 aggregate the received gradient ciphertext and then send it to the corresponding participating client.

[0124] The specific working methods and data sharing processes of each part of the above-mentioned decentralized hierarchical federated learning system 40 can be referred to the description in the previous embodiments of the present invention, and will not be repeated here.

[0125] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0126] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0127] In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus can be implemented in other ways.

[0128] The present invention also provides a storage medium, which is a computer-readable storage medium storing a computer program thereon. When the computer program is executed, it can perform some or all of the steps of the method shown in Figure 1 or Figure 2. The storage medium may include read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. The storage medium may also include non-volatile memory or non-transitory memory, etc.

[0129] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data provider to another website, computer, server, or data provider via wired or wireless means.

[0130] The embodiments of the present invention have been described in detail above. Specific implementation methods have been used to illustrate the present invention. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and systems of the present invention, and are merely some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention, and the content of this specification should not be construed as a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A decentralized hierarchical federated learning method, characterized in that, The method includes: Multiple edge servers receive gradient ciphertext sent by clients from different participating parties; these multiple edge servers form a server cluster and are arranged in sequence. The multiple edge servers aggregate the received gradient ciphertexts based on a secure multi-party computation protocol to obtain an aggregated model ciphertext. The secure multi-party computation protocol refers to a multi-user network where multiple edge servers, each holding different gradient ciphertexts, jointly compute an aggregated model ciphertext based on these gradient ciphertexts. Each edge server only obtains a portion of the data in the aggregated model ciphertext and does not disclose its own gradient ciphertext to other edge servers. The edge server sends the encrypted aggregation model to the participating client. The multiple edge servers aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain the aggregated model ciphertext, which includes: The first server among the plurality of edge servers selects a random number, adds the random number to the gradient ciphertext it receives, and transmits the accumulated gradient to the other servers among the plurality of edge servers. The other servers then add the gradient ciphertext they receive to the accumulated gradient in turn, until the last server adds the gradient ciphertext it receives and returns it to the first server. The first server subtracts the random number from the received accumulated gradient, and then divides it by the number of edge servers to obtain the aggregated model ciphertext; The first server publishes the aggregated model ciphertext to the other servers; The method further includes: The edge server determines the contribution of the participating client; Rewards will be distributed to the corresponding participants based on their contributions. The edge server determines the contribution of the participating client in the following ways: The edge server computing participant client marginal loss : ; in, and They represent and Loss on the validation set; This represents the global model obtained by aggregating the local models of all participating clients. This indicates that by aggregating the participating client... The global model obtained from the local models of all participating clients: ; ; According to the participating client marginal loss Determine its contribution level; the greater the marginal loss, the greater the contribution.

2. The decentralized hierarchical federated learning method according to claim 1, characterized in that, The first server is any one of the plurality of edge servers.

3. The decentralized hierarchical federated learning method according to claim 1, characterized in that, The method further includes: The participating client uses local data to train the model and obtain gradient data based on any of the following algorithms: distributed gradient descent algorithm, linear regression algorithm, and logistic regression algorithm.

4. The decentralized hierarchical federated learning method according to claim 3, characterized in that, The method further includes: The participating client samples any one of the following encryption algorithms to encrypt the gradient data: Paillier homomorphic encryption algorithm, threshold Paillier homomorphic encryption algorithm, identity-based homomorphic encryption algorithm, and lattice-based homomorphic encryption algorithm.

5. The decentralized hierarchical federated learning method according to claim 1, characterized in that, The method further includes: According to the clients of each participating party marginal loss Select clients to participate in the next round of model training; The edge server sends the aggregated model ciphertext to the participating client in the following ways: The encrypted aggregated model is then sent to the selected clients.

6. The decentralized hierarchical federated learning method according to claim 1, characterized in that, The method further includes: The participating client uses its private key to decrypt the ciphertext of the aggregated model to obtain the updated model; The updated model is then trained again based on local data to obtain a new gradient ciphertext. The new gradient ciphertext is uploaded to the edge server.

7. An edge server, characterized in that, The edge server is any one of the servers in a server cluster consisting of multiple edge servers arranged in sequence. The edge server includes: The receiving module is used to receive gradient ciphertext sent by the participating client. The aggregation module is used to aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain the aggregated model ciphertext. The secure multi-party computation protocol refers to a multi-user network that does not trust each other, in which multiple edge servers holding different gradient ciphertexts jointly compute the aggregated model ciphertext based on these gradient ciphertexts. Each edge server only obtains a part of the data in the aggregated model ciphertext and does not disclose the gradient ciphertext it holds to other edge servers. When the edge server acts as the first server, the aggregated model ciphertext is obtained as follows: Select a random number, add the random number to the received gradient ciphertext to obtain the accumulated gradient and pass it to other servers, so that other servers add the received gradient ciphertext to the accumulated gradient in turn, and receive the accumulated gradient returned by the last server, subtract the random number from the accumulated gradient, and then divide by the number of edge servers to obtain the aggregated model ciphertext, and publish the aggregated model ciphertext to other servers; When the edge server is another server besides the first server, the aggregated model ciphertext is obtained in the following way: receiving the accumulated gradient sent by the previous server, adding the received gradient ciphertext to the accumulated gradient and sending it to the next server or the first server, and receiving the aggregated model ciphertext published by the first server. The model distribution module is used to distribute the encrypted aggregated model to the participating client. The edge server also includes: The reward processing module is used to determine the contribution level of the participating client and distribute rewards to the participating client according to the contribution level. Determining the contribution of the participating client includes: The edge server computing participant client marginal loss : ; in, and They represent and Loss on the validation set; This represents the global model obtained by aggregating the local models of all participating clients. This indicates that by aggregating the participating client... The global model obtained from the local models of all participating clients: ; ; According to the participating client marginal loss Determine its contribution level; the greater the marginal loss, the greater the contribution.

8. A decentralized hierarchical federated learning system, characterized in that, The system includes: a central server and multiple edge servers as described in claim 7; The central server is used to initialize the federated learning system and set system parameters, secure multi-party computation protocol, and encryption algorithm. The multiple edge servers are used to receive gradient ciphertext sent by different participating clients, aggregate the received gradient ciphertext based on a secure multi-party computation protocol to obtain aggregated model ciphertext, and then send the aggregated model ciphertext to the participating clients. The gradient ciphertext is obtained by the participating clients using local data to train the model and encrypting the obtained gradient data using the encryption algorithm.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when run by a processor, performs the steps of the decentralized hierarchical federated learning method according to any one of claims 1 to 6.