Model aggregation method, device, system and electronic device

By performing data detection and supplementation before model training, combining balanced calculation and model aggregation strategy, the problem of poor model effectiveness caused by non-independent distribution of data is solved, and more efficient and accurate model calculation is achieved.

CN114782668BActive Publication Date: 2025-03-25CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110005363.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-05
Publication Date
2025-03-25
Estimated Expiration
2041-01-05

AI Technical Summary

Technical Problem

In the prior art, the non-independent distribution of data leads to poor model effects and lacks effective solutions.

Method used

By adding data detection links before model training begins, data supplement and balance calculations are performed, and model aggregation strategies are determined based on the balanced results of each node, thereby improving the effect and speed of model aggregation and improving the accuracy and accuracy of model calculations.

Benefits of technology

It effectively solves the problem of poor model effectiveness caused by non-independent distribution of data, improves the effect and speed of model aggregation, and improves the accuracy and accuracy of model calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782668B_ABST
    Figure CN114782668B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a model aggregation method, device, system and electronic device, which belong to the field of communication technology. The method includes: a coordinating node generates a feature data set; the feature data set is sent to multiple participating nodes; the multiple participating nodes obtain multiple balance metrics, and the balance metrics are generated after the multiple participating nodes supplement their local sample data based on the feature data set; the multiple participating nodes obtain multiple initial models; and the multiple initial models are model aggregated based on the multiple balance metrics. The present application can solve the phenomenon of non-independent distribution of data existing in the prior art, improve the effect and speed of model aggregation, and also greatly improve the precision and accuracy of model calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a model aggregation method, device, system and electronic device. Background Art

[0002] In recent years, artificial intelligence has entered the era of big data dominated by deep learning. Big data is the basic element of current artificial intelligence applications. However, in practical applications, the data status we face is: small scale, fragmentation, lack of data labels, data dispersion, data island phenomenon caused by user privacy protection and data security, etc. The traditional method is to aggregate scattered data into the data center and model it in the data center. With the continuous expansion of application fields and the continuous improvement of various laws and regulations on user privacy protection, the traditional method of aggregating data and then modeling is becoming more and more difficult to implement. Therefore, federated learning came into being.

[0003] The basic idea of ​​federated learning is to build a high-performance model shared by multiple participants under the condition of ensuring user privacy and data security, aiming to solve the problems of privacy protection and data silos. The specific method is to use multi-party data joint modeling. During the modeling process, the data of each party does not leave the local area and is not exposed to the participating modeling parties, so as to achieve the purpose of protecting user privacy and data security, and at the same time use the data of all parties to build a high-performance model. In practical applications, problems such as poor model effect may arise, and one of the important reasons is that the data of each node is not independent and identically distributed. At present, there is no mature method to solve such problems.

[0004] The above information disclosed in the Background section is only for enhancement of understanding of the background of the present application and therefore it may contain information that does not constitute the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a model aggregation method, device, system and electronic device, which can solve the problem of non-independent distribution of data existing in the prior art, resulting in poor model effect, and improve the effect and speed of model aggregation by supplementing and balancing the calculation of sample data, and also greatly improve the precision and accuracy of model calculation.

[0006] In order to solve the above technical problems, this application is implemented as follows:

[0007] According to a first aspect of the present application, a model aggregation method is proposed, which is applied to a coordination node, comprising:

[0008] The coordination node generates a feature data set;

[0009] sending the feature data set to a plurality of participating nodes;

[0010] The plurality of participating nodes obtain a plurality of balanced metric values, wherein the balanced metric values ​​are generated after the plurality of participating nodes supplement their local sample data based on the feature data set;

[0011] Acquiring multiple initial models from the multiple participating nodes;

[0012] The multiple initial models are aggregated based on the multiple balance metric values.

[0013] Optionally, the coordination node generates a feature data set, including:

[0014] The plurality of participating nodes respectively obtain characteristic values ​​of the m data;

[0015] Generate the feature data set according to the feature values ​​of the m data respectively obtained by the multiple participating nodes;

[0016] Wherein, m is a positive integer.

[0017] Optionally, before the multiple participating nodes respectively obtain the characteristic values ​​of the m data, the method further includes:

[0018] The amount of local sample data obtained by the multiple participating nodes;

[0019] Based on the data volume of the local sample data of the multiple participating nodes, calculating the average data volume of the participating nodes;

[0020] The value of m is determined based on the average data volume and the number of participating nodes.

[0021] Optionally, before the coordination node generates the feature data set, the process further includes:

[0022] The multiple participating nodes respectively obtain multiple sample categories of their local sample data;

[0023] According to the sample categories, generating a sample category set;

[0024] Sending the sample category set to the plurality of participating nodes;

[0025] receiving a comparison result fed back by the participating node according to the sample category set, wherein the comparison result is used to indicate whether the participating node has data missing;

[0026] The coordination node generates a feature data set, including:

[0027] In case of receiving the comparison result fed back by the participating node indicating that the participating node has data missing, the coordinating node generates a feature data set.

[0028] Optionally, the performing model aggregation on the multiple initial models based on the multiple balance metric values ​​includes:

[0029] Determining weights corresponding to the multiple participating nodes according to the balance metrics of the multiple participating nodes;

[0030] The weights corresponding to the multiple participating nodes are used to aggregate the multiple initial models.

[0031] Optionally, determining the weights corresponding to the multiple participating nodes according to the balance metrics of the multiple participating nodes includes:

[0032] Determine a total balance metric value according to the balance metric values ​​of the multiple participating nodes;

[0033] The weights corresponding to the plurality of participating nodes are determined according to the proportion of the balance metric value of each participating node in the total balance metric value.

[0034] Optionally, after aggregating the multiple initial models based on the multiple balance metrics, the method further includes:

[0035] The global model generated after model aggregation is sent to the multiple participating nodes.

[0036] According to a second aspect of the present application, a model aggregation device is proposed, which is applied to a coordination node, including:

[0037] A first generating module, used to generate a feature data set;

[0038] A first sending module, used to send the feature data set to multiple participating nodes;

[0039] A first acquisition module, configured to acquire, by the plurality of participating nodes, a plurality of balance metric values, wherein the balance metric values ​​are generated after the plurality of participating nodes supplement their local sample data based on the feature data set;

[0040] A second acquisition module, configured to acquire a plurality of initial models from the plurality of participating nodes;

[0041] An aggregation module is used to perform model aggregation on the multiple initial models based on the multiple balance metric values.

[0042] Optionally, the first generating module includes:

[0043] A first acquisition submodule is used for obtaining characteristic values ​​of m data respectively by the multiple participating nodes;

[0044] A first generating submodule, configured to generate the feature data set according to the feature values ​​of the m data respectively acquired by the plurality of participating nodes;

[0045] Wherein, m is a positive integer.

[0046] Optionally, the first generating module further includes:

[0047] A second acquisition submodule is used for the multiple participating nodes to acquire the data volume of their local sample data;

[0048] A calculation submodule, used for calculating the average data volume of the participating nodes based on the data volume of the local sample data of the multiple participating nodes;

[0049] The first determination submodule is used to determine the value of m based on the average value of the data volume and the number of participating nodes.

[0050] Optionally, the device further comprises:

[0051] A third acquisition module, configured to obtain, by the plurality of participating nodes, a plurality of sample categories of their local sample data respectively;

[0052] A second generating module, used to generate a sample category set according to the sample category;

[0053] A second sending module, configured to send the sample category set to the multiple participating nodes;

[0054] A receiving module, used to receive a comparison result fed back by the participating node according to the sample category set, wherein the comparison result is used to indicate whether the participating node has data missing;

[0055] The first generation module comprises:

[0056] The second generating submodule is used for the coordination node to generate a feature data set when receiving a comparison result fed back by the participating node indicating that the participating node has data missing.

[0057] Optionally, the aggregation module includes:

[0058] A second determination submodule, configured to determine weights corresponding to the plurality of participating nodes according to the balance metrics of the plurality of participating nodes;

[0059] The aggregation submodule is used for weights corresponding to the multiple participating nodes to perform model aggregation on the multiple initial models.

[0060] Optionally, the second determining submodule includes:

[0061] A first determining unit, configured to determine a total balancing metric value according to the balancing metric values ​​of the plurality of participating nodes;

[0062] The second determining unit is used to determine the weights corresponding to the multiple participating nodes according to the proportion of the balance metric value of each participating node in the total balance metric value.

[0063] Optionally, the device further comprises:

[0064] The third sending module is used to send the global model generated after model aggregation to the multiple participating nodes.

[0065] According to a third aspect of the present application, an electronic device is provided, comprising:

[0066] one or more processors;

[0067] A storage device for storing one or more programs;

[0068] When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the model aggregation method as described above.

[0069] According to a fourth aspect of the present application, a readable medium is provided, on which a program is stored, and when the program is executed by a processor, the steps of the model aggregation method described above are implemented.

[0070] According to a fifth aspect of the present application, a model aggregation method is proposed, which is applied to participating nodes, including:

[0071] The participating nodes obtain the feature data set from the coordinating node;

[0072] Supplementing local sample data according to the feature data set;

[0073] Calculate the balance metric value of the supplemented local sample data;

[0074] Train the machine learning model based on the supplemented local sample data to generate an initial model;

[0075] The balance metric and the initial model are sent to the coordination node.

[0076] Optionally, before the participating node obtains the feature data set from the coordinating node, the method further includes:

[0077] The participating node sends the data volume of the local sample data to the coordinating node;

[0078] The coordinating node obtains the value of m;

[0079] Extracting characteristic values ​​of m data from the local sample data, and sending the characteristic values ​​of the m data to the coordination node;

[0080] Wherein, m is a positive integer.

[0081] Optionally, before the participating node obtains the feature data set from the coordinating node, the method further includes:

[0082] The participating nodes count sample categories of their local sample data;

[0083] Sending the sample category of the local sample data to the coordination node;

[0084] receiving a sample category set fed back by the coordination node according to the sample category;

[0085] The sample category set is compared with the sample category of the local sample data, and the comparison result is fed back to the coordination node, where the comparison result is used to indicate whether the participating node has data missing.

[0086] Optionally, the supplementing the local sample data according to the feature data set includes:

[0087] Extracting sample data of a category missing from the sample category of the local sample data from the combination of the feature data;

[0088] The supplemented local sample data is determined according to the local sample data and the extracted sample data.

[0089] Optionally, after sending the balance metric value and the initial model to the coordination node, the method further includes:

[0090] The coordination node obtains a global model after performing model aggregation on the initial model;

[0091] The global model is locally updated.

[0092] According to a sixth aspect of the present application, a model aggregation device is provided, which is applied to a participating node, including:

[0093] A first acquisition module, configured to acquire a feature data set by a coordination node;

[0094] A supplementing module, used to supplement the local sample data according to the feature data set;

[0095] A calculation module, used for calculating a balance metric value of the supplemented local sample data;

[0096] A model training module is used to train the machine learning model based on the supplemented local sample data to generate an initial model;

[0097] The first sending module is used to send the balance metric value and the initial model to the coordination node.

[0098] Optionally, the device further comprises:

[0099] A second sending module, configured for the participating node to send the data volume of the local sample data to the coordinating node;

[0100] A second acquisition module, configured to acquire a value of m by the coordination node;

[0101] A third sending module is used to extract characteristic values ​​of m data in the local sample data, and send the characteristic values ​​of the m data to the coordination node;

[0102] Wherein, m is a positive integer.

[0103] Optionally, the device further comprises:

[0104] A statistics module, used by the participating nodes to count the sample categories of their local sample data;

[0105] A fourth sending module, configured to send the sample category of the local sample data to the coordination node;

[0106] A receiving module, configured to receive a sample category set fed back by the coordination node according to the sample category;

[0107] A feedback module is used to compare the sample category set with the sample category of the local sample data, and feed back the comparison result to the coordination node, wherein the comparison result is used to indicate whether the participating node has data missing.

[0108] Optionally, the supplementary module includes:

[0109] An extraction submodule, used for extracting sample data of a category missing from the sample category of the local sample data from the combination of the feature data;

[0110] The supplementing submodule is used to determine the supplemented local sample data according to the local sample data and the extracted sample data.

[0111] Optionally, the device further comprises:

[0112] An acquisition module, configured to acquire, by the coordination node, a global model after model aggregation is performed on the initial model;

[0113] An updating module is used to perform localized update on the global model.

[0114] According to a seventh aspect of the present application, there is provided an electronic device, including:

[0115] one or more processors;

[0116] A storage device for storing one or more programs;

[0117] When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the model aggregation method as described above.

[0118] According to an eighth aspect of the present application, a readable medium is provided, on which a program is stored, and when the program is executed by a processor, the steps of the model aggregation method described above are implemented.

[0119] According to a ninth aspect of the present application, a model aggregation system is provided, including:

[0120] The coordination node is used to generate a feature data set; send the feature data set to multiple participating nodes; obtain multiple balanced metric values ​​by the multiple participating nodes, and the balanced metric values ​​are generated by the multiple participating nodes after supplementing their local sample data based on the feature data set; obtain multiple initial models by the multiple participating nodes; and perform model aggregation on the multiple initial models based on the multiple balanced metric values;

[0121] Multiple participating nodes are used to obtain a feature data set from a coordination node; supplement local sample data based on the feature data set; calculate a balance metric value of the supplemented local sample data; train a machine learning model based on the supplemented local sample data to generate an initial model; and send the balance metric value and the initial model to the coordination node.

[0122] The beneficial effects of the above technical solution of the present application are as follows:

[0123] The above-mentioned scheme of the present application adds a data detection link for each node before the model training starts, performs data supplement and balance calculation based on the detection results, and determines the model aggregation strategy based on the balance results of each node. This can solve the problem of non-independent distribution of data existing in the prior art, improve the effect and speed of model aggregation, and improve the precision and accuracy of model calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] The above and other objects, features and advantages of the present application will become more apparent by describing in detail the exemplary embodiments thereof with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application, and it is clear to a person skilled in the art that other accompanying drawings can be obtained from these accompanying drawings without creative effort.

[0125] Figure 1 It is a schematic diagram of the federated learning method in the prior art.

[0126] Figure 2 The figure is a flowchart of a model aggregation method according to an exemplary embodiment.

[0127] Figure 3 The figure is a flowchart of a model aggregation method according to another exemplary embodiment.

[0128] Figure 4 is a schematic diagram of a model aggregation method according to yet another exemplary embodiment.

[0129] Figure 5 is a schematic diagram of a model aggregation method according to yet another exemplary embodiment.

[0130] Figure 6 The figure is a block diagram of a model aggregation device according to an exemplary embodiment.

[0131] Figure 7 is a block diagram of a model aggregation device according to another exemplary embodiment.

[0132] Figure 8 The invention is a block diagram of a model aggregation system according to an exemplary embodiment.

[0133] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0134] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0135] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0136] Horizontal federated learning is an important part of federated learning. It is mainly used when multiple participants have the same data structure but insufficient data volume. Under the condition of not exposing data privacy to each other, a high-performance model is obtained through joint modeling. In horizontal federated learning, the algorithm model of each participant is consistent with the data characteristics. Each participant uses local data to train a local model and encrypts the parameters to the coordinator. The coordinator decrypts the encrypted model parameters uploaded by each party and merges them into a global model. The global model is then encrypted and transmitted to each participant for local updates. The basic process is as follows: Figure 1 shown.

[0137] ① Local training task configuration;

[0138] ② Local model training and parameter extraction;

[0139] ③ Encrypted transmission of model parameters;

[0140] ④ Parameterized model merging;

[0141] ⑤ After merging, the model parameters are sent down;

[0142] ⑥Localization update;

[0143] The above process is the common horizontal federated learning process in the industry. In actual applications, problems such as poor model performance may occur. In the process of federated learning, the non-independent and identically distributed data of each node is an important reason for the poor model performance. In the implementation of horizontal federated learning, it is a common phenomenon that the data of each participating node are not independent and identically distributed. Here, non-independent and identically distributed has two levels of meaning:

[0144] 1. The distribution of sample sizes of different types of data at different nodes is different;

[0145] 2. The distribution of the same category of data features in different nodes is different.

[0146] Federated modeling of data that is not independent and identically distributed at each node will seriously affect the accuracy of the model and fail to achieve the goal of solving the problem by building a model through federated learning. Currently, there is no mature method in the industry to solve the problem of non-independent and identically distributed data at each node in federated learning.

[0147] In response to the above problems, this application proposes a node data supplement and correction method and a model aggregation strategy based on data distribution balance based on the characteristics of non-independent and identically distributed data. The model aggregation method of this application can improve the accuracy of the model when the data of each participant are not independent and identically distributed. The basic idea is to add a data detection link for each node before the model training starts, perform data supplement and balance calculation based on the detection results, and determine the model aggregation strategy based on the balance results of each node. The content of this application is described in detail below with the help of specific embodiments.

[0148] Figure 2 2 is a flow chart of a model aggregation method according to an exemplary embodiment. The model aggregation method 20 can be applied to a coordination node, and at least includes steps S202 to S210.

[0149] like Figure 2 As shown, in S202, the coordination node generates a feature data set.

[0150] For example, the plurality of participating nodes may respectively obtain characteristic values ​​of m data; and the characteristic data set may be generated according to the characteristic values ​​of the m data respectively obtained by the plurality of participating nodes; wherein m is a positive integer.

[0151] Wherein, before the multiple participating nodes respectively obtain the characteristic values ​​of m data, it also includes: the multiple participating nodes obtain the data volume of their local sample data; based on the data volume of the local sample data of the multiple participating nodes, calculate the average data volume of the participating nodes; based on the average data volume and the number of participating nodes, determine the value of m.

[0152] Before the coordination node generates the feature data set, the method further includes: the multiple participating nodes respectively obtain multiple sample categories of their local sample data; generate a sample category set according to the sample categories; and send the sample category set to the multiple participating nodes.

[0153] In one embodiment, for example, the comparison result fed back by the participating node based on the sample category set may be received, and the comparison result is used to indicate whether the participating node has missing data; the coordinating node generates a feature data set, including: upon receiving the comparison result fed back by the participating node indicating that the participating node has missing data, the coordinating node generates a feature data set.

[0154] In S204, the feature data set is sent to multiple participating nodes.

[0155] For example, uneven data distribution can have a significant impact on model accuracy. Therefore, after completing the data categories, we first measure the balance of data distribution at each node, and then determine the weight of the node in model aggregation based on the measurement results, in order to improve the accuracy of the federated model.

[0156] In S206, the multiple participating nodes obtain multiple balance metric values, where the balance metric values ​​are generated after the multiple participating nodes supplement their local sample data based on the feature data set.

[0157] Among them, determining the weights corresponding to the multiple participating nodes according to the balanced metric values ​​of the multiple participating nodes includes: determining the total balanced metric value according to the balanced metric values ​​of the multiple participating nodes; determining the weights corresponding to the multiple participating nodes according to the proportion of the balanced metric value of each participating node in the total balanced metric value.

[0158] In S208, the multiple participating nodes obtain multiple initial models.

[0159] In S210, the multiple initial models are aggregated based on the multiple balance metric values.

[0160] For example, weights corresponding to the multiple participating nodes may be determined according to the balance metrics of the multiple participating nodes; and the weights corresponding to the multiple participating nodes may be used to perform model aggregation on the multiple initial models.

[0161] After the multiple initial models are aggregated based on the multiple balance metrics, the method further includes: sending a global model generated after the model aggregation to the multiple participating nodes.

[0162] More specifically, the global model may be, for example, a user portrait model, and the multiple participants may be multiple user communication platforms. Each of the multiple user communication platforms may analyze the user data obtained online through the global model to obtain a user portrait, and may also provide users with more targeted services through the user portrait.

[0163] The model aggregation method of this application starts from the data integrity and distribution balance of each participating modeling node, and proposes methods and strategies to improve the accuracy and efficiency of federated modeling under the condition that the data of each node are not independent and identically distributed.

[0164] It should be clearly understood that the present application describes how to form and use specific examples, but the principles of the present application are not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in the present application, these principles can be applied to many other embodiments.

[0165] Figure 3 2 is a flow chart showing a model aggregation method according to an exemplary embodiment. The model aggregation method 20 can be applied to participating nodes, and at least includes steps S302 to S210.

[0166] like Figure 3 As shown, in S302, the participating nodes obtain a feature data set from the coordinating node.

[0167] In one embodiment, it also includes: the participating node sends the data volume of the local sample data to the coordination node; the coordination node obtains the value of m; extracts the characteristic values ​​of m data in the local sample data, and sends the characteristic values ​​of the m data to the coordination node; wherein m is a positive integer.

[0168] In S304, the local sample data is supplemented according to the feature data set.

[0169] Among them, before the participating nodes obtain the feature data set from the coordination node, it also includes: the participating nodes count the sample categories of their local sample data; send the sample categories of the local sample data to the coordination node; receive the sample category set fed back by the coordination node based on the sample categories; compare the sample category set with the sample categories of the local sample data to determine whether there are missing categories.

[0170] Furthermore, the participating nodes with missing categories may extract sample data of the missing category of the sample category of the local sample data from the combination of the feature data; and determine the supplemented local sample data based on the local sample data and the extracted sample data.

[0171] In S306 , a balance metric value of the supplemented local sample data is calculated.

[0172] Optionally, the balance metric may be information entropy / Gini index.

[0173] In S308, the machine learning model is trained based on the supplemented local sample data to generate an initial model.

[0174] In S310, the balance metric value and the initial model are sent to the coordination node.

[0175] Optionally, the method may further include: obtaining, by the coordination node, a global model after model aggregation of the initial model; and performing localized update on the global model.

[0176] The above-mentioned scheme of the present application adds a data detection link for each node before the model training starts, performs data supplement and balance calculation based on the detection results, and determines the model aggregation strategy based on the balance results of each node. This can solve the problem of non-independent distribution of data existing in the prior art, improve the effect and speed of model aggregation, and improve the precision and accuracy of model calculation.

[0177] Figure 4 is a schematic diagram of a model aggregation method according to another exemplary embodiment. Figure 4The whole process of the model aggregation method is shown. This application examines the distribution of data of each node from two aspects: on the one hand, whether it contains data of all categories; on the other hand, if it contains data of all categories, the balance of data of each category. First, all the data of all categories are supplemented to each node, and then the balance metric value of the supplemented data is calculated, and the weight of the relevant node in the model aggregation is determined according to the metric value. The specific method is as follows Figure 4 As shown:

[0178] 1. Solution to incomplete data categories of modeling nodes:

[0179] (1) All nodes count the categories of their own data, give a list of their own data categories, and send it to the coordination node;

[0180] (2) For each category, each participating node extracts the features of each sample data of the category as the input for subsequent modeling. At the same time, the feature that has the greatest impact on the modeling results is found, called the key feature, and its mean is calculated;

[0181] (3) The coordinating node receives the category lists of each participating node, merges them to obtain the category set of all data, and sends it to each participating node;

[0182] (4) Each participating node compares its own category set with the overall result sent by the coordination node to determine whether its data is missing and sends the missing information to the coordination node.

[0183] (5) Before the modeling process begins, the coordination node counts the sample size of each participating node, calculates the average value M, and then divides M by the number of nodes, assuming the quotient to be m. Each participating node randomly selects m data from its own data set, extracts its features, and sends the feature values ​​of the m data to the coordination node, which are combined to form a feature data set S.

[0184] (6) The coordinating node sends the data set S to the participating nodes with missing data. The participating nodes extract samples of their own missing categories from it to form a complete data set. When extracting, the participating nodes select samples with a large difference in the mean of the key features of their own related categories.

[0185] 2. Model aggregation solution based on the data balance of each node:

[0186] The more balanced the distribution of categories in the data set used for modeling, the better the modeling effect. Therefore, when the coordination node aggregates the model, it weights and sums the model parameters provided by each participating node according to the balance of the modeling data. The determination of the weight is related to the balance measurement value of the modeling data. The stronger the balance, the greater the weight.

[0187] In specific implementation, after the data of each participating node is completed and before modeling begins, each participating node calculates the balance measurement value of its own data (such as information entropy / Gini index) and sends it to the coordination node. The coordination node calculates the sum of the balance measurement values ​​of all participating nodes, and uses the proportion of the measurement value of each participating node in the total as the weight of the participating node model when aggregating the global model. After the above preparations are completed, modeling begins.

[0188] In a specific embodiment, during the operator's business handling process, users are often required to sign and manually fill in relevant information. In order to protect the rights and interests of users, handwritten text recognition is required. Since the relevant data is stored in local companies, in order to protect user privacy data cannot be transmitted, the horizontal federated learning method is used to model handwritten text recognition. The following is an example of the above method for the construction of a federated learning model for handwritten digit recognition.

[0189] The data in this example is the MNIST dataset, which consists of pictures of handwritten digits and their corresponding labels. Figure 5 shown.

[0190] The MNIST dataset is divided into training images and test images. Each image represents a number from 0 to 9, and the image size is a 28*28 matrix.

[0191] Now randomly extract 600 samples from each category in the training image, a total of 6000 samples, randomly distributed on 50 nodes, the number categories contained in each node are not independent and identically distributed, some nodes contain samples of all 10 numbers, and others only contain samples of part of the 10 numbers, and the sample size of each node is random; on the other hand, from the actual data, some samples of the same number in the data of different nodes also have large differences, such as: the handwritten number "1", some are directly a short vertical line, and some are similar to printed text, with a hook on the top and a short horizontal line below. Data experiments show that in this case, the effect of federated learning modeling is poor. When the numbers contained in all nodes are incomplete and the intersection of number categories is small, for the same test sample, the recognition accuracy of the federated learning model is very different from the accuracy of single-node modeling of each node, and the purpose of establishing an accurate model by multi-node federated learning cannot be achieved.

[0192] To solve the above problems, according to Figure 4 The process shown is as follows:

[0193] The coordination node issues statistical notifications on sample size, number of sample categories, and feature extraction of each sample category to each modeling node;

[0194] After each modeling node counts its own sample size and the number of categories contained in the sample, it performs dimensionality reduction PCA processing on each category sample of its own, counts the mean and standard deviation of the first principal component, and then sends the sample size and number of categories to the coordination node;

[0195] The coordination node sums up the sample sizes of each node and takes the average, obtaining an average sample size of 120 for each node. Then it sends a message to each node, asking them to randomly select 3 samples and send their dimension-reduced data and labels to the coordination node:

[0196] The coordination node merges the samples sent by each node to form a sample set S, and counts its category distribution. If there are less than 8 samples in a category, it sends a message to each node, requiring each node to randomly select 2 samples and send their dimension-reduced data and labels to the coordination node.

[0197] Repeat process 4 until the sample size of all categories in S is not less than 8;

[0198] The coordination node sends the data set S to the node that needs to supplement the samples and informs it to supplement the missing samples;

[0199] After receiving S, the node with missing data categories selects samples of its own missing categories, paying attention to selecting samples whose first principal component is significantly different from the first principal component of its own sample set, and merges them into its own sample set.

[0200] The coordination node sends a message to each node, asking it to calculate the GINI index of its sample and send it to the coordination node. The formula can be as follows:

[0201]

[0202] Wherein, k is the number of categories contained in the sample, which may be 10, for example, and pk is the proportion of category k.

[0203] After receiving the GINI index of each node, the coordination node sums and calculates the proportion of each node's index wi, i = 1, 2, ..., 50 as the corresponding weight of the parameter summation during model aggregation;

[0204] The coordinating node publishes the initial values ​​of the model parameters to each node and starts federated learning modeling. During the modeling process, the above weights are used for model aggregation.

[0205] In the implementation of federated learning, it is a common phenomenon that the data of each node is not independent and identically distributed, which seriously affects the accuracy of the federated learning model. At present, there is no mature solution to this problem in the existing technology.

[0206] According to the model aggregation method of the present application, starting from the node sample distribution, we can first supplement the missing category samples for the nodes with missing samples to solve the negative impact that the missing sample categories of some nodes may have on the federated learning model; further, the balance of the sample distribution of each node is used as the weight of its training parameters in the subsequent model aggregation, which effectively improves the accuracy of the overall model.

[0207] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above functions defined by the above method provided in the present application are executed. The program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0208] In addition, it should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0209] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0210] Figure 6 FIG. 1 is a block diagram of a model aggregation device according to an exemplary embodiment. Figure 6 As shown, the model aggregation device 60 can be used to coordinate nodes, including:

[0211] The first generating module 601 is used to generate a feature data set;

[0212] A first sending module 602, configured to send the feature data set to multiple participating nodes;

[0213] A first acquisition module 603 is configured to acquire a plurality of balance metrics by the plurality of participating nodes, wherein the balance metrics are generated after the plurality of participating nodes supplement their local sample data based on the feature data set;

[0214] A second acquisition module 604 is used to acquire multiple initial models from the multiple participating nodes;

[0215] The aggregation module 605 is configured to perform model aggregation on the multiple initial models based on the multiple balance metric values.

[0216] Optionally, the first generating module 601 includes:

[0217] A first acquisition submodule is used for obtaining characteristic values ​​of m data respectively by the multiple participating nodes;

[0218] A first generating submodule, configured to generate the feature data set according to the feature values ​​of the m data respectively acquired by the plurality of participating nodes;

[0219] Wherein, m is a positive integer.

[0220] Optionally, the first generating module 601 further includes:

[0221] A second acquisition submodule is used for the multiple participating nodes to acquire the data volume of their local sample data;

[0222] A calculation submodule, used for calculating the average data volume of the participating nodes based on the data volume of the local sample data of the multiple participating nodes;

[0223] The first determination submodule is used to determine the value of m based on the average value of the data volume and the number of participating nodes.

[0224] Optionally, the device 60 further includes:

[0225] A third acquisition module, configured to obtain, by the plurality of participating nodes, a plurality of sample categories of their local sample data respectively;

[0226] A second generating module, used to generate a sample category set according to the sample category;

[0227] A second sending module, configured to send the sample category set to the multiple participating nodes;

[0228] A receiving module, used to receive a comparison result fed back by the participating node according to the sample category set, wherein the comparison result is used to indicate whether the participating node has data missing;

[0229] The first generating module 601 includes:

[0230] The second generating submodule is used for the coordination node to generate a feature data set when receiving a comparison result fed back by the participating node indicating that the participating node has data missing.

[0231] Optionally, the aggregation module 605 includes:

[0232] A second determination submodule, configured to determine weights corresponding to the plurality of participating nodes according to the balance metrics of the plurality of participating nodes;

[0233] The aggregation submodule is used for weights corresponding to the multiple participating nodes to perform model aggregation on the multiple initial models.

[0234] Optionally, the second determining submodule includes:

[0235] A first determining unit, configured to determine a total balancing metric value according to the balancing metric values ​​of the plurality of participating nodes;

[0236] The second determining unit is used to determine the weights corresponding to the multiple participating nodes according to the proportion of the balance metric value of each participating node in the total balance metric value.

[0237] Optionally, the device 60 further includes:

[0238] The third sending module is used to send the global model generated after model aggregation to the multiple participating nodes.

[0239] In the above scheme, before the model training starts, a data detection link for each node is added, and data supplement and balance calculation are performed based on the detection results. The model aggregation strategy is determined based on the balance results of each node. This can solve the problem of non-independent distribution of data in the existing technology, improve the effect and speed of model aggregation, and improve the precision and accuracy of model calculation.

[0240] Figure 7 FIG. 1 is a block diagram of a model aggregation device according to an exemplary embodiment. Figure 7 As shown, the model aggregation device 70 can be used for participating nodes, including:

[0241] The first acquisition module 701 is used for acquiring a feature data set by a coordination node;

[0242] A supplementing module 702, used to supplement the local sample data according to the feature data set;

[0243] A calculation module 703, used to calculate a balance metric value of the supplemented local sample data;

[0244] A model training module 704 is used to train the machine learning model based on the supplemented local sample data to generate an initial model;

[0245] The first sending module 705 is configured to send the balance metric value and the initial model to the coordination node.

[0246] Optionally, the device 70 further includes:

[0247] A second sending module, configured for the participating node to send the data volume of the local sample data to the coordinating node;

[0248] A second acquisition module, configured to acquire a value of m by the coordination node;

[0249] A third sending module is used to extract characteristic values ​​of m data in the local sample data, and send the characteristic values ​​of the m data to the coordination node;

[0250] Wherein, m is a positive integer.

[0251] Optionally, the device 70 further includes:

[0252] A statistics module, used by the participating nodes to count the sample categories of their local sample data;

[0253] A fourth sending module, configured to send the sample category of the local sample data to the coordination node;

[0254] A receiving module, configured to receive a sample category set fed back by the coordination node according to the sample category;

[0255] A feedback module is used to compare the sample category set with the sample category of the local sample data, and feed back the comparison result to the coordination node, wherein the comparison result is used to indicate whether the participating node has data missing.

[0256] Optionally, the supplement module 702 includes:

[0257] An extraction submodule, used for extracting sample data of a category missing from the sample category of the local sample data from the combination of the feature data;

[0258] The supplementing submodule is used to determine the supplemented local sample data according to the local sample data and the extracted sample data.

[0259] Optionally, the device 70 further includes:

[0260] An acquisition module, configured to acquire, by the coordination node, a global model after model aggregation is performed on the initial model;

[0261] An updating module is used to perform localized update on the global model.

[0262] The above-mentioned scheme of the present application adds a data detection link for each node before the model training starts, performs data supplement and balance calculation based on the detection results, and determines the model aggregation strategy based on the balance results of each node. This can solve the problem of non-independent distribution of data existing in the prior art, improve the effect and speed of model aggregation, and improve the precision and accuracy of model calculation.

[0263] It should be noted that the execution subject of the model aggregation method provided in the embodiment of the present application may be a model aggregation device, or a control module in the model aggregation device for executing the model aggregation method. In the embodiment of the present application, the execution of the model aggregation method by the model aggregation device is taken as an example to illustrate the model aggregation device based on federated learning provided in the embodiment of the present application.

[0264] The model aggregation device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device, which is not specifically limited in the embodiment of the present application.

[0265] The model aggregation device provided in the embodiment of the present application can achieve Figures 2 to 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0266] Figure 8 FIG. 1 is a block diagram of a model aggregation system according to an exemplary embodiment. Figure 8 As shown, the model aggregation device 80 includes: a coordination node 801 and multiple participating nodes 802.

[0267] The coordination node 801 is used to generate a feature data set; send the feature data set to multiple participating nodes; obtain multiple balanced metric values ​​by the multiple participating nodes, where the balanced metric values ​​are generated after the multiple participating nodes supplement their local sample data based on the feature data set; obtain multiple initial models by the multiple participating nodes; and perform model aggregation on the multiple initial models based on the multiple balanced metric values;

[0268] Participating node 802 is used to obtain a feature data set from a coordination node; supplement local sample data based on the feature data set; calculate a balance metric value of the supplemented local sample data; train a machine learning model based on the supplemented local sample data to generate an initial model; and send the balance metric value and the initial model to the coordination node.

[0269] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment.

[0270] Refer to the following Fig. 9 hereinafter describes an electronic device 900 according to this embodiment of the present application. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0271] like Fig. 9As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), a display unit 940, etc.

[0272] The storage unit stores a program code, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 910 can perform the following steps: Figure 2 , Figure 3 Follow the steps shown in .

[0273] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 9201 and / or a cache memory unit 9202 , and may further include a read-only memory unit (ROM) 9203 .

[0274] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0275] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0276] The electronic device 900 may also communicate with one or more external devices 900' (e.g., keyboards, pointing devices, Bluetooth devices, etc.) to enable a user to communicate with the electronic device 900, and / or any device (e.g., routers, modems, etc.) that the electronic device 900 can communicate with one or more other computing devices. Such communication may be performed through an input / output (I / O) interface 950. In addition, the electronic device 900 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 960. The network adapter 960 may communicate with other modules of the electronic device 900 through a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0277] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the implementation method of the present application.

[0278] The software product may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0279] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0280] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0281] The above-mentioned readable medium carries one or more programs. When the above-mentioned one or more programs are executed by a device, the readable medium implements the following functions:

[0282] Generate a feature data set; send the feature data set to multiple participating nodes; obtain multiple balance measurement values ​​by the multiple participating nodes, and the balance measurement values ​​are generated by the multiple participating nodes after supplementing their local sample data based on the feature data set; obtain multiple initial models by the multiple participating nodes; and perform model aggregation on the multiple initial models based on the multiple balance measurement values.

[0283] The readable medium can also realize the following functions: the coordination node obtains a feature data set; supplements the local sample data according to the feature data set; calculates the balance metric value of the supplemented local sample data; trains the machine learning model based on the supplemented local sample data to generate an initial model; and sends the balance metric value and the initial model to the coordination node.

[0284] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0285] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0286] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A model aggregation method, characterized in that: Applied to the coordination node, including: The coordinating node generates a feature data set; wherein the feature data set is generated by the multiple participating nodes based on the feature values ​​of m data obtained from the MNIST data set; sending the feature data set to a plurality of participating nodes; The plurality of participating nodes obtain a plurality of balanced metric values, wherein the balanced metric values ​​are generated after the plurality of participating nodes supplement their local sample data based on the feature data set; wherein the local sample data is determined based on the MNIST data set; Acquiring multiple initial models from the multiple participating nodes; The multiple initial models are aggregated based on the multiple balance metric values.

2. The model aggregation method according to claim 1, characterized in that: Before the plurality of participating nodes respectively obtain the characteristic values ​​of the m data, the method further includes: The amount of local sample data obtained by the multiple participating nodes; Based on the data volume of the local sample data of the multiple participating nodes, calculating the average data volume of the participating nodes; The value of m is determined based on the average data volume and the number of participating nodes.

3. The model aggregation method according to claim 1, characterized in that: Before the coordination node generates the feature data set, the method further includes: The multiple participating nodes respectively obtain multiple sample categories of their local sample data; According to the sample categories, generating a sample category set; Sending the sample category set to the plurality of participating nodes; receiving a comparison result fed back by the participating node according to the sample category set, wherein the comparison result is used to indicate whether the participating node has data missing; The coordination node generates a feature data set, including: In case of receiving the comparison result fed back by the participating node indicating that the participating node has data missing, the coordinating node generates a feature data set.

4. The model aggregation method according to claim 1, characterized in that: The performing model aggregation on the multiple initial models based on the multiple balance metric values ​​includes: Determining weights corresponding to the multiple participating nodes according to the balance metrics of the multiple participating nodes; The weights corresponding to the multiple participating nodes are used to aggregate the multiple initial models.

5. The model aggregation method according to claim 4, characterized in that: The step of determining weights corresponding to the plurality of participating nodes according to the balance metrics of the plurality of participating nodes comprises: Determine a total balance metric value according to the balance metric values ​​of the multiple participating nodes; The weights corresponding to the plurality of participating nodes are determined according to the proportion of the balance metric value of each participating node in the total balance metric value.

6. The model aggregation method according to claim 1, characterized in that: After the multiple initial models are aggregated based on the multiple balance metrics, the method further includes: The global model generated after model aggregation is sent to the multiple participating nodes.

7. A model aggregation method, characterized in that: Applicable to participating nodes, including: The participating nodes obtain a feature data set from the coordinating node; wherein the feature data set is generated by the feature values ​​of m data obtained by the multiple participating nodes based on the MNIST data set; According to the feature data set, the local sample data is supplemented; wherein the local sample data is determined based on the MNIST data set; Calculate the balance metric value of the supplemented local sample data; Train the machine learning model based on the supplemented local sample data to generate an initial model; The balance metric and the initial model are sent to the coordination node.

8. The model aggregation method according to claim 7, characterized in that: Before the participating node obtains the feature data set from the coordinating node, the method further includes: The participating node sends the data volume of the local sample data to the coordinating node; The coordinating node obtains the value of m; Extract characteristic values ​​of m data from the local sample data, and send the characteristic values ​​of the m data to the coordination node; wherein m is a positive integer.

9. The model aggregation method according to claim 7, characterized in that: Before the participating node obtains the feature data set from the coordinating node, the method further includes: The participating nodes count sample categories of their local sample data; Sending the sample category of the local sample data to the coordination node; receiving a sample category set fed back by the coordination node according to the sample category; The sample category set is compared with the sample category of the local sample data, and the comparison result is fed back to the coordination node, where the comparison result is used to indicate whether the participating node has data missing.

10. The model aggregation method according to claim 9, characterized in that: The supplementing of the local sample data according to the feature data set includes: Extracting sample data of a category missing from the sample category of the local sample data from the combination of the feature data; The supplemented local sample data is determined according to the local sample data and the extracted sample data.

11. The model aggregation method according to claim 7, characterized in that: After sending the balance metric value and the initial model to the coordination node, the method further includes: The coordination node obtains a global model after performing model aggregation on the initial model; The global model is locally updated.

12. A model polymerization device, characterized in that: Applied to the coordination node, including: A first generating module is used to generate a feature data set; wherein the feature data set is generated by feature values ​​of m data obtained by multiple participating nodes based on the MNIST data set; A first sending module, used to send the feature data set to multiple participating nodes; A first acquisition module is configured to acquire a plurality of balanced metric values ​​by the plurality of participating nodes, wherein the balanced metric values ​​are generated after the plurality of participating nodes supplement their local sample data based on the feature data set; wherein the local sample data is determined based on the MNIST data set; A second acquisition module, configured to acquire a plurality of initial models from the plurality of participating nodes; An aggregation module is used to perform model aggregation on the multiple initial models based on the multiple balance metric values.

13. A model polymerization device, characterized in that: Applicable to participating nodes, including: A first acquisition module is used for acquiring a feature data set by a coordinating node; wherein the feature data set is generated by feature values ​​of m data acquired by multiple participating nodes based on the MNIST data set; A supplementing module, used to supplement the local sample data according to the feature data set; wherein the local sample data is determined based on the MNIST data set; A calculation module, used for calculating a balance metric value of the supplemented local sample data; A model training module is used to train the machine learning model based on the supplemented local sample data to generate an initial model; The first sending module is used to send the balance metric value and the initial model to the coordination node.

14. A model aggregation system, characterized in that: include: A coordinating node, configured to generate a feature data set; and send the feature data set to a plurality of participating nodes; The multiple participating nodes obtain multiple balanced metric values, where the balanced metric values ​​are generated after the multiple participating nodes supplement their local sample data based on the feature data set; the multiple participating nodes obtain multiple initial models; and perform model aggregation on the multiple initial models based on the multiple balanced metric values; A plurality of participating nodes are used to obtain a feature data set from a coordination node; supplement local sample data according to the feature data set; calculate a balance metric value of the supplemented local sample data; train a machine learning model based on the supplemented local sample data to generate an initial model; and send the balance metric value and the initial model to the coordination node; The feature data set is generated by feature values ​​of m data obtained by multiple participating nodes based on the MNIST data set, and the local sample data is determined based on the MNIST data set.

15. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the model aggregation method according to any one of claims 1 to 11.

16. A readable medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the model aggregation method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Transverse federated learning method, device and apparatus and computer storage medium

    CN110309923A

  • Training sample construction method, device and equipment and computer readable storage medium

    CN111860868A