Federal learning-based data processing method, device and system

Through adaptive feature selection and deep neural network encoding, combined with Xavier initialization and encrypted communication, federated learning parameters are dynamically adjusted, which solves the problem of low efficiency and accuracy of model training caused by data heterogeneity in the existing technology, and achieves more efficient Safe data processing and model training.

CN118886479APending Publication Date: 2024-11-01CHUANGYI (SHANGHAI) INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing federated learning data processing methods cannot effectively deal with the diversity of data format, quality and distribution characteristics, resulting in the model paying too much attention to noise characteristics, reducing the accuracy and robustness of the model, and lacking reasonable initialization strategies, resulting in model training. Inefficiency and waste of computing resources.

Method used

Feature encoding is performed through adaptive feature selection function and deep neural network model, and the feature importance weight and learning rate are dynamically adjusted according to data heterogeneity and network environment. The Xavier initialization method is used to set the global model initial weight and bias terms, and then the encryption is performed. The communication module performs model parameters exchange and aggregation, and dynamically adjusts the parameters and strategies of federated learning to adapt to changes in data distribution.

Benefits of technology

Improve the model's attention to predicting key features, enhance the flexibility and accuracy of the model, ensure the reasonable distribution and safe transmission of model parameters, improve training efficiency and model quality, and enhance the adaptability to data heterogeneity. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886479A_ABST
    Figure CN118886479A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and system based on federated learning, and belongs to the technical field of data processing.The method includes the steps that heterogeneous data of different participants are collected and preprocessed, key features are extracted according to the preprocessed heterogeneous data, and feature coding is carried out. The importance weight of the features is automatically adjusted according to the heterogeneity degree of the data and the network environment, it is ensured that the model focuses on the features most effective for prediction, feature coding is conducted through the deep neural network model M, high-dimensional features are mapped to a low-dimensional space, the capacity of the model for processing complex data is improved, and the prediction efficiency is improved. An initial weight and an offset item of a global model are set through a Xavier initialization method, reasonable distribution of model parameters is ensured, a training process is accelerated, parameters, a learning rate and a communication round number in federal learning are dynamically adjusted according to a data heterogeneity degree, so that the model can adapt to data distribution changes more flexibly, and training efficiency and model quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and specifically refers to a data processing method, device and system based on federated learning. Background Art

[0002] With the advent of the big data era, the efficiency and security of data processing have become issues to be solved. Traditional data processing methods usually require all data to be centralized on a central server for processing, which not only increases the risk of data leakage, but also limits the efficiency and flexibility of data processing.

[0003] However, there are still some defects in the existing federated learning data processing. The existing federated learning data processing adopts fixed or static feature selection and encoding strategies, which cannot effectively cope with the diversity of data format, quality and distribution characteristics, resulting in the model paying too much attention to noise characteristics and ignoring the signals that are really critical to prediction, which reduces the accuracy and robustness of the model. The lack of a reasonable initialization strategy will prolong the time it takes for the model to reach a stable state and consume more computing resources. It fails to dynamically adjust according to the heterogeneity of the data, resulting in the model being unable to flexibly adapt to changes in data distribution, affecting the training efficiency and model quality. Therefore, a data processing method, device and system based on federated learning are proposed. Summary of the invention

[0004] The purpose of the present invention is to provide a data processing method, device and system based on federated learning to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a data processing method, device and system based on federated learning, comprising the following steps:

[0006] S1. Collect heterogeneous data from different participants and perform preprocessing;

[0007] S2, extracting key features and performing feature encoding based on the preprocessed heterogeneous data;

[0008] S3, the central server initializes the global model parameters and distributes them to each participant, and evaluates the degree of heterogeneity of the participant data;

[0009] S4, dynamically adjust the parameters and strategies of federated learning according to the degree of heterogeneity and network environment;

[0010] S5. Each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation;

[0011] S6. Evaluate the trained global model, adjust and optimize the global model based on the evaluation results, and deploy the optimized global model.

[0012] Among them, S2, the pre-processed heterogeneous data is used to extract key features and perform feature encoding, and the importance weight of the features is automatically adjusted according to the heterogeneous data and the dynamic network environment. An adaptive feature selection function is set to F, and the adaptive feature selection function implementation formula is:

[0013] F(X,W,N)=W′,

[0014] In the formula, X represents the preprocessed heterogeneous data, W represents the initial feature weight vector, N represents the network state vector, and W′ represents the adjusted feature weight vector;

[0015] According to the selected features, the deep neural network model is used to encode and map the high-dimensional features to the low-dimensional space. Let the deep neural network model be M, and the feature encoding formula is:

[0016] Z=M(F,θ),

[0017] In the formula, Z represents the feature encoding of the output, F represents the features selected by the input, and θ represents the model parameters.

[0018] Among them, in S3, the central server sets the initial weights and initial values ​​of the bias items of the global model through the Xavier initialization method. Assume that the global model has n layers in the first layer. l input neurons and n l+1 output neurons, with a weight matrix W l , the global model initialization implementation formula is:

[0019]

[0020] In the formula, W l,ij represents the weight from the i-th input neuron to the j-th output neuron in the l-th layer of the neural network, u represents the uniformly distributed random number generator, the random value generated when the weight is initialized, α represents the data heterogeneity factor, and adjusts the weight initialization range;

[0021] After the global model is initialized, the central server sends the global model parameters to the participant devices through a secure communication channel.

[0022] Wherein, in said S3, the central server collects the data sets of the participants, and the central server evaluates the degree of heterogeneity of the data of each participant based on the statistical information of the collected data sets;

[0023] Suppose there are N participants, and the data set of each participant i is X i , the feature dimension is Fi , the degree of heterogeneity is H, and the heterogeneity evaluation formula is:

[0024]

[0025] In the formula, the smaller the heterogeneity index is, the higher the similarity between data sets is, and vice versa, the stronger the heterogeneity is.

[0026] The initial weights and bias items of the global model are set through the Xavier initialization method to ensure the reasonable distribution of model parameters and accelerate the training process. In addition, the parameters, learning rate and number of communication rounds in federated learning are dynamically adjusted according to the degree of heterogeneity of the data, so that the model can adapt to changes in data distribution more flexibly and improve training efficiency and model quality.

[0027] Among them, S4 dynamically adjusts the parameters and strategies of federated learning according to the degree of heterogeneity and the network environment, and the formula for dynamically adjusting the learning rate is:

[0028] η t =η 0 ·exp(-λH t ),

[0029] In the formula, η t represents the dynamic learning rate of the tth round, η 0 represents the initial learning rate, H t represents the degree of data heterogeneity in the tth round, and λ represents the degree of influence of controlling heterogeneity on the learning rate;

[0030] The parameters of federated learning are dynamically adjusted according to the network environment. The formula for dynamically adjusting the number of communication rounds is:

[0031] T t =T 0 +α·ΔH t ,

[0032] In the formula, T t represents the number of communication rounds in round t, T 0 represents the basic communication round number, α represents the adjustment factor, where ΔH t =H t -H t-1 Indicates the change in the degree of data heterogeneity. When the heterogeneity changes significantly, increasing the number of communication rounds will help the model adapt to changes in data distribution more quickly.

[0033] Wherein, in said S5, each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation;

[0034] The encryption strength is adjusted during the training of the local model. The encryption strength increases at a rate that increases with the heterogeneity of the data. The encryption strength adjustment formula is:

[0035] E t =E 0 +β·log(1+H t ),

[0036] In the formula, E t represents the encryption strength of the tth round, which is dynamically adjusted according to the degree of data heterogeneity. 0 represents the encryption strength without the influence of data heterogeneity, β represents the degree of influence of the degree of data heterogeneity on the encryption strength, and H t Indicates the degree of data heterogeneity in round t, and sends the updated model parameters to the central server;

[0037] The central server receives the new model parameters and aggregates them to generate an updated global model. The implementation formula is:

[0038]

[0039] In the formula, g t represents the global model parameters of the tth round, N t represents the number of participants in round t, γ t represents the weight of participant i, which is determined according to the degree of data heterogeneity and the state of the network environment, θ i (t) represents the local model parameters of participant i in round t.

[0040] Among them, S6 verifies the trained global model, evaluates the global model according to the verification set, analyzes the deviation and variance of the model, determines the model status, adjusts the parameters according to the evaluation results to optimize the model, and deploys the optimized global model.

[0041] Among them, a data processing device based on federated learning is characterized by: including a central server, a memory, a processor, a participant device and an encrypted communication module.

[0042] Among them, a data processing system based on federated learning is characterized by: including:

[0043] Data collection and preprocessing module: used to collect heterogeneous data of participants and perform data preprocessing;

[0044] Feature extraction and encoding module: extract features from the processed heterogeneous data, automatically adjust the importance weight of features according to the heterogeneity of the data and the network environment, and encode the selected features;

[0045] Global model initialization module: The central server initializes the global model through Xavier and sends it to the participant devices through a secure communication channel;

[0046] Federated learning parameter strategy adjustment module: dynamically adjusts the parameters of federated learning according to the degree of data heterogeneity and network environment;

[0047] Model training and parameter exchange module: Participants train local models using data after local preprocessing and feature extraction;

[0048] Model aggregation module: The central server collects the model parameters of each participant and aggregates them;

[0049] Global model evaluation and optimization module: evaluates the global model performance through the validation set, and adjusts the model parameters for optimization based on the evaluation results;

[0050] Global model deployment module: deploys the optimized global model to actual application scenarios.

[0051] Compared with the prior art, the present invention has the following beneficial effects:

[0052] 1. In order to solve the problem that data from different sources have different formats, quality and distribution characteristics, direct merging and training easily introduces noise, which affects the model effect, and improves the efficiency and flexibility of data heterogeneity processing and model training, the present invention uses an adaptive feature selection function F to automatically adjust the importance weight of features according to the degree of data heterogeneity and the network environment, ensuring that the model focuses on the most effective features for prediction, and uses a deep neural network model M to perform feature encoding, map high-dimensional features to low-dimensional space, and improve the model's ability to process complex data;

[0053] 2. The present invention sets the initial weights and bias items of the global model through the Xavier initialization method to ensure the reasonable distribution of model parameters and accelerate the training process. In addition, the parameters, learning rate and number of communication rounds in federated learning are dynamically adjusted according to the degree of heterogeneity of the data, so that the model can adapt to changes in data distribution more flexibly, thereby improving training efficiency and model quality;

[0054] 3. The encryption strength Ct of the present invention increases with the increase of data heterogeneity through the encryption strength adjustment mechanism, ensuring the security of model parameters during transmission. At the same time, the model parameters are exchanged through the encryption communication module, and the central server can safely aggregate the model updates of each participant to generate a global model;

[0055] 4. The present invention receives and aggregates model parameters from participants through a central server to generate an updated global model θt, taking into account the data heterogeneity and network status of each participant, ensuring that the global model can fully reflect the data characteristics and training results of all participants. At the same time, through the global model evaluation and optimization module, the model performance is evaluated according to the verification set, and the parameters are adjusted for optimization to ensure the generalization ability and prediction accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 The operating process of a data processing method based on federated learning of the present invention is as follows Figure 1 ;

[0057] Figure 2 The operating process of a data processing method based on federated learning of the present invention is as follows Figure 2 ;

[0058] Figure 3 This is a structural schematic diagram of a data processing device based on federated learning according to the present invention;

[0059] Figure 4 This is a structural schematic diagram of a data processing system based on federated learning in the present invention. DETAILED DESCRIPTION

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

[0061] Example

[0062] See also Figure 1-Figure 4 As shown, the present invention provides a technical solution: comprising the following steps:

[0063] S1. Collect heterogeneous data from different participants and perform preprocessing;

[0064] S2, extracting key features and performing feature encoding based on the preprocessed heterogeneous data;

[0065] S3, the central server initializes the global model parameters and distributes them to each participant, and evaluates the degree of heterogeneity of the participant data;

[0066] S4, dynamically adjust the parameters and strategies of federated learning according to the degree of heterogeneity and network environment;

[0067] S5. Each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation;

[0068] S6. Evaluate the trained global model, adjust and optimize the global model based on the evaluation results, and deploy the optimized global model.

[0069] Among them, S2, the pre-processed heterogeneous data is used to extract key features and perform feature encoding, and the importance weight of the features is automatically adjusted according to the heterogeneous data and the dynamic network environment. An adaptive feature selection function is set to F, and the adaptive feature selection function implementation formula is:

[0070] F(X,W,N)=W′,

[0071] In the formula, X represents the preprocessed heterogeneous data, W represents the initial feature weight vector, N represents the network state vector, and W′ represents the adjusted feature weight vector;

[0072] According to the selected features, the deep neural network model is used to encode and map the high-dimensional features to the low-dimensional space. Let the deep neural network model be M, and the feature encoding formula is:

[0073] Z=M(F,θ),

[0074] In the formula, Z represents the feature encoding of the output, F represents the features selected by the input, and θ represents the model parameters.

[0075] Among them, in S3, the central server sets the initial weights and initial values ​​of the bias items of the global model through the Xavier initialization method. Assume that the global model has n layers in the first layer. l input neurons and n l+1 output neurons, with a weight matrix W l , the global model initialization implementation formula is:

[0076]

[0077] In the formula, W l,ij represents the weight from the i-th input neuron to the j-th output neuron in the l-th layer of the neural network, u represents the uniformly distributed random number generator, the random value generated when the weight is initialized, α represents the data heterogeneity factor, and adjusts the weight initialization range;

[0078] After the global model is initialized, the central server sends the global model parameters to the participant devices through a secure communication channel.

[0079] Wherein, in said S3, the central server collects the data sets of the participants, and the central server evaluates the degree of heterogeneity of the data of each participant based on the statistical information of the collected data sets;

[0080] Suppose there are N participants, and the data set of each participant i is X i , the feature dimension is F i , the degree of heterogeneity is H, and the heterogeneity evaluation formula is:

[0081]

[0082] In the formula, the smaller the heterogeneity index is, the higher the similarity between data sets is, and vice versa, the stronger the heterogeneity is.

[0083] The initial weights and bias items of the global model are set through the Xavier initialization method to ensure the reasonable distribution of model parameters and accelerate the training process. In addition, the parameters in federated learning, learning rate ηt and number of communication rounds Tt are dynamically adjusted according to the degree of heterogeneity of the data, so that the model can adapt to changes in data distribution more flexibly and improve training efficiency and model quality.

[0084] Among them, S4 dynamically adjusts the parameters and strategies of federated learning according to the degree of heterogeneity and the network environment, and the formula for dynamically adjusting the learning rate is:

[0085] η t =η 0 ·exp(-λH t ),

[0086] In the formula, η t represents the dynamic learning rate of the tth round, η 0 represents the initial learning rate, H t represents the degree of data heterogeneity in the tth round, and λ represents the degree of influence of controlling heterogeneity on the learning rate;

[0087] The parameters of federated learning are dynamically adjusted according to the network environment. The formula for dynamically adjusting the number of communication rounds is:

[0088] T t =T 0 +α·ΔH t ,

[0089] In the formula, T t represents the number of communication rounds in round t, T 0 represents the basic communication round number, α represents the adjustment factor, where ΔH t =H t -H t-1 Indicates the change in the degree of data heterogeneity. When the heterogeneity changes significantly, increasing the number of communication rounds will help the model adapt to changes in data distribution more quickly.

[0090] Wherein, in said S5, each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation;

[0091] The encryption strength is adjusted during the training of the local model. The encryption strength increases at a rate that increases with the heterogeneity of the data. The encryption strength adjustment formula is:

[0092] E t =E 0 +β·log(1+H t ),

[0093] In the formula, E t represents the encryption strength of the tth round, which is dynamically adjusted according to the degree of data heterogeneity. 0 represents the encryption strength without the influence of data heterogeneity, β represents the degree of influence of the degree of data heterogeneity on the encryption strength, and H t Indicates the degree of data heterogeneity in round t, and sends the updated model parameters to the central server;

[0094] The central server receives the new model parameters and aggregates them to generate an updated global model. The implementation formula is:

[0095]

[0096] In the formula, g t represents the global model parameters of the tth round, N t represents the number of participants in round t, γ t represents the weight of participant i, which is determined according to the degree of data heterogeneity and the state of the network environment, θ i (t) represents the local model parameters of participant i in round t.

[0097] Among them, S6 verifies the trained global model, evaluates the global model according to the verification set, analyzes the deviation and variance of the model, determines the model status, adjusts the parameters according to the evaluation results to optimize the model, and deploys the optimized global model.

[0098] Among them, a data processing device based on federated learning is characterized by: including a central server, a memory, a processor, a participant device and an encrypted communication module.

[0099] Among them, a data processing system based on federated learning is characterized by: including:

[0100] Data collection and preprocessing module: used to collect heterogeneous data of participants and perform data preprocessing;

[0101] Feature extraction and encoding module: extract features from the processed heterogeneous data, automatically adjust the importance weight of features according to the heterogeneity of the data and the network environment, and encode the selected features;

[0102] Global model initialization module: The central server initializes the global model through Xavier and sends it to the participant devices through a secure communication channel;

[0103] Federated learning parameter strategy adjustment module: dynamically adjusts the parameters of federated learning according to the degree of data heterogeneity and network environment;

[0104] Model training and parameter exchange module: Participants train local models using data after local preprocessing and feature extraction;

[0105] Model aggregation module: The central server collects the model parameters of each participant and aggregates them;

[0106] Global model evaluation and optimization module: evaluates the global model performance through the validation set, and adjusts the model parameters for optimization based on the evaluation results;

[0107] Global model deployment module: deploys the optimized global model to actual application scenarios.

[0108] In this example, specifically: S2 extracts key features from the preprocessed heterogeneous data and performs feature encoding, automatically adjusts the importance weight of the features according to the heterogeneous data and the dynamic network environment, and assumes an adaptive feature selection function as F. The adaptive feature selection function implementation formula is:

[0109] F(X,W,N)=W′,

[0110] In the formula, X represents the preprocessed heterogeneous data, W represents the initial feature weight vector, N represents the network state vector, and W′ represents the adjusted feature weight vector;

[0111] According to the selected features, the deep neural network model is used to encode and map the high-dimensional features to the low-dimensional space. Let the deep neural network model be M, and the feature encoding formula is:

[0112] Z=M(F,θ),

[0113] In the formula, Z represents the feature encoding of the output, F represents the features selected by the input, and θ represents the model parameters.

[0114] In this example, specifically: in S3, the central server collects data sets of participants, and the central server evaluates the degree of heterogeneity of the data of each participant based on the collected statistical information of the data sets;

[0115] Suppose there are N participants, and the data set of each participant i is X i , the feature dimension is F i , the degree of heterogeneity is H, and the heterogeneity evaluation formula is:

[0116]

[0117] In the formula, the smaller the heterogeneity index is, the higher the similarity between data sets is, and vice versa, the stronger the heterogeneity is.

[0118] The initial weights and bias items of the global model are set through the Xavier initialization method to ensure the reasonable distribution of model parameters and accelerate the training process. In addition, the parameters, learning rate and number of communication rounds in federated learning are dynamically adjusted according to the degree of heterogeneity of the data, so that the model can adapt to changes in data distribution more flexibly and improve training efficiency and model quality.

[0119] In this example, specifically, in S5, each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation;

[0120] The encryption strength is adjusted during the training of the local model. The encryption strength increases at a rate that increases with the heterogeneity of the data. The encryption strength adjustment formula is:

[0121] E t =E 0 +β·log(1+H t ),

[0122] In the formula, E t represents the encryption strength of the tth round, which is dynamically adjusted according to the degree of data heterogeneity. 0 represents the encryption strength without the influence of data heterogeneity, β represents the degree of influence of the degree of data heterogeneity on the encryption strength, and H t Indicates the degree of data heterogeneity in round t, and sends the updated model parameters to the central server;

[0123] The central server receives the new model parameters and aggregates them to generate an updated global model. The implementation formula is:

[0124]

[0125] In the formula, g t represents the global model parameters of the tth round, N t represents the number of participants in round t, γ t represents the weight of participant i, which is determined according to the degree of data heterogeneity and the state of the network environment, θ i(t) represents the local model parameters of participant i in round t.

[0126] Working principle: Collect heterogeneous data from different participants, pre-process the collected data, and use the adaptive feature selection function to dynamically adjust the important weights of features according to data heterogeneity and network environment, select the most critical features for the model, and then use the deep neural network model M to encode the features and map the high-dimensional features to the low-dimensional space;

[0127] The central server sets the initial weights and biases for the global model through the Xavier initialization method. The initialized global model parameters are sent to each participant device through a secure communication channel as the basis for local model training. The central server evaluates the degree of heterogeneity based on the statistical information of the participant data set, and dynamically adjusts the parameters and strategies of federated learning based on the degree of heterogeneity and the network environment. The participant devices use local data and the model parameters provided by the central server to train the local model. The participant devices send the updated parameters of the local model back to the central server through encrypted communication, aggregate the model parameters, evaluate the performance of the global model on the validation set, analyze the deviation and variance, determine whether the model is overfitting, adjust the model parameters for optimization based on the evaluation results, and deploy the optimized global model to the actual application scenario.

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

[0129] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A data processing method based on federated learning, characterized in that: The following steps are involved: S1. Collect heterogeneous data from different participants and perform preprocessing; S2, extracting key features and performing feature encoding based on the preprocessed heterogeneous data; S3, the central server initializes the global model parameters and distributes them to each participant, and evaluates the degree of heterogeneity of the participant data; S4, dynamically adjust the parameters and strategies of federated learning according to the degree of heterogeneity and network environment; S5. Each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation; S6. Evaluate the trained global model, adjust and optimize the global model based on the evaluation results, and deploy the optimized global model.

2. The data processing method based on federated learning according to claim 1, characterized in that: In S2, the pre-processed heterogeneous data is used to extract key features and perform feature encoding, and the importance weight of the features is automatically adjusted according to the heterogeneous data and the dynamic network environment. An adaptive feature selection function is set to F, and the adaptive feature selection function implementation formula is: F(X,W,N)=W′, In the formula, X represents the preprocessed heterogeneous data, W represents the initial feature weight vector, N represents the network state vector, and W′ represents the adjusted feature weight vector; According to the selected features, the deep neural network model is used to encode and map the high-dimensional features to the low-dimensional space. Let the deep neural network model be M, and the feature encoding formula is: Z=M(F,θ), In the formula, Z represents the feature encoding of the output, F represents the features selected by the input, and θ represents the model parameters.

3. The data processing method based on federated learning according to claim 1, characterized in that: In S3, the central server sets the initial weights and initial values ​​of the bias items of the global model through the Xavier initialization method. Assume that the global model has n layers in the first layer. l input neurons and n l+1 output neurons, with a weight matrix W l , the global model initialization implementation formula is: In the formula, W l,ij represents the weight from the i-th input neuron to the j-th output neuron in the l-th layer of the neural network, u represents the uniformly distributed random number generator, the random value generated when the weight is initialized, α represents the data heterogeneity factor, and adjusts the weight initialization range; After the global model is initialized, the central server sends the global model parameters to the participant devices through a secure communication channel.

4. The data processing method based on federated learning according to claim 3, characterized in that: In S3, the central server collects data sets of the participants, and the central server evaluates the degree of heterogeneity of the data of each participant based on the collected statistical information of the data sets; Suppose there are N participants, and the data set of each participant i is X i , the feature dimension is F i , the degree of heterogeneity is H, and the heterogeneity evaluation formula is: In the formula, the smaller the heterogeneity index is, the higher the similarity between data sets is, and vice versa, the stronger the heterogeneity is.

5. The data processing method based on federated learning according to claim 1, characterized in that: S4 dynamically adjusts the parameters and strategies of federated learning according to the degree of heterogeneity and the network environment, and the formula for dynamically adjusting the learning rate is: or t =η0·exp(-λH t ), In the formula, η t represents the dynamic learning rate of the tth round, η0 represents the initial learning rate, H t represents the degree of data heterogeneity in the tth round, and λ represents the degree of influence of controlling heterogeneity on the learning rate; The parameters of federated learning are dynamically adjusted according to the network environment. The formula for dynamically adjusting the number of communication rounds is: T t =T0+α·ΔH t , In the formula, T t represents the number of communication rounds in the tth round, T0 represents the basic number of communication rounds, and α represents the adjustment factor, where ΔH t =H t -H t-1 Indicates the change in the degree of data heterogeneity. When the heterogeneity changes significantly, increasing the number of communication rounds will help the model adapt to changes in data distribution more quickly.

6. The data processing method based on federated learning according to claim 1, characterized in that: In S5, each participant trains a local model based on the feature data after preprocessing and feature extraction, and exchanges model parameters through encrypted communication and sends them to the central server for aggregation; The encryption strength is adjusted during the training of the local model. The encryption strength increases at a rate that increases with the heterogeneity of the data. The encryption strength adjustment formula is: E t NE0+β·log(1+H t ), In the formula, E t represents the encryption strength of the tth round. The encryption strength is dynamically adjusted according to the degree of data heterogeneity. E0 represents the encryption strength without the influence of data heterogeneity. β represents the degree of influence of the degree of data heterogeneity on the encryption strength. H t Indicates the degree of data heterogeneity in round t, and sends the updated model parameters to the central server; The central server receives the new model parameters and aggregates them to generate an updated global model. The implementation formula is: In the formula, g t represents the global model parameters of the tth round, N t represents the number of participants in round t, γ t represents the weight of participant i, which is determined according to the degree of data heterogeneity and the state of the network environment, θ i (t) represents the local model parameters of participant i in round t.

7. The data processing method based on federated learning according to claim 1, characterized in that: The S6 verifies the trained global model, evaluates the global model according to the verification set, analyzes the deviation and variance of the model, determines the model status, adjusts the parameters according to the evaluation results to optimize the model, and deploys the optimized global model.

8. A data processing device based on federated learning, characterized in that: Includes a central server, memory, processor, participant devices and encrypted communication module.

9. A data processing system based on federated learning, characterized in that: include: Data collection and preprocessing module: used to collect heterogeneous data of participants and perform data preprocessing; Feature extraction and encoding module: extract features from the processed heterogeneous data, automatically adjust the importance weight of features according to the heterogeneity of the data and the network environment, and encode the selected features; Global model initialization module: The central server initializes the global model through Xavier and sends it to the participant devices through a secure communication channel; Federated learning parameter strategy adjustment module: dynamically adjusts the parameters of federated learning according to the degree of data heterogeneity and network environment; Model training and parameter exchange module: Participants train local models using data after local preprocessing and feature extraction; Model aggregation module: The central server collects the model parameters of each participant and aggregates them; Global model evaluation and optimization module: evaluates the global model performance through the validation set, and adjusts the model parameters for optimization based on the evaluation results; Global model deployment module: deploys the optimized global model to actual application scenarios.

Citation Information

Cited By

  • Cross-data heterogeneity intelligent optimization method, system and device based on data quality dynamic decision

    CN119625499A