Hierarchical federal learning system and method in wireless mobility scene

By introducing hierarchical aggregation algorithm and joint optimization algorithm in the hierarchical federated learning system of wireless mobility scenarios, the channel changes caused by high energy consumption and user mobility are solved, and efficient energy management and green communication are achieved.

CN119623673APending Publication Date: 2025-03-14SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411715290.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In wireless mobility scenarios, traditional hierarchical federated learning systems increase energy consumption due to channel changes caused by the increase in the number of model parameters and user mobility, and the prior art fails to effectively optimize the energy management of user equipment.

Method used

By introducing a hierarchical aggregation algorithm and a joint optimization algorithm, edge servers flexibly allocate computing tasks and schedule user equipment participation and task allocation based on user computing resources, energy state and channel conditions. At the same time, the central server uses the weighted average method for global aggregation, and optimizes user selection and resource scheduling through the Liyapunov optimization method.

Benefits of technology

It effectively reduces the energy consumption of the layered federated learning system in wireless mobility scenarios, realizes green communication, and optimizes the energy management of user equipment while ensuring federated learning performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623673A_ABST
    Figure CN119623673A_ABST
Patent Text Reader

Abstract

The invention provides a hierarchical federated learning system and method in a wireless mobility scene. The system comprises a central server, a plurality of base stations and a plurality of edge servers, each base station is connected with at least one piece of user equipment, and the user equipment has mobility and can perform data acquisition and model updating at different positions; in each round of training of the hierarchical federated learning system, the user equipment performs local updating by using the local data set, and uploads a local model to the base station after updating; the edge server is configured in the base station and is responsible for receiving a local model uploaded by user equipment and performing partial aggregation, and the partial aggregation is based on a preset aggregation algorithm; after multiple times of aggregation, uploading an aggregation model to a central server; and the central server is used for receiving the aggregation models from the plurality of edge servers and performing global aggregation to complete a federal learning task. According to the method, the user energy overhead can be minimized under federal learning performance constraint and mobility constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communications and artificial intelligence technology, and in particular to a hierarchical federated learning system and method in a wireless mobility scenario. Background Art

[0002] With the rapid development of fifth-generation (5G) communication technology and the widespread deployment of the Internet of Things (IoT), massive amounts of data are collected and analyzed through artificial intelligence (AI) technology. However, data and computing power are usually scattered among user devices. Traditional centralized machine learning methods require users to upload data to a central server, which leads to significant communication overhead and privacy issues. Federated learning (FL) has emerged as a distributed machine learning algorithm. A "cloud-edge-end" hierarchical federated learning architecture is often deployed in wireless systems. Users train local models on their private datasets and upload the trained models to the base station for partial aggregation on the edge server; after several partial aggregations, the edge server uploads the model to the central server for global aggregation to complete the federated learning task.

[0003] However, with the advancement of AI technology, the number of model parameters continues to increase. Limited wireless resources and the rapidly growing number of model parameters have become the key bottlenecks in the federated learning process, increasing the energy consumption during the federated learning training process. In addition, existing technologies generally assume that users are stationary throughout the system, which is not realistic. User mobility causes channel changes on the one hand, and on the other hand causes users to communicate with different base stations and participate in edge aggregation on different edge servers. Therefore, the hierarchical federated learning system in the wireless mobility scenario faces a series of challenges. It is very important to reduce the energy overhead of federated learning while ensuring the performance of the federated learning system and considering user mobility. Summary of the invention

[0004] In view of the defects in the prior art, the present invention provides a hierarchical federated learning system and method in a wireless mobility scenario.

[0005] According to a hierarchical federated learning system and method in a wireless mobility scenario provided by the present invention, the scheme is as follows:

[0006] In a first aspect, a hierarchical federated learning system in a wireless mobility scenario is provided, the method comprising:

[0007] A central server, multiple base stations, and multiple edge servers;

[0008] Base stations, each of which is connected to at least one user device, which is mobile and can collect data and update models at different locations; in each round of training of the hierarchical federated learning system, the user device uses the local data set to perform local updates, and uploads the local model to the base station after the update;

[0009] The edge server is configured in the base station and is responsible for receiving the local model uploaded by the user equipment and performing edge aggregation, wherein the partial aggregation is based on a preset aggregation algorithm; the edge server uploads the aggregated model to the central server after performing multiple edge aggregations;

[0010] The central server is used to receive the aggregated models from multiple edge servers and perform global aggregation to complete the federated learning task;

[0011] Among them, at the beginning of each round of training in the hierarchical federated learning system, the edge server selects the participating user device set based on the system status and user status. For the selected user devices, the edge server will allocate the corresponding channel, uplink transmission power and local computing frequency.

[0012] Preferably, the edge server receives local models uploaded by multiple user devices and performs edge aggregation;

[0013] By introducing the hierarchical aggregation algorithm, the edge server can flexibly allocate computing tasks according to the user's computing resources, and also allocate the number of participating users and tasks in each round according to the user's energy status and channel conditions.

[0014] Preferably, the central server performs global aggregation, and the global aggregation adopts a weighted average method, where the weight is based on the local data of each user device. The user set of the base station e in the nth round is The formula for edge aggregation is:

[0015]

[0016] in, is the user selection vector, d i is the data set of the ith user, w i and w e Represent the local model parameters and edge server model parameters respectively, represents the model parameters of the edge server e in the n+1th communication round, Indicates the nth communication round τ l The model parameters of user i after the local update, |D i | represents the dataset size of the i-th user;

[0017] Edge Aggregation τ eAfter that, the base station uploads the edge aggregation model to the central server for global aggregation. The formula for global aggregation is:

[0018]

[0019] Among them, w n+1 represents the model parameters of the central server in the n+1th communication round, and ε represents the set of edge servers.

[0020] Preferably, when the edge server selects the user equipment set, it is necessary to optimize the selection and energy management of the user equipment by the edge server, including:

[0021] The energy consumed by the local update process of the user equipment is optimized according to the computing resources and the wireless communication resources. The local computing time and the energy consumed by the local computing are:

[0022]

[0023] Among them, γ is the number of CPU rounds required to calculate a sample, τ l represents the number of rounds of local update, α is the energy consumption coefficient, is the local calculation frequency of user i in round n;

[0024] The uplink transmission rate of the user equipment is calculated based on the Shannon formula, and the uplink transmission rate of the user i in the nth round is:

[0025]

[0026] Where B is the bandwidth of RB, is the uplink transmission power of user i in the nth round, is the channel gain of user i in round n, N 0 is the power spectrum of the noise during the communication process, so the uplink communication time is:

[0027]

[0028] Among them, S is the size of the data packet transmitted in the uplink, and the energy consumption of the uplink communication is:

[0029]

[0030] Under the premise of considering user mobility and federated learning performance, the energy consumption of user devices in the entire federated learning process is minimized.

[0031] Preferably, a long-term optimization problem is established based on minimizing the energy consumption of user devices in the entire federated learning process:

[0032]

[0033] Among them, the goal of P1 is to minimize the total energy consumption of all mobile users in the whole process under the constraints, and optimize the variables is the access vector, is the transmit power vector, To calculate the frequency vector;

[0034] C1 represents the user selection variable, where Indicates that user i is selected to participate in the training process of the nth communication round;

[0035] C2 indicates that each base station has a limited channel, and base station e has M e channels; in each round, the number of users selected by base station e shall not exceed M e Users;

[0036] C3 represents the delay constraint of mobile user communication and computation, where is the time that user i stays in the base station coverage area in the nth communication round. For users who do not move, this value is T max , that is, the maximum time of a communication round;

[0037] C4 and C5 are resource constraints, where C4 specifies the maximum and minimum computation frequencies, while C5 defines the limit on the transmit power. The long-term constraint C6 is the user participation rate; represents the user participation rate of user i in the nth communication round; N represents the total number of communication rounds to complete the federated learning process.

[0038] Preferably, the long-term optimization problem is transformed by the Lyapunov optimization method to define a virtual queue:

[0039]

[0040] Among them, Q i (n+1) represents the virtual queue of user i in the n+1th round; Q i (n) represents the virtual queue of user i in round n.

[0041] Convert the long-term constraint C6 to C6' through a virtual queue:

[0042]

[0043] Where E{} represents the mathematical expectation; n represents the communication round;

[0044] Define the Lyapunov function and conditional Lyapunov drift as:

[0045]

[0046] Among them, L(n+1) represents the Lyapunov function of the n+1th round; L(n) represents the Lyapunov function of the nth round; ΔL(n) represents the conditional Lyapunov drift of the nth round.

[0047] The Lyapunov drift penalty function is defined as:

[0048]

[0049] in, represents the Lyapunov drift penalty function, V is the control parameter for balancing energy consumption and satisfying the long-term participation rate constraint; represents the communication energy consumption of user i in the nth communication round, represents the computational energy consumption of user i in the nth communication round. It is easy to prove that:

[0050]

[0051] Where C is a constant, minimize Stable queue, satisfying constraint C6', transforms the problem into:

[0052]

[0053] stC1~C5.

[0054] The more time the selected user uses, the lower the energy consumption is. Abbreviated as According to the previous conclusion, the time in, represents the maximum communication time of user i in the nth communication round; optimize variable p n With f n Using optimization variables Therefore, the transformation problem is:

[0055]

[0056] stC1,C2,

[0057]

[0058] in, represents a cost function that considers user energy consumption and long-term participation rate constraints; solve the problem, that is, how to allocate resources to minimize the cost for a selected user, specifically considering:

[0059]

[0060] This problem is a convex optimization problem and is solved by the following optimization scheme:

[0061] calculate

[0062]

[0063] If t left Greater than t right , indicating that the update process cannot be completed under resource constraints, and the cost is set to positive infinity;

[0064] If t left Less than or equal to t right ,calculate and if and The same sign indicates the best Equal to t left or right , compare the costs of the two and choose the smaller one;

[0065] if and Different sign, then Located in the interval (t left ,t right ), use Newton's method to solve the optimal cost;

[0066] According to the best The optimal resource allocation solution is calculated using the following formula:

[0067] and

[0068] in, represents the optimal communication time of user i in the nth communication round, represents the scheduling cost function of user i in the nth communication round.

[0069] Preferably, the problem is transformed into:

[0070]

[0071] stC1,C2.

[0072] The system can provide the best resource scheduling solution for any given access solution;

[0073] For the entire system, each base station calculates the cost of scheduling all users, selects users according to the cost from small to large, and obtains the optimal user selection plan. Each selected user obtains the optimal resource allocation plan according to the optimization plan, and obtains the final plan:

[0074] 1) Each base station initializes the user set of the current round;

[0075] 2) Use the optimization scheme to calculate the minimum cost for all users to be selected;

[0076] 3) Each base station selects a user with a smaller cost until all channels are allocated or the user set is empty;

[0077] 4) Complete the hierarchical federated learning process.

[0078] In a second aspect, a hierarchical federated learning method in a wireless mobility scenario is provided, the method comprising:

[0079] Step S1: In a mobility scenario, the user equipment uses its local data to update a local model, where the local model update is based on a local data set of the user equipment;

[0080] Step S2: The user equipment uploads the updated local model to the base station via the wireless network;

[0081] Step S3: The base station deploys an edge server to receive and partially aggregate the local model uploaded by the user equipment;

[0082] Step S4: The edge server uploads the aggregated aggregation model to the central server for global aggregation;

[0083] Step S5: The central server completes global aggregation and updates the federated learning model.

[0084] Preferably, the hierarchical federated learning system in the novel wireless mobility scenario is applied, taking into account user mobility and federated learning training performance, and under the constraints of communication and computing resources, the total energy consumption of users of the federated learning system is minimized through user selection and resource scheduling.

[0085] On the third aspect, a user selection and resource scheduling method is provided. Based on the hierarchical federated learning method in the wireless mobility scenario, the scheduling cost is calculated for all users, and the user with the minimum cost is selected to obtain the target user set and resource scheduling plan; the method also includes monitoring the mobility status of the user device and dynamically adjusting the model upload strategy according to the mobility status.

[0086] Compared with the prior art, the present invention has the following beneficial effects:

[0087] 1. The joint optimization algorithm proposed in this invention realizes green communication, can effectively schedule users, allocate transmission power and computing frequency, and greatly reduce the energy consumption of the hierarchical federated learning system in wireless mobility scenarios;

[0088] 2. The joint optimization algorithm proposed in the present invention has low complexity and is more efficient. The optimal cost is obtained for each user through the Newton method, and users with low costs are selected to participate in the federated learning process;

[0089] 3. The algorithm proposed in this invention takes into account user mobility and performs online scheduling;

[0090] 4. The present invention uses the federated learning performance as a long-term constraint to ensure that the performance of the federated learning task will not be affected during the process of optimizing energy consumption.

[0091] Other beneficial effects of the present invention will be explained in the specific implementation manner through the introduction of specific technical features and technical solutions. Through the introduction of these technical features and technical solutions, those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0093] Figure 1 A hierarchical federated learning architecture for wireless mobility scenarios;

[0094] Figure 2 Comparison of the training accuracy between the present invention and other solutions when training with the CIFAR-10 dataset;

[0095] Figure 3 The figure shows the comparison of energy consumption between the present invention and other schemes when training with the CIFAR-10 dataset. DETAILED DESCRIPTION

[0096] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0097] The embodiment of the present invention provides a hierarchical federated learning system and method in a wireless mobility scenario, referring to Figure 1 As shown, the system specifically includes: a central server, multiple base stations and multiple edge servers.

[0098] Among them, the base station, each base station is connected to at least one user device, the user device is mobile and can collect data and update the model at different locations; in each round of training of the hierarchical federated learning system, the user device uses the local data set for local update, and uploads the local model to the base station after the update; the local model update is based on the local data set of the user device for training, and the training algorithm used is the batch gradient descent method.

[0099] The edge server is configured in the base station and is responsible for receiving the local model uploaded by the user device and performing partial aggregation based on a preset aggregation algorithm; uploading the aggregated model to the central server after multiple edge aggregations; edge aggregation and computing resource scheduling. In the preferred embodiment of the present invention, the edge server performs edge aggregation after receiving the local models uploaded by multiple user devices. By introducing a hierarchical aggregation algorithm, the edge server can not only flexibly allocate computing tasks according to the user's computing resources, but also determine the number of participating users and task allocation in each round according to the user's energy status and channel conditions. The scalability and adaptability of the system are significantly improved.

[0100] The central server is used to receive the aggregated models from multiple edge servers and perform global aggregation to complete the federated learning task; the model upload strategy is dynamically adjusted. In different communication rounds, the system dynamically adjusts the model upload frequency and data volume according to the mobility status of the user device (for example, close to or far away from the base station), thereby reducing the channel interference and communication delay caused by mobility. This preferred method not only ensures the continuity of the federated learning task, but also reduces the communication overhead. Preferably, green communication is realized, and the system achieves the goal of green communication through a more complex resource allocation scheme (such as an optimization algorithm based on Newton's method). This preferred method not only reduces energy consumption, but also can maintain stable federated learning performance in various complex wireless environments, so that the system shows better performance in actual deployment.

[0101] Among them, at the beginning of each round of training in the hierarchical federated learning system, the edge server selects the participating user device set based on the system status and user status. For the selected user devices, the edge server will allocate corresponding wireless resources, namely channels, uplink transmission power and local computing frequency.

[0102] Specifically, the edge server receives local models uploaded by multiple user devices and performs edge aggregation;

[0103] By introducing the hierarchical aggregation algorithm, the edge server can flexibly allocate computing tasks according to the user's computing resources, and also allocate the number of participating users and tasks in each round according to the user's energy status and channel conditions.

[0104] The central server performs global aggregation, which uses a weighted average method. The weight is based on the local data of each user device. The user set of base station e in the nth round is The formula for edge aggregation is:

[0105]

[0106] in, is the user selection vector, D iis the data set of the ith user, w i and w e Represent the local model parameters and edge server model parameters respectively, represents the model parameters of the edge server e in the n+1th communication round, Indicates the nth communication round τ l The model parameters of user i after the local update, ||D i | represents the dataset size of the i-th user;

[0107] Edge Aggregation τ e After that, the base station uploads the edge aggregation model to the central server for global aggregation. The formula for global aggregation is:

[0108]

[0109] Among them, w n+1 represents the model parameters of the central server in the n+1th communication round, and ε represents the set of edge servers.

[0110] When the edge server selects a set of user devices, it is necessary to optimize the edge server's selection of user devices and energy management. Jointly optimize user selection and energy management. The selection of user devices not only considers the channel status and computing power, but also dynamically adjusts according to the real-time mobility status. This optimization design enables the system to select suitable users to participate in federated learning in a more optimal way in mobile scenarios, thereby minimizing the overall energy consumption of the system. In addition, the transmit power control algorithm further reduces the energy consumption of the device by automatically adjusting the user's transmit power.

[0111] Specifically, the energy consumed by the local update process of the user equipment is optimized according to the computing resources and the wireless communication resources. The local computing time and the energy consumed by the local computing are:

[0112]

[0113] Among them, γ is the number of CPU rounds required to calculate a sample, τ l represents the number of rounds of local update, α is the energy consumption coefficient, is the local calculation frequency of user i in round n;

[0114] The uplink transmission rate of the user equipment is calculated based on the Shannon formula, and the uplink transmission rate of the user i in the nth round is:

[0115]

[0116] Where B is the bandwidth of RB, is the uplink transmission power of user i in the nth round, is the channel gain of user i in round n, N 0 is the power spectrum of the noise during the communication process, so the uplink communication time is:

[0117]

[0118] Among them, S is the size of the data packet transmitted in the uplink, and the energy consumption of the uplink communication is:

[0119]

[0120] The main goal of the present invention is to reduce user energy consumption, and the delay of downlink communication is relatively small, so the uplink communication and local computing process are concentrated. Since the user's computing resources and wireless communication resources are limited, only some users can participate in the process of wireless federated learning. At the beginning of each round, the edge server selects the participating user set through the scheduling algorithm based on the system status and user status. For the selected user set, the edge server will allocate the corresponding channel, uplink transmission power and local computing frequency. Subsequently, the selected user will download the model and complete the federated learning task. The specific scheduling algorithm design is achieved by solving the optimization problem. The goal of the present invention is to minimize the energy consumption of the user end in the entire federated learning process under the premise of considering user mobility and federated learning performance, and on this basis, establish a long-term optimization problem as follows:

[0121]

[0122] Among them, the goal of P1 is to minimize the total energy consumption of all mobile users in the whole process under the constraints, and optimize the variables is the access vector, is the transmit power vector, To calculate the frequency vector;

[0123] C1 represents the user selection variable, where Indicates that user i is selected to participate in the training process of the nth communication round;

[0124] C2 indicates that each base station has a limited channel, and base station e has M e channels; in each round, the number of users selected by base station e shall not exceed M e Users;

[0125] C3 represents the delay constraint of mobile user communication and computation, where is the time that user i stays in the base station coverage area in the nth communication round. For users who do not move, this value is T max , that is, the maximum time of a communication round;

[0126] C4 and C5 are resource constraints, where C4 specifies the maximum and minimum computation frequencies, while C5 defines the limit on the transmit power. The long-term constraint C6 is the user participation rate; represents the user participation rate of user i in the nth communication round; N represents the total number of communication rounds to complete the federated learning process.

[0127] This embodiment balances system performance and energy consumption requirements through the Lyapunov optimization algorithm. Under long-term constraints, the optimal design ensures the minimum participation rate of each user, while minimizing the overall energy consumption of the system by adjusting the local computing frequency and wireless resource allocation of each user in real time. In practical applications, the energy consumption of user devices can be reduced by about 30%, while the performance of federated learning remains at an ideal level.

[0128] Specifically, this long-term optimization problem is transformed through the Lyapunov optimization method, and a virtual queue is defined:

[0129]

[0130] Among them, Q i (n+1) represents the virtual queue of user i in the n+1th round; Q i (n) represents the virtual queue of user i in round n.

[0131] Convert the long-term constraint C6 to C6' through a virtual queue:

[0132]

[0133] Where E{} represents the mathematical expectation and n represents the communication round.

[0134] Define the Lyapunov function and conditional Lyapunov drift as:

[0135]

[0136] Among them, L(n+1) represents the Lyapunov function of the n+1th round; L(n) represents the Lyapunov function of the nth round; ΔL(n) represents the conditional Lyapunov drift of the nth round.

[0137] The Lyapunov drift penalty function is defined as:

[0138]

[0139] in, represents the Lyapunov drift penalty function, V is the control parameter for balancing energy consumption and satisfying the long-term participation rate constraint; represents the communication energy consumption of user i in the nth communication round, represents the computational energy consumption of user i in the nth communication round. It is easy to prove that:

[0140]

[0141] Where C is a constant, minimize Stable queue, satisfying constraint C6', transforms the problem into:

[0142]

[0143] stC1~C5.

[0144] The more time the selected user uses, the lower the energy consumption is. Abbreviated as According to the previous conclusion, the time in, represents the maximum communication time of user i in the nth communication round; optimize variable p n With f n Using optimization variables Therefore, the transformation problem is:

[0145]

[0146] stC1,C2,

[0147]

[0148] in, represents a cost function that considers user energy consumption and long-term participation rate constraints; solve the problem, that is, how to allocate resources to minimize the cost for a selected user, specifically considering:

[0149]

[0150] This problem is a convex optimization problem and is solved by the following optimization scheme:

[0151] calculate

[0152]

[0153] If t left Greater than t right , indicating that the update process cannot be completed under resource constraints, and the cost is set to positive infinity;

[0154] If t left Less than or equal to t right ,calculate and if and The same sign indicates the best Equal to t left orright , compare the costs of the two and choose the smaller one;

[0155] if and Different sign, then Located in the interval (t left ,t right ), use Newton's method to solve the optimal cost;

[0156] According to the best The optimal resource allocation solution is calculated using the following formula:

[0157] and

[0158] in, represents the optimal communication time of user i in the nth communication round, represents the scheduling cost function of user i in the nth communication round.

[0159] Given any access scheme, the optimal resource scheduling scheme can be given, so the original problem is transformed into how to select the appropriate user, and the problem is transformed into:

[0160]

[0161] stC1,C2.

[0162] For the entire system, each base station calculates the cost of scheduling all users, selects users according to the cost from small to large, and obtains the optimal user selection plan. Each selected user obtains the optimal resource allocation plan according to the optimization plan, and obtains the final plan:

[0163] 1) Each base station initializes the user set of the current round;

[0164] 2) Use the optimization scheme to calculate the minimum cost for all users to be selected;

[0165] 3) Each base station selects a user with a smaller cost until all channels are allocated or the user set is empty;

[0166] 4) Complete the hierarchical federated learning process.

[0167] The present invention also provides a hierarchical federated learning method in a wireless mobility scenario, which specifically includes:

[0168] Step S1: In a mobility scenario, the user equipment uses its local data to update the model, where the model update is based on the local data set of the user equipment;

[0169] Step S2: The user equipment uploads the updated model to the base station via the wireless network;

[0170] Step S3: The base station deploys an edge server to receive and partially aggregate the model uploaded by the user equipment, where the partial aggregation is based on an aggregation algorithm;

[0171] Step S4: the edge server uploads the aggregated model to the central server for global aggregation, and the global aggregation adopts a weighted average method;

[0172] Step S5: The central server completes global aggregation and updates the federated learning model.

[0173] Next, the present invention will be described in more detail.

[0174] The present invention provides a hierarchical federated learning system in a wireless mobility scenario, referring to Figure 1 As shown, the system specifically includes: a central server, a base station and a user; it also includes a user selection and resource scheduling scheme that minimizes the total energy consumption of users of the federated learning system under the constraints of communication and computing resources, taking into account user mobility and federated learning training performance.

[0175] In each round of training of the hierarchical federated learning system, users use local data sets to perform local updates and upload the models to the base station after updating. The base station deploys edge servers to partially aggregate the received models and upload the aggregated models to the central server after multiple aggregations. The central server is responsible for globally aggregating the received aggregated models.

[0176] There are U users in the hierarchical federated learning system, denoted as user set The data set of user i is The loss function is denoted as f i (w). The local update is updated using batch gradient descent, and the update formula is:

[0177]

[0178] Where τ represents the number of rounds of local updates, and a total of τ is updated l times, n represents the training round of the system, and each edge aggregation is recorded as a training round.

[0179] The E base stations in the hierarchical federated learning system are denoted as the set ε = {1, 2, 3, ..., E}. Due to the existence of mobility, the actual locations of users in different rounds are different, and the nearest base station is selected for communication based on the actual location. The user set of base station e in the nth round is denoted as The formula for edge aggregation is:

[0180]

[0181] Edge Aggregation τe After that, the base station uploads the edge aggregation model to the central server for global aggregation. The formula for global aggregation is:

[0182]

[0183] Considering the user's local update process, the time consumed by local calculation is:

[0184]

[0185] The energy consumed by local computing is:

[0186]

[0187] Among them, γ is the number of CPU rounds required to calculate a sample, α is the energy consumption coefficient, is the local calculation frequency of user i in round n.

[0188] Considering the wireless communication process between the user and the base station, according to Shannon's formula, the uplink transmission rate of user i in the nth round is:

[0189]

[0190] Where B is the bandwidth of RB, is the uplink transmission power of user i in the nth round, is the channel gain of user i in round n, N 0 is the power spectrum of the noise during the communication process. Therefore, the uplink communication time is:

[0191]

[0192] Where S is the size of the data packet transmitted in the uplink. The energy consumption of the uplink communication is:

[0193]

[0194] Considering that the main goal is to reduce the energy consumption of users and the latency of downlink communication is negligible compared to the latency of uplink communication, we mainly consider the uplink communication and local computation process.

[0195] Since the user's computing resources and wireless communication resources are limited, only a part of the users can participate in the wireless federated learning process. At the beginning of each round, the edge server selects the set of users to access according to the system status and user status according to the scheduling algorithm, and gives the allocated channel, uplink transmission power and local computing frequency to the selected user set. After that, the selected user downloads the model to complete the federated learning task. The specific scheduling algorithm design is obtained by solving the optimization problem. The goal of this invention is to consider user mobility and federated learning performance, and minimize the user-side energy consumption of the entire federated learning process under constraints. Therefore, the long-term optimization problem is established as:

[0196]

[0197] The goal of P1 is to minimize the total energy consumption of all mobile users in the whole process under the constraints, and optimize the variables is the access vector, is the transmit power vector, is the calculated frequency vector. C1 represents the user-selected variable, where Indicates that user i is selected to participate in the training process of the nth communication round. C2 indicates that each base station has a limited channel, and base station e has M e In each round, the number of users selected by base station e shall not exceed M e users. C3 represents the delay constraint of mobile user communication and computation, where is the time that user i stays in the base station coverage area in the nth communication round. For users who do not move, this value is T max , which is the maximum time of a communication round. C4 and C5 are resource constraints, where C4 specifies the maximum and minimum computing frequencies, and C5 defines the limit of the transmission power. The long-term constraint C6 is the user participation rate, which is a common method to ensure the performance of federated learning. The participation rate constraint not only prevents users with poor conditions from being excluded from the FL training process, but also ensures that key users participate in more communication rounds.

[0198] Since this problem is a long-term random optimization problem, the present invention transforms the problem through the Lyapunov optimization method. First, define the virtual queue:

[0199]

[0200] Convert the long-term constraint C6 to C6' through a virtual queue:

[0201]

[0202] Define the Lyapunov function as:

[0203]

[0204] Then the conditional Lyapunov drift is:

[0205] ΔL(n)=E{L(n+1)-L(n)|Q(n)},

[0206] The Lyapunov drift penalty function is defined as:

[0207]

[0208] in, represents the Lyapunov drift penalty function, V is the control parameter for balancing energy consumption and satisfying the long-term participation rate constraint; represents the communication energy consumption of user i in the nth communication round, represents the computational energy consumption of user i in the nth communication round. It is easy to prove that

[0209]

[0210] Where C is a constant. Minimize The queue can be stabilized and constraint C6' can be satisfied. The problem is transformed into:

[0211]

[0212] stC1~C5.

[0213] The more time the selected user uses, the lower the energy consumption. For convenience, the uplink communication time Abbreviated as According to the previous conclusion, the time Optimizing variable p n With f n You can use optimization variables Therefore, the transformation problem is:

[0214]

[0215] stC1,C2,

[0216]

[0217] in, Represents a cost function that considers user energy consumption and long-term participation rate constraints. To solve this problem, first consider:

[0218]

[0219] The problem is how to allocate resources to minimize the cost for a selected user. It is easy to see that this problem is a convex optimization problem. The following optimization scheme is used to solve this problem:

[0220] 1) Calculation

[0221]

[0222] 2) If t left Greater than t right , indicating that the update process cannot be completed under resource constraints, and the cost is set to positive infinity.

[0223] 3) If t left Less than or equal to t right ,calculate and if and The same sign indicates the best Equal to t left or right , compare the costs of the two and choose the smaller one;

[0224] 4) If and Different sign, then Located in the interval (t left ,t right ), use Newton's method to solve the optimal cost.

[0225] 5) According to the best The optimal resource allocation solution is calculated using the following formula: and

[0226]

[0227] From Solution 1, we can see that given any access solution, the optimal resource scheduling solution can be given. Therefore, the original problem is transformed into how to select the appropriate user.

[0228]

[0229] stC1,C2.

[0230] For the entire system, each base station calculates the cost of scheduling all users, selects users according to the cost from small to large, and obtains the optimal user selection plan. Each selected user obtains the optimal resource allocation plan according to plan 1. Therefore, the final plan is:

[0231] Each base station initializes the user set for the current round.

[0232] Use solution 1 to calculate the minimum cost for all users to be selected.

[0233] Each base station selects a user with a smaller cost until all channels are allocated or the user set is empty.

[0234] Complete the hierarchical federated learning process.

[0235] The embodiment of the present invention provides a hierarchical federated learning system and method in a wireless mobility scenario. Figure 1 The basic structure of the present invention is described. Figure 2 and Figure 3 The performance of the invention is compared with other scheduling schemes.

[0236] As an emerging distributed machine learning algorithm, federated learning can solve the communication overhead and privacy protection problems existing in traditional centralized machine learning. The "cloud-edge-end" hierarchical federated learning architecture is often deployed in wireless systems. Users train local models on their private data sets, upload the trained models to the base station, and perform partial aggregation on the edge server; after several partial aggregations, the edge server uploads the model to the central server for global aggregation to complete the federated learning task, which not only reduces the communication overhead caused by data upload, but also protects the privacy of users.

[0237] The user selection and resource scheduling scheme designed by the system takes into account user mobility and optimizes the performance of federated learning to minimize the total energy consumption of users when communication and computing resources are limited. Users in the system are mobile and use their own data to update the federated learning model, which is uploaded to the base station through the wireless network; the base station is equipped with an edge server, which receives the model uploaded by the user and partially aggregates it, and uploads the model to the central server; the central server receives the model uploaded by the edge server, performs global aggregation, and completes the federated learning task.

[0238] Taking into account the general resource constraints of users' devices in the system, the present invention aims to minimize the energy consumption of the user end during the entire hierarchical federated learning process, and comprehensively considers the limitations of federated learning performance and user mobility to design a new wireless hierarchical federated learning system.

[0239] The hierarchical federated learning system in the wireless mobility scenario of the present invention performs user selection and resource allocation with less complexity, ensures the performance of federated learning in the scenario where the user is mobile, and greatly reduces the energy consumption of the user end to achieve green communication. The user selection and resource scheduling method of the present invention calculates the scheduling cost for all users and selects users with a smaller cost. The target user set and resource scheduling scheme are obtained efficiently.

[0240] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0241] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A hierarchical federated learning system in a wireless mobility scenario, characterized in that: include: A central server, multiple base stations, and multiple edge servers; Base stations, each of which is connected to at least one user equipment, wherein the user equipment is mobile and can perform data collection and model update at different locations; In each round of training of the hierarchical federated learning system, the user device uses the local data set to perform local updates and uploads the local model to the base station after the update; The edge server is configured in the base station and is responsible for receiving the local model uploaded by the user equipment and performing edge aggregation, wherein the partial aggregation is based on a preset aggregation algorithm; the edge server uploads the aggregated model to the central server after performing multiple edge aggregations; The central server is used to receive the aggregated models from multiple edge servers and perform global aggregation to complete the federated learning task; Among them, at the beginning of each round of training in the hierarchical federated learning system, the edge server selects the participating user device set based on the system status and user status. For the selected user devices, the edge server will allocate the corresponding channel, uplink transmission power and local computing frequency.

2. The hierarchical federated learning system in a wireless mobility scenario according to claim 1, characterized in that: The edge server receives local models uploaded by multiple user devices and performs edge aggregation; By introducing the hierarchical aggregation algorithm, the edge server can flexibly allocate computing tasks according to the user's computing resources, and also allocate the number of participating users and tasks in each round according to the user's energy status and channel conditions.

3. The hierarchical federated learning system in a wireless mobility scenario according to claim 1, characterized in that: The central server performs global aggregation, which uses a weighted average method, with the weights based on the local data of each user device. The user set of base station e in the nth round is The formula for edge aggregation is: in, is the user selection vector, D i is the data set of the ith user, w i and w e Represent the local model parameters and edge server model parameters respectively, represents the model parameters of the edge server e in the n+1th communication round, Indicates the nth communication round τ l The model parameters of user i after the local update, |d i | represents the dataset size of the i-th user; Edge Aggregation τ e After that, the base station uploads the edge aggregation model to the central server for global aggregation. The formula for global aggregation is: Among them, w n+1 represents the model parameters of the central server in the n+1th communication round, and ε represents the set of edge servers.

4. The hierarchical federated learning system in a wireless mobility scenario according to claim 1, characterized in that: When the edge server selects a user device set, it is necessary to optimize the selection and energy management of the user device by the edge server, including: The energy consumed by the local update process of the user equipment is optimized according to the computing resources and the wireless communication resources. The local computing time and the energy consumed by the local computing are: Among them, γ is the number of CPU rounds required to calculate a sample, τ l represents the number of rounds of local update, α is the energy consumption coefficient, and f i n is the local calculation frequency of user i in round n; The uplink transmission rate of the user equipment is calculated based on the Shannon formula, and the uplink transmission rate of the user i in the nth round is: Where, B is the bandwidth of RB, is the uplink transmission power of user i in the nth round, is the channel gain of user i in the nth round, N0 is the power spectrum of the noise during the communication process, so the uplink communication time is: Among them, S is the size of the data packet transmitted in the uplink, and the energy consumption of the uplink communication is: Under the premise of considering user mobility and federated learning performance, the energy consumption of user devices in the entire federated learning process is minimized.

5. The hierarchical federated learning system in a wireless mobility scenario according to claim 4, characterized in that: Based on minimizing the energy consumption of user devices in the entire federated learning process, a long-term optimization problem is established: P1: s.t.C1: C2: C3: C4:f i min ≤f i n ≤f i max , C5: C6: Among them, the goal of P1 is to minimize the total energy consumption of all mobile users in the whole process under the constraints, and optimize the variables is the access vector, is the transmit power vector, To calculate the frequency vector; C1 represents the user selection variable, where Indicates that user i is selected to participate in the training process of the nth communication round; C2 indicates that each base station has a limited channel, and base station e has M e channels; in each round, the number of users selected by base station e shall not exceed M e Users; C3 represents the delay constraint of mobile user communication and computation, where is the time that user i stays in the base station coverage area in the nth communication round. For users who do not move, this value is T max , that is, the maximum time of a communication round; C4 and C5 are resource constraints, where C4 specifies the maximum and minimum computation frequencies, while C5 defines the limit on the transmit power. The long-term constraint C6 is the user participation rate; represents the user participation rate of user i in the nth communication round; N represents the total number of communication rounds to complete the federated learning process.

6. The hierarchical federated learning system in a wireless mobility scenario according to claim 5, characterized in that: This long-term optimization problem is transformed through the Lyapunov optimization method, and a virtual queue is defined: Among them, Q i (n+1) represents the virtual queue of user i in the n+1th round; Q i (n) represents the virtual queue of user i in round n. Convert the long-term constraint C6 to C6' through a virtual queue: Where E{} represents the mathematical expectation; n represents the communication round; Define the Lyapunov function and conditional Lyapunov drift as: ΔL(n)=E{L(n+1)-L(n)|Q(n)}, Where, L(n+1) represents the Lyapunov function of the n+1th round; L(n) represents the Lyapunov function of the nth round; ΔL(n) represents the conditional Lyapunov drift of the nth round; The Lyapunov drift penalty function is defined as: in, represents the Lyapunov drift penalty function, V is the control parameter for balancing energy consumption and satisfying the long-term participation rate constraint; represents the communication energy consumption of user i in the nth communication round, represents the computational energy consumption of user i in the nth communication round. It is easy to prove that: Where C is a constant, minimize Stable queue, satisfying constraint C6', transforms the problem into: P2: stC1~C5. The more time the selected user uses, the lower the energy consumption is. Abbreviated as According to the previous conclusion, the time in, represents the maximum communication time of user i in the nth communication round; optimize variable p n With f n Using optimization variables Therefore, the transformation problem is: P3: stC1,C2, C4′: C5′: in, represents a cost function that considers user energy consumption and long-term participation rate constraints; solve the problem, that is, how to allocate resources to minimize the cost for a selected user, specifically considering: P4: s.t.C4′: C5′: This problem is a convex optimization problem and is solved by the following optimization scheme: calculate If t left Greater than t right , indicating that the update process cannot be completed under resource constraints, and the cost is set to positive infinity; If t left Less than or equal to t right ,calculate and if and The same sign indicates the best Equal to t left or right , compare the costs of the two and choose the smaller one; if and Different sign, then Located in the interval (t left ,t right ), use Newton's method to solve the optimal cost; According to the best The optimal resource allocation solution is calculated using the following formula: and in, represents the optimal communication time of user i in the nth communication round, represents the scheduling cost function of user i in the nth communication round.

7. The hierarchical federated learning system in a wireless mobility scenario according to claim 1, characterized in that: Transform the problem into: P5: stC1,C2. The system can provide the best resource scheduling solution for any given access solution; For the entire system, each base station calculates the cost of scheduling all users, selects users according to the cost from small to large, and obtains the optimal user selection plan. Each selected user obtains the optimal resource allocation plan according to the optimization plan, and obtains the final plan: 1) Each base station initializes the user set of the current round; 2) Use the optimization scheme to calculate the minimum cost for all users to be selected; 3) Each base station selects a user with a smaller cost until all channels are allocated or the user set is empty; 4) Complete the hierarchical federated learning process.

8. A hierarchical federated learning method in a wireless mobility scenario, provided with a hierarchical federated learning system in a wireless mobility scenario as claimed in any one of claims 1 to 7, characterized in that: include: Step S1: In a mobility scenario, the user equipment uses its local data to update a local model, where the local model update is based on a local data set of the user equipment; Step S2: The user equipment uploads the updated local model to the base station via the wireless network; Step S3: The base station deploys an edge server to receive and partially aggregate the local model uploaded by the user equipment; Step S4: The edge server uploads the aggregated aggregation model to the central server for global aggregation; Step S5: The central server completes global aggregation and updates the federated learning model.

9. The hierarchical federated learning method in a wireless mobility scenario according to claim 8, characterized in that: The hierarchical federated learning system in the novel wireless mobility scenario is applied. Under the premise of considering user mobility and federated learning training performance, and under the constraints of communication and computing resources, the total energy consumption of users of the federated learning system is minimized through user selection and resource scheduling.

10. A user selection and resource scheduling method, based on the hierarchical federated learning method in the wireless mobility scenario of claim 9, characterized in that: The scheduling cost is calculated for all users, and the user with the minimum cost is selected to obtain the target user set and the resource scheduling plan; the method also includes monitoring the mobility status of the user device and dynamically adjusting the model upload strategy according to the mobility status.

Citation Information

Cited By

  • Wireless multi-modal federated learning system for modal heterogeneous users

    CN120529414A

  • Wireless multi-modal federated learning system for modal-heterogeneous users

    CN120529414B