Data processing method and device and electronic equipment

By converting the data distribution into a probability distribution in federated learning, calculating the KL divergence and overlap degree, and finely controlling the training frequency and weight, the challenges brought by non-independent homogeneous data are solved, and the accuracy and training efficiency of model output are improved .

CN119168086AActive Publication Date: 2024-12-20GRG BANKING IT

Patent Information

Application Number
CN202411201898.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-20
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The non-independent and homogeneous distribution of client data in federated learning leads to performance degradation and instability in training processes. The existing methods are inefficient and cannot significantly improve the accuracy of the model.

Method used

By converting the data distribution of the client and server side into a probability distribution, calculate the KL divergence and overlap degree, finely control the training frequency and aggregation weight, filter the clients participating in the aggregation and their proportion, and optimize global model training.

Benefits of technology

It improves the efficiency and accuracy of federated learning, reduces the training burden, and achieves more efficient and accurate biometric recognition, suitable for complex data distribution scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168086A_ABST
    Figure CN119168086A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device and electronic equipment, and belongs to the field of electronic equipment. The data processing method comprises the following steps: acquiring a first parameter sent by each client in a current round, and at least one of KL divergence and overlapping degree of first data output by a local model of the client in the current round relative to second data output by a server in a previous round; based on at least one of the KL divergence and the overlapping degree, processing a first parameter sent by each client under the current round to obtain a second parameter of the global model of the server under the current round; training the global model based on the second parameter and second image data corresponding to the server, and obtaining second data output by the global model in the current round; and sending the second parameter and the second data to each client. According to the data processing method, more efficient and more accurate federal learning is realized, and the accuracy of model output is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of biometric identification, and in particular, relates to a data processing method, device and electronic device. Background Art

[0002] Federated Learning (FL) is an emerging machine learning paradigm that aims to collaboratively train global models by coordinating local data from multiple clients while ensuring the protection of user data privacy. However, FL faces a major challenge, namely the non-independent and identically distributed (non-IID) problem of client data. This problem stems from the fact that data from different clients are affected by multiple factors such as user habits and behavioral characteristics, resulting in inconsistent data distribution and the inability to accurately reflect the characteristics of the overall data distribution. This data heterogeneity will significantly reduce the performance of federated learning, not only prolonging the convergence cycle of model training, but also exacerbating the instability of the training process. In related technologies, these challenges are mainly addressed by simply adjusting weights or increasing the number of training rounds, but such methods ignore the complexity of data distribution differences, so they are inefficient and cannot significantly improve model accuracy. In addition, these methods also lead to a significant increase in computing resources and time costs. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a data processing method, device and electronic device, which abstracts the data distribution of the client into a probability distribution and calculates the overlapping area to finely control the training frequency and aggregation weight of the client, so that the server can converge toward the global optimal solution more accurately, reduce unnecessary training burden, and improve training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of model output.

[0004] In a first aspect, the present application provides a data processing method, which is applied to a server; the method comprises:

[0005] Obtaining a first parameter in the current round sent by each client, and at least one of a KL divergence and a degree of overlap of first data output by the local model of the client in the current round relative to second data output by the server in the previous round, wherein the first parameter is a parameter of the local model obtained by each client based on the first image data of the client after training;

[0006] Based on at least one of the KL divergence and the overlap degree, the first parameter of the current round sent by each of the clients is processed to obtain the second parameter of the global model of the server in the current round; and based on the second parameter and the second image data corresponding to the server, the global model is trained to obtain the second data output by the global model in the current round;

[0007] The second parameter and the second data are sent to each of the clients, the second parameter is used to optimize the local model of each of the clients, and the second data is used for each of the clients to calculate at least one of the KL divergence and the degree of overlap corresponding to the next round.

[0008] According to the data processing method provided in the embodiment of the present application, by converting the data distribution of the client and the server into a probability distribution and calculating the KL divergence and the degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0009] According to an embodiment of the present application, the first parameter in the current round sent by each of the clients is processed based on at least one of the KL divergence and the overlap degree to obtain a second parameter of the global model of the server in the current round; and the global model is trained based on the second parameter and the second image data corresponding to the server to obtain the second data output by the global model in the current round, including:

[0010] Processing each of the first parameters based on at least one of the KL divergence and the overlap degree to obtain a second parameter of the global model in the current round;

[0011] The second parameters are deployed in the global model, and the global model is trained based on the second image data to obtain the second data of the current round output by the global model.

[0012] According to an embodiment of the present application, the processing of each first parameter based on at least one of the KL divergence and the overlap degree to obtain the second parameter of the global model in the current round includes:

[0013] Based on the degree of overlap, a plurality of first parameters corresponding to the plurality of clients are screened to obtain first parameters corresponding to at least some of the target clients;

[0014] Based on the KL divergence corresponding to each of the target clients, the first parameters sent by each of the target clients are aggregated to obtain the second parameter.

[0015] According to an embodiment of the present application, the filtering of the plurality of first parameters corresponding to the plurality of clients based on the overlap degree to obtain the first parameters corresponding to at least some of the target clients includes:

[0016] Obtaining a first ratio of the number of clients whose overlap degree is greater than a target threshold to the number of all clients;

[0017] Based on the first ratio, updating the target threshold;

[0018] The first parameter corresponding to the client whose overlap degree is not greater than the updated target threshold among all the clients is determined as the first parameter corresponding to the target client.

[0019] According to an embodiment of the present application, the step of performing aggregating processing on the first parameters sent by each of the target clients based on the KL divergence corresponding to each of the target clients to obtain the second parameter includes:

[0020] Determine a weight corresponding to each target client based on the KL divergence corresponding to each target client;

[0021] Based on the weight, weighted aggregation is performed on the first parameters sent by each of the target clients to obtain the second parameter.

[0022] According to an embodiment of the present application, the second image data includes multiple frames of biometric images of different categories.

[0023] In a second aspect, the present application provides a data processing method, which is applied to a client; the method comprises:

[0024] Training a local model of the client based on the first image data and the second parameter, obtaining the first data of the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round;

[0025] Based on the first data in the current round and the second data in the previous round sent by the server, obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round;

[0026] Sending at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

[0027] According to the data processing method provided in the embodiment of the present application, by converting the data distribution of the client and the server into a probability distribution and calculating the KL divergence and the degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0028] According to an embodiment of the present application, obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round sent by the server, includes:

[0029] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0030] Performing Gaussian distribution processing on the first data in the current round and the second data in the previous round sent by the server to obtain a probability density function;

[0031] The probability density function is defined based on the mean and the standard deviation to obtain the degree of overlap.

[0032] According to an embodiment of the present application, obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round sent by the server, includes:

[0033] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0034] Based on the mean and the standard deviation, the KL divergence is calculated.

[0035] According to an embodiment of the present application, the first image data includes multiple frames of biometric images corresponding to a target category, and the target category is one of the multiple frames of biometric images of different categories included in the second image data corresponding to the server.

[0036] In a third aspect, the present application provides a data processing device, which is applied to a server; the device includes:

[0037] A first processing module is used to obtain a first parameter in the current round sent by each client, and at least one of a KL divergence and a degree of overlap of first data output by the local model of the client in the current round relative to second data output by the server in the previous round, wherein the first parameter is a parameter of the local model obtained by each client through training based on the first image data of the client;

[0038] A second processing module is used to process the first parameters of the current round sent by each of the clients based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model of the server in the current round; and train the global model based on the second parameters and the second image data corresponding to the server to obtain the second data output by the global model in the current round;

[0039] The third processing module sends the second parameter and the second data to each of the clients, wherein the second parameter is used to optimize the local model of each of the clients, and the second data is used for each of the clients to calculate at least one of the KL divergence and the degree of overlap corresponding to the next round.

[0040] According to the data processing device provided in the embodiment of the present application, by converting the client and server data distribution into probability distribution and calculating the KL divergence and degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0041] In a fourth aspect, the present application provides a data processing device, which is applied to a client; the device includes:

[0042] A first processing module is used to train a local model of the client based on the first image data and the second parameter, and obtain the first data in the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round;

[0043] A second processing module, configured to obtain at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round received and sent by the server;

[0044] The third processing module is used to send at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

[0045] According to the data processing device provided in the embodiment of the present application, by converting the client and server data distribution into probability distribution and calculating the KL divergence and degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0046] In a fifth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the data processing method as described in the first or second aspect above is implemented.

[0047] In a sixth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the data processing method as described in the first aspect or the second aspect above is implemented.

[0048] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the data processing method as described in the first or second aspect above.

[0049] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0050] By converting the client and server data distribution into probability distribution and calculating the KL divergence and overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively addressing the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0051] Furthermore, the clients participating in the aggregation are screened based on the degree of overlap between the client's local model and the server's global model. During training, the participation frequency of clients with high overlap can be reduced based on the degree of overlap, and training resources can be allocated to clients with poor training effects, thereby achieving fine control of the training frequency and improving the training efficiency and accuracy of the global model.

[0052] Furthermore, by dynamically adjusting the client's aggregation weight according to the ratio of the size of the KL divergence and giving higher weights to clients with smaller KL divergence, more refined aggregation weight control can be achieved, which can solve problems such as low training efficiency caused by the diversity and complexity of client data distribution, improve the precision, accuracy and training efficiency of training, and is suitable for scenarios with more complex data distribution differences and has universal applicability.

[0053] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0055] Figure 1 This is one of the flow charts of the data processing method provided in the embodiment of the present application;

[0056] Figure 2 This is the second flow chart of the data processing method provided in the embodiment of the present application;

[0057] Figure 3 This is the third flow chart of the data processing method provided in the embodiment of the present application;

[0058] Figure 4 This is a fourth flow chart of the data processing method provided in the embodiment of the present application;

[0059] Figure 5 It is one of the structural schematic diagrams of the data processing device provided in the embodiment of the present application;

[0060] Figure 6 This is the second structural diagram of the data processing device provided in the embodiment of the present application;

[0061] Figure 7 It is a hardware schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0063] 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.

[0064] The data processing method, data processing device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0065] The data processing method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0066] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0067] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0068] The data processing method provided in the embodiments of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the data processing method. The electronic devices mentioned in the embodiments of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The data processing method provided in the embodiments of the present application is described below using an electronic device as an example of an execution subject.

[0069] The data processing method can be applied to the field of palmprint recognition.

[0070] In actual application, the federated learning algorithm can be used for implementation.

[0071] The process of federated learning often involves a server and multiple clients, which may be clients in rail transit, schools, hospitals, or other industries.

[0072] The following describes the data processing method using the server as the execution subject.

[0073] like Figure 1 As shown, the data processing method includes: step 110, step 120 and step 130.

[0074] Step 110: The server obtains the first parameter in the current round sent by each client, and at least one of the KL divergence and the degree of overlap of the first data output by the local model of the client in the current round relative to the second data output by the server in the previous round, wherein the first parameter is the parameter of the local model obtained by each client based on the first image data of the client during training;

[0075] In this step, each client is a participant in the global model training, and the server is a central server for the global model training.

[0076] The local model is a model corresponding to each client trained on each client. The model can be a traditional machine learning algorithm or a deep learning algorithm. The model can automatically perform internal loss calculation and gradient descent optimization.

[0077] The global model is a model trained on the server side. The parameters of the global model can be aggregated from the parameters output after the local model training of each client is completed.

[0078] It should be noted that the model training of the global model is training without updating the internal parameters, that is, the update of the global model training parameters depends on the model parameters sent by the local models trained by each client.

[0079] The first parameter may be a parameter of a local model obtained by each client through training based on the first image data of the client, and may include a model weight, a gradient, etc.

[0080] The first image data may be a training data set of a local model of each client.

[0081] It is understandable that the training data sets of various clients may be different.

[0082] For example, the training data set may include actual palm print images obtained by each client during historical operations.

[0083] During the actual execution process, a specific training data set can also be set for each client.

[0084] In some embodiments, the first image data may include multiple frames of biometric images corresponding to the target category.

[0085] One client corresponds to one target category; different clients correspond to different target categories.

[0086] For example, image data may be classified to obtain three sub-sample sets of categories a, b, and c.

[0087] The a-type sub-sample set is used as the training data set corresponding to client A, the b-type sub-sample set is used as the training data set corresponding to client B, and the c-type sub-sample set is used as the training data set corresponding to client C, so that the training data sets of each client together constitute a non-independent and identically distributed data set.

[0088] The first data output by the local model of the client in the current round may be a feature vector obtained after the local model of the client is trained in the current round.

[0089] The feature vector may be a vector containing feature information of the client local model training data. For example, when the training data set is a palmprint image, the output first data may be a palmprint feature vector.

[0090] The training round is the round of global model training.

[0091] A training round is the entire process of training the local model of each client, training the global model on the server, and feeding back the local model of the client.

[0092] It can be understood that the first data output by the local model of the client in the current round is the feature vector of the local model output by the local model of the client after completing the current training round. The second data output by the server in the previous round is the feature vector of the global model obtained by the global model of the server after completing the previous training round.

[0093] The KL divergence and overlap are calculated by each client and sent to the server.

[0094] KL divergence is the degree of difference in probability distributions.

[0095] In the actual execution process, the feature vectors of the local model and the global model can be abstracted into a one-dimensional Gaussian distribution, that is, a probability distribution, to obtain the KL divergence.

[0096] It should be noted that KL divergence is not symmetric.

[0097] It can be understood that the KL divergence of the first data output by the client's local model in the current round relative to the second data output by the server in the previous round is not equal to the KL divergence of the second data output by the server in the previous round relative to the first data output by the client's local model in the current round.

[0098] The degree of overlap may be a ratio of the overlapping areas of the probability distributions of the client and the server.

[0099] In actual implementations, the overlap increases, indicating that the model distributions are converging toward uniformity.

[0100] It should be noted that, during the first round of training, each client only sends the first parameter to the server, but does not send at least one of the KL divergence and the degree of overlap; starting from the second training round, each client sends the first parameter and at least one of the KL divergence and the degree of overlap to the server.

[0101] Step 120: Process the first parameters of the current round sent by each client based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model of the server in the current round; and train the global model based on the second parameters and the second image data corresponding to the server to obtain the second data output by the global model in the current round;

[0102] In this step, the second image data may be a training data set of a global model on the server side.

[0103] In some embodiments, the second image data may include a large amount of biometric images of different categories.

[0104] For example, the training data set may include actual palm print images acquired by the server during historical operations.

[0105] During the actual execution process, a specific training data set can also be set for the server.

[0106] In some embodiments, the training data set of the global model of the server may also be a collection of the training data sets of the local models of the clients.

[0107] Continuing with the examples of the images of categories a, b and c described in the above embodiment, the training data set corresponding to the server may include images of categories a, b and c at the same time.

[0108] The second parameter of the global model in the current round is the model parameter of the global model in the current training round.

[0109] The second data output by the global model in the current round is the feature vector of the global model obtained after the current training round is completed.

[0110] Processing the first parameter of the current round sent by each client based on at least one of the KL divergence and the degree of overlap to obtain the second parameter of the global model of the server in the current round may include: processing the first parameter of the current round sent by each client based on the KL divergence to obtain the second parameter of the global model of the server in the current round; or, processing the first parameter of the current round sent by each client based on the degree of overlap to obtain the second parameter of the global model of the server in the current round; or, processing the first parameter of the current round sent by each client based on the KL divergence and the degree of overlap to obtain the second parameter of the global model of the server in the current round.

[0111] During the training process, the model training of the server-side global model is training without updating the internal parameters, that is, the update of the global model training parameters depends on the model parameters sent by the local models trained by each client.

[0112] In the actual implementation process, any feasible training method can be used to train the global model, which is not elaborated in this application.

[0113] It should be noted that, during the first round of training, since each client only sends the first parameter to the server but does not send at least one of the KL divergence and the degree of overlap, the second parameter of the global model of the server in the current round is obtained by processing only the first parameter; starting from the second training round, each client sends the first parameter and at least one of the KL divergence and the degree of overlap to the server, and the server processes the first parameter of the current round sent by each client based on at least one of the KL divergence and the degree of overlap to obtain the second parameter of the global model in the current round.

[0114] In some embodiments, step 120 may include:

[0115] Processing each first parameter based on at least one of KL divergence and overlap degree to obtain a second parameter of the global model in the current round;

[0116] The second parameter is deployed in the global model, and the global model is trained based on the second image data to obtain the second data of the current round output by the global model.

[0117] In this embodiment, the KL divergence is the degree of difference in probability distribution. In the actual execution process, the first parameter can be screened or weighted based on the KL divergence to increase the proportion of the first parameter corresponding to the local model with a smaller degree of difference participating in this global training.

[0118] The degree of overlap may be the ratio of the overlapping areas of the probability distributions of the client and the server. In the actual execution process, the clients may be screened based on the degree of overlap to increase the proportion of the first parameters corresponding to the local models with smaller differences participating in this global training.

[0119] like Figure 2 As shown, after obtaining the second parameter of the global model in the current round, the second parameter is deployed to the global model, the second image data is input into the global model, the global model is trained with the output feature vector as the goal, and the second data output by the global model is obtained.

[0120] According to the data processing method provided in the embodiment of the present application, the second parameter is obtained by processing each first parameter based on at least one of the KL divergence and the degree of overlap, so as to train the global model based on the second image data. This can be directly applied to the training stage of federated learning, significantly improve the performance of the model in a non-independent and identically distributed environment, and has a high practical application value.

[0121] The following takes the processing of the first parameter based on the KL divergence and the overlap degree as an example for explanation.

[0122] like Figure 4 As shown, in some embodiments, processing each first parameter based on at least one of the KL divergence and the overlap degree to obtain the second parameter of the global model in the current round may include:

[0123] Based on the degree of overlap, multiple first parameters corresponding to multiple clients are screened to obtain first parameters corresponding to at least some of the target clients;

[0124] Based on the KL divergence corresponding to each target client, the first parameters sent by each target client are aggregated to obtain the second parameter.

[0125] In this embodiment, the target client is the client that participates in the global model training in this training round.

[0126] The aggregation processing method for the first parameters sent by each target client may be weighted averaging.

[0127] In the actual execution process, the first parameter can be firstly screened based on the degree of overlap to obtain the target clients participating in this round of aggregation processing, and then the first parameter of the target client can be aggregated based on the KL divergence of the screened target client to obtain the second parameter of this round.

[0128] According to the data processing method provided in the embodiment of the present application, the first parameter is firstly screened for clients by the degree of overlap to obtain the target clients participating in this round of aggregation processing, and then the first parameter of the target client is aggregated by the KL divergence of the screened target client to obtain the second parameter of this round. This can reduce the frequency of participation of clients with high overlap, and allocate training resources to clients with poor training effects. The aggregation weight of the client can be dynamically adjusted according to the size ratio of the KL divergence, and more refined training frequency and aggregation weight control can be achieved, thereby improving the precision, accuracy and training efficiency of training. It is suitable for scenarios with complex data distribution differences and has universal applicability.

[0129] Continue to refer Figure 4 In some embodiments, based on the degree of overlap, screening multiple first parameters corresponding to multiple clients to obtain first parameters corresponding to at least some target clients may include:

[0130] Obtaining a first ratio of the number of clients having an overlap degree greater than a target threshold to the number of all clients;

[0131] Based on the first ratio, updating the target threshold;

[0132] The first parameter corresponding to the client whose overlap degree is not greater than the updated target threshold among all the clients is determined as the first parameter corresponding to the target client.

[0133] In this embodiment, the target threshold is a threshold of the overlapping area ratio of the probability distribution of the first data of the client and the second data of the server.

[0134] Updating the target threshold based on the first ratio may include: updating the target threshold based on a magnitude relationship between the first ratio and a preset threshold.

[0135] For example, when the range interval of the first ratio is between 0 and 1, the preset threshold can be set to 0.5; when the first ratio is greater than 0.5, it is considered that the proportion of clients exceeding the target threshold is large, and the target threshold is adjusted upward; when the first ratio is not greater than 0.5, it is considered that the proportion of clients below the target threshold is large, and the target threshold is adjusted downward.

[0136] Updating the target threshold based on the first ratio may also include: determining, based on the first ratio, a second ratio of the number of clients having an overlap degree not greater than the target threshold to the number of all clients;

[0137] The target threshold is updated based on the first ratio and the second ratio.

[0138] For example, there are multiple clients and one server, and the global model is trained for a total of 200 rounds. After 100 rounds of training, the initial overlap threshold is set to 0.15. In subsequent training, the threshold is adjusted by ±0.01 according to the proportion of clients greater than and not greater than the threshold. When there are 6 clients greater than the threshold, the proportion of clients greater than the threshold is 3 / 5, and the corresponding proportion of clients not greater than the threshold is 2 / 5. Since 3 / 5 is greater than 2 / 5, the threshold is increased by 0.01, and the updated overlap threshold is 0.16. The parameters of the local model corresponding to the clients whose overlap is not greater than the updated target threshold among all clients are selected and determined as the parameters participating in the global model aggregation processing.

[0139] According to the data processing method provided in the embodiment of the present application, the clients participating in the aggregation are screened by the degree of overlap between the local model of the client and the global model of the server. During training, the participation frequency of clients with high overlap can be reduced based on the degree of overlap, and training resources can be inclined to clients with poor training effects, thereby achieving fine control of the training frequency, thereby improving the training efficiency and accuracy of the global model.

[0140] Continue to refer Figure 4 In some embodiments, based on the KL divergence corresponding to each target client, the first parameter sent by each target client is aggregated to obtain the second parameter, which may include:

[0141] Based on the KL divergence corresponding to each target client, determine the weight corresponding to each target client;

[0142] Based on the weight, weighted aggregation is performed on the first parameters sent by each target client to obtain a second parameter.

[0143] In this embodiment, the weight corresponding to each target client is the aggregated weight of the first parameters of each target client when the server aggregates the first parameters of each target client.

[0144] The weight corresponding to each target client can be obtained by the inverse proportion of the KL divergence corresponding to each target client.

[0145] It can be understood that the larger the KL divergence corresponding to the target client is, the smaller the assigned weight is.

[0146] According to the data processing method provided in the embodiment of the present application, the aggregation weight of the client is dynamically adjusted by the size ratio of the KL divergence, and a higher weight is given to the client with a smaller KL divergence. This can achieve more refined aggregation weight control, and can solve problems such as low training efficiency caused by the diversity and complexity of client data distribution. It can improve the precision, accuracy and training efficiency of training, and is suitable for scenarios with more complex data distribution differences and has universal applicability.

[0147] Step 130: Send the second parameter and the second data to each client, the second parameter is used to optimize the training of the local model of each client, and the second data is used for each client to calculate at least one of the KL divergence and the degree of overlap corresponding to the next round.

[0148] In this step, the second parameter of the global model of the server is sent to the client, which can realize the update and iterative optimization of the local model of the client, so that the distribution of the local model of the client and the global model of the server gradually converges, thereby achieving the training effect of the global model; the second data of the global model of the server is sent to the client, so that each client can calculate at least one of the KL divergence and overlap degree corresponding to the next round, so as to update and iteratively optimize the global model parameters corresponding to the next round, thereby improving the accuracy of the global model.

[0149] Continue to refer Figure 2 , the client receives the second parameter and the second data, trains the local model based on the second parameter and the first image data, obtains the first data and the first parameter, calculates at least one of the KL divergence and the degree of overlap based on the first data and the second data, and sends the calculation results of the first parameter, the KL divergence and the degree of overlap to the server, and the server re-executes the logic of steps 110 to 130, and loops in sequence until a preset training round or the expected accuracy of the global model is reached.

[0150] During the research and development process, the inventors found that in the related art, in the non-IID federated learning environment, the diversity of client data distribution caused training challenges. Currently, these challenges are mainly addressed by simply adjusting weights or increasing training rounds, but such methods ignore the complexity of data distribution differences, so they are inefficient and cannot significantly improve model accuracy. In addition, these methods also lead to a significant increase in computing resources and time costs.

[0151] In the present application, by converting the data distribution of the client and server into a probability distribution, calculating the KL divergence and overlap degree of the client relative to the server, adjusting the aggregation weight and training frequency of each client based on the KL divergence and overlap degree, and adjusting the training parameters of the global model of the server based on the aggregation weight and training frequency of each client, and using the training parameters to train the global model of the server and initialize the training parameters of the local model of each client for the next training round, the model distribution of each client is made consistent with the global model distribution, so that the server can converge toward the global optimal solution more accurately, reduce unnecessary training burden, improve training efficiency, and ultimately improve the accuracy of non-IID federated learning.

[0152] According to the data processing method provided in the embodiment of the present application, by converting the data distribution of the client and the server into a probability distribution and calculating the KL divergence and the degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0153] The embodiment of the present application also provides a data processing method.

[0154] The data processing method is described below with the client as the execution subject.

[0155] like Figure 3 As shown, the data processing method includes: step 310, step 320 and step 330.

[0156] Step 310: training a local model of the client based on the first image data and the second parameter, obtaining the first data of the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server by processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round;

[0157] In this step, the first image data is a training data set of a local model of the client.

[0158] The second parameter is a global model parameter obtained by aggregating the first parameter of the client by the global model in the previous round.

[0159] It can be understood that the second parameter is the initial training parameter of the local model of the client in the current training round.

[0160] It should be noted that in the first round of training, the second parameter is the initialization model parameter of the global model, which is distributed to each client by the global model; starting from the second round of training, the second parameter is the global model parameter obtained by aggregating the first parameter of the client by the global model of the server in the previous round.

[0161] The first parameter is the model parameter after the local model training of the client is completed in the current training round.

[0162] The first data of the current round of the local model output is the feature vector output after the local model of the client is trained in the current training round.

[0163] Step 320: obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round received and sent by the server;

[0164] In this step, the second data of the previous round sent by the server is the feature vector of the global model output after the server completes the global model training in the previous training round.

[0165] In some embodiments, step 320 may include:

[0166] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0167] Performing Gaussian distribution processing on the first data in the current round and the second data in the previous round sent by the server to obtain a probability density function;

[0168] The degree of overlap is obtained by defining the probability density function based on the mean and standard deviation.

[0169] In this embodiment, the degree of overlap can be obtained by the overlap area, and the overlap area can be obtained by multiplying the probability density function of the first data and the second data abstracted into a Gaussian distribution, and then integrating over the entire real number range.

[0170] In the code, the overlapping area is calculated by setting appropriate upper and lower limits based on the mean and standard deviation of the first data and the second data (such as Max(μ1+5*σ1,μ2+5*σ2), Min(μ1-5*σ1,μ2-5*σ2)).

[0171] The overlap area is calculated as follows:

[0172] ∫(f(x)*g(x))dx

[0173] Among them, f(x) is the probability density function of the first data output by the local model of the client, and g(x) is the probability density function of the second data output by the global model of the server.

[0174] The degree of overlap may be a ratio of the overlap area to the server distribution area.

[0175] The server-side distribution area is obtained by integrating the probability density function of the second data over the entire real number range.

[0176] In the code, the server-side distribution area is set with the same upper and lower limits as the overlap area.

[0177] According to the data processing method provided in the embodiment of the present application, by calculating the degree of overlap between the local model probability distribution of the client and the global model probability distribution of the server, the global model can be used to screen the local models of the target clients to participate in the global model training, and the training resources can be inclined to the clients with poor training effects, so as to achieve fine control of the training frequency, thereby improving the training efficiency and accuracy of the global model.

[0178] In some embodiments, obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round sent by the server may include:

[0179] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0180] Based on the mean and standard deviation, the KL divergence is calculated.

[0181] In this embodiment, it is assumed that the trained feature vector follows a one-dimensional normal distribution, and its KL divergence can be calculated by the mean (μ) and the standard deviation (σ). Assuming that the client is C and the server is S, the KL divergence formula of the client relative to the server is as follows:

[0182]

[0183] Among them, μ1 and σ1 are the mean and variance of the probability distribution of the client, and μ2 and σ2 are the mean and variance of the probability distribution of the server.

[0184] In the actual execution process, the parameter aggregation weight from the client to the server is determined based on the weight ratio of the KL divergence.

[0185] Specifically, the larger the KL divergence, the greater the difference in the two distributions, and the smaller the weight given.

[0186] According to the data processing method provided in the embodiment of the present application, by calculating the KL divergence of the client relative to the server, the size ratio of the KL divergence can be obtained to dynamically adjust the client's aggregation weight, giving a higher weight to a client with a smaller KL divergence, thereby achieving more refined aggregation weight control, and being able to solve problems such as low training efficiency caused by the diversity and complexity of client data distribution, thereby improving the precision, accuracy and training efficiency of training, and being suitable for scenarios with more complex data distribution differences, and having universal applicability.

[0187] Step 330: Send at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

[0188] In this step, at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round are sent to the server, so that the server can screen the first parameter of the client based on at least one of the KL divergence and the degree of overlap, and achieve more refined weight aggregation processing to improve the training efficiency and accuracy of the global model.

[0189] Continue to refer Figure 2 , at the server end, at least one of the KL divergence and the degree of overlap and a first parameter are received, the server end aggregates the first parameter based on at least one of the KL divergence and the degree of overlap to obtain a second parameter for model training of the global model, and trains the global model based on the second image data without updating the internal parameters to obtain second data of the global model, and sends the second data and the second parameter to the client end, and the client end re-executes the logic of steps 310 to 330, and loops in sequence until a preset training round of the global model or a desired accuracy of the global model is reached.

[0190] According to the data processing method provided in the embodiment of the present application, by converting the data distribution of the client and the server into a probability distribution and calculating the KL divergence and the degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0191] The data processing method provided in the embodiment of the present application can be executed by a data processing device. In the embodiment of the present application, the data processing device provided in the embodiment of the present application is described by taking the data processing method executed by the data processing device as an example.

[0192] An embodiment of the present application also provides a data processing device.

[0193] like Figure 5 As shown, the data processing device is applied to a server, and the device includes: a first processing module 510 , a second processing module 520 , and a third processing module 550 .

[0194] The first processing module 510 is used to obtain the first parameter in the current round sent by each client, and at least one of the KL divergence and the degree of overlap of the first data output by the local model of the client in the current round relative to the second data output by the server in the previous round, wherein the first parameter is the parameter of the local model obtained by each client based on the first image data of the client after training;

[0195] The second processing module 520 is used to process the first parameters of the current round sent by each client based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model of the server in the current round; and train the global model based on the second parameters and the second image data corresponding to the server to obtain the second data output by the global model in the current round;

[0196] The third processing module 530 is used to send the second parameter and the second data to each client, the second parameter is used to optimize the local model of each client, and the second data is used for each client to calculate at least one of the KL divergence and the overlap degree corresponding to the next round.

[0197] According to the data processing device provided in the embodiment of the present application, by converting the client and server data distribution into probability distribution and calculating the KL divergence and degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0198] In some embodiments, the second processing module 520 may also be used to:

[0199] Processing each first parameter based on at least one of KL divergence and overlap degree to obtain a second parameter of the global model in the current round;

[0200] The second parameter is deployed in the global model, and the global model is trained based on the second image data to obtain the second data of the current round output by the global model.

[0201] In some embodiments, the second processing module 520 may also be used to:

[0202] Based on the degree of overlap, multiple first parameters corresponding to multiple clients are screened to obtain first parameters corresponding to at least some of the target clients;

[0203] Based on the KL divergence corresponding to each target client, the first parameters sent by each target client are aggregated to obtain the second parameter.

[0204] In some embodiments, the second processing module 520 may also be used to:

[0205] Obtaining a first ratio of the number of clients having an overlap degree greater than a target threshold to the number of all clients;

[0206] Based on the first ratio, updating the target threshold;

[0207] The first parameter corresponding to the client whose overlap degree is not greater than the updated target threshold among all the clients is determined as the first parameter corresponding to the target client.

[0208] In some embodiments, the second processing module 520 may also be used to:

[0209] Based on the KL divergence corresponding to each target client, determine the weight corresponding to each target client;

[0210] Based on the weight, weighted aggregation is performed on the first parameters sent by each target client to obtain a second parameter.

[0211] An embodiment of the present application also provides a data processing device.

[0212] like Figure 6 As shown, the data processing device is applied to a client, and the device includes: a first processing module 610 , a second processing module 620 , and a third processing module 630 .

[0213] The first processing module 610 is used to train the local model of the client based on the first image data and the second parameter, and obtain the first data in the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server by processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round;

[0214] The second processing module 620 is used to obtain at least one of a KL divergence and an overlap degree corresponding to the current round based on the first data in the current round and the second data in the previous round sent by the server;

[0215] The third processing module 630 is used to send at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

[0216] According to the data processing device provided in the embodiment of the present application, by converting the client and server data distribution into probability distribution and calculating the KL divergence and degree of overlap of the client relative to the server, it is possible to more finely screen the clients participating in the aggregation and the corresponding proportions of the participating clients; this not only enables the server to converge toward the global optimal solution more accurately, but also reduces unnecessary training burden and improves training efficiency, thereby effectively responding to the challenges brought by non-independent and identically distributed data, achieving more efficient and accurate federated learning, and improving the accuracy of biometric recognition output by the model.

[0217] In some embodiments, the second processing module 620 may also be used to:

[0218] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0219] Performing Gaussian distribution processing on the first data in the current round and the second data in the previous round sent by the server to obtain a probability density function;

[0220] The degree of overlap is obtained by defining the probability density function based on the mean and standard deviation.

[0221] In some embodiments, the second processing module 620 may also be used to:

[0222] Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained;

[0223] Based on the mean and standard deviation, the KL divergence is calculated.

[0224] The data processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0225] The data processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0226] The data processing device provided in the embodiment of the present application can realize Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0227] In some embodiments, Figure 7 As shown, an embodiment of the present application also provides an electronic device 700, including a processor 701, a memory 702, and a computer program stored in the memory 702 and executable on the processor 701. When the program is executed by the processor 701, each process of the above-mentioned data processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0228] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0229] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned data processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0230] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0231] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned data processing method when executed by a processor.

[0232] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0233] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0234] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0235] 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.

[0236] 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 relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0237] 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.

[0238] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0239] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A data processing method, characterized in that: Applied to the server, the method includes: Obtaining a first parameter in the current round sent by each client, and at least one of a KL divergence and a degree of overlap of first data output by the local model of the client in the current round relative to second data output by the server in the previous round, wherein the first parameter is a parameter of the local model obtained by each client based on the first image data of the client after training; Based on at least one of the KL divergence and the overlap degree, the first parameter of the current round sent by each of the clients is processed to obtain the second parameter of the global model of the server in the current round; and based on the second parameter and the second image data corresponding to the server, the global model is trained to obtain the second data output by the global model in the current round; The second parameter and the second data are sent to each of the clients, the second parameter is used to optimize the local model of each of the clients, and the second data is used for each of the clients to calculate at least one of the KL divergence and the degree of overlap corresponding to the next round.

2. The data processing method according to claim 1, characterized in that: The first parameters in the current round sent by each of the clients are processed based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model of the server in the current round; and the global model is trained based on the second parameters and the second image data corresponding to the server to obtain the second data output by the global model in the current round, including: Processing each of the first parameters based on at least one of the KL divergence and the overlap degree to obtain a second parameter of the global model in the current round; The second parameters are deployed in the global model, and the global model is trained based on the second image data to obtain the second data of the current round output by the global model.

3. The data processing method according to claim 2, characterized in that: The processing of the first parameters based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model in the current round includes: Based on the degree of overlap, a plurality of first parameters corresponding to the plurality of clients are screened to obtain first parameters corresponding to at least some of the target clients; Based on the KL divergence corresponding to each of the target clients, the first parameters sent by each of the target clients are aggregated to obtain the second parameter.

4. The data processing method according to claim 3, characterized in that: The step of screening a plurality of first parameters corresponding to a plurality of the clients based on the overlap degree to obtain first parameters corresponding to at least some of the target clients includes: Obtaining a first ratio of the number of clients whose overlap degree is greater than a target threshold to the number of all clients; Based on the first ratio, updating the target threshold; The first parameter corresponding to the client whose overlap degree is not greater than the updated target threshold among all the clients is determined as the first parameter corresponding to the target client.

5. The data processing method according to claim 3, characterized in that: The step of performing aggregation processing on the first parameters sent by each of the target clients based on the KL divergence corresponding to each of the target clients to obtain the second parameter includes: Determine a weight corresponding to each target client based on the KL divergence corresponding to each target client; Based on the weight, weighted aggregation is performed on the first parameters sent by each of the target clients to obtain the second parameter.

6. The data processing method according to any one of claims 1 to 5, characterized in that: The second image data includes a plurality of frames of biometric feature images of different categories.

7. A data processing method, characterized in that: Applied to a client, the method comprises: Training a local model of the client based on the first image data and the second parameter, obtaining the first data of the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round; Based on the first data in the current round and the second data in the previous round sent by the server, obtaining at least one of a KL divergence and a degree of overlap corresponding to the current round; Sending at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

8. The data processing method according to claim 7, characterized in that: The obtaining, based on the first data in the current round and the second data in the previous round sent by the server, at least one of a KL divergence and a degree of overlap corresponding to the current round includes: Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained; Performing Gaussian distribution processing on the first data in the current round and the second data in the previous round sent by the server to obtain a probability density function; The probability density function is defined based on the mean and the standard deviation to obtain the degree of overlap.

9. The data processing method according to claim 7, characterized in that: The obtaining, based on the first data in the current round and the second data in the previous round sent by the server, at least one of a KL divergence and a degree of overlap corresponding to the current round includes: Based on the first data in the current round and the second data in the previous round sent by the server, a mean and a standard deviation of the first data and a mean and a standard deviation of the second data are obtained; Based on the mean and the standard deviation, the KL divergence is calculated.

10. The data processing method according to any one of claims 7 to 9, characterized in that: The first image data includes multiple frames of biometric feature images corresponding to a target category, and the target category is one of the multiple frames of biometric feature images of different categories included in the second image data corresponding to the server.

11. A data processing device, characterized in that: Applied to the server, the device comprises: A first processing module is used to obtain a first parameter in the current round sent by each client, and at least one of a KL divergence and a degree of overlap of first data output by the local model of the client in the current round relative to second data output by the server in the previous round, wherein the first parameter is a parameter of the local model obtained by each client through training based on the first image data of the client; A second processing module is used to process the first parameters of the current round sent by each of the clients based on at least one of the KL divergence and the overlap degree to obtain the second parameters of the global model of the server in the current round; and train the global model based on the second parameters and the second image data corresponding to the server to obtain the second data output by the global model in the current round; The third processing module is used to send the second parameters and the second data to each of the clients, wherein the second parameters are used to optimize the local model of each of the clients, and the second data is used for each of the clients to calculate at least one of the KL divergence and the degree of overlap corresponding to the next round.

12. A data processing device, characterized in that: Applied to a client, the device comprises: A fourth processing module is used to train a local model of the client based on the first image data and the second parameter, and obtain the first data in the current round output by the local model and the first parameter of the local model; the second parameter is sent by the server to the client; the second parameter is obtained by the server processing the first parameter sent by each client in the previous round based on at least one of the KL divergence and the overlap degree received in the previous round; A fifth processing module, configured to obtain at least one of a KL divergence and a degree of overlap corresponding to the current round based on the first data in the current round and the second data in the previous round sent by the server; The sixth processing module sends at least one of the KL divergence and the degree of overlap corresponding to the current round and the first parameter of the current round to the server; at least one of the KL divergence and the degree of overlap corresponding to the current round is used for training the global model of the server to generate the second data of the current round.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the data processing method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Federal mutual learning model training method for non-independent identically distributed data

    CN114091667A

  • Improved transverse synchronous federated learning aggregation acceleration method

    CN116629350A

  • Weakly supervised federal learning training method, apparatus and device, and storage medium

    CN117350357A

  • Federal modeling method and device for non-independent identically distributed data and medium

    CN118133937A

  • Heterogeneous federated learning privacy protection method and system based on diffusion model

    CN118211268A

Cited By

  • Information technology data monitoring device and use method thereof

    CN119935254A