Federal learning training method and device

By adding a scoring column to the training data samples of the federated learning model and dynamically adjusting the scores, the problems of slow convergence and low accuracy of the model are solved, and the overall performance and generalization ability of the model are improved.

CN118607675APending Publication Date: 2024-09-06SHANDONG INSPUR SCI RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410870149.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The federated learning model has slow convergence speed and low accuracy during the training process, mainly due to the deviation of model parameters caused by the differences in data distribution of different participants and the decrease in accuracy during the aggregation process.

Method used

By adding a score column for each training data sample and dynamically adjusting the scores of the training data samples according to the model performance during the training process, the model can more effectively utilize high-quality training data samples and reduce its dependence on low-quality training data samples. Thereby improving the overall performance and generalization ability of the model. The specific method includes selecting at least two training data sample groups, calculating the average score of each sample, updating model parameters based on these scores, and adjusting the value of the score column according to the accuracy of the global model to optimize the training data set.

Benefits of technology

It improves the convergence speed and accuracy of the model, enhances the model's utilization of high-quality data, and reduces its dependence on low-quality data, thereby improving the overall performance and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607675A
    Figure CN118607675A
Patent Text Reader

Abstract

The invention discloses a federated learning training method and device, relates to the technical field of machine learning, and enables a model to more effectively utilize high-quality training data samples by adding a score column for each training data sample and dynamically adjusting scores of the training data samples according to model performance in the training process, thereby improving the training efficiency. And the dependence on low-quality training data samples is reduced, so that the overall performance and generalization ability of the global federal model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of machine learning, and in particular to a training method and device for federated learning. Background Art

[0002] In federated learning, data is usually collected independently by each participant. Since different participants adopt different data collection strategies, standards, and methods, and each participant collects data from different sources and backgrounds, the collected data has differences in distribution, which is the non-independent and identically distributed problem. In addition, each participant trains the model locally and uploads the trained model parameters or gradient information to the central server for aggregation. Since the data distribution of different participants is different, the model parameters they train will also be different. During the aggregation process, these differences may cause deviations in the global model parameters, thereby reducing the convergence speed and accuracy of the model. Summary of the invention

[0003] The present disclosure provides a federated learning training method and device, the main purpose of which is to solve the problems of slow convergence speed and low accuracy of the federated learning model during the training process.

[0004] According to a first aspect of the present disclosure, a training method for federated learning is provided, comprising: Select at least two training data sample groups from the training data sample set, and add a score column to each training data sample in the at least two training data sample groups; Setting the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; Calculating a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculating a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; Iteratively updating the first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively updating the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include update weights and gradients, and the second model parameters include update weights and gradients; receiving the first model parameter and the second model parameter based on a central server, aggregating the first model parameter and the second model parameter based on a federated averaging algorithm, and updating a global federated model based on the aggregation result to obtain an updated global federated model; Determining whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; If the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, the value of the score column corresponding to each training data sample in the at least two training data sample groups is adjusted down by ten percent; Reconstructing the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted down and the training data samples in the training data sample set except the at least two training data sample groups; The updated first participant model and the updated second participant model are updated based on the reconstructed training data sample set, and the updated global federal model is updated based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federal model are completed to obtain the final global federal model.

[0005] Optionally, the selecting at least two training data sample groups from the training data sample set includes: Using 10,000 training data samples to construct the training data sample set; When performing one round of training, 1000 training data samples are extracted from the training data sample set, and the 1000 training data samples are divided into 50 training data sample groups for iteration, each of the training data sample groups includes 20 training data samples; At least two training data sample groups are selected from the 50 training data sample groups.

[0006] Optionally, the selecting at least two training data sample groups from the training data sample set includes: At least two groups of preset numbers of training data samples are selected from the training data sample set to form training data sample groups respectively, so as to obtain the at least two training data sample groups.

[0007] According to a second aspect of the present disclosure, a training device for federated learning is provided, comprising: A selection unit, configured to select at least two training data sample groups from the training data sample set, and add a score column to each training data sample in the at least two training data sample groups; A setting unit, used to set the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; a calculation unit, configured to calculate a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculate a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; a first updating unit, configured to iteratively update a first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively update the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include an updated weight and a gradient, and the second model parameters include an updated weight and a gradient; a receiving unit, configured to receive the first model parameter and the second model parameter based on a central server, aggregate the first model parameter and the second model parameter based on a federated averaging algorithm, and update a global federated model based on the aggregation result to obtain an updated global federated model; A judging unit, configured to judge whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; a downward adjustment unit, configured to adjust downward by ten percent the value of the score column corresponding to each training data sample in the at least two training data sample groups when the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; a constructing unit, configured to reconstruct the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted downward and the training data samples in the training data sample set except for the at least two training data sample groups; The second updating unit is used to update the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and to update the updated global federal model based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federal model are completed to obtain the final global federal model.

[0008] According to a third aspect of the present disclosure, there is provided an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0009] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0010] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method as described in the first aspect above.

[0011] The training method and apparatus of federated learning provided by the present disclosure select at least two training data sample groups from a training data sample set, add a score column to each training data sample in the at least two training data sample groups; set the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; calculate the first average score of the score column corresponding to each training data sample in the first training data sample group, and calculate the second average score of the score column corresponding to each training data sample in the second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; iteratively update the first participant model based on the first average score as a weight to obtain the first model parameters of the updated first participant model, and iteratively update the second participant model based on the second average score as a weight to obtain the second model parameters of the updated second participant model, wherein the first model parameters include the updated weights and gradients, and the second model parameters include the updated weights and gradients; based on receiving the first model parameters and the second model parameters from a central server, and based on the federated The averaging algorithm aggregates the first model parameters and the second model parameters, updates the global federated model based on the aggregation result, and obtains an updated global federated model; determines whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; if the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, lowers the value of the score column corresponding to each training data sample in the at least two training data sample groups by ten percent; reconstructs the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is lowered and the training data samples in the training data sample set except the at least two training data sample groups; updates the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and updates the updated global federated model based on the updated model parameters corresponding to each of the updated first participant model and the updated second participant model, until the preset rounds of updates of the global federated model are completed to obtain a final global federated model. Compared with related technologies, by adding a score column for each training data sample and dynamically adjusting the score of the training data sample according to the model performance during the training process, the model can more effectively utilize high-quality training data samples and reduce dependence on low-quality training data samples, thereby improving the overall performance and generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1A flowchart of a training method for federated learning provided in an embodiment of the present disclosure; Figure 2 A schematic diagram of the structure of a federated learning training device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0013] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.

[0014] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.

[0015] In addition, the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein.

[0016] The following describes the training method and device of federated learning in the embodiments of the present disclosure with reference to the accompanying drawings.

[0017] In order to at least solve the problem of slow convergence speed and low accuracy of the federated learning model during the training process, this embodiment provides a training method for federated learning.

[0018] Figure 1 The following is a flow chart of a training method for federated learning provided in an embodiment of the present disclosure. Figure 1 As shown, the method comprises the following steps: Step 101, selecting at least two training data sample groups from the training data sample set, and adding a score column to each training data sample in the at least two training data sample groups; Step 102, setting the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; Step 103, calculating a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculating a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; Step 104, iteratively updating the first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively updating the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include updated weights and gradients, and the second model parameters include updated weights and gradients; Step 105, receiving the first model parameter and the second model parameter based on the central server, aggregating the first model parameter and the second model parameter based on a federated averaging algorithm, and updating a global federated model based on the aggregation result to obtain an updated global federated model; Step 106, determining whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; Step 107, if the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, then the value of the score column corresponding to each training data sample in the at least two training data sample groups is adjusted down by ten percent; Step 108, reconstructing the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted downward and the training data samples in the training data sample set except for the at least two training data sample groups; Step 109: Update the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and update the updated global federated model based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federated model are completed to obtain the final global federated model.

[0019] The training method of federated learning provided by the present disclosure selects at least two training data sample groups from a training data sample set, adds a score column to each training data sample in the at least two training data sample groups; sets the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; calculates a first average score of the score column corresponding to each training data sample in the first training data sample group, and calculates a second average score of the score column corresponding to each training data sample in the second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; iteratively updates the first participant model based on the first average score as a weight to obtain the first model parameters of the updated first participant model, and iteratively updates the second participant model based on the second average score as a weight to obtain the second model parameters of the updated second participant model, wherein the first model parameters include the updated weights and gradients, and the second model parameters include the updated weights and gradients; based on the central server receiving the first model parameters and the second model parameters, and based on the federated average score The algorithm aggregates the first model parameters and the second model parameters, updates the global federated model based on the aggregation result, and obtains an updated global federated model; determines whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; if the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, then reduces the value of the score column corresponding to each training data sample in the at least two training data sample groups by ten percent; reconstructs the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is reduced and the training data samples in the training data sample set except the at least two training data sample groups; updates the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and updates the updated global federated model based on the updated model parameters corresponding to each of the updated first participant model and the updated second participant model, until the preset rounds of updates of the global federated model are completed to obtain a final global federated model. Compared with related technologies, by adding a score column for each training data sample and dynamically adjusting the score of the training data sample according to the model performance during the training process, the model can more effectively utilize high-quality training data samples and reduce dependence on low-quality training data samples, thereby improving the overall performance and generalization ability of the model.

[0020] As a refinement of an embodiment of the present disclosure, when executing step 101 of selecting at least two training data sample groups from the training data sample set, the following implementation method may also be adopted but is not limited to, for example: using 10,000 training data samples to construct the training data sample set; when performing a round of training, extracting 1,000 training data samples from the training data sample set, and dividing the 1,000 training data samples into 50 training data sample groups for iteration, each of the training data sample groups including 20 training data samples; and selecting at least two training data sample groups from the 50 training data sample groups.

[0021] In some embodiments, the accuracy rate may be replaced by a recall rate, a ROC curve, an AUC, a mean square error, a RMSE, or a calculation result of the aforementioned indicators.

[0022] As a refinement of an embodiment of the present disclosure, when executing step 101 of selecting at least two training data sample groups from the training data sample set, the following implementation method may also be adopted but is not limited to, for example: selecting at least two groups of preset numbers of training data samples from the training data sample set to form training data sample groups respectively, so as to obtain the at least two training data sample groups.

[0023] To facilitate understanding of the above embodiments, the present disclosure provides exemplary descriptions, including: Step 201: Assume that the training set has 10,000 data items in total, extract 1,000 data items in each round for training, and train for 50 rounds.

[0024] Step 202: Add a score column for all data, with the initial value set to 1.

[0025] Step 203: Randomly select 1000 data items and divide them into 50 iterations, with 20 data items in each iteration.

[0026] Step 204: Select a group of iterations and calculate the average score of the current group of iteration data.

[0027] Step 205: Perform an iterative training and use the average score as weight to update the federated model.

[0028] Step 206: Repeat steps 204 and 205 until this round of federated training is completed.

[0029] Step 207: Aggregate multi-party federated training models.

[0030] Step 208: Verify the federated training model. If the model performance deteriorates, the score of the current round of data will be lowered by 10% (if the current value is 0.9, it will become 0.81 after the reduction).

[0031] Step 209: Repeat steps 203 to 208 until a preset number of rounds of federated model training is completed, where the preset number of rounds includes but is not limited to 50 rounds.

[0032] In summary, the embodiments of the present disclosure can achieve the following effects: 1. By adding a score column for each training data sample and dynamically adjusting the score of the training data sample according to the model performance during the training process, the model can more effectively utilize high-quality training data samples and reduce dependence on low-quality training data samples, thereby improving the overall performance and generalization ability of the model.

[0033] Corresponding to the above-mentioned federated learning training method, the present invention also proposes a federated learning training device. Since the system embodiment of the present disclosure corresponds to the above-mentioned method embodiment, the details not disclosed in the system embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0034] Figure 2 A structural diagram of a training device for federated learning provided in an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, including: A selection unit 31 is used to select at least two training data sample groups from the training data sample set, and add a score column to each training data sample in the at least two training data sample groups; A setting unit 32, configured to set the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; A calculation unit 33, configured to calculate a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculate a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; A first updating unit 34, configured to iteratively update the first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively update the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include an updated weight and a gradient, and the second model parameters include an updated weight and a gradient; The receiving unit 35 is configured to receive the first model parameter and the second model parameter based on the central server, aggregate the first model parameter and the second model parameter based on the federated averaging algorithm, and update the global federated model based on the aggregation result to obtain an updated global federated model; A judging unit 36, configured to judge whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; A downward adjustment unit 37, configured to adjust the value of the score column corresponding to each training data sample in the at least two training data sample groups downward by ten percent when the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; A construction unit 38, configured to reconstruct the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted downward and the training data samples in the training data sample set except for the at least two training data sample groups; The second updating unit 39 is used to update the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and to update the updated global federal model based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federal model are completed to obtain the final global federal model.

[0035] The training device of federated learning provided by the present disclosure selects at least two training data sample groups from a training data sample set, adds a score column to each training data sample in the at least two training data sample groups; sets the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; calculates a first average score of the score column corresponding to each training data sample in the first training data sample group, and calculates a second average score of the score column corresponding to each training data sample in the second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; iteratively updates a first participant model based on the first average score as a weight to obtain a first model parameter of the updated first participant model, and iteratively updates the second participant model based on the second average score as a weight to obtain a second model parameter of the updated second participant model, wherein the first model parameter includes an updated weight and a gradient, and the second model parameter includes an updated weight and a gradient; based on receiving the first model parameter and the second model parameter from a central server, and based on the federated average score, The algorithm aggregates the first model parameters and the second model parameters, updates the global federated model based on the aggregation result, and obtains an updated global federated model; determines whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; if the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, then reduces the value of the score column corresponding to each training data sample in the at least two training data sample groups by ten percent; reconstructs the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is reduced and the training data samples in the training data sample set except the at least two training data sample groups; updates the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and updates the updated global federated model based on the updated model parameters corresponding to each of the updated first participant model and the updated second participant model, until the preset rounds of updates of the global federated model are completed to obtain a final global federated model. Compared with the related art, by adding a score column for each training data sample and dynamically adjusting the score of the training data sample according to the model performance during the training process, the model can more effectively utilize high-quality training data samples and reduce the dependence on low-quality training data samples, thereby improving the overall performance and generalization ability of the model. The present disclosure provides an electronic device, including: at least one processor; and a memory in communication with the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training method of federated learning described in the above embodiment.

[0036] The present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the federated learning training method described in the above embodiment.

[0037] The present disclosure provides a computer program product, including a computer program, which implements the federated learning training method described in the above embodiment when executed by a processor.

[0038] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0039] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes 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 instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0040] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0041] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A training method for federated learning, characterized in that: include: Select at least two training data sample groups from the training data sample set, and add a score column to each training data sample in the at least two training data sample groups; Setting the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; Calculating a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculating a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; Iteratively updating the first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively updating the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include update weights and gradients, and the second model parameters include update weights and gradients; receiving the first model parameter and the second model parameter based on a central server, aggregating the first model parameter and the second model parameter based on a federated averaging algorithm, and updating a global federated model based on the aggregation result to obtain an updated global federated model; Determining whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; If the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model, the value of the score column corresponding to each training data sample in the at least two training data sample groups is adjusted down by ten percent; Reconstructing the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted down and the training data samples in the training data sample set except the at least two training data sample groups; The updated first participant model and the updated second participant model are updated based on the reconstructed training data sample set, and the updated global federal model is updated based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federal model are completed to obtain the final global federal model.

2. The method according to claim 1, characterized in that The selecting at least two training data sample groups from the training data sample set comprises: Using 10,000 training data samples to construct the training data sample set; When performing one round of training, 1000 training data samples are extracted from the training data sample set, and the 1000 training data samples are divided into 50 training data sample groups for iteration, each of the training data sample groups includes 20 training data samples; At least two training data sample groups are selected from the 50 training data sample groups.

3. The method according to claim 1, characterized in that The selecting at least two training data sample groups from the training data sample set comprises: At least two groups of preset numbers of training data samples are selected from the training data sample set to form training data sample groups respectively, so as to obtain the at least two training data sample groups.

4. A training device for federated learning, characterized in that: include: A selection unit, configured to select at least two training data sample groups from the training data sample set, and add a score column to each training data sample in the at least two training data sample groups; A setting unit, used to set the initial value of the score column corresponding to each training data sample in the at least two training data sample groups to 1; a calculation unit, configured to calculate a first average score of a score column corresponding to each training data sample in a first training data sample group, and calculate a second average score of a score column corresponding to each training data sample in a second training data sample group, wherein the at least two training data sample groups include the first training data sample group and the second training data sample group; a first updating unit, configured to iteratively update a first participant model based on the first average score as a weight to obtain first model parameters of the updated first participant model, and iteratively update the second participant model based on the second average score as a weight to obtain second model parameters of the updated second participant model, wherein the first model parameters include an updated weight and a gradient, and the second model parameters include an updated weight and a gradient; a receiving unit, configured to receive the first model parameter and the second model parameter based on a central server, aggregate the first model parameter and the second model parameter based on a federated averaging algorithm, and update a global federated model based on the aggregation result to obtain an updated global federated model; A judging unit, configured to judge whether the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; a downward adjustment unit, configured to adjust downward by ten percent the value of the score column corresponding to each training data sample in the at least two training data sample groups when the accuracy of the updated global federated model is less than or equal to the accuracy of the global federated model; a constructing unit, configured to reconstruct the training data sample set based on each training data sample in the at least two training data sample groups after the value of the score column is adjusted downward and the training data samples in the training data sample set except for the at least two training data sample groups; The second updating unit is used to update the updated first participant model and the updated second participant model based on the reconstructed training data sample set, and to update the updated global federal model based on the updated model parameters corresponding to the updated first participant model and the updated second participant model, until the preset rounds of updating of the global federal model are completed to obtain the final global federal model.

5. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1-3.

7. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 3.