Two-layer game incentive method and system for heterogeneous data hierarchical federated learning

CN122909218APending Publication Date: 2026-10-13ZHEJIANG GONGSHANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611131940.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

部分方法虽然能够鼓励更多客户端参与训练,但并不能保证参与客户端在标签分布上具有互补性;部分方法虽然能够降低通信能耗,但可能牺牲边缘侧数据质量;还有部分方法只关注客户端与服务器之间的单层交互,未能充分刻画端—边—云层次化架构中的多主体博弈关系

Benefits of technology

[0033]与现有技术相比,本发明能够减少仅依据物理距离或信道质量进行客户端接入所导致的边缘侧数据偏斜,降低非独立同分布数据对边缘模型和全局模型训练的不利影响,避免单边贪心匹配造成的资源分配不稳定,并提高异构数据环境下层次化联邦学习的模型精度、收敛效率、资源利用率和客户端参与公平性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122909218A_ABST
    Figure CN122909218A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of federated learning, distributed machine learning and mobile edge computing, and discloses a two-layer game incentive method and system for hierarchical federated learning of heterogeneous data, which, in an end-edge-cloud hierarchical federated learning architecture, first measures the data heterogeneity of a client alliance based on group earth moving distance, allocates contribution income by using Shapley value, and forms a stable client alliance through alliance-friendly preference rules; then adopts a two-sided delayed acceptance matching algorithm to stably match the client alliance with an edge server; and subsequently constructs a Stackelberg game between the cloud server and the edge alliance, so that the edge alliance determines the aggregation frequency and the cloud server determines the total reward strategy. The present application can simultaneously improve the edge-side data distribution, reduce the training and communication energy consumption, and improve the convergence effect of the global model and the resource utilization efficiency in the heterogeneous data scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of federated learning, distributed machine learning, and mobile edge computing, specifically to a two-layer game incentive method and system for hierarchical federated learning of heterogeneous data. Background Technology

[0002] Federated learning is a machine learning paradigm designed for distributed data silos. Compared with traditional centralized machine learning, federated learning can reduce the risk of privacy leaks caused by centralized storage of raw data and is suitable for deployment in environments where data is highly dispersed, such as mobile terminals, edge devices, sensor networks, and industrial field equipment.

[0003] With the development of mobile edge computing, traditional star-shaped federated learning architectures are increasingly unable to meet the needs of large-scale collaborative training on edge devices. In traditional federated learning, all clients typically communicate directly with the cloud server. When the number of clients is large, the model size is large, or the communication link is unstable, it can easily lead to excessive cloud communication pressure, core network congestion, increased training latency, and excessive client power consumption. To alleviate these problems, hierarchical federated learning introduces edge servers as intermediate aggregation nodes, forming a three-layer architecture of clients, edge servers, and cloud servers. Clients first upload their local models to the edge servers, where local aggregation is performed. Then, the edge-aggregated models are uploaded to the cloud servers for global aggregation. This architecture effectively shortens the communication distance between clients and aggregation nodes, reduces the cloud communication burden, and improves the efficiency of edge-cloud collaborative training.

[0004] However, in real-world mobile edge computing environments, client data typically exhibits significant non-independent and identically distributed characteristics. Different clients may have vastly different data distributions due to variations in geographical location, user behavior, device type, data acquisition environment, business scenario, or sensor status. In hierarchical federated learning, while connecting clients to the nearest edge server based solely on physical distance, communication channel quality, or signal strength can reduce client upload power consumption, it can easily lead to highly skewed class distributions of client data aggregated on the same edge server. If an edge server receives only client updates with incomplete or severely skewed class distributions during local aggregation, its edge model may deviate from the global optimization direction, causing edge model drift and further impacting the convergence speed and final accuracy of the global model in the cloud.

[0005] On the other hand, if the relationships between clients and edge servers are reorganized to improve data distribution at the edge, some clients may need to connect to edge servers that are not the closest or have poor communication conditions. While this adjustment is beneficial for improving the balance of data distribution at the edge, it may also increase client communication energy consumption and training costs. Therefore, in hierarchical federated learning of heterogeneous data, there is an inherent conflict between data distribution balance and communication energy consumption control.

[0006] Existing incentive mechanisms often focus on increasing client participation, reducing training energy consumption, or optimizing communication resource allocation, with less consideration given to the synergistic relationship between edge-side data heterogeneity correction, fair distribution of client contributions, edge server matching stability, and cloud reward strategies. While some methods can encourage more clients to participate in training, they cannot guarantee that participating clients are complementary in label distribution; while some methods can reduce communication energy consumption, they may sacrifice edge-side data quality; and some methods only focus on a single layer of interaction between the client and the server, failing to fully characterize the multi-agent game relationship in the edge-cloud hierarchical architecture. Summary of the Invention

[0007] To address the technical challenges of existing hierarchical federated learning incentive mechanisms in simultaneously considering edge-side data heterogeneity, client-side training and communication energy consumption, edge server stability matching, and cloud-based reward strategy optimization, this invention provides a two-layer game-theoretic incentive method and system for hierarchical federated learning of heterogeneous data. The technical solution is as follows:

[0008] A two-layer game-theoretic incentive method for hierarchical federated learning of heterogeneous data includes the following steps:

[0009] Step 1: Construct a hierarchical federated learning architecture, including cloud servers, edge servers, and clients; obtain local data statistics, computing resource parameters, and communication channel parameters of the clients;

[0010] Step 2: Construct a lower-level cooperative game. Based on the local data statistics, use the Group Earth Movement Distance (GEMD) to measure the heterogeneity of the client alliance's data distribution. Construct a client alliance value function based on the heterogeneity of the data distribution. Calculate the client's Shapley contribution to the alliance based on the client alliance value function. Construct a client utility function based on the Shapley contribution and the client's local training energy consumption.

[0011] Step 3: Based on the client utility function, make the clients migrate according to the alliance-friendly preference rules and divide them into stable client alliances;

[0012] Step 4: Based on the transmission energy consumption from the client alliance to the edge server and the edge server's preference for the data quality of the client alliance, perform bilateral delay reception matching between the client alliance and the edge server to form an edge alliance;

[0013] Step 5: Construct an upper-level Stackelberg game, with the cloud server as the leader and the edge alliance as the follower; the cloud server determines the total reward, and the edge alliance determines the local aggregation frequency; based on the Tullock competition mechanism, the cloud server determines the total reward strategy according to the edge alliance's aggregation contribution, model performance gains, and reward costs.

[0014] Step 6: According to the client alliance, edge server matching relationship, local aggregation frequency and total reward strategy, perform client local training, edge aggregation and cloud global aggregation to complete hierarchical federated learning training;

[0015] Step 7: Global model update, proceed to the next round of learning and training.

[0016] Furthermore, the Group Earth Movement Distance (GEMD) measures the deviation between the label distribution within the client alliance and the ideal label distribution. For the client alliance, the number of samples from each client in different label categories is counted, and the alliance heterogeneity is determined based on the difference between the sample proportion of each label category and the ideal label distribution. The smaller the alliance heterogeneity, the closer the data distribution within the client alliance is to the ideal equilibrium label distribution. The client alliance value function is constructed based on the alliance heterogeneity, and the client alliance value is negatively correlated with the alliance heterogeneity.

[0017] Furthermore, the Shapley contribution reward is determined by calculating the marginal increase in the value of the consortium before and after a client joins the consortium. When the number of clients is large, Monte Carlo sampling is used to approximate the calculation of the Shapley contribution reward. The client utility function is jointly determined by the Shapley contribution reward and the client's local training energy consumption. The client utility increases with the increase of the Shapley contribution reward and decreases with the increase of the client's local training energy consumption.

[0018] Furthermore, the energy consumption for local training on the client is determined by the client's effective capacitance coefficient, CPU frequency, number of training samples, and number of CPU cycles required for training a single sample; the communication energy consumption for uploading model parameters from the client is determined by the transmission power, the size of the uploaded model parameters, and the uplink transmission rate, which is calculated based on the communication bandwidth, channel gain, transmission power, and noise power; when the total uplink bandwidth of the edge server is allocated within its associated client consortium, the uplink transmission rate from the client to the edge server is calculated based on the allocated uplink bandwidth, and the energy consumption for uploading the model from the client to the edge server is calculated based on the client's transmission power, the size of the model parameters, and the uplink transmission rate.

[0019] Furthermore, the alliance-friendly preference rule includes: when a client migrates from the current client alliance to a candidate client alliance, if the total utility of the relevant client alliance members is improved or not reduced before and after the migration, the client is allowed to perform the migration; otherwise, the client is not allowed to perform the migration.

[0020] Furthermore, the specific process of bilateral delay acceptance matching is as follows: the client consortium forms an edge server preference list from low to high based on the transmission energy consumption required to connect to different edge servers; the edge servers form a client consortium preference list from high to low based on the data quality of the client consortiums; unmatched client consortia submit matching requests to the currently most preferred edge server; the edge server temporarily retains the current most preferred client consortium request and rejects other requests; the rejected client consortium continues to submit requests to the next preferred edge server until all client consortia are matched; the data quality of the client consortium is jointly determined by the client consortium value and the normalized data volume.

[0021] Furthermore, in the upper-level Stackelberg game, the utility function of the edge alliance includes the reward gained based on the Tullock competition mechanism, as well as the energy consumption cost generated by local training, model uploading, and edge aggregation. The edge alliance uses the frequency of local aggregation as a decision variable to maximize its own utility given the total reward of the cloud server. The utility function of the cloud server includes the model performance gain generated by the frequency of local aggregation of the edge alliance and the total reward expenditure. The model performance gain is described in the form of diminishing marginal returns. The cloud server uses the total reward as a decision variable to maximize its own utility.

[0022] Furthermore, the edge alliance determines the local aggregation frequency based on its own data volume, aggregation contribution, energy consumption cost, and the total reward given by the cloud server; the cloud server determines the total reward strategy based on the optimal response of each edge alliance.

[0023] A two-layer game incentive system for hierarchical federated learning of heterogeneous data, used to implement the above-described method, includes:

[0024] A hierarchical federated learning architecture, comprising cloud servers, multiple edge servers, and multiple clients;

[0025] The data heterogeneity assessment module is used to calculate the group Earth movement distance (GEMD) of the client alliance based on the client's local tag statistics and obtain the client alliance value function.

[0026] The client alliance formation module is used to calculate client utility based on client alliance value, Shapley contribution revenue, and client local training energy consumption, and to form a stable client alliance partition based on alliance friendliness preference rules.

[0027] The edge server matching module is used to construct a bilateral preference list based on the client alliance's transmission energy consumption and edge server data preferences, and obtain a stable matching result through a bilateral delayed acceptance matching algorithm.

[0028] The edge alliance utility calculation module is used to calculate the edge alliance utility based on the edge alliance data volume, local aggregation frequency, training energy consumption, communication energy consumption, and cloud rewards.

[0029] The cloud-based reward optimization module is used to determine the total reward strategy for cloud servers and the local aggregation frequency of edge alliances based on the Stackelberg game theory.

[0030] The federated training execution module is used to perform edge-cloud hierarchical federated learning training according to the stable client consortium, edge server matching relationship, total reward strategy and local aggregation frequency.

[0031] Furthermore, the cloud server distributes the global model, determines the overall reward strategy, receives the intermediate model uploaded by the edge server, and performs global aggregation; the edge server receives the global model distributed by the cloud server, distributes the intermediate model or training parameters to the matched client alliance, receives the local model uploaded by the client, and performs edge aggregation; the client performs local model training based on local private data, and participates in the formation of the client alliance according to data heterogeneity, contribution benefits, and energy consumption.

[0032] Beneficial effects

[0033] Compared with existing technologies, this invention can reduce edge data skew caused by client access based solely on physical distance or channel quality, reduce the adverse effects of non-independent and identically distributed data on edge and global model training, avoid resource allocation instability caused by unilateral greedy matching, and improve the model accuracy, convergence efficiency, resource utilization, and client participation fairness of hierarchical federated learning in heterogeneous data environments. Attached Figure Description

[0034] Figure 1 A flowchart of a two-layer game incentive method for hierarchical federated learning of heterogeneous data;

[0035] Figure 2 This is a schematic diagram of the hierarchical federated learning architecture according to an embodiment of the present invention;

[0036] Figure 3 This is a flowchart illustrating the client alliance formation and edge server matching process according to an embodiment of the present invention.

[0037] Figure 4 This is a flowchart illustrating the Stackelberg game interaction between the cloud server and the edge alliance in an embodiment of the present invention. Detailed Implementation

[0038] 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.

[0039] like Figure 1 As shown, the two-layer game incentive method for hierarchical federated learning of heterogeneous data of the present invention includes:

[0040] Step 1: Construct a hierarchical federated learning architecture, including cloud servers, edge servers, and clients; obtain local data statistics, computing resource parameters, and communication channel parameters of the clients;

[0041] Step 2: Construct a lower-level cooperative game. Based on the local data statistics, use the Group Earth Movement Distance (GEMD) to measure the heterogeneity of the client alliance's data distribution. Construct a client alliance value function based on the heterogeneity of the data distribution. Calculate the client's Shapley contribution to the alliance based on the client alliance value function. Construct a client utility function based on the Shapley contribution and the client's local training energy consumption.

[0042] Step 3: Based on the client utility function, make the clients migrate according to the alliance-friendly preference rules and divide them into stable client alliances;

[0043] Step 4: Based on the transmission energy consumption from the client alliance to the edge server and the edge server's preference for the data quality of the client alliance, perform bilateral delay reception matching between the client alliance and the edge server to form an edge alliance;

[0044] Step 5: Construct an upper-level Stackelberg game, with the cloud server as the leader and the edge alliance as the follower; the cloud server determines the total reward, and the edge alliance determines the local aggregation frequency; based on the Tullock competition mechanism, the cloud server determines the total reward strategy according to the edge alliance's aggregation contribution, model performance gains, and reward costs.

[0045] Step 6: According to the client alliance, edge server matching relationship, local aggregation frequency and total reward strategy, perform client local training, edge aggregation and cloud global aggregation to complete hierarchical federated learning training;

[0046] Step 7: Global model update, proceed to the next round of learning and training.

[0047] The specific process of this embodiment is as follows:

[0048] like Figure 2 As shown, the hierarchical federated learning architecture in this embodiment includes one cloud server, M edge servers, and N clients. The set of edge servers is denoted as... The client set is denoted as The nth client holds a local private dataset. ,in Indicates training samples, This indicates the corresponding label. Client-side local data is not uploaded to cloud servers or edge servers; it is used only for model training locally, thus protecting client data privacy. Cloud servers are used to store, update, and distribute the global model. Edge servers are located between the cloud server and the client, used to receive the global model distributed by the cloud server, distribute intermediate models to their associated clients, receive local models uploaded by clients, and perform edge-side local aggregation. Clients are used to perform model training based on local data and upload local model parameters or model updates to the corresponding edge server.

[0049] In the t-th round of hierarchical federated learning training, the cloud server distributes the global model to the edge server m. Edge server m sends an intermediate model to its matched client n. Client n obtains a local model after training with local data. The received local models are then uploaded to edge server m; edge server m aggregates the received local models into intermediate models. The cloud server further aggregates the intermediate models uploaded from each edge server into the next round of global models. .

[0050] This embodiment first characterizes the heterogeneity of client-side data. The heterogeneity in data scale among clients can be represented as follows: The heterogeneous distribution of tags among clients can be represented as follows: .in, Let L represent the number of samples of the i-th type of label in client a, and L represent the set of label categories. As explained above regarding heterogeneity, different clients may not only have data of different scales, but their label category coverage and category ratios may also differ significantly. If this difference in label distribution is not addressed, the model obtained by local aggregation on the edge server may be overly biased towards certain categories, thereby reducing the generalization ability of the global model on the overall data distribution.

[0051] To measure the degree of data distribution balance at the edge or within the client consortium, this embodiment uses Group Earth Movement Distance (GEMD). The heterogeneity of the client consortium or edge server m is also considered. The formula is as follows:

[0052] ,

[0053] in, This represents the total amount of data from all clients within the alliance m. Represents the ideal distribution probability of the i-th type of label, preferably . The smaller the value, the closer the data distribution within the consortium m is to an equilibrium distribution.

[0054] Based on heterogeneity The alliance value function of client alliance m The formula is as follows:

[0055] ,

[0056] This value function normalizes GEMD to alliance value, making It is located between 0 and 1. The closer the value is to 1, the higher the data quality of the corresponding alliance. Through this value function, the present invention can transform whether the data distribution is balanced into a calculable benefit in subsequent cooperative games.

[0057] This embodiment establishes a client-side energy consumption model. The computational energy consumption of client n during one round of local training is... for:

[0058] ,

[0059] in, The effective capacitance coefficient of the client. Let n be the CPU frequency of the client. The number of CPU cycles required to train one sample. This represents the number of training samples in this round. This formula shows that the larger the amount of data processed by the client, the higher the CPU frequency, or the higher the computational complexity per sample, the greater the energy consumption for local training.

[0060] When client n uploads model parameters to the edge server, its uplink transmission rate is... for:

[0061] ,

[0062] in, The uplink bandwidth allocated to client n for edge server m. For transmission power, Let n be the channel gain between client n and the corresponding edge server m. This represents noise power. If the total uplink bandwidth of edge server m is... And if it is equally distributed within its associated client alliance, then:

[0063] ,

[0064] in, For edge consortiums; communication energy consumption for client n to upload model parameters It is expressed as follows:

[0065] ,

[0066] in, Let n be the size of the model parameters uploaded by client n. As this formula shows, when the channel quality between the client and the edge server is poor or the model parameter size is large, the communication energy consumption required for the client to upload the model will increase. Therefore, when matching client consortia with edge servers, both data quality and transmission energy consumption need to be considered comprehensively.

[0067] Furthermore, the edge alliance The energy consumption of client-side participation within one edge aggregation interval is:

[0068] ,

[0069] in, This represents the number of local training iterations for client j. This represents the local computing power consumption of client j. This represents the energy consumption for model upload from client j to edge server m. If in the t-th round of global communication, the edge consortium... implement If there are several edge aggregation intervals, then the total energy consumption for client-side participation in this round is:

[0070] ,

[0071] like Figure 3 As shown, in the lower-level cooperative game, the system initializes M client alliances. The number of client alliances matches the number of edge servers, facilitating stable one-to-one matching later. The core objective of client alliance formation is not simply to minimize the communication distance between clients and edge servers, but rather to prioritize improving the label distribution structure within the alliance, making each alliance as close as possible to an ideal balanced distribution, thereby mitigating the impact of non-independent identical distribution during edge aggregation. For client i joining an alliance... The contribution and benefits generated are represented by the Shapley value in this embodiment. To ensure fair distribution:

[0072] ,

[0073] in, This represents the marginal increase in alliance value after client i joins sub-alliance C. Since accurately calculating the Shapley value requires enumerating all sub-alliances, the computational complexity is high when the number of clients is large. Therefore, in practical deployments, the Monte Carlo sampling method can be used to approximate the Shapley value, as follows:

[0074] ,

[0075] Where K is the number of random samples, Let k be the k-th random sampled sub-consortium. By using sampling approximation, the computational complexity can be reduced while maintaining the reasonableness of contribution evaluation, making this method applicable to mobile edge computing environments with a large client scale.

[0076] The lower-level utility of client n The energy consumption is determined by both the contribution revenue and the local computing energy consumption, and is calculated as follows:

[0077] ,

[0078] in, This represents the contribution reward that client n receives based on the Shapley value. This represents the energy consumption of local training on the client side. This utility function reflects the trade-off between data contribution and resource consumption: on the one hand, the client can benefit from improving the distribution of consortium data; on the other hand, the client needs to bear the energy cost of local training.

[0079] The client chooses whether to migrate based on the alliance's friendly preference rules. Let client n currently belong to the alliance. Candidates to join the alliance If the total utility of the relevant alliance members is greater after client n migrates than the total utility of the relevant alliance members before the migration, then the migration is executed. This preference rule can be expressed as follows:

[0080] ,

[0081] The migration decision for client n does not solely pursue maximizing individual utility, but prioritizes improving the overall utility of two related alliances, thereby encouraging clients with complementary data distributions to form stable alliances. This rule is adopted because the goal of this invention is to improve the overall data distribution of the alliances and enhance the overall training performance of the system, rather than allowing individual clients to gain short-term benefits at the expense of alliance stability. In this way, the system can gradually encourage clients with complementary data distributions to cluster in the same alliance and reduce alliance oscillations caused by greedy individual migrations. The migration process is iterative. In each round, the system can randomly or sequentially select clients and calculate the change in the total utility of the relevant alliances after their migration from the current alliance to other candidate alliances. If a migration satisfying the alliance-friendly preference rule exists, the migration is executed, and the GEMD, alliance value, and client utility of the relevant alliance are updated; if no migration can improve the total utility of the relevant alliances, the client alliance partitioning is considered to have reached a stable state. Finally, a stable client alliance partitioning is obtained.

[0082] After obtaining a stable client consortium, the system performs bilateral latency acceptance matching between the client consortium and the edge server. The goal of this matching process is to achieve a stable trade-off between data quality and communication energy consumption. Each client consortium... Based on the transmission power consumption required to connect to the edge server m A preference relationship is formed, where, .like ,but Prefer edge servers Instead , represented as:

[0083] ,

[0084] Each edge server forms a preference relationship based on the client consortium's overall data quality score. The overall data quality score also considers the consortium value obtained from GEMD transformation. and normalized data volume , represented as:

[0085] ,

[0086] in, , .like Then the edge server m prefers client alliances. Instead , represented as:

[0087] ,

[0088] The bilateral delayed acceptance matching process includes the following steps: First, all client consortia are in an unmatched state and each consortium selects its most preferred edge server according to its own preference list to submit a matching request. Second, after receiving one or more requests, each edge server temporarily retains its most preferred client consortium according to its own preference list and rejects other requests. Third, the rejected client consortium is removed from its preference list from the corresponding edge server and continues to submit requests to the next preferred edge server. Finally, the above process is repeated until all client consortia are matched with a certain edge server. If there are no unmatched client consortia... and edge server m enable and Then match For stable matching.

[0089] like Figure 4 As shown, in the upper-level Stackelberg game, the cloud server, as the leader, sets the total reward R, while the edge consortium, as the follower, chooses the local aggregation frequency. After the lower-level cooperative game and matching process, each edge server and its matched client alliance together constitute an edge alliance. The data volume of edge alliance m... according to Calculation. Based on the Tullock competition mechanism, the utility of edge consortium m. Represented as:

[0090] ,

[0091] in, This represents the reward that edge consortium m receives from the total reward R based on data volume and aggregation contribution. This represents the energy cost incurred by the edge consortium m in performing local training, aggregation, and uploading. This utility function suggests that the edge consortium can increase the frequency of local aggregation to obtain higher rewards. However, increased aggregation frequency also leads to higher energy consumption. Therefore, edge consortia need to strike a balance between reward benefits and energy costs. The utility of cloud servers. Represented as:

[0092] ,

[0093] in, This is a parameter representing the satisfaction level of the cloud server with the model's performance benefits. This utility function represents the model performance improvement with diminishing marginal returns as aggregation frequency increases, where R is the total reward cost paid by the cloud server. This utility function reflects the cloud server's fundamental goal: to incentivize edge consortia to provide sufficient aggregation contributions, thereby improving the overall model training performance, while paying a reasonable reward cost.

[0094] In a preferred embodiment, given the total reward R for the cloud server, the edge alliance m pairs Taking the first derivative, we get:

[0095] ,

[0096] in, When the utility function satisfies the concavity condition, the equilibrium aggregation frequency of the edge alliance m can be determined according to the first-order optimal condition; when R satisfies the excitation threshold, the edge alliance m selects the positive optimal aggregation frequency, otherwise it selects not to participate or selects the zero aggregation frequency.

[0097] Furthermore, let And will categorize candidate edge alliances by Sort by size from smallest to largest, there exists a participating set. satisfy:

[0098] ,

[0099] For a satisfying edge alliance m, its Nash equilibrium aggregation frequency The following can be determined:

[0100] ,

[0101] The cloud server calculates its own utility based on the balanced aggregation frequency of the edge consortium. Substituting the optimal response of the edge consortium as a function of R into the cloud server's utility function allows the cloud server to obtain the desired outcome. Maximum optimal total reward .Depend on and various peripheral alliances This constitutes the Stackelberg equilibrium strategy.

[0102] After completing the above two-layer game, the system proceeds according to the determined client alliance, edge server matching relationship, and total reward strategy. and local aggregation frequency Implement hierarchical federated learning.

[0103] At the system implementation level, this embodiment may include the following functional modules:

[0104] The data heterogeneity assessment module is used to calculate the GEMD of the client alliance based on the client's local tag statistics and obtain the alliance value function.

[0105] The client alliance formation module is used to calculate client utility based on alliance value, Shapley value, and client energy consumption, and to perform client migration based on alliance friendliness preference rules to obtain a stable client alliance partition.

[0106] The edge server matching module is used to construct a two-sided preference list based on the client alliance's transmission energy consumption and edge server data preferences, and obtain a stable matching result through a two-sided delayed acceptance algorithm.

[0107] The Edge Alliance Utility Calculation Module is used to calculate the edge alliance utility based on the edge alliance data volume, aggregation frequency, energy consumption cost, and cloud rewards.

[0108] The cloud-based reward optimization module is used to model cloud servers as leaders in a Stackelberg game and determine the overall reward strategy based on the optimal response of the edge alliance.

[0109] The federated training execution module is used to perform edge-cloud hierarchical federated learning training according to client consortium, edge server matching relationship, optimal reward and aggregation frequency.

[0110] In summary, the client participates in local training based on stable alliances, the edge servers receive the models uploaded by the client based on the matching results and perform edge aggregation according to a balanced aggregation frequency, and the cloud server performs global aggregation based on the intermediate models uploaded by each edge server, and continues to update the model and reward strategy in the next round of training. Therefore, this invention can improve edge data distribution, reduce unnecessary energy consumption, and improve the training performance of the global model in heterogeneous data environments while ensuring data privacy.

[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A two-layer game-theoretic incentive method for hierarchical federated learning of heterogeneous data, characterized in that, Includes the following steps: Step 1: Construct a hierarchical federated learning architecture, including cloud servers, edge servers, and clients; obtain local data statistics, computing resource parameters, and communication channel parameters of the clients; Step 2: Construct a lower-level cooperative game. Based on the local data statistics, use the Group Earth Movement Distance (GEMD) to measure the heterogeneity of the client alliance's data distribution. Construct a client consortium value function based on the heterogeneity of the data distribution; calculate the client's Shapley contribution reward to the consortium based on the client consortium value function; construct a client utility function based on the Shapley contribution reward and the client's local training energy consumption. Step 3: Based on the client utility function, make the clients migrate according to the alliance-friendly preference rules and divide them into stable client alliances; Step 4: Based on the transmission energy consumption from the client alliance to the edge server and the edge server's preference for the data quality of the client alliance, perform bilateral delay reception matching between the client alliance and the edge server to form an edge alliance; Step 5: Construct an upper-level Stackelberg game, with the cloud server as the leader and the edge alliance as the follower; the cloud server determines the total reward, and the edge alliance determines the local aggregation frequency; Based on the Tullock competition mechanism, the cloud server determines the total reward strategy based on the aggregate contribution of the edge alliance, the model performance benefits, and the reward cost. Step 6: According to the client alliance, edge server matching relationship, local aggregation frequency and total reward strategy, perform client local training, edge aggregation and cloud global aggregation to complete hierarchical federated learning training; Step 7: Global model update, proceed to the next round of learning and training.

2. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: The Group Earth Movement Distance (GEMD) measure the deviation between the label distribution within the client consortium and the ideal label distribution. For each client consortium, the number of samples from each client in different label categories is counted, and the consortium heterogeneity is determined based on the difference between the sample proportion of each label category and the ideal label distribution. The smaller the consortium heterogeneity, the closer the data distribution within the client consortium is to the ideal equilibrium label distribution. The client consortium value function is constructed based on the consortium heterogeneity, and the client consortium value is negatively correlated with the consortium heterogeneity.

3. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: The Shapley contribution reward is determined by calculating the marginal increase in the value of the consortium before and after a client joins the consortium. When the number of clients is large, Monte Carlo sampling is used to approximate the calculation of the Shapley contribution reward. The client utility function is jointly determined by the Shapley contribution reward and the client's local training energy consumption. The client utility increases with the increase of the Shapley contribution reward and decreases with the increase of the client's local training energy consumption.

4. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 3, characterized in that: The energy consumption for local training on the client side is determined by the client's effective capacitance coefficient, CPU frequency, number of training samples, and number of CPU cycles required for training a single sample. The communication energy consumption for uploading model parameters on the client side is determined by the transmission power, the size of the uploaded model parameters, and the uplink transmission rate, which is calculated based on the communication bandwidth, channel gain, transmission power, and noise power. When the total uplink bandwidth of the edge server is allocated within its associated client consortium, the uplink transmission rate from the client to the edge server is calculated based on the allocated uplink bandwidth, and the model upload energy consumption from the client to the edge server is calculated based on the client's sending power, the model parameter size, and the uplink transmission rate.

5. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: The alliance-friendly preference rules include: when a client migrates from the current client alliance to a candidate client alliance, if the total utility of the relevant client alliance members is improved or not reduced before and after the migration, the client is allowed to perform the migration; otherwise, the client is not allowed to perform the migration.

6. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: The specific process of bilateral delay acceptance matching is as follows: the client alliance forms an edge server preference list from low to high based on the transmission energy consumption required to connect to different edge servers; The edge server generates a client alliance preference list from high to low based on the data quality of the client alliance; Unmatched client consortia send matching requests to the currently most preferred edge server; The edge server temporarily retains the client federation request that is currently the most preferred and rejects other requests; The rejected client consortium continues to make requests to the next preferred edge server until all client consortia have been matched; the data quality of the client consortium is determined by the client consortium value and the normalized data volume.

7. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: In the aforementioned Stackelberg game, the utility function of the edge alliance includes the reward gained based on the Tullock competition mechanism, as well as the energy consumption costs generated by local training, model uploading, and edge aggregation. The edge alliance uses the frequency of local aggregation as a decision variable to maximize its own utility given the total reward of the cloud server. The utility function of the cloud server includes the model performance gains generated by the frequency of local aggregation of the edge alliance and the total reward expenditure. The model performance gains are described in the form of diminishing marginal returns. The cloud server uses the total reward as a decision variable to maximize its own utility.

8. The two-layer game incentive method for hierarchical federated learning of heterogeneous data as described in claim 1, characterized in that: The edge alliance determines the local aggregation frequency based on its own data volume, aggregation contribution, energy consumption cost, and the total reward given by the cloud server; the cloud server determines the total reward strategy based on the optimal response of each edge alliance.

9. A two-layer game incentive system for hierarchical federated learning of heterogeneous data, characterized in that, For implementing the method as described in any one of claims 1 to 8, comprising: A hierarchical federated learning architecture, comprising cloud servers, multiple edge servers, and multiple clients; The data heterogeneity assessment module is used to calculate the group Earth movement distance (GEMD) of the client alliance based on the client's local tag statistics and obtain the client alliance value function. The client alliance formation module is used to calculate client utility based on client alliance value, Shapley contribution revenue, and client local training energy consumption, and to form a stable client alliance partition based on alliance friendliness preference rules. The edge server matching module is used to construct a bilateral preference list based on the client alliance's transmission energy consumption and edge server data preferences, and obtain a stable matching result through a bilateral delayed acceptance matching algorithm. The edge alliance utility calculation module is used to calculate the edge alliance utility based on the edge alliance data volume, local aggregation frequency, training energy consumption, communication energy consumption, and cloud rewards. The cloud-based reward optimization module is used to determine the total reward strategy for cloud servers and the local aggregation frequency of edge alliances based on the Stackelberg game theory. The federated training execution module is used to perform edge-cloud hierarchical federated learning training according to the stable client consortium, edge server matching relationship, total reward strategy and local aggregation frequency.

10. The two-layer game incentive system for hierarchical federated learning of heterogeneous data as described in claim 9, characterized in that: The cloud server distributes the global model, determines the overall reward strategy, receives the intermediate model uploaded by the edge server, and performs global aggregation. The edge server receives the global model from the cloud server, sends intermediate models or training parameters to the matched client alliance, receives the local model uploaded by the client, and performs edge aggregation; the client performs local model training based on local private data, and participates in the formation of the client alliance according to data heterogeneity, contribution benefits, and energy consumption.