Data processing methods, apparatus and electronic equipment

CN119168086BActive Publication Date: 2026-08-11GRG BANKING IT
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

相关技术中,这些挑战主要通过简单地调整权重或增加训练轮次来应对,但这类方法忽视了数据分布差异的复杂性,因此效率低下,且无法显著提升模型准确率

Benefits of technology

[0045]根据本申请实施例提供的数据处理装置,通过将客户端和服务端数据分布转化为概率分布,计算客户端相对于服务端的KL散度以及重叠程度,能够更精细地筛选参与聚合的客户端以及参与的客户端对应的比重;这不仅使服务端能更准确地朝向全局最优解收敛,还减少了不必要的训练负担,提高了训练效率,从而有效应对了非独立同分布数据带来的挑战,实现了更高效、更准确的联邦学习,提高模型输出的生物特征识别的精确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168086B_ABST
    Figure CN119168086B_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, and electronic device, belonging to the field of electronic devices. The data processing method includes: acquiring first parameters sent by each client in the current round, and at least one of the following: the KL divergence and overlap degree 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; processing the first parameters sent by each client in the current round based on at least one of the KL divergence and overlap degree to obtain the second parameters of the server's global model in the current round; training the global model based on the second parameters and the corresponding second image data from the server to obtain the second data output by the global model in the current round; and sending the second parameters and the second data to each client. This data processing method achieves more efficient and accurate federated learning, improving the accuracy of the model output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Federated Learning (FL) is an emerging machine learning paradigm that aims to collaboratively train a global model by coordinating local data from multiple clients while ensuring user data privacy. However, FL faces a major challenge: the non-independent identically distributed (non-IID) problem of client data. This issue stems from the differences in user habits, behavioral characteristics, and other factors affecting different client data, leading to inconsistencies in data distribution and an inability to accurately reflect the overall data distribution. This data heterogeneity significantly degrades the performance of federated learning, not only prolonging the convergence period of model training but also exacerbating the instability of the training process. Related techniques primarily address these challenges by simply adjusting weights or increasing training epochs, but these methods ignore the complexity of data distribution differences, resulting in inefficiency and a failure to significantly improve model accuracy. Furthermore, these methods lead to a significant increase in computational resources and time costs. Summary of the Invention

[0003] This application aims to address at least one of the technical problems existing in related technologies. To this end, this application proposes a data processing method, apparatus, and electronic device that, by abstracting the data distribution of the client into a probability distribution and calculating the overlapping area, finely controls the training frequency and aggregation weights of the client, enabling the server to converge more accurately toward the global optimum, reducing unnecessary training burden, and improving training efficiency. This effectively addresses the challenges posed by non-independent and identically distributed data, achieving more efficient and accurate federated learning and improving the accuracy of model output.

[0004] Firstly, this application provides a data processing method applied to a server; the method includes:

[0005] The first parameter sent by each client in the current round is obtained, and at least one of the KL divergence and overlap between the first data output by the local model of the client in the current round and the second data output by the server in the previous round is obtained. The first parameter is the parameter of the local model trained by each client based on the first image data of the client.

[0006] The first parameters sent by each client in the current round are processed based on at least one of the KL divergence and the degree of overlap 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.

[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 client, and the second data is used by each client to calculate at least one of the KL divergence and overlap for the next round.

[0008] According to the data processing method provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the corresponding proportions of the participating clients. This not only enables the server to converge more accurately toward the global optimal solution, 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.

[0009] According to one embodiment of this application, the first parameter sent by each of the clients in the current round is processed based on at least one of the KL divergence and the overlap degree to obtain the 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] Based on at least one of the KL divergence and the degree of overlap, process each of the first parameters to obtain the second parameters of the global model in the current round;

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

[0012] According to one embodiment of this application, the step of processing each 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:

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

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

[0015] According to one embodiment of this application, the step of filtering multiple first parameters corresponding to multiple clients based on the degree of overlap to obtain first parameters corresponding to at least some target clients includes:

[0016] The first proportion of the number of clients with an overlap greater than a target threshold to the total number of clients is obtained.

[0017] The target threshold is updated based on the first ratio;

[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 one embodiment of this application, the aggregation of the first parameters sent by each of the target clients based on the KL divergence corresponding to each target client to obtain the second parameters includes:

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

[0021] Based on the weights, the first parameters sent by each of the target clients are weighted and aggregated to obtain the second parameters.

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

[0023] Secondly, this application provides a data processing method applied to a client; the method includes:

[0024] The client trains a local model based on the first image data and the second parameters, and obtains the first data and the first parameters of the local model in the current round output by the local model; the second parameters are sent to the client by the server; the second parameters are obtained by the server processing the first parameters sent by each client in the previous round based on at least one of KL divergence and overlap received in the previous round.

[0025] Based on the first data in the current round and the second data received from the server in the previous round, at least one of the KL divergence and overlap degree corresponding to the current round is obtained;

[0026] Send to the server at least one of the KL divergence and overlap degree corresponding to the current round, as well as the first parameter under the current round; the at least one of the KL divergence and overlap degree corresponding to the current round is used for the server's global model to train to generate the second data under the current round.

[0027] According to the data processing method provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the corresponding proportions of the participating clients. This not only enables the server to converge more accurately toward the global optimal solution, 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.

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

[0029] Based on the first data in the current round and the second data received from the server in the previous round, the mean and standard deviation of the first data and the mean and standard deviation of the second data are obtained.

[0030] Gaussian distribution processing is applied to the first data in the current round and the second data received from the server in the previous round to obtain the probability density function;

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

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

[0033] Based on the first data in the current round and the second data received from the server in the previous round, the mean and standard deviation of the first data and the mean and standard deviation of the second data are obtained.

[0034] The KL divergence is calculated based on the mean and the standard deviation.

[0035] According to one embodiment of this application, the first image data includes multiple frames of biometric images corresponding to a target category, wherein 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] Thirdly, this application provides a data processing apparatus applied to a server; the apparatus includes:

[0037] The first processing module is used to obtain the first parameter sent by each client in the current round, and at least one of the KL divergence and overlap between the first data output by the local model of the client in the current round and the second data output by the server in the previous round, wherein the first parameter is the parameter of the local model trained by each client based on the first image data of the client.

[0038] The second processing module is used to process the first parameters sent by each of the clients in the current round based on at least one of the KL divergence and the degree of overlap, to obtain the second parameters of the global model of the server in the current round; and to 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. The second parameter is used to optimize the local model of each client, and the second data is used by each client to calculate at least one of the KL divergence and overlap degree corresponding to the next round.

[0040] According to the data processing apparatus provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the proportion of each participating client. This not only enables the server to converge more accurately toward the global optimal solution, 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.

[0041] Fourthly, this application provides a data processing apparatus applied to a client; the apparatus includes:

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

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

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

[0045] According to the data processing apparatus provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the proportion of each participating client. This not only enables the server to converge more accurately toward the global optimal solution, 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.

[0046] Fifthly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data processing method as described in the first or second aspect above.

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

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

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

[0050] By transforming the data distribution of clients and servers into a probability distribution and calculating the KL divergence and overlap of clients relative to servers, it is possible to more precisely filter the clients participating in aggregation and the corresponding proportions of participating clients. This not only enables the server to converge more accurately toward the global optimum, but also reduces unnecessary training burden and improves training efficiency. Thus, it effectively addresses the challenges brought by non-independent and identically distributed data, achieves more efficient and accurate federated learning, and improves the accuracy of biometric recognition output by the model.

[0051] Furthermore, by filtering clients participating in aggregation based on the degree of overlap between the client's local model and the server's global model, during training, the frequency of participation of clients with high overlap can be reduced based on the degree of overlap, and training resources can be directed towards clients with poor training results, thereby achieving fine control over the training frequency and improving the training efficiency and accuracy of the global model.

[0052] Furthermore, by dynamically adjusting the aggregation weights of clients based on the magnitude of KL divergence, clients with smaller KL divergence are given higher weights. This enables more precise control over aggregation weights, which can solve problems such as low training efficiency caused by the diversity and complexity of client data distribution. It improves training accuracy, precision, and efficiency, and is applicable to scenarios with complex data distribution differences, thus having universality.

[0053] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

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

[0055] Figure 1 This is one of the flowcharts illustrating the data processing method provided in the embodiments of this application;

[0056] Figure 2 This is a second schematic flowchart of the data processing method provided in the embodiments of this application;

[0057] Figure 3 This is the third flowchart illustrating the data processing method provided in the embodiments of this application;

[0058] Figure 4 This is the fourth flowchart illustrating the data processing method provided in the embodiments of this application;

[0059] Figure 5 This is one of the structural schematic diagrams of the data processing apparatus provided in the embodiments of this application;

[0060] Figure 6 This is a second schematic diagram of the structure of the data processing device provided in the embodiments of this application;

[0061] Figure 7 This is a hardware schematic diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0062] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0063] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

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

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

[0066] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that, in some embodiments, the terminal may not be a portable communication device, but rather a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

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

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

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

[0070] In practical applications, federated learning algorithms can be used.

[0071] Federated learning often involves a server and multiple clients, which can be from various industries such as rail transit, schools, hospitals, or others.

[0072] The following section uses the server as the execution subject to explain the data processing method.

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

[0074] Step 110: The server obtains the first parameter sent by each client in the current round, and at least one of the KL divergence and overlap between the first data output by the client's local model in the current round and the second data output by the server in the previous round. The first parameter is the parameter of the local model trained by each client based on the client's first image data.

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

[0076] The local model is the model corresponding to each client, which is trained on each client. This 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. The parameters of the global model can be obtained by aggregating the parameters output by the local models trained on each client.

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

[0079] The first parameter can be the parameters of the local model trained by each client based on the client's first image data, which may include model weights, gradients, etc.

[0080] The first image data can be the training dataset of the local model on each client.

[0081] It is understandable that the training datasets for different clients may differ.

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

[0083] In actual execution, specific training datasets 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 can be classified to obtain three sub-sample sets: a, b, and c.

[0087] The sub-sample set of class a is used as the training dataset for client A, the sub-sample set of class b is used as the training dataset for client B, and the sub-sample set of class c is used as the training dataset for client C, so that the training datasets of each client together constitute a non-independent and identically distributed dataset.

[0088] The first data output by the client's local model in the current round can be the feature vector obtained by the client's local model after training in the current round.

[0089] The feature vector can be a vector containing feature information from the client's local model training data. For example, if the training dataset is a palm print image, the first output data can be a palm print feature vector.

[0090] The training rounds refer to the rounds in which the global model is trained.

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

[0092] Understandably, the first data output by the client's local model in the current round is the feature vector of the local model 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 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 represents the degree of difference in probability distributions.

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

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

[0097] It is understandable 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 can be the ratio of the overlapping areas of the probability distributions of the client and the server.

[0099] In actual implementation, the increased degree of overlap indicates that the model distribution tends to be consistent.

[0100] It should be noted that during the first round of training, each client only sends the first parameter to the server, without sending at least one of the KL divergence and overlap; from the second training round onwards, each client sends the first parameter and at least one of the KL divergence and overlap to the server.

[0101] Step 120: Process the first parameters sent by each client in the current round based on at least one of KL divergence and overlap 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 can be the training dataset of the global model on the server.

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

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

[0105] In actual execution, a specific training dataset can also be set for the server.

[0106] In some embodiments, the training dataset of the global model on the server can also be a collection of training datasets of the local models on each client.

[0107] Continuing with the examples of images of classes a, b, and c described in the previous embodiments, the training dataset corresponding to the server can simultaneously include images of classes a, b, and c.

[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 sent by each client in the current round based on at least one of KL divergence and overlap to obtain the second parameter of the server's global model in the current round can include: processing the first parameter sent by each client in the current round based on KL divergence to obtain the second parameter of the server's global model in the current round; or processing the first parameter sent by each client in the current round based on overlap to obtain the second parameter of the server's global model in the current round; or processing the first parameter sent by each client in the current round based on both KL divergence and overlap to obtain the second parameter of the server's global model in the current round.

[0111] During training, the global model on the server is trained without updating its internal parameters. That is, the update of the global model's training parameters depends on the model parameters sent by the local models trained on each client.

[0112] In actual implementation, any feasible training method can be used to train the global model, which will not be elaborated here.

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

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

[0115] The first parameters are processed based on at least one of KL divergence and overlap to obtain the second parameters 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, KL divergence represents the degree of difference in probability distributions. In actual execution, the first parameter can be filtered or weighted based on 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 can be the ratio of the overlapping area of ​​the probability distributions of the client and the server. In actual execution, clients can be screened based on the degree of overlap to increase the proportion of the first parameter corresponding to the local model with a smaller degree of difference participating in this global training.

[0119] like Figure 2 As shown, after obtaining the second parameters of the global model in the current round, the second parameters are 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 target, and the second data output by the global model is obtained.

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

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

[0122] like Figure 4 As shown, in some embodiments, processing each first parameter based on at least one of KL divergence and overlap to obtain the second parameters 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 filtered to obtain the 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 parameters.

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

[0126] The aggregation method for the first parameters sent by each target client can be a weighted average.

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

[0128] According to the data processing method provided in the embodiments of this application, the first parameter is first screened by the degree of overlap to obtain the target clients participating in the current round of aggregation processing. Then, the first parameter of the target clients is aggregated by the KL divergence of the screened target clients to obtain the second parameter of the current round. This can reduce the frequency of participation of clients with high overlap, and tend to allocate training resources to clients with poor training performance. Furthermore, the aggregation weight of the clients can be dynamically adjusted according to the size ratio of the KL divergence, which can achieve more refined control of training frequency and aggregation weight, thereby improving the accuracy, precision and efficiency of training. It is also applicable to scenarios with complex data distribution differences and has universality.

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

[0130] The highest proportion of clients with an overlap greater than the target threshold is obtained.

[0131] Update the target threshold based on the first ratio;

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

[0133] In this embodiment, the target threshold is the threshold value of the ratio of the overlap area between the probability distributions of the client's first data and the server's second data.

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

[0135] For example, if the first proportion is between 0 and 1, the preset threshold can be set to 0.5; if the first proportion is greater than 0.5, it is considered that the proportion of clients exceeding the target threshold is too large, so the target threshold is increased; if the first proportion is not greater than 0.5, it is considered that the proportion of clients below the target threshold is too large, so the target threshold is decreased.

[0136] Based on the first ratio, updating the target threshold may further include: based on the first ratio, determining a second ratio of the number of clients with an overlap degree not greater than the target threshold to the total number of 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. The global model is trained for 200 epochs. After 100 epochs, the initial overlap threshold is set to 0.15. In subsequent training, the threshold is adjusted by ±0.01 based on the proportion of clients with overlap greater than or less than the threshold. When there are 6 clients with overlap greater than the threshold, the proportion of clients with overlap greater than the threshold is 3 / 5, and the corresponding proportion of clients with overlap less 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 are selected from all clients and determined as the parameters participating in the global model aggregation process.

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

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

[0141] The weights for each target client are determined based on the KL divergence of each target client.

[0142] Based on the weights, the first parameters sent by each target client are weighted and aggregated to obtain the second parameter.

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

[0144] The weights corresponding to each target client can be obtained by inversely proportional to the KL divergence of each target client.

[0145] It is understandable that the larger the KL divergence of the target client, the smaller the assigned weight.

[0146] According to the data processing method provided in the embodiments of this application, the aggregation weight of the client is dynamically adjusted by the ratio of the size of KL divergence, and the client with smaller KL divergence is given a higher weight. This can achieve more refined aggregation weight control, solve the problem of low training efficiency caused by the diversity and complexity of client data distribution, improve the accuracy and efficiency of training, and is applicable to scenarios with complex data distribution differences, thus having universality.

[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. The second data is used by each client to calculate at least one of the KL divergence and overlap degree corresponding to the next round.

[0148] In this step, sending the second parameter of the server's global model to the client enables the client's local model to be updated and optimized iteratively, gradually bringing the distribution of the client's local model and the server's global model closer together, thus achieving the training effect of the global model. Sending the second data of the server's global model to the client allows each client to calculate at least one of the KL divergence and overlap degree corresponding to the next round, thereby updating and optimizing the global model parameters for the next round and improving the accuracy of the global model.

[0149] Continue to refer to Figure 2 Upon receiving the second parameter and the second data, the client trains the local model based on the second parameter and the first image data to obtain the first data and the first parameter. Based on the first data and the second data, the client calculates at least one of KL divergence and overlap, and sends the calculation results of the first parameter, KL divergence, and overlap to the server. The server then re-executes the logic of steps 110 to 130, and repeats this process until the preset number of training rounds or the desired global model accuracy is reached.

[0150] During the research and development process, the inventors discovered that in related technologies, training challenges arise in non-independent identically distributed (non-IID) federated learning environments due to the diversity of client data distributions. Currently, these challenges are mainly addressed by simply adjusting weights or increasing training epochs, but these methods ignore the complexity of data distribution differences, thus being inefficient and failing to significantly improve model accuracy. Furthermore, these methods also lead to a significant increase in computational resources and time costs.

[0151] In this application, the data distribution of clients and servers is transformed into a probability distribution. The KL divergence and overlap between clients and servers are calculated. Based on the KL divergence and overlap, the aggregation weights and training frequencies of each client are adjusted. The training parameters of the global model of the server are also adjusted based on the aggregation weights and training frequencies of each client. The global model of the server is trained using these training parameters, and the training parameters of the local models of each client in the next training round are initialized. This makes the model distribution of each client more consistent with the global model distribution, enabling the server to converge more accurately toward the global optimum, reducing unnecessary training burden, improving training efficiency, and ultimately improving the accuracy of non-IID federated learning.

[0152] According to the data processing method provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the corresponding proportions of the participating clients. This not only enables the server to converge more accurately toward the global optimal solution, 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.

[0153] This application also provides a data processing method.

[0154] The following explanation of the data processing method will focus on the client side.

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

[0156] Step 310: Train the local model of the client based on the first image data and the second parameters, and obtain the first data and the first parameters of the local model in the current round output by the local model; the second parameters are sent by the server to the client; the second parameters are obtained by the server processing the first parameters sent by each client in the previous round based on at least one of KL divergence and overlap received in the previous round.

[0157] In this step, the first image data is the training dataset of the client's local model.

[0158] The second parameter is the global model parameter obtained after aggregating the client's first parameter in the previous round of global model processing.

[0159] Understandably, the second parameter is the initial training parameter of the client's local model in the current training round.

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

[0161] The first parameter is the model parameter after the client's local model has been trained in the current training round.

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

[0163] Step 320: Based on the first data in the current round and the second data received from the server in the previous round, obtain at least one of the KL divergence and overlap degree corresponding to the current round;

[0164] In this step, the second data sent by the server from the previous round is the feature vector of the global model output by the server after the global model has been trained 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 from the previous round sent by the server, the mean and standard deviation of the first data and the mean and standard deviation of the second data are obtained.

[0167] The probability density function is obtained by applying Gaussian distribution processing to the first data in the current round and the second data received from the server in the previous round.

[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 from the overlap area, which can be obtained by multiplying the probability density functions of the first and second data, which are abstracted into Gaussian distributions, 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 (such as Max(μ1+5*σ1,μ2+5*σ2), Min(μ1-5*σ1,μ2-5*σ2)) based on the mean and standard deviation of the first and second data.

[0171] The overlapping area is calculated as follows:

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

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

[0174] The degree of overlap can be defined as the ratio of the overlapping area to the server-side 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 to the same upper and lower limits as the overlapping area.

[0177] According to the data processing method provided in the embodiments of this 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 select the local model of the target client to participate in the global model training, and tend to the client with poor training effect 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 the KL divergence and overlap degree corresponding to the current round based on the first data in the current round and the second data received from the server in the previous round may include:

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

[0180] The KL divergence is calculated based on the mean and standard deviation.

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

[0182]

[0183] Where μ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 actual implementation, the aggregated weights of parameters from the client to the server are determined based on the weight ratio of KL divergence.

[0185] Specifically, the larger the KL divergence, the greater the difference in distribution between the two, and the smaller the weight assigned.

[0186] According to the data processing method provided in the embodiments of this application, by calculating the KL divergence of the client relative to the server, the aggregation weight of the client can be dynamically adjusted according to the magnitude ratio of the KL divergence. The client with a smaller KL divergence is given a higher weight, which can achieve more refined aggregation weight control. This can solve the problems of low training efficiency caused by the diversity and complexity of client data distribution, improve the accuracy and efficiency of training, and is applicable to scenarios with complex data distribution differences, thus having universality.

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

[0188] In this step, sending at least one of the KL divergence and overlap degree corresponding to the current round, as well as the first parameter under the current round, to the server enables the server to filter the first parameter of the client based on at least one of the KL divergence and overlap degree, thereby achieving more refined weight aggregation processing and improving the training efficiency and accuracy of the global model.

[0189] Continue to refer to Figure 2 Upon receiving at least one of KL divergence and overlap degree as a first parameter, the server aggregates the first parameter based on at least one of KL divergence and overlap degree to obtain the second parameter used for model training of the global model. The server then trains the global model without updating its internal parameters based on the second image data to obtain the second data of the global model. The second data and the second parameter are then sent to the client. The client then re-executes the logic of steps 310 to 330, and repeats this process until the preset number of training rounds of the global model or the desired accuracy of the global model is reached.

[0190] According to the data processing method provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the corresponding proportions of the participating clients. This not only enables the server to converge more accurately toward the global optimal solution, 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.

[0191] The data processing method provided in this application can be executed by a data processing device. This application uses an example of a data processing device executing the data processing method to illustrate the data processing device provided in this application.

[0192] This application also provides a data processing apparatus.

[0193] like Figure 5 As shown, the data processing device is applied to the server side, 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 parameters sent by each client in the current round, and at least one of the KL divergence and overlap between the first data output by the client's local model in the current round and the second data output by the server in the previous round. The first parameters are the parameters of the local model trained by each client based on the client's first image data.

[0195] The second processing module 520 is used to process the first parameters sent by each client in the current round based on at least one of KL divergence and overlap, to obtain the second parameters of the global model of the server in the current round; and to 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 by each client to calculate at least one of the KL divergence and overlap degree corresponding to the next round.

[0197] According to the data processing apparatus provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the proportion of each participating client. This not only enables the server to converge more accurately toward the global optimal solution, 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.

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

[0199] The first parameters are processed based on at least one of KL divergence and overlap to obtain the second parameters 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 for:

[0202] Based on the degree of overlap, multiple first parameters corresponding to multiple clients are filtered to obtain the 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 parameters.

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

[0205] The highest proportion of clients with an overlap greater than the target threshold is obtained.

[0206] Update the target threshold based on the first ratio;

[0207] The first parameter corresponding to the client whose overlap is no greater than the updated target threshold among all 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 for:

[0209] The weights for each target client are determined based on the KL divergence of each target client.

[0210] Based on the weights, the first parameters sent by each target client are weighted and aggregated to obtain the second parameter.

[0211] This application also provides a data processing apparatus.

[0212] like Figure 6 As shown, the data processing device is applied to the client and 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 a local model of the client based on the first image data and the second parameters, and to obtain the first data and the first parameters of the local model in the current round output by the local model; the second parameters are sent by the server to the client; the second parameters are obtained by the server processing the first parameters sent by each client in the previous round based on at least one of KL divergence and overlap received in the previous round.

[0214] The second processing module 620 is used to obtain at least one of the KL divergence and 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 overlap degree corresponding to the current round, as well as the first parameter under the current round, to the server; at least one of the KL divergence and overlap degree corresponding to the current round is used for the server's global model to train in order to generate the second data under the current round.

[0216] According to the data processing apparatus provided in the embodiments of this application, by transforming the data distribution of the client and the server into a probability distribution, and calculating the KL divergence and overlap of the client relative to the server, it is possible to more precisely filter the clients participating in the aggregation and the proportion of each participating client. This not only enables the server to converge more accurately toward the global optimal solution, 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.

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

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

[0219] The probability density function is obtained by applying Gaussian distribution processing to the first data in the current round and the second data received from the server in the previous round.

[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 for:

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

[0223] The KL divergence is calculated based on the mean and standard deviation.

[0224] The data processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0225] The data processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.

[0226] The data processing device provided in this application embodiment can achieve... Figures 1 to 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0227] In some embodiments, such as Figure 7 As shown, this application embodiment 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, it implements the various processes of the above-described data processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

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

[0229] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described data processing method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

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

[0231] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described data processing method.

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

[0233] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above data processing method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0234] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0235] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0237] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0238] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

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

Claims

1. A data processing method, characterized in that, Applied to the server side, the method includes: The first parameter sent by each client in the current round is obtained, and at least one of the KL divergence and overlap between the first data output by the local model of the client in the current round and the second data output by the server in the previous round is obtained. The first parameter is the parameter of the local model trained by each client based on the first image data of the client. The first parameters sent by each client in the current round are processed based on at least one of the KL divergence and the degree of overlap 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. 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 client, and the second data is used by each client to calculate at least one of the KL divergence and overlap for the next round.

2. The data processing method according to claim 1, characterized in that, The first parameter sent by each client in the current round is processed based on at least one of the KL divergence and the overlap degree to obtain the 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: Based on at least one of the KL divergence and the degree of overlap, process each of the first parameters to obtain the second parameters of the global model in the current round; 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.

3. The data processing method according to claim 2, characterized in that, The step of processing each of the first parameters based on at least one of the KL divergence and the overlap to obtain the second parameters of the global model in the current round includes: Based on the degree of overlap, multiple first parameters corresponding to multiple clients are filtered to obtain first parameters corresponding to at least some of the target clients; 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.

4. The data processing method according to claim 3, characterized in that, The step of filtering multiple first parameters corresponding to multiple clients based on the degree of overlap to obtain first parameters corresponding to at least some target clients includes: The first proportion of the number of clients with an overlap greater than a target threshold to the total number of clients is obtained. The target threshold is updated based on the first ratio; 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 aggregation of the first parameters sent by each target client based on the KL divergence corresponding to each target client to obtain the second parameters includes: Based on the KL divergence corresponding to each target client, determine the weight corresponding to each target client; Based on the weights, the first parameters sent by each of the target clients are weighted and aggregated to obtain the second parameters.

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

7. A data processing method, characterized in that, Applied to a client, the method includes: The client trains a local model based on the first image data and the second parameters, and obtains the first data and the first parameters of the local model in the current round output by the local model; the second parameters are sent to the client by the server; the second parameters are obtained by the server processing the first parameters sent by each client in the previous round based on at least one of KL divergence and overlap received in the previous round. Based on the first data in the current round and the second data received from the server in the previous round, at least one of the KL divergence and overlap degree corresponding to the current round is obtained; Send to the server at least one of the KL divergence and overlap degree corresponding to the current round, as well as the first parameter under the current round; the at least one of the KL divergence and overlap degree corresponding to the current round is used for the server's global model to train to generate the second data under the current round.

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

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

10. The data processing method according to any one of claims 7-9, characterized in that, The first image data includes multiple frames of biometric images corresponding to a target category, where 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.

11. A data processing apparatus, characterized in that, Applied to the server side, the device includes: The first processing module is used to obtain the first parameter sent by each client in the current round, and at least one of the KL divergence and overlap between the first data output by the local model of the client in the current round and the second data output by the server in the previous round, wherein the first parameter is the parameter of the local model trained by each client based on the first image data of the client. The second processing module is used to process the first parameters sent by each of the clients in the current round based on at least one of the KL divergence and the degree of overlap, to obtain the second parameters of the global model of the server in the current round; and to 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 parameter and the second data to each of the clients. 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 overlap degree corresponding to the next round.

12. A data processing apparatus, characterized in that, Applied to a client, the device includes: The fourth processing module is used to train a local model of the client based on the first image data and the second parameters, and to obtain the first data of the current round output by the local model and the first parameters of the local model; the second parameters are sent by the server to the client; the second parameters are obtained by the server processing the first parameters sent by each client in the previous round based on at least one of KL divergence and overlap received in the previous round. The fifth processing module is used to obtain at least one of the KL divergence and overlap degree corresponding to the current round based on the first data in the current round and the second data sent by the server in the previous round. The sixth processing module sends at least one of the KL divergence and overlap degree corresponding to the current round, as well as the first parameter under the current round, to the server; the at least one of the KL divergence and overlap degree corresponding to the current round is used for training the global model of the server to generate the second data under 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, it implements the data processing method as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Improved transverse synchronous federated learning aggregation acceleration method

    CN116629350A

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

    CN118133937A