CN116484922A - Federal learning method, system, equipment and storage medium - Google Patents

Federal learning method, system, equipment and storage medium Download PDF

Info

Publication number
CN116484922A
CN116484922A CN202310466543.1A CN202310466543A CN116484922A CN 116484922 A CN116484922 A CN 116484922A CN 202310466543 A CN202310466543 A CN 202310466543A CN 116484922 A CN116484922 A CN 116484922A
Authority
CN
China
Prior art keywords
client
target
neural network
network model
sample
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.)
Granted
Application number
CN202310466543.1A
Other languages
Chinese (zh)
Other versions
CN116484922B (en
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.)
Shenzhen University
Original Assignee
Shenzhen University
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 Shenzhen University filed Critical Shenzhen University
Priority to CN202310466543.1A priority Critical patent/CN116484922B/en
Publication of CN116484922A publication Critical patent/CN116484922A/en
Application granted granted Critical
Publication of CN116484922B publication Critical patent/CN116484922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a federal learning method, a federal learning system, federal learning equipment and a federal learning storage medium. For each client participating in federal learning, acquiring scheduling related information of the client; determining target scheduling probability of the client according to the scheduling related information; the target scheduling probability is sent to a server side, so that the server side determines a target client side according to the target scheduling probability; wherein the target client is a client scheduled to train a neural network model; and for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample. According to the federal learning method provided by the embodiment of the invention, the scheduled client is determined based on the sample time delay information, the sample length information and the communication overhead information of the client, the client is reasonably scheduled, and the neural network model can be efficiently combined trained.

Description

Federal learning method, system, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of neural networks, in particular to a federal learning method, a federal learning system, federal learning equipment and a federal learning storage medium.
Background
With the rapid development of intelligent services such as computer vision, recommendation systems and medical image analysis, people are continuously raising the attention of data leakage and privacy violation problems caused by the intelligent services. To ensure that intelligent services are provided while training a machine learning model, a new learning paradigm of federal learning (Federated Learning, FL) has been proposed to protect the user's data privacy. However, existing optimization works are mainly directed to the offline FL, which assumes that the data samples are kept stationary on the client throughout the model training process. However, many real-time intelligent services, including online recommendation systems, require systems to be able to process continuously generated data samples in a timely manner, thereby leading to research into online federal learning (Online Federated Learning, OFL). However, OFL faces two conflicting goals of improving model utility and communication overhead simultaneously: on the one hand, the continuously generated data samples need to be processed in a lower time delay to obtain higher model utility; on the other hand, too frequent communication between the client and the server may result in high communication overhead.
Conventional client scheduling schemes are directed to static data sources, which assume that training data is collected before model training begins and does not change dynamically during training. These solutions have the following drawbacks: 1) The method has the advantages that a large amount of time is required for completely collecting all training data, and model training is started after the data samples are completely collected, so that intolerable high time delay is brought; 2) The offline data collection mode needs to store all data samples, so that a large amount of storage space of the client is consumed; 3) After the data sample is completely collected, the model is continuously updated, so that a continuous high CPU load is brought to the client, normal operation of other applications on the client is affected, and the experience quality of a user is damaged.
Disclosure of Invention
The embodiment of the invention provides a federal learning method, a federal learning system, federal learning equipment and a federal learning storage medium, wherein a scheduled client is determined based on a target scheduling probability, and a neural network model can be efficiently subjected to joint training.
In a first aspect, an embodiment of the present invention provides a federal learning method, which is performed by a client participating in federal learning, including:
for each client participating in federal learning, acquiring scheduling related information of the client; wherein the scheduling related information includes at least one of: sample delay information, sample length information and communication overhead information;
determining target scheduling probability of the client according to the scheduling related information;
the target scheduling probability is sent to a server side, so that the server side determines a target client side according to the target scheduling probability; wherein the target client is a client scheduled to train a neural network model;
and for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample.
In a second aspect, embodiments of the present invention also provide a federal learning system, comprising: a server and a plurality of clients;
the clients are used for determining target scheduling probability based on the scheduling related information and sending the target scheduling probability to the server;
the server side is used for determining a set number of target clients based on a plurality of target scheduling probabilities and sending a neural network model to the target clients;
the target client is used for training the neural network model based on the data sample and sending the trained neural network model to the server;
the server is used for fusing the set number of trained neural network models to obtain a target neural network model.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the federal learning method according to an embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where computer instructions are stored, where the computer instructions are configured to cause a processor to execute the federal learning method according to the embodiment of the present invention.
The embodiment of the invention discloses a federal learning method, a federal learning system, federal learning equipment and a federal learning storage medium. The method is performed by a client participating in federal learning and comprises: for each client participating in federal learning, acquiring scheduling related information of the client; wherein the scheduling related information includes at least one of: sample delay information, sample length information and communication overhead information; determining target scheduling probability of the client according to the scheduling related information; the target scheduling probability is sent to the server side, so that the server side determines a target client side according to the target scheduling probability; the target client is a client which is scheduled to train the neural network model; and for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample. According to the federal learning method provided by the embodiment of the invention, the scheduled client is determined based on the sample time delay information, the sample length information and the communication overhead information of the client, the client is reasonably scheduled, and the neural network model can be efficiently combined trained.
Drawings
FIG. 1 is a flow chart of a federal learning method in accordance with a first embodiment of the present invention;
FIG. 2 is an exemplary diagram of managing data samples using queues in accordance with one embodiment of the present invention;
FIG. 3 is a flow chart of a federal learning method in accordance with a second embodiment of the present invention;
FIG. 4 is an exemplary diagram of federally learning a neural network model in accordance with a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a federal learning system according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a federal learning method according to an embodiment of the present invention, where the embodiment is applicable to a case of federal learning on a neural network model, the method may be performed by a federal learning device, where the federal learning device is disposed in a client that participates in federal learning, and the client may be a mobile terminal, a PC or a server. The method specifically comprises the following steps:
s110, for each client participating in federal learning, acquiring scheduling related information of the client.
Wherein the scheduling related information includes at least one of: sample delay information, sample length information, and communication overhead messages. The sample delay information may characterize a delay in which the data sample has not been trained, and may be determined by a duration of the data sample that has not been trained from the time of generation to the current time. The sample length information may be determined by the number of data samples that have not participated in training. The communication overhead message may characterize the communication overhead between the client and the server.
Optionally, before the scheduling related information of the client is acquired, the method further includes the following steps: acquiring the frequency of use of each data sample in a client; the data samples are divided into a plurality of sample levels according to the frequency of use.
The frequency of use is the number of times of participating in model training. The sample level is inversely proportional to the frequency of use. In the model training process, the value of the data sample for model training can be rapidly attenuated along with the increase of the use times, so that the data sample needs to be aligned and graded according to the use frequency. The less frequently used, the higher the rank of the data samples. In this embodiment, a hierarchical queue may be employed to store data samples. The new incoming data samples are first placed in a 0-level queue, and as the number of sampled participation models increases, the value of the data samples gradually decreases and thus gradually moves to a higher-level (i.e., lower-level) queue. Illustratively, fig. 2 is an exemplary diagram of managing data samples using queues in the present embodiment, as shown in fig. 2, for a total of 4-level queues, new incoming data samples are first placed in the 0-level queue, after the data samples are used 1 time to train the model, the data samples are moved from the 0-level queue to the 1-level queue, and so on. Assuming the dynamic process of data samples in a queue, for example, a level 1 queue, which currently buffers 3 data samples, the 3 data samples are moved into a level 2 queue after being used for model training. In this embodiment, a linked list and pointers may also be used to manage the data samples in the client, each pointer being used to point to the end of each level of queue. The extra memory overhead of the client is constant, and the operation of moving the sample from the first-level queue to the next-level queue is only performed by moving the corresponding pointer, so that the generated extra calculation overhead is negligible.
In this embodiment, when the frequency of use of the data sample exceeds the set threshold, the data sample is deleted, i.e., no longer used to train the neural network model.
Specifically, the process of obtaining the scheduling related information of the client may be: accumulating the time delay of the data samples with the use frequency of 0 to obtain sample time delay information; acquiring the number of data samples with the use frequency of 0 as sample length information; acquiring the number of samples respectively included in each sample level; determining the resource duty ratio of each sample level based on the number of samples; the communication overhead message is determined based on the resource duty cycle and the number of samples.
The time delay of the data sample can be understood as the time length of the data sample from the generation time to the current time. Assuming that the data sample with the frequency of use of 0 includes N, and the nth data sampleIs extended to d n The sample delay information can be expressed as:and sample length information Γ 2 Is N.
Wherein the resource duty cycle may be a computing resource (CPU) duty cycle. The manner of determining the resource duty ratio for each sample level based on the number of samples may be: a ratio of the number of samples to the total number of samples for each sample level is determined and used as a resource duty ratio for the sample level. Specifically, determining the communication overhead message according to the resource duty cycle and the number of samples may be expressed as:wherein V, beta, c are all constants, mu is the speed of the CPU of the client, gamma i Is the weight of the ith class and can be set based on the power law distribution, Q i For the number of data samples contained in the ith level, p i The resource duty cycle for the i-th level.
S120, determining target scheduling probability of the client according to the scheduling related information.
Specifically, the method for determining the target scheduling probability of the client according to the scheduling related information may be: constructing an objective function according to the scheduling related information and the optimization variable; carrying out optimization solution on the objective function to obtain an objective result; and taking the value of the optimization variable corresponding to the target result as the target scheduling probability.
The optimization variable is a variable corresponding to the sampling probability, namely the objective function is a function constructed by taking the scheduling probability as an independent variable. By way of example, assuming that the optimization variables are denoted as x, constructing an optimization objective function from the schedule-related information and the optimization variables may be expressed as:the way to optimally solve the objective function may be: and carrying out optimization iteration on the objective function by adopting the existing arbitrary optimization algorithm to obtain an optimal solution of the objective function, namely an objective result. Finally, taking the x value corresponding to the target result asTarget scheduling probability of the current client.
S130, the target scheduling probability is sent to the server side, so that the server side determines the target client side according to the target scheduling probability.
Wherein the target client is a client that is scheduled to train the neural network model.
In this embodiment, after receiving the target scheduling probabilities sent by each client, the server selects a set number of clients based on the multiple target scheduling probabilities, and issues the latest neural network to the target clients, so that the clients train the neural network model.
And S140, for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample.
In this embodiment, after receiving the latest neural network model, the target client first samples a certain number of data samples, and then trains the received neural network model based on the sampled data samples, so as to update parameters in the neural network model.
Specifically, the training method for the neural network model based on the data sample may be: selecting a set number of data samples according to the sequence from high sample level to low sample level; training the neural network model based on the selected data samples.
The data samples with the set number are selected according to the order of the sample level from high to low, which can be understood as preferentially selecting the data samples with low use frequency. That is, based on the above embodiment, the data samples in the 0-level queue are selected first, then the data samples in the 1-level queue are selected, and so on until the selected number is reached. For example, assuming that 50 data samples need to be selected for one training, 20 data samples are included in the 0-stage queue and 50 data samples are included in the 1-stage queue in the client, the 20 samples in the 0-stage queue are selected and processed, and 30 data samples are selected from the 1-stage queue, so that the required number of data samples are formed. The method has the advantages that the new data sample can be used for training the neural network model preferentially, and the accuracy of the neural network model is improved.
Optionally, the training of the neural network model based on the selected data samples may be: for each data sample, acquiring first gradient information of the data sample participating in the training and second gradient information of the data sample participating in the training last time; acquiring historical average gradient information of a target client; and updating parameters of the neural network model based on the first gradient information, the second gradient information and the historical average gradient information.
The process of obtaining the first gradient information of the data sample participating in the training at this time may be: and inputting the data sample into the current neural network model for processing to obtain first gradient information. The second gradient information can be understood as: when the data sample participates in training last time, the data sample is input into gradient information obtained by the neural network model at last time. Historical average gradient information can be understood as: the average value of gradient information generated in the process from the beginning of training to the current training of the neural network model by the current client.
Specifically, the process of updating the parameters of the neural network model based on the first gradient information, the second gradient information and the historical average gradient information may be: linearly superposing the first gradient information, the second gradient information and the historical average gradient information to obtain an initial adjustment amount; and fusing the initial adjustment quantity and the update coefficient to obtain a target adjustment quantity, and subtracting the target adjustment quantity from the parameters of the neural network model to obtain the updated parameters of the neural network model. By way of example, updating parameters of the neural network model may represent: w (e) =w (e-1) - η (g (e) - α (e) +a (e)), where g (e) is first gradient information, α (e) is second gradient information, a (e) is historical average gradient information, w (e-1) is a neural network model parameter before update, and w (e) is a neural network model parameter after update. In this embodiment, when the parameters of the neural network model are updated, the second gradient information and the historical average gradient information are referred to, so that fluctuation of the gradient information of the neural network model is effectively reduced, and the training speed of the neural network model is accelerated.
According to the technical scheme, for each client participating in federal learning, scheduling related information of the client is obtained; wherein the scheduling related information includes at least one of: sample delay information, sample length information and communication overhead information; determining target scheduling probability of the client according to the scheduling related information; the target scheduling probability is sent to the server side, so that the server side determines a target client side according to the target scheduling probability; the target client is a client which is scheduled to train the neural network model; and for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample. According to the federal learning method provided by the embodiment of the invention, the scheduled client is determined based on the sample time delay information, the sample length information and the communication overhead information of the client, the client is reasonably scheduled, and the neural network model can be efficiently combined trained.
Example two
Fig. 3 is a flowchart of a federal learning method provided in a second embodiment of the present invention, where the embodiment is applicable to a case of federal learning on a neural network model, the method may be performed by a federal learning device, where the device is disposed in a server that participates in federal learning, and the server may be a mobile terminal, a PC or a server. The method specifically comprises the following steps:
s310, receiving target scheduling probabilities sent by a plurality of clients.
The target scheduling probability is determined for the client based on the scheduling related information. The determination process of the target scheduling probability may be referred to the above embodiments, and will not be described herein.
S320, determining a set number of target clients based on the target scheduling probability.
The set number may be the number of clients scheduled at a time, which is set according to bandwidth information, for example: 2 or 3, etc. may be provided.
Optionally, the manner of determining the set number of target clients based on the target scheduling probability may be: the set number of clients with the largest target scheduling probability is selected as target clients, and as an example, a total of 5 clients are assumed, the set number is 3, the target scheduling probability is respectively P1, P2, P3, P4 and P5, and the set number satisfies that P1> P2> P3> P4> P5, and then the clients corresponding to P1, P2 and P3 are selected as target clients.
Optionally, the manner of determining the set number of target clients based on the target scheduling probability may further be: and randomly sampling according to the target scheduling probability to obtain a set number of target clients. The random sampling process according to the target scheduling probability may be: if the number of the selected clients exceeds the set number, a plurality of clients with the smallest target scheduling probability are removed, and the remaining clients are used as target clients.
And S330, the neural network model is sent to the target client, so that the target client trains the neural network model.
In this embodiment, the server issues the latest neural network model to the target client, so that the target client performs joint training on the neural network model. The training process of the neural network model by the target client may be referred to the above embodiments, and will not be described herein.
S340, receiving the trained neural network model returned by the target client.
S350, fusing the set number of trained neural network models to obtain a target neural network model.
The method for fusing the set number of trained neural network models may be: and carrying out weighted summation on the parameters in the set quantity of trained neural network models, and taking the weighted summation parameters as the parameters of the target neural network model.
Fig. 4 is an exemplary diagram of federal learning of a neural network model in this embodiment, as shown in fig. 4, a server selects a client (1) and a client (3) to perform joint training of the models, issues the latest neural network model to the client (1) and the client (3), after the client (1) and the client (3) train the neural network model, sends the trained neural network model to the server, and the server fuses the trained neural network models to obtain a final neural network model.
According to the technical scheme, target scheduling probabilities sent by a plurality of clients are received; the target scheduling probability is determined by the client based on the scheduling related information; determining a set number of target clients based on the target scheduling probability; the neural network model is sent to a target client, so that the target client trains the neural network model; receiving a trained neural network model returned by a target client; and fusing the set number of trained neural network models to obtain a target neural network model. According to the embodiment, the scheduled client is determined through the target scheduling probability, the client can be reasonably scheduled, and the neural network model is efficiently subjected to joint training.
Example III
Fig. 5 is a schematic structural diagram of a federal learning system according to a third embodiment of the present invention, as shown in fig. 5, the system includes: the server side and the clients. The plurality of clients are used for determining target scheduling probabilities based on the scheduling related information and sending the target scheduling probabilities to the server. The server side is used for determining a set number of target clients based on the target scheduling probabilities and sending the neural network model to the target clients. The target client is used for training the neural network model based on the data sample and sending the trained neural network model to the server. The server is used for fusing the set number of trained neural network models to obtain a target neural network model.
In particular, the principles of steps performed by the client and the server in the federal learning method may be referred to the above embodiments, which are not described herein again.
Example IV
Fig. 6 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the federal learning method.
In some embodiments, the federal learning method can be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. One or more of the steps of the federal learning method described above may be performed when the computer program is loaded into RAM 13 and executed by processor 11. Alternatively, in other embodiments, the processor 11 may be configured to perform the federal learning method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A federal learning method, the method performed by a client participating in federal learning, comprising:
for each client participating in federal learning, acquiring scheduling related information of the client; wherein the scheduling related information includes at least one of: sample delay information, sample length information and communication overhead information;
determining target scheduling probability of the client according to the scheduling related information;
the target scheduling probability is sent to a server side, so that the server side determines a target client side according to the target scheduling probability; wherein the target client is a client scheduled to train a neural network model;
and for the target client, receiving the neural network model sent by the server, and training the neural network model based on the data sample.
2. The method of claim 1, further comprising, prior to obtaining the scheduling-related information for the client:
acquiring the frequency of use of each data sample in the client; the frequency of use is the frequency of participation in model training;
dividing the data samples into a plurality of sample levels according to the frequency of use; wherein the sample level is inversely proportional to the frequency of use.
3. The method of claim 2, wherein obtaining scheduling related information for the client comprises:
accumulating the time delay of the data samples with the use frequency of 0 to obtain sample time delay information;
acquiring the number of data samples with the use frequency of 0 as sample length information;
acquiring the number of samples respectively included in each sample level;
determining the resource duty ratio of each sample level based on the sample number;
and determining a communication overhead message according to the resource duty ratio and the sample number.
4. The method of claim 1, wherein determining a target scheduling probability for the client based on the scheduling related information comprises:
constructing an objective function according to the scheduling related information and the optimization variable; wherein, the optimized variable is a variable corresponding to the sampling probability;
carrying out optimization solution on the objective function to obtain an objective result;
and taking the value of the optimization variable corresponding to the target result as a target scheduling probability.
5. The method of claim 2, wherein training the neural network model based on data samples comprises:
selecting a set number of data samples according to the sequence from high sample level to low sample level;
training the neural network model based on the selected data samples.
6. The method of claim 5, wherein training the neural network model based on the selected data samples comprises:
for each data sample, acquiring first gradient information of the data sample participating in training this time and second gradient information of the data sample participating in training last time;
acquiring historical average gradient information of the target client;
updating parameters of the neural network model based on the first gradient information, the second gradient information and the historical average gradient information.
7. A federal learning method, the method performed by a server participating in federal learning, comprising:
receiving target scheduling probabilities sent by a plurality of clients; the target scheduling probability is determined for the client based on scheduling related information;
determining a set number of target clients based on the target scheduling probability;
transmitting a neural network model to the target client so that the target client trains the neural network model;
receiving a trained neural network model returned by the target client;
and fusing the set number of trained neural network models to obtain a target neural network model.
8. A federal learning system, comprising: a server and a plurality of clients;
the clients are used for determining target scheduling probability based on the scheduling related information and sending the target scheduling probability to the server;
the server side is used for determining a set number of target clients based on a plurality of target scheduling probabilities and sending a neural network model to the target clients;
the target client is used for training the neural network model based on the data sample and sending the trained neural network model to the server;
the server is used for fusing the set number of trained neural network models to obtain a target neural network model.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the federal learning method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the federal learning method of any one of claims 1-7 when executed.
CN202310466543.1A 2023-04-23 2023-04-23 Federal learning method, system, equipment and storage medium Active CN116484922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310466543.1A CN116484922B (en) 2023-04-23 2023-04-23 Federal learning method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310466543.1A CN116484922B (en) 2023-04-23 2023-04-23 Federal learning method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116484922A true CN116484922A (en) 2023-07-25
CN116484922B CN116484922B (en) 2024-02-06

Family

ID=87222881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310466543.1A Active CN116484922B (en) 2023-04-23 2023-04-23 Federal learning method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116484922B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213796A (en) * 2019-05-28 2019-09-06 大连理工大学 A kind of intelligent resource allocation methods in car networking
CN112887145A (en) * 2021-01-27 2021-06-01 重庆邮电大学 Distributed network slice fault detection method
CN113221163A (en) * 2021-04-29 2021-08-06 深圳大学 Method and system for training model
CN113506040A (en) * 2021-08-05 2021-10-15 重庆大学 Scheduling and resource allocation method for high-performance federal learning in UAV swarm
CN113504999A (en) * 2021-08-05 2021-10-15 重庆大学 Scheduling and resource allocation method for high-performance hierarchical federated edge learning
CN113537518A (en) * 2021-07-19 2021-10-22 哈尔滨工业大学 Model training method and device based on federal learning, equipment and storage medium
CN113807538A (en) * 2021-04-09 2021-12-17 京东科技控股股份有限公司 Federal learning method and device, electronic equipment and storage medium
CN113900796A (en) * 2021-09-02 2022-01-07 山东电力工程咨询院有限公司 Resource allocation method and system for multi-task federal learning in 5G network
CN114064394A (en) * 2021-10-22 2022-02-18 深圳大学 Safety monitoring method and device based on edge calculation and terminal equipment
CN114580661A (en) * 2022-02-25 2022-06-03 腾讯科技(深圳)有限公司 Data processing method and device based on federal learning and computer equipment
CN114861790A (en) * 2022-04-29 2022-08-05 深圳大学 Method, system and device for optimizing federal learning compression communication
CN114881365A (en) * 2022-06-08 2022-08-09 国网河北省电力有限公司信息通信分公司 Supply chain management method and supply chain management system based on block chain
CN115174396A (en) * 2022-07-02 2022-10-11 华北电力大学 Low-carbon energy management and control communication network service management method based on digital twin
US20220366320A1 (en) * 2021-07-13 2022-11-17 Beijing Baidu Netcom Science Technology Co., Ltd. Federated learning method, computing device and storage medium
WO2023279975A1 (en) * 2021-07-06 2023-01-12 华为技术有限公司 Model processing method, federated learning method, and related device
US20230041074A1 (en) * 2020-01-10 2023-02-09 Telefonaktiebolaget Lm Ericsson (Publ) Distributed machine learning using network measurements

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110213796A (en) * 2019-05-28 2019-09-06 大连理工大学 A kind of intelligent resource allocation methods in car networking
US20230041074A1 (en) * 2020-01-10 2023-02-09 Telefonaktiebolaget Lm Ericsson (Publ) Distributed machine learning using network measurements
CN112887145A (en) * 2021-01-27 2021-06-01 重庆邮电大学 Distributed network slice fault detection method
CN113807538A (en) * 2021-04-09 2021-12-17 京东科技控股股份有限公司 Federal learning method and device, electronic equipment and storage medium
CN113221163A (en) * 2021-04-29 2021-08-06 深圳大学 Method and system for training model
WO2023279975A1 (en) * 2021-07-06 2023-01-12 华为技术有限公司 Model processing method, federated learning method, and related device
US20220366320A1 (en) * 2021-07-13 2022-11-17 Beijing Baidu Netcom Science Technology Co., Ltd. Federated learning method, computing device and storage medium
CN113537518A (en) * 2021-07-19 2021-10-22 哈尔滨工业大学 Model training method and device based on federal learning, equipment and storage medium
CN113506040A (en) * 2021-08-05 2021-10-15 重庆大学 Scheduling and resource allocation method for high-performance federal learning in UAV swarm
CN113504999A (en) * 2021-08-05 2021-10-15 重庆大学 Scheduling and resource allocation method for high-performance hierarchical federated edge learning
CN113900796A (en) * 2021-09-02 2022-01-07 山东电力工程咨询院有限公司 Resource allocation method and system for multi-task federal learning in 5G network
CN114064394A (en) * 2021-10-22 2022-02-18 深圳大学 Safety monitoring method and device based on edge calculation and terminal equipment
CN114580661A (en) * 2022-02-25 2022-06-03 腾讯科技(深圳)有限公司 Data processing method and device based on federal learning and computer equipment
CN114861790A (en) * 2022-04-29 2022-08-05 深圳大学 Method, system and device for optimizing federal learning compression communication
CN114881365A (en) * 2022-06-08 2022-08-09 国网河北省电力有限公司信息通信分公司 Supply chain management method and supply chain management system based on block chain
CN115174396A (en) * 2022-07-02 2022-10-11 华北电力大学 Low-carbon energy management and control communication network service management method based on digital twin

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LAIZHONG CUI 等: "CREAT: Blockchain-Assisted Compression Algorithm of Federated Learning for Content Caching in Edge Computing", 《IEEE INTERNET OF THINGS JOURNAL》, vol. 9, no. 16, pages 14151 - 14161, XP011916580, DOI: 10.1109/JIOT.2020.3014370 *

Also Published As

Publication number Publication date
CN116484922B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN112559007B (en) Parameter updating method and device of multitask model and electronic equipment
CN113361721B (en) Model training method, device, electronic equipment, storage medium and program product
CN114065863B (en) Federal learning method, apparatus, system, electronic device and storage medium
CN114265979A (en) Method for determining fusion parameters, information recommendation method and model training method
US20230186607A1 (en) Multi-task identification method, training method, electronic device, and storage medium
CN114329201A (en) Deep learning model training method, content recommendation method and device
CN114500339B (en) Node bandwidth monitoring method and device, electronic equipment and storage medium
CN114065864B (en) Federal learning method, federal learning device, electronic apparatus, and storage medium
CN115358411A (en) Data processing method, device, equipment and medium
CN114818913A (en) Decision generation method and device
CN113132479B (en) Flow switching and model generating method and device device, storage medium, and program
CN116484922B (en) Federal learning method, system, equipment and storage medium
CN116684378A (en) Mail caching method, device, equipment and medium based on hierarchical management
CN113434270B (en) Data resource scheduling method and device, electronic equipment and storage medium
CN113626175B (en) Data processing method and device
CN113361574A (en) Training method and device of data processing model, electronic equipment and storage medium
CN113179218B (en) Model training method, network congestion control method, device and related products
CN115334321B (en) Method and device for acquiring access heat of video stream, electronic equipment and medium
CN113411390B (en) Scheduling method and device of content distribution network and electronic equipment
CN115577980B (en) Power equipment regulation and control method and device, electronic equipment and medium
CN115293329A (en) Parameter updating method, device, equipment and storage medium
CN115622949A (en) Traffic scheduling method, device, equipment and medium
CN118158479A (en) Live broadcast heat adjustment strategy determination method, device, equipment and medium
CN114418123A (en) Model noise reduction method and device, electronic equipment and storage medium
CN114612784A (en) Target detection network training method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant