Hierarchical federated learning method and system in mobile social network scenario

By optimizing user selection and resource allocation in mobile social network scenarios and utilizing KKT conditions and alternating optimization algorithms, the problems of high energy consumption and repeated data training in existing technologies are solved, thereby reducing energy consumption and improving model accuracy.

CN119729638BActive Publication Date: 2025-09-19SHANGHAI JIAOTONG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411914505.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-09-19
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

In the mobile social network scenario, existing federated learning methods fail to effectively and reasonably allocate transmission power and computing frequency, resulting in increased communication overhead and energy consumption, and serious data duplication training in complex social network graph structures.

Method used

By selecting user solutions and associating them with edge servers based on social network graphs, the optimal communication bandwidth allocation and user local computing frequency are calculated. By using KKT conditions and alternating optimization algorithms, user selection, scheduling, and resource allocation are optimized to reduce energy consumption.

Benefits of technology

In the social network scenario, energy consumption is reduced by 55%, model accuracy is improved by 1%, computational complexity is reduced, resource allocation efficiency is improved, and the federated learning process is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119729638B_ABST
    Figure CN119729638B_ABST
Patent Text Reader

Abstract

The present invention provides a hierarchical federated learning method and system for mobile social network scenarios, comprising: Step S1: selecting a user scenario based on N users in a social network graph; selecting a user combination based on the user scenario, where N is a constant; Step S2: associating the users in the user combination with K edge servers, thereby obtaining multiple association scenarios, where K is a constant; and Step S3: calculating the KKT conditions of the association scenarios based on the users and the multiple association scenarios, thereby deriving the optimal communication bandwidth allocation and local computing frequency for the users. The proposed joint optimization algorithm efficiently schedules users, with the preferred users in each scheduling round less than 50% of the total number of users, and rationally allocating transmission power and computing frequency. Compared with traditional baseline algorithms, the proposed hierarchical federated learning system for social network scenarios reduces energy consumption by at least 55%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of wireless communication and artificial intelligence technology, and specifically relates to a hierarchical federated learning method and system in a mobile social network scenario. Background Art

[0002] With breakthroughs in artificial intelligence, especially artificial neural networks, machine learning (ML) has rapidly become a transformative technology. However, traditional centralized machine learning requires users to upload their data to a central server, an approach that incurs high communication overhead and data privacy risks.

[0003] To address these issues, federated learning (FL) emerged as a distributed machine learning algorithm. The "cloud-edge-device" layered architecture is commonly used in wireless systems. Users train local models on private datasets and upload model updates to base stations, where edge servers perform partial aggregation. After several rounds of partial aggregation, the edge servers upload the updated models to a central server for global aggregation, completing the federated learning task.

[0004] Existing research on federated learning typically assumes that each user's data is completely independent and private, with no overlap with other users' data. However, in reality, some data may be shared between different users. For example, in everyday communication, messages sent via phone, text message, or email are stored on both the sender's and receiver's devices. Similarly, conversations on social platforms like Twitter and WeChat are visible to all participants. This data may include text, images, and videos, which is closely related to personal privacy. Federated learning is often used for model training, such as for sentiment detection or rapid response generation. Because each data sample is stored on the sender's and receiver's devices, if both devices participate in federated learning, the shared data may be repeatedly trained multiple times in a single round of communication. As the number of users increases, this leads to the formation of a complex social network graph structure. In a social network graph, allowing all users to participate in federated learning results in a large amount of data being repeatedly trained in a single round of communication, which inevitably increases communication overhead compared to performing a single local update for each unique data point.

[0005] Patent document CN114866545A discloses a semi-asynchronous hierarchical federated learning method and system based on over-the-air computing. This scheme assigns N clients to M edge servers, with each edge server assigned to n clients, resulting in m free clients. After the model parameters of the n clients are updated, they are synchronously uploaded to their corresponding edge servers for preliminary model aggregation. The M edge servers then upload the aggregated model parameters and the updated model parameters of the m free clients to a central server. The central server performs global model aggregation on the model parameters received within a deadline and broadcasts the globally aggregated model parameters to the N clients for the next round of model parameter updates until convergence is achieved. By grouping clients and setting a deadline, this scheme reduces the system's global model update time and improves convergence speed and efficiency. However, this scheme does not reasonably allocate transmission power and computing frequency, and does not reduce the losses in federated learning.

[0006] This problem needs to be solved urgently. Summary of the Invention

[0007] In view of the deficiencies in the prior art, the present invention aims to provide a hierarchical federated learning method and system in a mobile social network scenario.

[0008] A hierarchical federated learning method in a mobile social network scenario provided by the present invention includes:

[0009] Step S1: Based on N users in the social network graph, a user plan is selected; based on the user plan, a user combination is selected; N is a constant;

[0010] Step S2: Associating the users of the user group with K edge servers, thereby obtaining multiple association schemes; K is a constant;

[0011] Step S3: Based on the user and the multiple association schemes, the KKT conditions of the association schemes are calculated, thereby obtaining the optimal communication bandwidth allocation and the user's local computing frequency.

[0012] Preferably, the step S1 includes:

[0013] Step S1.1: Based on the user scenario, derive the upper bound of energy consumption and then derive the comprehensive metric factor

[0014] Step S1.2: Traverse all the user plans obtained and calculate the Obtain the comprehensive measurement factor The user combination with the smallest value

[0015] In step S1.1, the mathematical expression of the upper bound of the energy cost is:

[0016]

[0017] in, represents the upper bound of energy cost; τ represents the number of edge aggregations; M is the set of selected users The number of users in Representing a collection The total amount of training data for all users in v max represents the upper bound of the frequency constraint; C is the number of times the CPU needs to run to process a single sample; λ is the number of local trainings; p is the user's uplink transmit power; t0 represents the user's delay constraint; R max represents the upper bound of energy consumption of a single user;

[0018] The mathematical expression of the comprehensive measurement factor is:

[0019]

[0020] in, represents the comprehensive measurement factor; ∈ max represents the maximum convergence speed metric factor in the user solution; represents the upper bound of the maximum energy cost in the user scheme; Represents the convergence speed index;

[0021] described The mathematical expression is:

[0022]

[0023] in, and Represents a set The amount of valid data and redundant data covered by all users;

[0024] The steps of the user solution include:

[0025] Step A1: according to the number of users, find an approximate upper bound and an approximate lower bound of the number of users;

[0026] Step A2: Select the number of users M and traverse from the approximate lower bound to the approximate upper bound to obtain N m Group different user combinations, i.e. sets

[0027] Preferably, in step S2, the association scheme includes gradient climbing and random exchange;

[0028] The gradient climbing includes:

[0029] Step B1: Allocate an edge server to each user to obtain a total energy consumption;

[0030] Step B2: Moving the user to the edge server that minimizes the total energy consumption;

[0031] Step B3: Determine whether the total energy consumption is reduced. If yes, re-execute step B2; if no, stop.

[0032] The mathematical expression of the total energy consumption is:

[0033]

[0034] Among them, E total represents the total energy consumption; τ represents the number of edge aggregations; Indicates the energy consumption of uplink communication; Indicates local computing consumption; represents the user set; u i represents the i-th user; e i represents the i-th base station; represents the base station set; n represents the ordinal number of the user; k represents the ordinal number of the base station;

[0035] described The mathematical expression is:

[0036]

[0037] Among them, α represents the energy consumption coefficient; Indicates the sample size; v n Represents user u n The local calculation frequency is the calculation frequency; λ represents the number of local updates; C is the number of times the CPU needs to run to process a single sample;

[0038] described The mathematical expression is:

[0039]

[0040] Among them, δ n,k Represents user u n With edge server k Communication relationship, B n,k Indicates edge server e k Assigned to user u n The bandwidth, p represents the user's uplink transmission power, h n,k Represents user u n With edge server kN0 represents the power spectrum of the noise during the communication process; z represents the number of model bits for uplink transmission;

[0041] The random exchange includes:

[0042] Step C1: Select two associated users within the communication range of different edge servers, and obtain the total energy consumption of the two users before and after the exchange;

[0043] Step C2: Determine whether the total energy cost before the exchange is greater than the total energy cost after the exchange. If yes, accept the exchange; if no, accept the exchange based on probability.

[0044] In step C2, the mathematical expression of the probability is:

[0045]

[0046] Among them, prob represents probability; is the total energy consumption of the user before exchange, is the total energy consumption after user exchange, T c The current temperature.

[0047] Preferably, in step S3, the mathematical expression of the KKT condition is:

[0048]

[0049] Among them, formula (c) to formula (f) are complementary relaxation conditions; μ k ,θ n , γ n and σ n are a Lagrange multiplier, another Lagrange multiplier, another Lagrange multiplier, and another Lagrange multiplier respectively; τ is the number of edge aggregations; α is the capacitance coefficient; v n For user u n The local calculation frequency; z is the model bit size; p is the transmission power; B n,k Base station e k Assigned to user u n Bandwidth; h n,k Represents user u n With edge server k The channel gain between them; N0 is the background noise; B0 is the base station e k Allocable bandwidth; v min 、v max are the upper and lower limits of frequency respectively; X n is the first intermediate quantity, Y n is the second intermediate quantity;

[0050] The mathematical expression of the first intermediate quantity is:

[0051]

[0052] The mathematical expression of the second intermediate quantity is:

[0053]

[0054] In step S3, based on the KKT condition, optimal communication bandwidth allocation and user local computing frequency are obtained through alternating optimization;

[0055] The alternating optimization includes:

[0056] Step D1: Let the initial calculation frequency of all the users be the upper limit of the frequency, that is, v min ;

[0057] Step D2: Substitute the calculated frequency of the user into the formula Γ n ;

[0058] Step D3: Determine Γ n Is the calculation result of greater than zero? If yes, then the equations of the KKT condition are solved to obtain the optimal communication bandwidth allocation and the user's local calculation frequency; if no, then the calculation frequency is kept unchanged and step D2 is executed again until all Γ n The result of calculation is less than or equal to zero;

[0059] The Γ n The mathematical expression is:

[0060]

[0061] Among them, Γ n Under KKT conditions, n Monotonically increasing.

[0062] A hierarchical federated learning system in a mobile social network scenario provided by the present invention includes:

[0063] Module M1: Based on N users in a social network graph, select a user plan; based on the user plan, select a user combination; N is a constant;

[0064] Module M2: associates the users of the user group with K edge servers, thereby obtaining multiple association schemes; K is a constant;

[0065] Module M3: Based on the user and the multiple association schemes, calculate the KKT conditions of the association schemes, and then obtain the optimal communication bandwidth allocation and the user's local computing frequency.

[0066] Preferably, the module M1 includes:

[0067] Module M1.1: Based on the user scenario, derive the upper bound of energy consumption and then derive the comprehensive measurement factor

[0068] Module M1.2: Traverse all the user plans obtained and calculate the Obtain the comprehensive measurement factor The user combination with the smallest value

[0069] In the module M1.1, the mathematical expression of the energy consumption upper bound is:

[0070]

[0071] in, represents the upper bound of energy cost; τ represents the number of edge aggregations; M is the set of selected users The number of users in Representing a collection The total amount of training data for all users in v max represents the upper bound of the frequency constraint; C is the number of times the CPU needs to run to process a single sample; λ is the number of local trainings; p is the user's uplink transmit power; t0 represents the user's delay constraint; R max Indicates the upper bound of energy consumption of a single user;

[0072] The mathematical expression of the comprehensive measurement factor is:

[0073]

[0074] in, represents the comprehensive measurement factor; ∈ max represents the maximum convergence speed metric factor in the user solution; represents the upper bound of the maximum energy cost in the user scheme; Represents the convergence speed index;

[0075] described The mathematical expression is:

[0076]

[0077] in, and Represents a set The amount of valid data and redundant data covered by all users;

[0078] The steps of the user solution include:

[0079] Module A1: according to the number of users, find the approximate upper bound and the approximate lower bound of the number of users;

[0080] Module A2: Select the number of users M and traverse from the approximate lower bound to the approximate upper bound to obtain N m Group different user combinations, i.e. sets

[0081] Preferably, in the module M2, the association scheme includes gradient climbing and random exchange;

[0082] The gradient climbing includes:

[0083] Module B1: Allocate an edge server to each user to obtain the total energy consumption;

[0084] Module B2: moving the user to the edge server that minimizes the total energy consumption;

[0085] Module B3: Determine whether the total energy consumption is reduced. If yes, re-execute step B2; if no, stop.

[0086] The mathematical expression of the total energy consumption is:

[0087]

[0088] Among them, E total represents the total energy consumption; τ represents the number of edge aggregations; Indicates the energy consumption of uplink communication; Indicates local computing consumption; represents the user set; u i represents the i-th user; e i represents the i-th base station; represents the base station set; n represents the ordinal number of the user; k represents the ordinal number of the base station;

[0089] described The mathematical expression is:

[0090]

[0091] Among them, α represents the energy consumption coefficient; Indicates the sample size; v n Represents user u n The local computation frequency; λ represents the number of local updates; C is the number of times the CPU needs to run to process a single sample;

[0092] described The mathematical expression is:

[0093]

[0094] Among them, δ n,k Represents user u n With edge server k Communication relationship, B n,k Indicates edge server e k Assigned to user u n The bandwidth, p represents the user's uplink transmission power, h n,k Represents user u n With edge server k N0 represents the power spectrum of the noise during the communication process; z represents the number of model bits for uplink transmission;

[0095] The random exchange includes:

[0096] Module C1: Select two associated users within the communication range of different edge servers, and obtain the total energy consumption of the two users before and after the exchange;

[0097] Module C2: Determine whether the total energy cost before the exchange is greater than the total energy cost after the exchange. If the result is yes, the exchange is accepted; if the result is no, the exchange is accepted based on probability;

[0098] In the module C2, the mathematical expression of the probability is:

[0099]

[0100] Among them, prob represents probability; is the total energy consumption of the user before exchange, is the total energy consumption after user exchange, T c The current temperature.

[0101] Preferably, in the module M3, the mathematical expression of the KKT condition is:

[0102]

[0103] Among them, formula (c) to formula (f) are complementary relaxation conditions; μ k ,θ n , γ n and σ n are a Lagrange multiplier, another Lagrange multiplier, another Lagrange multiplier, and another Lagrange multiplier respectively; τ is the number of edge aggregations; α is the capacitance coefficient; ν n For user u n The local calculation frequency; z is the model bit size; p is the transmission power; B n,k Base station e kAssigned to user u n Bandwidth; h n,k Represents user u n With edge server k The channel gain between them; N0 is the background noise; B0 is the base station e k Allocable bandwidth; v min 、v max are the upper and lower limits of frequency respectively; X n is the first intermediate quantity, Y n is the second intermediate quantity;

[0104] The mathematical expression of the first intermediate quantity is:

[0105]

[0106] The mathematical expression of the second intermediate quantity is:

[0107]

[0108] In the module M3, based on the KKT condition, optimal communication bandwidth allocation and user local computing frequency are obtained through alternating optimization;

[0109] The alternating optimization includes:

[0110] Module D1: Let the initial calculation frequency of all users be the upper limit of the frequency, that is, v min ;

[0111] Module D2: Substitute the calculated frequency of the user into the formula Γ n ;

[0112] Module D3: Determine Γ n Is the calculation result greater than zero? If yes, then the equations of the KKT condition are solved to obtain the optimal communication bandwidth allocation and the user's local calculation frequency; if no, then the calculation frequency is kept unchanged and the module D2 is retriggered until all Γ n The result of calculation is less than or equal to zero;

[0113] The Γ n The mathematical expression is:

[0114]

[0115] Among them, Γ n Under KKT conditions, n Monotonically increasing.

[0116] According to the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the steps of the hierarchical federated learning method in the mobile social network scenario are implemented.

[0117] According to an electronic device provided by the present invention, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the hierarchical federated learning method in the mobile social network scenario are implemented.

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

[0119] 1. The joint optimization algorithm proposed in this paper efficiently schedules users, with the preferred users in each round of scheduling less than 50% of the total number of users. It also rationally allocates transmission power and computing frequency. Compared with traditional baseline algorithms, it reduces the energy consumption of hierarchical federated learning systems in social network scenarios by at least 55%.

[0120] 2. The joint optimization algorithm proposed in this invention has low complexity. Resource allocation is achieved through an alternating optimization method, and the computational complexity is reduced from O(2 M ) is reduced to O(M); the base station association uses a heuristic algorithm, and the time complexity is reduced from O(K M ) is reduced to Moreover, the user's choice is made by balancing the amount of effective data and the amount of redundancy. The time complexity is from Reduced to O(ξM 2 ); where O represents complexity; M represents the number of scheduled users; T f represents the final cooling temperature of the simulated annealing method; T0 represents the initial temperature of the simulated annealing method; the symbol "!" represents factorial; ξ represents the number of user plans when scheduling M users; K represents the number of edge servers; Indicates the maximum number of iteration steps at each temperature; α c Indicates the cooling rate.

[0121] 3. By setting a coverage constraint of 60% in the social network graph structure, the present invention ensures that the model accuracy of federated learning is improved by at least 1% while optimizing energy consumption by 55% compared with the traditional baseline algorithm.

[0122] 4. The present invention takes into account federated learning, user mobility and social networks at the same time, introduces the concepts of effective data volume and redundant data volume, and through the joint optimization of user selection, user scheduling and user resource allocation, not only reduces the user energy consumption in the federated learning process, but also enables the model to show superior performance. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0124] Figure 1 A schematic diagram of the hierarchical federated learning architecture in a social network scenario provided by the present invention;

[0125] Figure 2 A schematic diagram comparing the training accuracy of the present invention and other solutions when trained using the CIFAR-10 dataset provided by the present invention;

[0126] Figure 3 A schematic diagram comparing the energy consumption of the present invention and other solutions when training using the CIFAR-10 dataset provided by the present invention. DETAILED DESCRIPTION

[0127] The present invention will be described in detail below with reference to specific embodiments. The following examples 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 skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0128] This invention provides a hierarchical federated learning framework based on a social network graph structure, comprising a central server, base stations, and a social network. Users are mobile, and some data may be shared between different users. Users use their own data to update federated learning models locally, which are then uploaded to the base station via a wireless network. The base station is equipped with an edge server, which receives and aggregates the local models uploaded by users, and then uploads each to the central server. The central server receives the models uploaded by the edge servers, performs global aggregation, and generates a new model, thus completing the federated learning task.

[0129] The embodiment of the present invention discloses a hierarchical federated learning system in a mobile social network scenario. Figure 1 As shown, it includes a central server, base stations and a social network; in addition, 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 the training performance of federated learning.

[0130] In each round of training in the hierarchical federated learning system, users use their local datasets to perform local updates and then upload the updated models to the base station. The base station deploys edge servers, which partially aggregate the received models and upload them to the central server after multiple aggregations. The central server is responsible for global aggregation of the received models.

[0131] According to a hierarchical federated learning method in a social network scenario provided by the present invention, the process of the software system includes: Step S1: from N users constituting a social network graph, multiple groups of user solutions that meet the effective data coverage constraint are selected, and from multiple groups of feasible solutions, the user combination that minimizes the comprehensive metric factor is selected, that is,

[0132] Step S2: The user combination obtained in step S1, i.e. Will The users in are associated with K edge servers, and multiple association schemes are obtained using simulated annealing method;

[0133] Step S3: Based on the association schemes between the user and the edge server obtained in steps S1 and S2, the KKT conditions under each association scheme are calculated to obtain the optimal communication bandwidth allocation and the user's local computing frequency;

[0134] Specifically, in step S1, the implementation method is as follows:

[0135] In other words, in step S1, the user solution is to calculate the approximate upper bound of the number of selected users through a greedy algorithm, that is, and an approximate lower bound, i.e. Select the number of users, i.e. M from Traverse to For each value of M, from all users Randomly generate N m Different user combinations, namely Guarantee each Satisfy coverage constraints.

[0136] Step S1.1: Derived energy cost upper bound according to the user plan Then we can get the comprehensive measurement factor, namely

[0137] Step S1.2: Traverse all the user plans obtained and calculate the The comprehensive measurement factor is obtained, namely The user combination with the smallest value of

[0138] described The mathematical expression is:

[0139]

[0140] in, represents the upper bound of energy cost; τ represents the number of edge aggregations; M is the set of selected users The number of users in Representing a collection The total amount of training data for all users in v max represents the upper bound of the frequency constraint; C is the number of times the CPU needs to run to process a single sample; λ is the number of local trainings; p is the user's uplink transmit power; t0 represents the user's delay constraint; R max represents the upper bound of energy consumption of a single user;

[0141] R max It is a simplified expression of the following parameters:

[0142]

[0143] Among them, v max represents the upper bound of the frequency constraint, R max represents the upper bound of energy consumption of a single user;

[0144] The mathematical expression is:

[0145]

[0146] in, and Represents a set The amount of valid data and redundant data covered by all users in the .

[0147] The comprehensive measurement factor, namely The mathematical expression is:

[0148]

[0149] in, represents the upper bound of the maximum energy cost in the user scheme; ∈ max represents the maximum convergence speed metric factor in the user solution;

[0150] In step S2, The users in are associated with K edge servers, and a near-optimal association scheme is obtained using gradient climbing and random exchange based on hill climbing and simulated annealing.

[0151] The nearly optimal association scheme is:

[0152] 1) Gradient climbing: ① Select edge servers for each user in order, use the bandwidth and frequency allocation method in step S3 to allocate bandwidth and frequency to each user, and calculate the total energy cost E total Each user selects the current conditions that can make E total Add minimal edge servers.

[0153] ② Move each assigned user in order, and each move can make E total Reduce the most edge servers.

[0154] ③Whenever the base station assigned to a user changes, return to the first user and repeat step ② until E total No longer decrease, get the optimal allocation plan under the current strategy.

[0155] 2) Random exchange: define the initial temperature T0 and the end temperature T f , cooling rate α c , the maximum number of iterations at each temperature ① Under the allocation scheme obtained in 1), consider user u associated with two different edge servers i and u j , if u i and u j If both are within the communication range of the edge server associated with the other party, then the two users are considered to be interchangeable.

[0156] ② Use the resource allocation method in step S3 to calculate the E before and after each pair of users exchange total , if after the exchange E total Decrease, then accept the exchange strategy and get a new allocation plan; if E total Increase, then the exchange strategy is accepted with a probability below.

[0157]

[0158] Among them, prob represents probability; E before user exchange total , E after user exchange total , T c The current temperature.

[0159] When the initial temperature drops from T0 to the final temperature T f The solution generated in the process is regarded as the approximate optimal association solution.

[0160] In step S3, the KKT conditions under each association scheme are calculated respectively, and an alternating optimization is performed according to the KKT conditions to obtain the optimal communication bandwidth allocation and the user's local computing frequency;

[0161] The mathematical expression of the optimal communication bandwidth allocation KKT condition is:

[0162]

[0163] Among them, (c)-(f) are complementary relaxation conditions; μk ,θ n , γ n and σ n are a Lagrange multiplier, another Lagrange multiplier, another Lagrange multiplier, and another Lagrange multiplier respectively; τ is the number of edge aggregations; α is the capacitance coefficient; v n For user u n The local calculation frequency; z is the model bit size; p is the transmission power; B n,k Base station e k Assigned to user u n Bandwidth; h n,k Represents user u n With edge server k The channel gain between them; N0 is the background noise; B0 is the base station e k Allocable bandwidth; v min 、v max is the upper and lower limits of frequency; X n is the first intermediate quantity, Y n is the second intermediate quantity, and the mathematical expressions are:

[0164]

[0165]

[0166] According to formula (a) and formula (b), it is easy to know that μ k >0, the relationship between some variables can be characterized as:

[0167]

[0168] For a user u n , if (d) is relaxed, then ν n =ν min . Define the following function, the mathematical expression is:

[0169]

[0170] Γ n Under KKT conditions, it is v n Strictly monotonically increasing, with v i , i≠n is strictly monotonically decreasing. Based on the above conclusions, the alternating optimization solution is as follows: 1) Assume that the initial calculation frequency of all users is v min 2) Set all users’ v n Substitute into Γ n , calculate Γ n 3) It is easy to prove that for a user u n , if its corresponding Γ n>0, then the (d) corresponding to this user is a tight constraint under the KKT condition. 4) For Γ n <0, keep the calculation frequency unchanged. For users with tight constraints in (d) in 3), solve the equations under the KKT condition and find the optimal calculation frequency, which is and the optimal bandwidth, i.e. Repeat steps 2) and 3) until all users Γ n ≤0.

[0171] In other words, a hierarchical federated learning system in a social network scenario provided by the present invention includes:

[0172] 1) The central server is used to receive the aggregated models from multiple edge servers and perform global aggregation;

[0173] 2) Multiple base stations, each connected to at least one user equipment, wherein the user equipment is mobile and can collect data and update models at different locations;

[0174] 3) An edge server, configured in the base station, is responsible for receiving the local model uploaded by the user equipment and performing partial aggregation, where the partial aggregation is based on a preset aggregation algorithm.

[0175] 4) A social network graph is used to represent the communication relationship between users, and some users in the social network graph have some shared training data.

[0176] Specifically, the size of data covered by a selected user in the social network graph is defined as valid data, and the size of data repeatedly covered by the selected user is defined as redundant data. The valid and redundant data amounts vary depending on the selected user and the graph structure. Specifically, the user device uploads a local model update via the wireless network; the local model update is trained based on the user device's local dataset using a batch gradient descent training algorithm. Specifically, the edge server uses a dynamic resource scheduling algorithm to allocate wireless resources to user devices participating in the model update based on the user device's channel status and computing power.

[0177] In hierarchical federated learning systems users, recorded as user set The dataset of user i is The loss function is denoted as f i (w); local update uses batch gradient descent, that is, batch gradient decent for update, and the update formula is:

[0178]

[0179] in, Represents user u n The loss function is Indicates u n Model parameters of , where t represents the round of local update; Represents a single sample (x i ,y i ) loss function; Indicates the sample size, x i Represents the feature vector of the i-th sample, y i Indicates the corresponding label.

[0180] The K base stations of the hierarchical federated learning system form a base station set, that is, the set Due to mobility, the actual location of users in different rounds is different, and the nearest base station is selected for communication based on the actual location. In other words, the central server performs global aggregation, which uses a weighted average method with weights based on the local data of each user device. k The user set is The mathematical expression of edge aggregation is:

[0181]

[0182] in, is the data set of the i-th user, Represents user u n The model parameters after λ local updates, represents the size of the dataset of the i-th user. After edge aggregation τ times, the base station uploads the edge aggregation model to the central server for global aggregation. The number of global aggregation rounds is T. The formula for global aggregation is:

[0183]

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

[0185]

[0186] in, represents the local computation time; λ is the number of local trainings, C is the number of CPU runs required to process a single sample; v n For user u n The local calculation frequency of

[0187]

[0188] in, represents local computing consumption; α is the energy consumption coefficient; the uplink transmission rate of the user equipment is calculated based on the Shannon formula, and the user u n With edge server k The uplink transmission rate is expressed as:

[0189]

[0190] Among them, δ n,k is an indicator function, representing user u n With edge server k Communication relationship, B n,k For edge servers k Assigned to user u n bandwidth, p is the user's uplink transmission power, h n,k For user u n With edge server k The channel gain between , N0 is the power spectrum of the noise during the communication process. Therefore, the mathematical expression of the uplink communication time is:

[0191]

[0192] Where z is the size of the uplink transmission packet; the energy consumption of uplink communication is expressed as:

[0193]

[0194] The federated learning model adopts synchronous aggregation;

[0195] Only one communication round is analyzed, and the overall overhead can be rigorously calculated using the following formula.

[0196]

[0197] Among them, t total Indicates the total time cost; E total represents the total energy cost; τ represents the number of edge aggregations;

[0198] Given that the main goal of the research is to reduce user energy consumption and the latency of downlink communication is negligible compared to uplink communication, this study focuses on uplink communication and local computing processes.

[0199] Due to limited user computing and wireless communication resources, only a subset of users can participate in wireless federated learning. At the beginning of each communication round, the edge server dynamically selects a set of participating users based on system and user status using a scheduling algorithm. The edge server allocates channel bandwidth and local computing frequency to the selected set of users. The selected users then download the model and execute the federated learning task. The scheduling algorithm is designed by solving an optimization problem.

[0200] This scheme aims to comprehensively consider the social network graph structure, user mobility and federated learning performance, minimize user energy consumption, and based on this, establish the following long-term optimization problem.

[0201]

[0202] C2:δ n,k ∈{0,1}

[0203] C3:

[0204] C4:

[0205] C5:

[0206] C6:0≤B n,k ≤B0

[0207] C7:v min ≤v n ≤v min

[0208] C8:

[0209] C9:

[0210] Among them, P represents the problem; E total represents the total energy consumption; represents the lower limit of effective data coverage; r ef Indicates effective data coverage;

[0211] Constraint C1 represents the requirement of effective data coverage, which ensures the performance of the final model by maintaining sufficient data coverage. Constraints C2 and C3 are constraints on the characteristic function used to characterize user u n With edge server k The association status between them determines whether a connection is established between them; Constraint C4 limits the time delay to ensure that the transmission rate and delay overhead are within an acceptable range, thereby avoiding the negative impact of excessive communication delay on model performance; Constraints C5 and C6 establish the edge server e kThe bandwidth limit allocated to its scheduled users; constraint C7 describes the computing resource constraints for the selected users; constraints C8 and C9 represent the relationship between users assigned to each edge server, selected users and all users.

[0212] In the hierarchical federated learning framework based on social networks, firstly, Select the set of users who participate in federated learning Then the selected user collection Assign it to K edge servers. Each user transmits its model parameters to the corresponding base station. Finally, the CPU operating frequency and communication channel bandwidth are allocated to the user device.

[0213] Based on this, the original problem is decomposed into three sub-problems. First, resource allocation is defined as sub-problem I, where and The optimal resource allocation scheme for a single edge server and its user devices can be determined. Based on sub-problem I, sub-problem II, edge association, is proposed. Finally, based on the results of subproblems I and II, we introduce user selection, namely subproblem III, which is equivalent to the original problem and aims to minimize the total energy consumption of the system.

[0214] If the delay variable in constraint C4 is expressed in terms of bandwidth and frequency, then subproblem I can be formulated as:

[0215] P1:

[0216] Among them, P1 represents problem I; E k Indicates base station e k and the total energy expenditure of its scheduling users;

[0217] stC5,C6,C7,C8,C9

[0218] Among them, st represents the constraint condition;

[0219]

[0220] The superscript “′” indicates a variant of constraint C4; X n is a parameter of the objective function; Y n is another parameter of the objective function; where X n and Y n It is a simplified expression of some parameters in the objective function, and its meaning is as follows:

[0221]

[0222] It is easy to prove that P1 is about B n,k and v n Therefore, the Lagrangian equation of P1 is:

[0223]

[0224] Among them, μ k ≥0,θ n ≥0,σ n ≥0,γ n ≥0 is the Lagrange multiplier. By taking partial derivatives of the corresponding variables, the KKT conditions are derived as follows:

[0225] In the KKT conditions, (c)-(f) are the complementary relaxation conditions of P1. According to (a) and (b), it is easy to know that μ k >0, the relationship between some variables can be characterized as:

[0226]

[0227] Yizhi for a user u n , constraint condition, that is, C4′ is relaxed, then v n =v min .

[0228] According to the constraint condition C4′, the following function is defined, and the mathematical expression is:

[0229]

[0230] Easy to prove Γ n Under KKT conditions, it is n Strictly monotonically increasing, with ν i ,i≠n is strictly monotonically decreasing.

[0231] According to the above conclusions, P1 can be solved by the following scheme:

[0232] 1) Assume that the initial calculation frequency of all users is ν min .

[0233] 2) Set the ν of all users n Substitute into Γ n , calculate Γ n positive and negative.

[0234] 3) Yizhi for a user u n , if its corresponding Γ n >0, then the constraint C4′ corresponding to the user is a tight constraint under the KKT condition.

[0235] 4) For Γ n<0, keep the calculation frequency unchanged. For users with tight constraints on C4′ in (3), solve the equations under KKT conditions to find the optimal solution. and Repeat steps (2) and (3) until all users Γ n ≤0.

[0236] The above and Substituting into the objective function, we get:

[0237]

[0238] According to the analysis and solution of sub-problem I, sub-problem II can be expressed as

[0239] P2:

[0240] stC3,C8,C9

[0241] in, Indicates base station e k and the total energy consumption of scheduling users under optimal bandwidth and frequency conditions;

[0242] P2, i.e., Problem II, can be solved using a heuristic algorithm. Based on hill climbing and simulated annealing, the adaptive gradient optimization algorithm is defined as follows

[0243] 1) Gradient climbing: ① Select edge servers for each user in order, allocate resources to each user using the resource allocation method in sub-problem I, and calculate E total Each user selects the current conditions that can make E total Add minimal edge servers.

[0244] ② Move each assigned user in order, and each move can make E total Reduce the most edge servers.

[0245] ③Whenever the base station assigned to a user changes, return to the first user and repeat step ② until E total No longer decrease, get the optimal allocation plan under the current strategy.

[0246] 2) Random exchange: define the initial temperature T0 and the end temperature T f , cooling rate α cool , the maximum number of iterations at each temperature

[0247] ① Under the optimal allocation scheme obtained in (1), consider user u associated with two different edge servers i and uj , if u i and u j If both are within the communication range of the edge server associated with the other party, then the two users are considered to be interchangeable.

[0248] ② Use the resource allocation method of subproblem I to calculate E before and after each pair of users exchange total , if after the exchange E total Decrease, then accept the exchange strategy and get a new allocation plan; if E total Increase, then the exchange strategy is accepted with a probability below.

[0249]

[0250] Among them, prob represents probability; E is the allocation scheme before user exchange calculated according to the resource allocation method of sub-problem I total , E is the allocation scheme after the exchange calculated according to the resource allocation method of sub-problem I total , T c The current temperature.

[0251] When the initial temperature drops from T0 to the final temperature T f The optimal solution generated in the process is the approximate optimal solution of P2, that is,

[0252] Based on sub-problems I and II, sub-problem III can be expressed as:

[0253] P3:

[0254] stC1,C9

[0255] Where P3 represents subproblem III; the superscript * represents the optimal solution;

[0256] Easy to derive exist Lower upper bound

[0257]

[0258] Among them, M is the selected user set The number of users in Representing a collection The total amount of training data for all users in R max It is a simplified expression of the following parameters:

[0259]

[0260] Among them, vmax represents the upper bound of the frequency constraint, R max represents the upper bound of a single user's energy consumption; for a given And the constraints C1~C9, the approximate upper bound of M can be easily obtained by the greedy algorithm and approximate lower bound

[0261] For the entire system, the problem can be solved by the following scheme: 1) Let M be rise to For each value of M, from Randomly generate N m different Guarantee each Constraint C1 is satisfied.

[0262] 2) From all (1) Select the one that makes smallest As the approximate optimal solution of P3.

[0263] 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 this invention is compared with other scheduling schemes.

[0264] A user selection and resource scheduling method includes: estimating the convergence speed and energy cost of federated learning for selected users based on the amount of valid and redundant data, selecting users with the lowest cost, and efficiently obtaining a target user set. The method further obtains user scheduling and resource allocation plans, and dynamically adjusts the model upload strategy based on user mobility.

[0265] Federated learning is an emerging distributed machine learning algorithm that effectively addresses the high communication overhead and insufficient privacy protection issues of traditional centralized machine learning. The hierarchical "cloud-edge-device" federated learning architecture is typically deployed in wireless systems. Users train local models on private datasets and upload them to base stations, where edge servers perform partial aggregation. After multiple rounds of partial aggregation, the edge servers upload the models to a central server for global aggregation, reducing the communication overhead associated with data upload while protecting user privacy.

[0266] The embodiment of the present invention proposes a hierarchical federated learning system suitable for social network scenarios, such as Figure 1As shown in the figure, the system includes a central server, base stations, and a social network. Users in the system are mobile and share data to a certain extent. Users update the federated learning model using their own data and then upload it to the base station via the wireless network. The base station is equipped with an edge server that receives the model uploaded by the user and performs partial aggregation. Subsequently, the central server receives the model uploaded by the edge server and performs global aggregation, completing the federated learning task.

[0267] The hierarchical federated learning system for social network scenarios proposed in the present invention realizes user selection and resource allocation with low complexity, which not only ensures the performance of federated learning but also significantly reduces the energy consumption of the user end, thereby achieving green communication.

[0268] According to the present invention, a hierarchical federated learning system in a social network scenario includes a central server, a base station, and a social network. The users are mobile, and some users share some data. The federated learning model is updated using their own data and uploaded to the base station via a wireless network.

[0269] By jointly optimizing user selection and energy management, user device selection not only considers channel conditions and computing power but also dynamically adjusts based on the user's effective data volume, redundant data volume, and mobility status. This optimized design enables the system to optimally select suitable users for federated learning in social network scenarios, thereby minimizing overall system energy consumption. Furthermore, the optimized resource allocation algorithm further reduces device energy consumption by automatically adjusting user computing frequency and bandwidth allocation. In practical applications, user device energy consumption can be reduced by over 50%, while maintaining ideal federated learning performance.

[0270] This preferred embodiment balances system performance and energy consumption requirements through a redundancy-effectiveness trade-off algorithm. Under coverage constraints, the preferred design ensures that most user data is fully trained, ensuring model performance, while minimizing the overall system energy consumption by adjusting the local computing frequency and wireless resource allocation of each user in real time. The base station is configured with an edge server for receiving models uploaded by users and performing partial aggregation before uploading them to the central server; preferably, multi-level aggregation and computing resource scheduling. In a preferred embodiment of the present invention, the edge server adopts a multi-level aggregation and computing resource scheduling strategy after receiving local models uploaded by multiple user devices. By introducing a hierarchical aggregation algorithm, the edge server can flexibly allocate tasks according to user computing resources, and dynamically determine the number of participating users and task allocation in each round in combination with the user's energy status and channel conditions. This preferred design significantly improves the scalability and adaptability of the system.

[0271] The central server receives models from edge servers and performs global aggregation to complete the federated learning task. Preferably, the system dynamically adjusts the training and upload frequency of user models based on user mobility during communication rounds, such as proximity to or distance from the base station, and the amount of valid and redundant data. This reduces redundant data overhead, channel interference, and communication latency. This approach not only reduces energy consumption but also maintains stable federated learning performance in complex wireless environments, demonstrating excellent practical deployment results.

[0272] The present invention also provides a hierarchical federated learning system in a mobile social network scenario. The hierarchical federated learning system in the mobile social network scenario can be implemented by executing the process steps of the hierarchical federated learning method in the mobile social network scenario. That is, those skilled in the art can understand the hierarchical federated learning method in the mobile social network scenario as an optimal implementation method of the hierarchical federated learning system in the mobile social network scenario.

[0273] Module M1: Based on N users in a social network graph, select a user plan; based on the user plan, select a user combination; N is a constant;

[0274] Module M2: associates the users of the user group with K edge servers, thereby obtaining multiple association schemes; K is a constant;

[0275] Module M3: Based on the user and the multiple association schemes, calculate the KKT conditions of the association schemes, and then obtain the optimal communication bandwidth allocation and the user's local computing frequency.

[0276] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention 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 a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.

[0277] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. A hierarchical federated learning method in a mobile social network scenario, characterized by: include: Step S1: Select a user solution based on N users in the social network graph; Based on the user plan, select a user combination; N is a constant; Step S2: Associating the users of the user group with K edge servers, thereby obtaining multiple association schemes; K is a constant; The association scheme includes performing gradient climbing followed by random swapping; The gradient climbing includes: Step B1: Allocate an edge server to each user to obtain a total energy consumption; Step B2: Moving the user to the edge server that minimizes the total energy consumption; Step B3: Determine whether the total energy consumption is reduced. If yes, re-execute step B2; if no, stop. After the gradient climb, the random swap is performed, including: Step C1: Select two associated users within the communication range of different edge servers, and obtain the total energy consumption of the two users before and after the exchange; Step C2: Determine whether the total energy cost before the exchange is greater than the total energy cost after the exchange. If yes, accept the exchange; if no, accept the exchange based on probability. Step S3: Calculate the KKT condition of the association scheme, and obtain the optimal communication bandwidth allocation and the user's local computing frequency through alternating optimization; Wherein, the alternating optimization includes: Step D1: Let the initial calculation frequency of all the users be the upper limit of the frequency, that is, ; Step D2: Substitute the calculated frequency of the user into the formula ; Step D3: Judgment Is the calculation result greater than zero? If yes, then the equations of the KKT conditions are solved to obtain the optimal communication bandwidth allocation and the user's local calculation frequency; if no, then the calculation frequency is kept unchanged and step D2 is executed again until all The result of calculation is less than or equal to zero; The mathematical expression of the KKT condition is: Among them, formula (c) to formula (f) are complementary relaxation conditions; 、 、 and are a Lagrange multiplier, another Lagrange multiplier, another Lagrange multiplier, and another Lagrange multiplier; is the number of edge aggregations; is the capacitance coefficient; For users The local calculation frequency of is the model bit size; p is the transmit power; For base stations Assign to user bandwidth; is the channel gain; is background noise; For base stations Allocatable bandwidth; 、 are the upper and lower limits of frequency respectively; is the first intermediate quantity, is the second intermediate quantity; The mathematical expression of the first intermediate quantity is: The mathematical expression of the second intermediate quantity is: described The mathematical expression is: in, Under KKT conditions Monotonically increasing.

2. The hierarchical federated learning method in a mobile social network scenario according to claim 1, characterized in that: In the step S1, it includes: Step S1.1: Based on the user scenario, derive the upper bound of energy consumption and then derive the comprehensive metric factor ; Step S1.2: Traverse all the user plans obtained and calculate the , and the comprehensive measurement factor is obtained The user combination with the smallest value ; In step S1.1, the mathematical expression of the upper bound of the energy cost is: in, represents the upper bound of energy cost; Indicates the number of edge aggregations; For the selected user set The number of users in Representing a collection The total amount of training data for all users in ; represents the upper bound of the frequency constraint; The number of times the CPU needs to run to process a single sample; Number of local training sessions; The uplink transmission power of the user; represents the user delay constraint; represents the upper bound of energy consumption of a single user; The mathematical expression of the comprehensive measurement factor is: in, represents the comprehensive measurement factor; represents the maximum convergence speed metric factor in the user solution; represents the upper bound of the maximum energy cost in the user scheme; Represents the convergence speed index; described The mathematical expression is: in, and Represents a set The amount of valid data and redundant data covered by all users; The steps of the user solution include: Step A1: according to the number of users, find an approximate upper bound and an approximate lower bound of the number of users; Step A2: Select the number of users Traversing from the approximate lower bound to the approximate upper bound, we get Group different user combinations, i.e. sets .

3. The hierarchical federated learning method in a mobile social network scenario according to claim 2, characterized in that: In step S2, the mathematical expression of the total energy cost of the gradient climb is: in, represents the total energy consumption; Indicates the number of edge aggregations; Indicates the energy consumption of uplink communication; Indicates local computing consumption; Represents a user set; Indicates the users; Indicates the base stations; represents a set of base stations; Indicates the ordinal number of the user; Indicates the ordinal number of the base station; described The mathematical expression is: in, represents the energy consumption coefficient; Indicates the sample size; Represents a user The local calculation frequency of Indicates the number of local updates; The number of times the CPU needs to run to process a single sample; described The mathematical expression is: in, Represents a user With edge servers communication relationship, Represents an edge server Assign to user bandwidth, Indicates the user's uplink transmit power. Represents a user With edge servers The channel gain between Represents the power spectrum of noise during communication; Indicates the model bit size of uplink transmission; In the random exchange, the mathematical expression of the probability is: in, represents probability; is the total energy consumption of the user before exchange, After exchanging for the user Total energy consumption, The current temperature.

4. A hierarchical federated learning system in a mobile social network scenario, characterized by: include: Module M1: Select user solutions based on N users in the social network graph; Based on the user plan, select a user combination; N is a constant; Module M2: associates the users of the user group with K edge servers, thereby obtaining multiple association schemes; K is a constant; The association scheme includes performing gradient climbing followed by random swapping; The gradient climbing includes: Module B1: Allocate an edge server to each user to obtain the total energy consumption; Module B2: moving the user to the edge server that minimizes the total energy consumption; Module B3: Determine whether the total energy consumption is reduced. If yes, re-trigger the operation of module B2; if no, stop. After the gradient climb, the random swap is performed, including: Module C1: Select two associated users within the communication range of different edge servers, and obtain the total energy consumption of the two users before and after the exchange; Module C2: Determine whether the total energy cost before the exchange is greater than the total energy cost after the exchange. If the result is yes, the exchange is accepted; if the result is no, the exchange is accepted based on probability; Module M3: Calculate the KKT condition of the association scheme, and obtain the optimal communication bandwidth allocation and user local computing frequency through alternating optimization; Wherein, the alternating optimization includes: Module D1: Let the initial calculation frequency of all users be the upper limit of the frequency, that is, ; Module D2: Substitute the calculated frequency of the user into the formula ; Module D3: Judgment Is the calculation result greater than zero? If yes, then the equations of the KKT conditions are solved to obtain the optimal communication bandwidth allocation and the user's local calculation frequency; if no, then the calculation frequency is kept unchanged and the module D2 is retriggered until all The result of calculation is less than or equal to zero; The mathematical expression of the KKT condition is: Among them, formula (c) to formula (f) are complementary relaxation conditions; 、 、 and are respectively a Lagrange multiplier, another Lagrange multiplier, another Lagrange multiplier and another Lagrange multiplier; is the number of edge aggregations; is the capacitance coefficient; For users The local calculation frequency of is the model bit size; p is the transmit power; For base stations Assign to user bandwidth; is the channel gain; is background noise; For base stations Allocatable bandwidth; 、 are the upper and lower limits of frequency respectively; is the first intermediate quantity, is the second intermediate quantity; The mathematical expression of the first intermediate quantity is: The mathematical expression of the second intermediate quantity is: described The mathematical expression is: in, Under KKT conditions Monotonically increasing.

5. The hierarchical federated learning system in the mobile social network scenario according to claim 4, characterized in that: The module M1 includes: Module M1.1: Based on the user scenario, derive the upper bound of energy consumption and then derive the comprehensive measurement factor ; Module M1.2: Traverse all the user plans obtained and calculate the , and the comprehensive measurement factor is obtained The user combination with the smallest value ; In the module M1.1, the mathematical expression of the energy consumption upper bound is: in, represents the upper bound of energy cost; Indicates the number of edge aggregations; For the selected user set The number of users in Representing a collection The total amount of training data for all users in ; represents the upper bound of the frequency constraint; The number of times the CPU needs to run to process a single sample; Number of local training sessions; The uplink transmission power of the user; represents the user delay constraint; represents the upper bound of energy consumption of a single user; The mathematical expression of the comprehensive measurement factor is: in, represents the comprehensive measurement factor; represents the maximum convergence speed metric factor in the user solution; represents the upper bound of the maximum energy cost in the user scheme; Represents the convergence speed index; described The mathematical expression is: in, and Represents a set The amount of valid data and redundant data covered by all users; The user plan includes: Module A1: according to the number of users, find the approximate upper bound and the approximate lower bound of the number of users; Module A2: Select the number of users Traversing from the approximate lower bound to the approximate upper bound, we get Group different user combinations, i.e. sets .

6. The hierarchical federated learning system in the mobile social network scenario according to claim 5, characterized in that: In the module M2, the mathematical expression of the total energy cost of the gradient climb is: in, represents the total energy consumption; Indicates the number of edge aggregations; Indicates the energy consumption of uplink communication; Indicates local computing consumption; Represents a user set; Indicates the users; Indicates the base stations; represents a set of base stations; Indicates the ordinal number of the user; Indicates the ordinal number of the base station; described The mathematical expression is: in, represents the energy consumption coefficient; Indicates the sample size; Represents a user The local calculation frequency of Indicates the number of local updates; The number of times the CPU needs to run to process a single sample; described The mathematical expression is: in, Represents a user With edge servers communication relationship, Represents an edge server Assign to user bandwidth, Indicates the user's uplink transmit power. Represents a user With edge servers The channel gain between Represents the power spectrum of noise during communication; Indicates the model bit size of uplink transmission; In the random exchange, the mathematical expression of the probability is: in, represents probability; is the total energy consumption of the user before exchange, After exchanging for the user Total energy consumption, The current temperature.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the hierarchical federated learning method in a mobile social network scenario according to any one of claims 1 to 3 are implemented.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the hierarchical federated learning method in a mobile social network scenario according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Semi-asynchronous hierarchical federated learning method and system based on air computing

    CN114866545A