A data federation learning method based on reservation hierarchy

By adjusting the client's training and upload time through a reservation-based tiered mechanism, the congestion and waiting problems caused by heterogeneous communication resources in federated learning are resolved, improving communication efficiency and privacy protection, and making it suitable for various practical scenarios.

CN117313833BActive Publication Date: 2025-11-25KASHGAR ELECTRONIC INFORMATION IND TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311124294.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-11-25
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

Existing federated learning suffers from communication congestion and excessively long waiting times due to heterogeneous communication resources, and it does not fully utilize client resources, posing a risk of privacy leaks.

Method used

A tiered reservation mechanism is adopted, which selects clients for different local training rounds in each round of federated learning communication and staggers model upload times. Combined with the server's communication resource constraints, the training and upload times of clients are adjusted in different levels to reduce communication congestion and privacy leaks.

Benefits of technology

It improves the communication efficiency and reliability of federated learning, makes full use of client resources, reduces the risk of privacy leakage during model upload, and is suitable for scenarios such as pedestrian re-identification in the Internet of Things, credit default prediction in financial institutions, and disease risk prediction in medical units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313833B_ABST
    Figure CN117313833B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of federated learning, and discloses a federated learning method based on pre-booking grading. A server sends global model parameters and pre-booking rules to a bookable client in a current round. The bookable client performs local model training and generates a booking request to upload to the server. The server determines a booking result of the current round according to the booking request and sends the booking result to a selected client in the current round. The selected client continues to complete local training according to the booking result and uploads trained local model parameters to the server. The server opens an upload channel of the client in communication according to the upload time period in the booking result and aggregates local model parameters of each client to update global model parameters. The application comprehensively considers changes in communication resources of a server in actual deployment of federated learning, flexibly adjusts a federated learning communication mechanism, and improves availability and reliability of federated learning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of federated learning, and particularly relates to a federated learning method based on reservation grading. BACKGROUND

[0002] With the development of the big data era, people produce various types of data every day in daily life, and these data (such as power data, financial data, etc.) are collected and used by many enterprises and departmental organs. The continuous flow of data in time and space brings economic value. However, the problems of data security and data privacy have also been paid attention to, and relevant laws and regulations have been promulgated by countries and regions to protect data privacy. Among them, federated learning is a new distributed model training method that breaks the traditional data centralized model training, aiming at keeping data in local. As shown in the figure, federated learning mainly trains models by different participants using their local data sets, and then aggregates the local training models of multiple parties into a global model through privacy protection, model aggregation and other technologies. In this way, the data of each participant is kept in the local, reducing the risk of data leakage, while the global model can learn the characteristics of the data of each party. However, in federated learning, the client waits for too long to upload the model, which cannot quickly aggregate and update the global model; moreover, the actual communication resource situation of different clients and servers in the running process and the possible communication resource fluctuation in the actual training process are not considered. Figure 1

[0003] Compared with the data transmission in the training process of traditional data centralized machine learning, the communication between the server and the client in the process of federated learning training is mainly the uploading and downloading of models; in the process of model uploading, the server appears communication congestion due to too many clients; moreover, the same training rounds are performed by clients with different computing resources, without fully considering the heterogeneous resource situation of clients in federated learning, so that the clients are not fully utilized. In order to improve the communication efficiency in the process of model transmission, different researchers have proposed different strategies, some researchers have proposed local training adjustment strategy and adaptive client clustering strategy based on weighted voting, which adjusts the training times of clients during local training, and then clusters the client models through weighted voting during model aggregation and then aggregates the models. Some researchers use dynamic sampling and top-k selection to shield to optimize the communication efficiency in federated learning. Obviously, more current research focuses on communication efficiency optimization. The clients ignore the privacy leakage problem and the attack of malicious clients to honest clients in the process of model uploading and downloading in the communication process of federated learning. SUMMARY

[0004] ​In view of the above problems existing in the prior art, the present application aims to provide a federated learning method based on reservation grading under the condition of server communication resource constraint, improve the efficiency of federated learning, reduce the invalid communication consumption in the federated learning training process, and at the same time avoid the aggregation failure or too long waiting time caused by the communication resource heterogeneity between different clients and servers in the model aggregation process, improve the model communication efficiency of federated learning, and reduce the possible privacy leakage problem in the model transmission process.

[0005] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions.

[0006] The present application provides a federated learning method based on reservation grading, which comprises the following steps:

[0007] S1. The server sends the initialized global model parameters or the global model parameters obtained by the previous round of training, and the current round of model training communication reservation rules to the reservable clients in the current round;

[0008] S2. The reservable clients in the current round perform local model training, and generate reservation requests according to the reservation rules and upload them to the server;

[0009] S3. The server determines the reservation result of the current round according to the reservation request, and sends it to the selected clients in the current round;

[0010] S4. The selected clients continue to complete the local training according to the reservation result, and upload the trained local model parameters to the server;

[0011] S5. The server opens the upload channel of the clients in communication according to the upload time period in the reservation result, and aggregates the collected local model parameters of each client to update the global model parameters;

[0012] Repeat the above steps S1 to S5 until the global model parameters reach the predetermined target.

[0013] This invention proposes a federated learning method based on a hierarchical reservation mechanism. During each round of federated learning communication, the hierarchical reservation mechanism selects clients from different local training rounds, allowing clients with different data and computing resources to maximize their role in federated learning. Simultaneously, by staggering the model submission times of clients at different levels, server congestion is avoided, enabling better deployment of federated learning in real-world scenarios (e.g., IoT pedestrian re-identification and detection, financial institution credit default prediction, and medical unit disease risk prediction). The federated learning method provided by this invention is applicable to various global model network structures (which are also the local model network structures of each client), such as ResNet, CNN, and RNN networks.

[0014] In step S1 above, the interaction occurs between the server and several clients connected to the server. Initially, the server randomly initializes the global model parameters according to the target task, and uses these initialized global model parameters as the global model parameters for the first round of training in step S1.

[0015] In a specific implementation, step S1 above includes the following sub-steps:

[0016] S11 uses all active clients in the current round as the clients eligible to participate in the reservation for the current round, and determines the sending time and reservation rules for each eligible client.

[0017] S12 sends the initialized global model parameters or the global model parameters obtained from the previous training round, along with the reservation rules, to the corresponding reservationable client according to the sending time.

[0018] In step S11 above, the active client refers to a client that is currently online and connected to the server via a network. The reservation rules include the number of local model training sessions that can be reserved for the client and the reservation time.

[0019] Step S2 above includes the following sub-steps:

[0020] The S21 reservation client updates its local model parameters based on the global model parameters sent by the server.

[0021] The S22 reservation client uses local data to train an updated local model until the reservation time is reached, and obtains the number of times the local model of the reservation client has been trained.

[0022] The S23 reservation client evaluates the local model training effect according to the maximum local model training times required in the reservation rule, generates a reservation request for the local model training times and the reservation willingness time period that meet the reservation rule, and uploads the reservation request to the server; if the reservation rule is not met, the reservation client program is terminated.

[0023] The above step S3 includes the following sub-steps:

[0024] S31 The server receives the reservation application sent by each reservation client within the reservation time;

[0025] S32 The server determines the selected client in each upload time period in the current round according to the reservation request of each reservation client and the first client selection rule.

[0026] S33 The server sends the reservation result of the final upload time and the local model training times of the selected client to the corresponding client.

[0027] In the above step S31, the reservation client that does not receive the reservation application within the reservation time is regarded as a client that has been closed in the current round and does not participate in the subsequent operation in the current round.

[0028] In the above step S32, the server determines the upload time period according to the reservation willingness time period of the received reservation client, divides the upload time period into different levels, determines the maximum number of selected clients in the upload time period of different levels in the current round according to the latest evaluation of the communication resource constraint, for example, according to the current time width or the actual throughput divided by the current model parameter amount, and determines the selected client in combination with the first client selection rule and the received reservation request of the reservation client.

[0029] The first client selection rule is shown in formula (1):

[0030]

[0031] Wherein, indicates whether the client i is selected in the kth level upload time period, 1 indicates that the client i is selected in the kth level upload time period, 0 indicates that the client i is not selected in the kth level upload time period, n indicates the number of all clients, x i indicates the local model training times submitted by the client i when applying for reservation of the current global model training, T i indicates the number of rounds in which the client i participates in the global model training.

[0032] Before calculating formula (1), the following constraint conditions need to be met:

[0033]

[0034] wherein, r i k = 0 means that the client i does not apply, r i k = 1 means that the client i applies to reserve the kth level upload time period, R i k = 1 means that the client i applies to reserve the kth level upload time period, R k represents the total number of clients allowed to participate in model uploading in the kth level upload time period of the current server (determined by step S32).

[0035] If the number of selected clients for each upload time period in the current round does not meet the preset requirement, then according to the second client selection rule, the unselected reserving clients before each upload time period are further determined as the selected clients for the corresponding upload time period in the current round.

[0036] That is, if formula (2) cannot be met, the unselected reserving clients before each level upload time period (j = 0, 1,..., k-1) in the global model training are added to the reservation for the kth level upload time period in the current round, and the corresponding second client reservation rule is:

[0037]

[0038] wherein, represents whether the client i is selected in the reservation of the kth level upload time period in the current round, represents that the client i is not selected in the reservation of the kth level upload time period, n represents the number of all clients, x i represents the number of local model training submitted by the client i when applying for reservation in the current round of global model training, q i represents whether the client i who is reserved but unselected in each level upload time period before the kth level upload time period is selected in the kth level upload time period, q i = 1 means that the client i is selected in the reservation of the kth level upload time period, q i = 0 means that the client i is not selected in the reservation of the kth level upload time period, T i represents the number of rounds of global model training in which the client i participates.

[0039] Before calculating formula (3), the following constraint conditions need to be met:

[0040]

[0041] In the above step S33, the formula (1) is satisfied or satisfy formula (3) and q i =1 as the selected client; reset the upload time and the number of local model training of the selected client, and take both as the generated reservation result. Then send the generated reservation result to the corresponding client.

[0042] In the above step S4, each selected client determines the upload time period and the number of local model training according to the reservation result returned by the server; and packs the local model parameters of the selected client that meets the reservation result.

[0043] For the selected client of the kth level upload time period in the current round, when the upload time of the reservation result is reached, the selected client judges whether the number of local model training in the upload time period meets the number of local model training requirement in the reservation result. If it is met, the training is stopped, and the trained local model parameters are packed and sent to the server; if it is not met, the local model continues to be trained until the number of local model training requirement in the reservation result is met, and then the training is stopped, and the trained local model parameters are packed and sent to the server.

[0044] The above step S5 includes the following sub-steps:

[0045] S51 The server opens the upload channel of the corresponding selected client according to the set upload time period, accepts the local model parameters sent from different clients, and judges whether it meets the reservation result. If it meets the reservation result, the local model parameters sent by the selected client are accepted; if it does not meet the reservation result, the local model parameters sent by the selected client are rejected; until all selected clients in different levels of upload time period complete uploading or reach the predetermined cutoff time period;

[0046] S52 The server aggregates all received local model parameters to generate the global model parameters of the current round;

[0047] S53 judge whether the global model parameters meet the predetermined convergence condition. If the predetermined convergence condition is met, the training is stopped; otherwise, return to step S1 for the next round of global model training.

[0048] In the above step S51, the channel is opened until the end of each upload time period, regardless of whether all local model parameters of the selected client are received; if all local model parameters of the corresponding client are accepted in advance, the channel time can be ended in advance.

[0049] Compared with the prior art, the present application has the following beneficial effects:

[0050] 1) The application comprehensively considers the changes of communication resources of the server that may occur in the actual deployment of federated learning, can flexibly adjust the federated learning communication mechanism under different communication resources, and improves the availability and reliability of federated learning.

[0051] 2) The application makes full use of the computing resources of different clients under the heterogeneous client resources in federated learning, improves the model communication efficiency of federated learning.

[0052] 3) The application classifies and reserves different clients, thereby reducing the influence of malicious clients on the global model in the model uploading process. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 It is a schematic diagram of the process of the traditional federated learning method.

[0054] Figure 2 It is a schematic diagram of the process of the federated learning method based on reservation classification provided by the embodiment of the application.

[0055] Figure 3 It is a schematic diagram of the sub-step process of step S1 in the embodiment of the application.

[0056] Figure 4 It is that the server sends the global model parameters and reservation rules to the reservable clients in the embodiment of the application.

[0057] Figure 5 It is a schematic diagram of the sub-step process of step S2 in the embodiment of the application.

[0058] Figure 6 It is a schematic diagram of the sub-step process of step S3 in the embodiment of the application.

[0059] Figure 7 It is that each selected client uploads the local model parameters to the server by opening the channel. DETAILED DESCRIPTION

[0060] The specific embodiments of the application are described below to facilitate those skilled in the art to understand the application, but it should be clear that the application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the application defined and determined by the appended claims, and all applications utilizing the concept of the application are within the scope of protection.

[0061] The application scenario targeted by this embodiment is the credit default prediction scenario of financial institutions.

[0062] The global model network structure used in this embodiment is CNN.

[0063] The federated learning method based on reservation hierarchy provided in this embodiment, such as Figure 2 As shown, it includes the following steps:

[0064] The S1 server will initialize the global model parameters or the global model parameters obtained from the previous training round, and send the communication reservation rules for the current round of model training to the available clients for the current round.

[0065] Initially, the server randomly initializes the global model parameters according to the target task, and uses the initialized global model parameters as the global model parameters for the first round of training in step S1.

[0066] like Figure 3 As shown, step S1 includes the following sub-steps:

[0067] S11 uses all active clients in the current round as the clients eligible to participate in the reservation for the current round, and determines the sending time and reservation rules for each eligible client.

[0068] An active client refers to a client that is currently online and connected to the server via the network. The reservation rules include the number of local model training iterations for the eligible client and the reservation time. The sending time here refers to the time the server sends the reservation rules to the eligible client. The reservation time in the reservation rules is the time after the eligible client receives the reservation rules, starts timing, and uploads the reservation request after a given duration (e.g., 3 minutes). This can be set by the server during initialization.

[0069] S12 sends the initialized global model parameters or the global model parameters obtained from the previous training round, along with the reservation rules, to the corresponding client according to the sending time.

[0070] like Figure 4 As shown, in the t-th time period, the global model parameters or the global model parameters obtained from the previous training round will be initialized, and the reservation rules will be sent to two of the clients; in the (t+1)-th time period, the global model parameters or the global model parameters obtained from the previous training round will be initialized, and the reservation rules will be sent to one of the clients; in the (t+N)-th time period, the global model parameters or the global model parameters obtained from the previous training round will be initialized, and the reservation rules will be sent to one of the clients.

[0071] Initially, the server randomly initializes the parameters of the global model (in this case, a CNN) based on the target task.

[0072] In the current round of S2, the available clients train the local model and generate reservation requests based on the reservation rules, which are then uploaded to the server.

[0073] like Figure 5 As shown, this step includes the following sub-steps:

[0074] The S21 bookable client updates the local model parameters of the bookable client according to the global model parameters sent by the server.

[0075] The S22 bookable client trains the updated local model using local data until the booking time is reached, obtaining the local model training times of the bookable client.

[0076] In this embodiment, the local data is divided into a training set and a validation set according to a ratio of 8:2, the local model is trained using the training set data, and a cross-entropy loss function is used as the loss function to obtain a loss value. Then, the local model parameters are optimized by a stochastic gradient descent method optimization algorithm. The above operations are repeated until the booking time is reached.

[0077] The S23 bookable client evaluates the training effect of the local model according to the maximum local model training times required in the booking rules, generates a booking request for the local model training times and the booking willingness time period that meet the booking rules, and uploads it to the server. If the booking rules are not met, the bookable client program is terminated (i.e., the local model parameters and the local model training times are not generated into a booking request, nor are they uploaded to the server).

[0078] For example, the booking rules received by the bookable client require that the local model be trained for 1 round in the first channel time period, 3 rounds in the second channel time period, and 5 rounds in the third channel time period, and the opening time period of each channel is within 20s after the server sends the booking result. If the bookable client completes the local model training for 3 rounds within the booking time period, it can be seen that it is closest to the requirement of the second channel time period in the booking rules, and generates a booking request for the local model training times and the booking willingness time period (i.e., the acceptable upload time period), and uploads it to the server.

[0079] The S3 server determines the booking result of the current round according to the booking request and sends it to the client selected in the current round.

[0080] As shown in FIG. 8, this step includes the following sub-steps: Figure 6

[0081] The S31 server receives booking applications sent by each bookable client within the booking time.

[0082] The bookable client that does not receive a booking application within the booking time is considered to be a client that has closed the current round and does not participate in the subsequent operations of the current round.

[0083] ​S32 Server determines the selected client of each upload time period in the current round according to the reservation request of each bookable client and the first client selection rule.

[0084] The server determines the upload time period according to the received reservation time period of the bookable client, and divides the upload time period into different levels according to the upload time period.

[0085] The server determines the maximum number of selected clients in the upload time period of different levels in the current round according to the latest evaluated communication resource constraint. For example, it can be obtained according to the current time width or the actual throughput divided by the current model parameter quantity. The client is selected in combination with the first client selection rule and the reservation request sent by the received bookable client.

[0086] The first client selection rule is shown in formula (1):

[0087]

[0088] Wherein, represents whether the client i selects the kth level upload time period, =1 represents that the client i selects the kth level upload time period, =0 represents that the client i does not select the kth level upload time period, n represents the number of all clients, x i represents the number of local model training submitted by the client i when applying for reservation in the current round of global model training, T i represents the number of rounds of global model training in which the client i participates.

[0089] The following constraint conditions need to be met before calculating formula (1):

[0090]

[0091] Wherein, r i k represents whether the client i applies for the kth level upload time period, r i k =0 represents that the client i does not apply, r i k =1 represents that the client i applies for the kth level upload time period, R k represents the total number of clients allowed to participate in model upload in the kth level upload time period under the current server communication resource (determined by step S32).

[0092] If the number of selected clients in the current round does not reach the preset requirement, the selected clients in the current round are determined in combination with the bookable clients that are not selected in the global model training of each round before the current round and the second client selection rule.

[0093] That is, if formula (2) cannot be met, all the clients who failed to be selected in the global model training of each level upload time period (j = 0, 1, …, k-1) before the current round k level upload time period will be reserved, and the corresponding second client reservation rule is:

[0094]

[0095] Wherein, represents whether the client i selects the kth level upload time period, represents that the client i does not select the kth level upload time period, n represents the number of all clients, x i represents the number of local model training submitted by the client i when applying for reservation in the kth global model training, q i represents whether the client i who reserved but failed to be selected in each level upload time period before the kth level upload time period is selected as a candidate in the kth level upload time period, q i represents that the client i who reserved the kth level upload time period is selected, q i represents that the client i who reserved the kth level upload time period is not selected, T i represents the number of rounds of global model training in which the client i participates.

[0096] Before calculating formula (3), the following constraints need to be met:

[0097]

[0098] The server S33 generates a reservation result by combining the final upload time and the number of local model training of the selected client, and sends it to the corresponding client.

[0099] For the client satisfying formula (1) or formula (3) and q i = 1, the client is selected as the selected client; the upload time and the number of local model training of the selected client are reset, and both are used as the generated reservation result. The generated reservation result is sent to the corresponding client.

[0100] The selected client continues to complete local training according to the reservation result, and uploads the trained local model parameters to the server.

[0101] In this step, each selected client determines the upload time period and the number of local model training according to the reservation result returned by the server; and packs the local model parameters of the selected client satisfying the reservation result.

[0102] In the specific implementation, for the client selected for the k-th level upload time period in the current round, when the upload time returned by the reservation result is reached, the selected client determines whether the number of times the local model has been trained within that upload time period has reached the requirement of the number of times the local model has been trained in the reservation result. If it has, training is stopped, and the trained local model parameters are packaged and sent to the server; if not, the local model continues to be trained until the requirement of the number of times the local model has been trained in the reservation result is met, then training is stopped, and the trained local model parameters are packaged and sent to the server.

[0103] According to the reservation time in the reservation result, the S5 server opens the upload channel of the client it is communicating with, and aggregates the local model parameters collected from each client to update the global model parameters.

[0104] Step S5 includes the following sub-steps:

[0105] The S51 server opens the upload channel for the selected client within a set time period, accepts local model parameters sent from different clients, and determines whether the reservation result is met. If the reservation result is met, the server accepts the local model parameters sent by the selected client; if the reservation result is not met, the server rejects the local model parameters sent by the selected client. This process continues until all selected clients have completed their uploads within the different upload time periods or the scheduled deadline has been reached.

[0106] The channel remains open until the end of each upload time period, regardless of whether all local model parameters from the selected clients have been received. If all local model parameters from the corresponding clients are received ahead of schedule, the channel time can be ended early. For selected clients that have not uploaded by the scheduled upload time in step S4, their trained local model parameters will still be packaged and sent to the server after training is completed. Although the server closes the upload channel at this time, it can be used directly in the subsequent global model training process if the second client reservation rules are met.

[0107] like Figure 7 As shown, in the t′ time period, the local model parameters of two selected clients are uploaded to the server; in the t′+N′ time period, the local model parameters of one of the selected clients are uploaded to the server.

[0108] The S52 server aggregates all received local model parameters to generate the global model parameters for the current round.

[0109] Here, the conventional Fedavg algorithm can be used to aggregate the local model parameters received by the server, see McMahan B, Moore E, Ramage D, et al. Communication-efficient learning of deep networks from decentralized data [C] / / Artificial intelligence and statistics. PMLR, 2017: 1273-1282.

[0110] S53 determines whether the global model parameters reach a predetermined convergence condition, and if so, the training is stopped; otherwise, returns to step S1, and repeats the above steps S1 to S5, to perform the next round of global model training, until the global model parameters reach the predetermined target.

[0111] The predetermined target, i.e., the predetermined convergence condition, can be that the global model loss value is minimized or tends to be constant, or the upper limit of the number of iterations as the convergence condition.

[0112] The pre-booking hierarchical federated learning method provided by the application has the following differences from the traditional federated learning method:

[0113] (1) The current federated learning technology directly uploads and downloads the model in the communication process without considering the actual communication situation of the server, and sends the model to all clients and uploads the local model of the client at the same time. The application aims to combine the current communication resources of the server, send the global model and receive the local model uploaded by the client in different rounds under different communication resources, and combine the pre-booking mechanism in the model aggregation process, effectively guarantee the efficiency of the client participating in the federated learning, and reduce the problem of excessive waiting of the federated learning caused by communication problems.

[0114] (2) In the current federated learning technology, all clients perform the same number of training rounds to adapt to the local data in the training process, and the aggregation process is more biased towards clients with higher computing resources. The application uses the pre-booking mechanism to prompt the client to train to the highest training round when the pre-booking is issued, and waits for the pre-booking result, judges the effectiveness of the local training round after obtaining the result, and controls the training effect of different clients to make each client achieve the best effect.

[0115] The present application is described in reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a device that implements the flow Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks

[0116] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices that implement the flow Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks

[0117] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the flow Figure 1 one or more flows and / or blocks Figure 1 one or more flows and / or blocks

[0118] The principles and implementation of the present application are described in the specific embodiments, and the above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation and application range will be changed, and the above description should not be understood as a limitation of the present application.

[0119] Those skilled in the art will realize that the embodiments described herein are for the purpose of helping the reader to understand the principles of the present application, and should be understood as not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations according to the technical inspiration disclosed in the present application without departing from the essence of the present application, and these modifications and combinations are still within the scope of protection of the present application.

Claims

1. A method for a pre-booking level-based federated learning, characterized in that, The method comprises the following steps: S1, the server sends the initialized global model parameters or the global model parameters obtained in the previous round of training and the communication reservation rule of the current round of model training to the bookable clients in the current round; S2, the bookable clients in the current round perform local model training and generate a reservation request according to the reservation rule and upload the reservation request to the server; S3, the server determines the reservation result of the current round according to the reservation request and sends the reservation result to the selected clients in each upload time period in the current round; the reservation result comprises the upload time period and the number of local model training; S4, the selected clients continue to perform local training according to the reservation result and upload the trained local model parameters to the server; S5, the server opens the upload channel of the clients in communication according to the upload time period in the reservation result and aggregates the local model parameters collected from the clients to update the global model parameters; The steps S1 to S5 are repeated until the global model parameters reach the predetermined target.

2. The pre-booking level-based federated learning method according to claim 1, wherein, Step S1 comprises the following sub-steps: S11, all active clients in the current round are taken as bookable clients participating in reservation in the current round, and the sending time and reservation rule of each bookable client are determined; S12, the initialized global model parameters or the global model parameters obtained in the previous round of training and the reservation rule are sent to the corresponding bookable clients according to the sending time.

3. The preemption level based federated learning method of claim 2, wherein, In step S12, the reservation rule comprises the number of local model training of the bookable client and the reservation time.

4. The preemption level based federated learning method of claim 1, wherein, Step S2 comprises the following sub-steps: S21, the bookable client updates the local model parameters of the bookable client according to the global model parameters sent by the server; S22, the bookable client trains and updates the local model until the reservation time is reached, and the number of local model training of the bookable client is obtained; S23, the bookable client evaluates the training effect of the local model according to the maximum number of local model training required in the reservation rule, generates a reservation request including the number of local model training meeting the reservation rule and the reservation time period, and uploads the reservation request to the server; if the reservation rule is not met, the program of the bookable client is terminated.

5. The pre-booking level-based federated learning method according to claim 1, wherein, Step S3 comprises the following sub-steps: S31, the server receives the reservation application sent by each bookable client within the reservation time; S32, the server determines the selected clients in each upload time period in the current round according to the reservation request of each bookable client according to the first client selection rule; S33, the server generates a reservation result including the final required upload time period and the number of local model training of the selected clients and sends the reservation result to the corresponding clients.

6. The pre-booking level-based federated learning method according to claim 5, characterized in that, In step S31, the bookable clients that do not receive the reservation application within the reservation time are regarded as clients closed in the current round and do not participate in the subsequent operation in the current round.

7. The pre-booking level-based federated learning method according to claim 5, characterized in that, In step S32, the first client selection rule is shown in formula (1): wherein, represents whether the client i selects the upload time period of the kth level of the current round, represents that the client i selects the upload time period of the kth level, represents that the client i does not select the upload time period of the kth level, n represents the number of all clients, x i represents the number of local model training times submitted by the client i when applying for the current global model training, i represents the number of rounds of global model training in which the client i accumulatively participates. Before calculating formula (1), the following constraint conditions need to be met: wherein r i k represents whether the client i applies for a reservation of the kth level upload time period, r i k = 0 represents that the client i does not apply, r i k = 1 represents that the client i applies for a reservation of the kth level upload time period, R k represents the total number of model upload clients allowed to participate in the kth level upload time period under the current server communication resources.

8. The pre-booking level-based federated learning method according to claim 7, characterized in that, If the number of selected clients in each upload time period does not reach the preset requirement, the second client selection rule is used to further determine the selected clients in the corresponding upload time period of the current round in combination with the pre-booked clients that are not selected before each upload time period. That is, if formula (2) cannot be satisfied, the pre-booked clients that are not selected in the global model training of each level upload time period before the kth level upload time period of the current round are added to the booking, and the corresponding second client booking rule is: wherein q i represents whether the client i, which is not selected on the time period of the kth level, is selected on the time period of the kth level, q i represents that the client i reserves the time period of the kth level to be selected, q i represents that the client i reserves the time period of the kth level to be not selected. Before calculating formula (3), the following constraint conditions need to be met:

9. The pre-booking level-based federated learning method according to claim 1, wherein, In step S4, each selected client determines the upload time period and the local model training frequency requirement according to the booking result returned by the server, and packs the local model parameters of the selected client that meets the booking result; For the selected clients in the kth level upload time period of the current round, when the upload time of the booking result is reached, the selected client judges whether the local model training frequency in the upload time period meets the local model training frequency requirement in the booking result. If it meets, the training is stopped, and the trained local model parameters are packaged and sent to the server; if it does not meet, the local model continues to be trained until the local model training frequency requirement in the booking result is met, and then the training is stopped, and the trained local model parameters are packaged and sent to the server.

10. The pre-booking level-based federated learning method according to claim 1, wherein, Step S5 includes the following sub-steps: S51, the server opens the upload channel of the corresponding selected client in the set upload time period, accepts the local model parameters sent from different clients, and judges whether it meets the booking result. If it meets the booking result, the local model parameters sent by the selected client are accepted; if it does not meet the booking result, the local model parameters sent by the selected client are rejected; until all selected clients in different level upload time periods of the current round complete the upload or reach the predetermined cutoff time period; S52, the server aggregates all received local model parameters to generate global model parameters of the current round; S53, judge whether the global model parameters meet the predetermined convergence condition. If it meets the predetermined convergence condition, the training is stopped; otherwise, return to step S1 for the next round of global model training.

Citation Information

Patent Citations

  • Federated learning method and device

    CN110443375A

  • Distributed cooperation method for communication optimization

    CN116468133A