CN116614498A - Federal learning client selection method, device, equipment and storage medium - Google Patents

Federal learning client selection method, device, equipment and storage medium Download PDF

Info

Publication number
CN116614498A
CN116614498A CN202310468937.0A CN202310468937A CN116614498A CN 116614498 A CN116614498 A CN 116614498A CN 202310468937 A CN202310468937 A CN 202310468937A CN 116614498 A CN116614498 A CN 116614498A
Authority
CN
China
Prior art keywords
client
edge server
clients
candidate
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310468937.0A
Other languages
Chinese (zh)
Inventor
李鹏升
黄浩
甘庭
李宗鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University WHU
Original Assignee
Wuhan University WHU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University WHU filed Critical Wuhan University WHU
Priority to CN202310468937.0A priority Critical patent/CN116614498A/en
Publication of CN116614498A publication Critical patent/CN116614498A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a federal learning client selection method, a federal learning client selection device, federal learning client selection equipment and a federal learning client selection storage medium, wherein the federal learning client selection method comprises the following steps: sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server; calculating a time delay score of each client in the candidate client set of each edge server, and determining a candidate client set with the highest score; marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked. The method and the system effectively solve the problem of client attribution of the overlapping areas of the plurality of edge servers, quicken the convergence rate of the model and improve the calculation efficiency.

Description

Federal learning client selection method, device, equipment and storage medium
Technical Field
The present invention relates to the field of federal learning technologies, and in particular, to a federal learning client selection method, apparatus, device, and storage medium.
Background
With the rapid development of the internet, a large amount of data is generated in the network every day, which brings opportunities to the field of artificial intelligence based on learning. Unlike traditional federal learning, in hierarchical federal learning, terminal devices do not interact directly with a central server any more, but upload model parameters to an edge server with a shorter communication distance, and the edge server trains clients inside the edge server for a plurality of rounds and then uploads the model parameters to the central server for aggregation. This greatly reduces communication time and provides a more stable network connection. Unlike the central server, the edge server is generally only responsible for selecting and training clients in a small area, which results in an overlapping area, wherein the clients are simultaneously located in a plurality of edge servers, and when the edge servers independently select the clients, the situation that a plurality of edge servers simultaneously select the same client is avoided, and the edge servers are limited in computing capacity and communication capacity of the clients, and can only participate in one edge server for training, so that the time of the whole training is greatly prolonged.
Disclosure of Invention
The application mainly aims to provide a federal learning client selection method, a federal learning client selection device, federal learning client selection equipment and a federal learning client selection storage medium, wherein clients can be selected for each edge server in turn according to the budget of each edge server, the client attribution problem of overlapping areas of a plurality of edge servers is effectively solved, meanwhile, the training efficiency is ensured, the client set with low time delay and low price is selected for training, the convergence speed of a model is greatly accelerated, and the calculation efficiency is improved.
In a first aspect, the present application provides a federal learning client selection method, the method comprising the steps of:
sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server;
calculating a time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is a return brought to the server by the clients participating in training;
marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
With reference to the first aspect, as an optional implementation manner, determining a return ratio of the client in the area corresponding to each edge server according to a ratio of estimated returns sent by the client to the edge servers to bidding prices of the client;
ordering the clients in the area corresponding to each edge server according to the descending order of the return ratio, and finding out the minimum client meeting the budget of each edge server;
taking the minimum client as a critical, and selecting clients arranged in front of the minimum client one by one;
and generating a candidate client set according to the selected clients.
With reference to the first aspect, as an optional implementation manner, the method is according to the formula
For the kth round of training, client j pays back based on upper bound confidence UCB under edge server e,/I>Delay score for UCB of client, < +.>For client i whether in the kth round has been selected by the server, the +.>For the k-th round of training, the budget for each edge server e.
With reference to the first aspect, as an optional implementation manner, when the client is selected, the method is according to a formula Limiting selected clients, whereinFor the kth round, client i participates in the training of the reward in edge server e,/- >For the kth round, whether client i is selected to participate in the training in edge server e, +.>For the kth round, the edge server e selects the set of clients.
With reference to the first aspect, as an optional implementation manner, the method is according to the formula Calculating a delay score of the client side training round, wherein +.>For the delay score of the kth client i under edge server e,/for the K client i>For the kth round, edge server e receives the model parameter time of client i, +.>For the start time of the kth training, t max A maximum time for a round of training is predefined;
through the time delay score of the client side self-training, according to the formula Calculating an average delay score of all clients in the candidate set of clients, wherein +.>To cut-off in the k-1 th round of training, client i is selected by edge server e for a number of times,/v>In the k-1 round of training, the time delay score of the client i in the edge server e is that alpha is a parameter for adjusting the historical time delay, and beta is a parameter for adjusting the time delay of the round;average time delay score of all clients in the client set, < ->To cut off to the kth round, the number of times client i is selected by edge server e;
and determining the candidate client set with the highest score according to the sum of the time delay scores of all clients in the candidate client set.
With reference to the first aspect, as an optional implementation manner, a model is initialized through a central server and distributed to each edge server;
each edge server independently trains each client in the candidate client set corresponding to the model issuing;
after each client is trained independently, the model parameters obtained through training are uploaded to the corresponding edge server, and the time of receiving the model parameters of each client is recorded through the edge server so as to update the selected times and the time delay score of the client.
With reference to the first aspect, as an optional implementation manner, according to the number of local training rounds of the edge servers, the latest model parameters are uploaded to the central server for aggregation, and after the central server completes aggregation, the latest model parameters are issued to each edge server again, so as to update the local model of the edge server.
In a second aspect, the present application provides a federal learning client selection apparatus, the apparatus comprising:
the selecting module is used for sequencing the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server so as to determine a candidate client set of each edge server;
A calculation module, configured to calculate a latency score of each client in the candidate client set of each edge server, and determine a candidate client set with the highest score, where the latency score is a return that the client participating in training brings to the server;
and the marking module is used for marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
In a third aspect, the present application also provides an electronic device, including: a processor; a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of the first aspects.
In a fourth aspect, the present application also provides a computer readable storage medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method of any one of the first aspects.
The application provides a federal learning client selection method, a federal learning client selection device, federal learning client selection equipment and a federal learning client selection storage medium, wherein the federal learning client selection method comprises the following steps: sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server; calculating a time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is a return brought to the server by the clients participating in training; marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked. According to the application, the client can be selected for each edge server in turn according to the budget of each edge server, the problem of client attribution of the overlapping area of a plurality of edge servers is effectively solved, meanwhile, the training efficiency is ensured, the client set with lower time delay and low price is selected for training, the convergence speed of the model is greatly accelerated, and the calculation efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flowchart of a method for selecting a federal learning client according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a federal learning client selection apparatus according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a computer readable program medium according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
The embodiment of the application provides a federal learning client selection method, a federal learning client selection device, federal learning client selection equipment and a federal learning client selection storage medium, which can select a client for each edge server in turn according to the budget of each edge server, effectively solve the client attribution problem of a plurality of overlapping areas of the edge servers, ensure the training efficiency at the same time, and train a client set with low selection time delay and low price, thereby greatly accelerating the convergence speed of a model and improving the calculation efficiency.
In order to achieve the technical effects, the application has the following general ideas:
a federal learning client selection method, the method comprising the steps of:
s101: and ordering the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server.
S102: and calculating the time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is the return brought to the server by the clients participating in training.
S103: marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
Embodiments of the present application are described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a federal learning client selection method provided by the present application, and as shown in fig. 1, the method includes the steps of:
and step S101, sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server.
Specifically, for an edge server e, clients in an area corresponding to the server are sorted according to descending order of the return ratio, a minimum client j meeting the budget of each edge server is found, and a client in front of j is selected by taking j as a critical so as to generate a candidate client set. It should be noted that the return ratio is the ratio of the estimated return sent by the client to the edge server to the bidding price of the client, i.e. the return obtained per unit bidding. It should be noted that, similar to the base station, the edge server is only responsible for selecting and training the clients in one area, and ordering the clients in the area corresponding to the server according to the descending order of the return ratio can reduce the delay caused by the effect of the dequeue, thereby accelerating the training process.
In one embodiment, budget B in each training round of each edge server is preset, as many clients as possible are selected under the budget B, and the clients are sorted according to the reverse order of r/B (return ratio), that is, the clients are selected one by one before the return ratio, as followsEnsuring authenticity and individuality, paying a reward P to each winning client by adopting a critical payment rule, finding out the smallest client j meeting the budget due to limited budget, obtaining the reward when the client before j wins, and judging whether the sum paid out of the budget of the edge server, wherein the reward is compared with the reverse order to select the client to maximally utilize the total budget to select the client as much as possible, each edge server selects the client as much as possible by the operation, and generating a candidate client set corresponding to each edge server by utilizing the selected client
It should be noted that, the budget of each edge server is preset, not calculated, for example, the budget of each edge server is set to 100. Because the budget of each round of edge servers is limited, and the number of clients in the responsible range of each round of edge servers is large, only part of clients can be selected to participate in the round of training according to the budget.
Competitive price with edge server e, < +_>For the kth round of training, client j pays back based on upper bound confidence UCB under edge server e,/I>Delay score for UCB of client, < +.>For client i to have been selected by the server in the kth round,for the k-th round of training, the budget for each edge server e.
In one embodiment, when a client is selected, the client is selected according to the formula Limiting the selected clients, wherein +.>For the kth round, client i participates in the training of the reward in edge server e,/->For the kth round, whether client i is selected to participate in the training in edge server e, +.>For the kth round, the edge server e selects the set of clients.
It should be noted that, with the assurance of authenticity and individuality, clients are not usually non-sensible machines, but rather, rational and selfish individuals, who are not willing to participate in the training if their profits cannot be guaranteed, because of the need to consume resources and time of the server.
Also to be noted is the formula:is that the sum of rewards of the selected clients for any one edge server e does not exceed the limit of the budget of the client, and the formulaIs that for any client selected by the edge server, his compensation is greater than his own bidding price, formula +. >The client value range is 0 and 1,0 is not selected by the client, 1 is selected by the client, and the formula +.> And cannot be selected by multiple edge servers on behalf of the same client.
Step S102, calculating a time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is a return brought to the server by the clients participating in training.
Specifically, according to the formulaCalculating a delay score for a client's own run of training, whereinFor the delay score of the kth client i under edge server e,/for the K client i>For the kth round, edge server e receives the model parameter time of client i, +.>For the start time of the kth training, t max For predefining a maximum time for a round of training. It should be noted that the time delay score may be understood as a return that the client participating in the training brings to the server.
Through the time delay score of the client side self-training, according to the formula Calculating an average delay score of all clients in the candidate set of clients, wherein +.>To cut-off in the k-1 th round of training, client i is selected by edge server e for a number of times,/v>In the training of the k-1 round, the time delay score of the client i at the edge server e is that alpha is a parameter for adjusting the historical time delay, and beta is a parameter for adjusting the time delay of the round. It should be noted that, the average delay score is a weighted value of the client history score, and is understood as a history average return.
It should be noted that the average delay score is obtained by weighting and calculating the delay score of the current round and the average delay score of the previous round of the client i under the edge server e. The average delay score is calculated to have a latest evaluation on the delay of the client, and the change of the network environment of the client causes the average delay score to change, for example, if the network environment of the client becomes worse, after the round is finished, the average delay score of the client under the edge server is reduced, so that the selection of the client in the next round is affected.
The average latency score is used to calculate a UCB-based latency score that directly affects the selection of the next round of clients.
It should be further noted that, the latest delay of the client is often more representative of the network condition of the client at this time, so the importance is usually higher than the historical delay, and the latest delay may be fixed to specific values, such as α=1 and β=2, when implemented.
Average time delay score of all clients in the client set, < ->To cut off to the kth round, client i is selected by edge server e a number of times.
And determining the candidate client set with the highest score according to the sum of the time delay scores of all clients in the candidate client set.
For example, according to the determined candidate clients corresponding to each edge serverCalculating the time delay scores of UCB of all clients in each candidate client to determine the total score of all candidate clients, namely +.>And (3) summing.
It should be noted that UCB is an upper confidence-bound algorithm, and the idea is that a client with a high current average delay score has high availability, and a client that is not selected or has a small number of selections has high exploration value, the exploration value can be measured by uncertainty measure, and the upper bound of the sum of the two is taken to replace the delay evaluation of the client.
The UCB delay score is calculated by an average delay score, and the UCB delay score is calculated mainly for better balancing the relationship between exploration and utilization when the client is selected.
And step S103, marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
Specifically, the edge servers of the selected clients are marked as Edge servers of unselected clients are marked +.>Wherein k is the training round number, and e is the edge server;
marking edge server selected clients asClients not selected by the edge server are marked asWhere k is the training round number and i is the client.
For ease of understanding, first, all edge servers are ranked in reverse order according to the return ratio, and clients are selected, where each edge server has a candidate client set (where the clients in the respective sets may overlap), then the total score of the clients in each edge server candidate set is calculated, the set with the highest score is selected, and at the same time, this client set and its corresponding edge server are marked as selected, and the candidate client sets of other edge servers are emptied, and the above procedure is repeated. For example: a, b and c are three edge servers, candidate client sets obtained through calculation in this round are a1, b1 and c1 respectively, and if all clients in a1 have the highest score, the clients in a1 are marked as selected, and b1 and c1 are all emptied; the above procedure is then repeated for b and c (clients that have been marked as selected cannot be candidate again).
It will be appreciated that each is calculatedIs +.>The sum of which is selected and the largest edge server is marked as selected +.>At the same time set its clients +.>Marked as selected, i.eEmpty all-> After the set of the candidate clients of the edge server, repeating the above operations on the rest of the edge servers until all the edge servers have been selected.
In one embodiment, an intermediate cloud server, S edge servers and N clients are defined, each edge server having a plurality of clients, and phi is defined e,t Is the set of clients within range of edge server e at turn t, there may be an overlap region (overlay) between different edge servers, i.eBecause of the computing power and bandwidth limitation of the clients, the clients in the overlapping area can only participate in the training of one edge server every round. In the training of the kth round, it is assumed that the start time is +.>Client i presents a bid of participating itself in the training of edge server e>Use-> Representing that client i participates in training of edge server e in the kth round, +.>Vice versa, use->Indicating that client i has not been selected by any client at round k,/is not selected by any client >Then the indication has been selected. The client set selected by the edge server e in the t-th round is +.>And gives a compensation of +/for each of the clients>While the edge server e budget at this round (round t) is +.>The edge server e receives the model parameter time of client i as +.>The maximum time of one training round is t max I.e. exceeding t max The back edge server no longer receives the model parameters of the client, ">To cut off to the kth round, client i is selected by edge server e a number of times.
In one embodiment, a model is initialized by a central server and distributed to each edge server; each edge server independently trains each client in the candidate client set corresponding to the model issuing; after each client is trained independently, the model parameters obtained through training are uploaded to the corresponding edge server, and the time of receiving the model parameters of each client is recorded through the edge server so as to update the selected times and the time delay score of the client. It should be noted that, the edge server has no model at the beginning, and after the cloud server issues the model to the edge server, the edge server can distribute the model to the client for local training.
In one embodiment, the problem of minimizing the training time per round may be modeled as a formulaIt should be noted that minimizing the modeling is to make each round as short as possible to shorten the overall training process of federal learning.
In one embodiment, each edge server a distributes models to collectionsAfter the training is completed locally, each client uploads the model parameters to the corresponding edge server, and the edge server records the time when each client model parameter is received, and updates the selected times of the client +.>And calculate +.>And update->Further calculate the UCB-based delay score +.>And meanwhile, the edge server completes the parameter aggregation of the round.
Tc is a user-defined value indicating how many rounds of edge server local training each time an edge server passes, the edge server uploading model parameters to the central server.
In one embodiment, tc=0, each edge server uploads the latest model parameters to the central server for aggregation, and after the central server completes aggregation, the latest model parameters are issued to each edge server again, and the edge servers update their own local models.
In one embodiment, experiments are performed at various different budgets of the edge server, respectively. S=4 edge servers are used, n=40 clients. The data amount of each client is the same, but not independent and distributed (Non-iid), the bid of each client in each round is constant (0.5, 1), the budget of each round of each edge server is unified as B, and the longest time t of each round in MNIST data set max =10s, maximum time t per round in CIFAR10 dataset max =120 s, per T c When=3 rounds, the edge server uploads the model to the central server for aggregation, fixing training 30 rounds.
It can be understood that the application combines the historical time delay and training quality of the client through the bidding situation of the client, and sequentially selects the client for each edge server according to the budget of each edge server, thereby effectively solving the problem of overlapping areas of the edge servers, ensuring the training efficiency and the authenticity, individuality and calculation efficiency of the bidding of the user.
Referring to fig. 2, fig. 2 is a schematic diagram of a federal learning client selection apparatus according to the present application, where, as shown in fig. 2, the apparatus includes:
selection module 201: the method is used for sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server.
The calculation module 202: the method is used for calculating the time delay score of each client in the candidate client set of each edge server and determining the candidate client set with the highest score, wherein the time delay score is the return brought to the server by the clients participating in training.
Marking module 203: the method is used for marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
Further, in one possible implementation manner, the selection module 201 is further configured to determine a return ratio of the client in the area corresponding to each edge server according to a ratio of the estimated return sent by the client to the edge server to the bidding price of the client;
ordering the clients in the area corresponding to each edge server according to the descending order of the return ratio, and finding out the minimum client meeting the budget of each edge server;
taking the minimum client as a critical, and selecting clients arranged in front of the minimum client one by one;
and generating a candidate client set according to the selected clients.
Further, in a possible implementation manner, the computing module 202 is further configured to rootBid price->For the kth round of training, client j pays back based on upper bound confidence UCB under edge server e,/I >Delay score for UCB of client, < +.>For client i whether in the kth round has been selected by the server, the +.>For the k-th round of training, the budget for each edge server e.
Further, in a possible implementation manner, the method further includes a limiting module, configured to, when the client is selected, perform a process according to a formula Limiting the selected clients, wherein +.>For the kth round, client i participates in the training of the reward in edge server e,/->For the kth round, whether client i is selected to participate in the training in edge server e, +.>For the kth round, the edge server e selects the set of clients.
Further, in a possible implementation manner, the calculating module 202 is further configured to calculate the formula according to the formulaCalculating a delay score of the client side training round, wherein +.>For the delay score of the kth client i under edge server e,/for the K client i>For the kth round, edge server e receives the model parameter time of client i, +.>For the start time of the kth training, t max A maximum time for a round of training is predefined;
through the time delay score of the client side self-training, according to the formula Calculating an average delay score of all clients in the candidate set of clients, wherein +.>To cut-off in the k-1 th round of training, client i is selected by edge server e for a number of times,/v >In the k-1 round of training, the time delay score of the client i in the edge server e is that alpha is a parameter for adjusting the historical time delay, and beta is a parameter for adjusting the time delay of the round;average time delay score of all clients in the client set, < ->To cut off to the kth round, the number of times client i is selected by edge server e;
and determining the candidate client set with the highest score according to the sum of the time delay scores of all clients in the candidate client set.
Further, in one possible implementation manner, the system further comprises an updating module, which is used for initializing the model through the central server and distributing the model to each edge server;
each edge server independently trains each client in the candidate client set corresponding to the model issuing;
after each client is trained independently, the model parameters obtained through training are uploaded to the corresponding edge server, and the time of receiving the model parameters of each client is recorded through the edge server so as to update the selected times and the time delay score of the client.
Further, in one possible implementation manner, the updating module is further configured to upload the latest model parameters to the central server according to the local training round number of the edge servers for aggregation, and send the latest model parameters to each edge server again after the central server completes aggregation, so as to update the local model of the edge server.
An electronic device 300 according to this embodiment of the invention is described below with reference to fig. 3. The electronic device 300 shown in fig. 3 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 3, the electronic device 300 is embodied in the form of a general purpose computing device. Components of electronic device 300 may include, but are not limited to: the at least one processing unit 310, the at least one memory unit 320, and a bus 330 connecting the various system components, including the memory unit 320 and the processing unit 310.
Wherein the storage unit stores program code that is executable by the processing unit 310 such that the processing unit 310 performs the steps according to various exemplary embodiments of the present invention described in the above-mentioned "example methods" section of the present specification.
The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a Random Access Memory (RAM) 321 and/or a cache memory 322, and may further include a Read Only Memory (ROM) 323.
The storage unit 320 may also include a program/utility 324 having a set (at least one) of program modules 325, such program modules 325 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 330 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 300 may also communicate with one or more external devices (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and/or any device (e.g., router, modem, etc.) that enables the electronic device 300 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 350. Also, electronic device 300 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 360. As shown, the network adapter 360 communicates with other modules of the electronic device 300 over the bus 330. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 300, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, including several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
According to an aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when said program product is run on the terminal device.
Referring to fig. 4, a program product 400 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
In summary, the present application provides a federal learning client selection method, apparatus, device, and storage medium, where the method includes the steps of: sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server; calculating a time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is a return brought to the server by the clients participating in training; marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked. According to the application, the client can be selected for each edge server in turn according to the budget of each edge server, the problem of client attribution of the overlapping area of a plurality of edge servers is effectively solved, meanwhile, the training efficiency is ensured, the client set with lower time delay and low price is selected for training, the convergence speed of the model is greatly accelerated, and the calculation efficiency is improved.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Claims (10)

1. A federal learning client selection method, comprising:
sorting the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server to determine a candidate client set of each edge server;
calculating a time delay score of each client in the candidate client set of each edge server, and determining the candidate client set with the highest score, wherein the time delay score is a return brought to the server by the clients participating in training;
marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
2. The method of claim 1, wherein the ranking the clients in the area corresponding to each edge server according to the payback ratio and selecting the clients that meet the budget of each edge server to determine the candidate client set of each edge server comprises:
Determining the return ratio of the client in the area corresponding to each edge server according to the ratio of the estimated return sent by the client to the edge server and the bidding price of the client;
ordering the clients in the area corresponding to each edge server according to the descending order of the return ratio, and finding out the minimum client meeting the budget of each edge server;
taking the minimum client as a critical, and selecting clients arranged in front of the minimum client one by one;
and generating a candidate client set according to the selected clients.
3. The method according to claim 2, characterized in that:
bid price of the machine e,for the kth round of training, client j pays back based on upper bound confidence UCB under edge server e,/I>Delay score for UCB of client, < +.>For client i whether in the kth round has been selected by the server, the +.>For the k-th round of training, the budget for each edge server e.
4. The method as recited in claim 2, further comprising:
when a client is selected, it is according to the formula Limiting the selected clients, wherein +.>For the kth round, client i participates in the training of the reward in edge server e,/- >For the kth round, whether client i is selected to participate in the training in edge server e, +.>For the kth round, the edge server e selects the set of clients.
5. The method of claim 1, wherein said calculating the latency score for each client in the candidate client set for each edge server and determining the candidate client set with the highest score comprises:
according to the formulaCalculating a delay score of the client side training round, wherein +.>For the delay score of the kth client i under edge server e,/for the K client i>For the kth round, edge server e receives the model parameter time for client i,for the start time of the kth training, t max A maximum time for a round of training is predefined;
through the time delay score of the client side self-training, according to the formula Calculating an average delay score of all clients in the candidate set of clients, wherein +.>To cut-off in the k-1 th round of training, client i is selected by edge server e for a number of times,/v>In the k-1 round of training, the time delay score of the client i in the edge server e is that alpha is a parameter for adjusting the historical time delay, and beta is a parameter for adjusting the time delay of the round;average time delay score of all clients in the client set, < - >To cut off to the kth round, the number of times client i is selected by edge server e;
and determining the candidate client set with the highest score according to the sum of the time delay scores of all clients in the candidate client set.
6. The method according to claim 1, characterized in that it comprises:
initializing a model through a central server and distributing the model to each edge server;
each edge server independently trains each client in the candidate client set corresponding to the model issuing;
after each client is trained independently, the model parameters obtained through training are uploaded to the corresponding edge server, and the time of receiving the model parameters of each client is recorded through the edge server so as to update the selected times and the time delay score of the client.
7. The method as recited in claim 1, further comprising:
and uploading the latest model parameters to the central server for aggregation according to the local training round number of the edge servers, and retransmitting the latest model parameters to each edge server after the central server completes aggregation so as to update the local model of the edge server.
8. A federal learning client selection apparatus, comprising:
The selecting module is used for sequencing the clients in the area corresponding to each edge server according to the return ratio, and selecting the clients meeting the budget of each edge server so as to determine a candidate client set of each edge server;
a calculation module, configured to calculate a latency score of each client in the candidate client set of each edge server, and determine a candidate client set with the highest score, where the latency score is a return that the client participating in training brings to the server;
and the marking module is used for marking all clients in the candidate client set with the highest score and the edge servers corresponding to the candidate client set with the highest score as selected, and emptying the candidate client sets of the rest unmarked edge servers until all the edge servers are marked.
9. An electronic device, the electronic device comprising:
a processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it stores computer program instructions, which when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 7.
CN202310468937.0A 2023-04-26 2023-04-26 Federal learning client selection method, device, equipment and storage medium Pending CN116614498A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310468937.0A CN116614498A (en) 2023-04-26 2023-04-26 Federal learning client selection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310468937.0A CN116614498A (en) 2023-04-26 2023-04-26 Federal learning client selection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116614498A true CN116614498A (en) 2023-08-18

Family

ID=87677209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310468937.0A Pending CN116614498A (en) 2023-04-26 2023-04-26 Federal learning client selection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116614498A (en)

Similar Documents

Publication Publication Date Title
US11848826B2 (en) Hyperparameter and network topology selection in network demand forecasting
KR102012373B1 (en) Method for auto-trading based on searching stock item by the stock trading server
CN108446382B (en) Method and apparatus for pushed information
CN109802998A (en) A kind of mist network cooperating scheduling motivational techniques and system based on game
CN107547214A (en) Group&#39;s reading method, electronic equipment and computer-readable storage medium based on e-book
CN112491964B (en) Mobile assisted edge calculation method, apparatus, medium, and device
US20200334609A1 (en) Adaptive multiyear economic planning for energy systems, microgrid and distributed energy resources
CN105913244A (en) Multi-user business data processing method and system
Xu et al. Cost-aware resource management for federated clouds using resource sharing contracts
CN109741177A (en) Appraisal procedure, device and the intelligent terminal of user credit
CN107230004A (en) A kind of regenerative resource portfolio optimization optimization method, device and computing device
Han et al. Tiff: Tokenized incentive for federated learning
CN112749824A (en) Information delivery optimization method and system, electronic device and storage medium
CN116614498A (en) Federal learning client selection method, device, equipment and storage medium
KR102513416B1 (en) Simultaneous multiple power trading method in a microgrid composed of M producers and N consumers
CN110648164A (en) Method and device for determining marginal electricity price interval of node
US20230089895A1 (en) System and methods for bid optimization in real-time bidding
CN111724176A (en) Shop traffic adjusting method, device, equipment and computer readable storage medium
KR102590112B1 (en) Coded and Incentive-based Mechanism for Distributed Training of Machine Learning in IoT
CN110210885A (en) Excavate method, apparatus, equipment and the readable storage medium storing program for executing of potential customers
Bernasconi et al. Dark-pool smart order routing: a combinatorial multi-armed bandit approach
CN112165721A (en) Multi-service task unloading and service migration method based on edge computing
Gao et al. A real-time task offloading strategy based on double auction for optimal resource allocation in edge computing
AU2020202643A1 (en) Adaptive multiyear economic planning method for energy systems, microgrid and distributed energy resources
Fan et al. A Learning-based Incentive Mechanism for Mobile AIGC Service in Decentralized Internet of Vehicles

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination