Adaptive data processing method, device, equipment and storage medium based on federated learning
By detecting data processing instructions, enter the data to be processed to the preset dynamic federal network model, and use federal learning technology processing data to solve the data caused by deep learning models in the existing technology in the data caused by training in the attack mode. The problem of decreased efficiency and accuracy has achieved more efficient and more accurate data processing.
Patent Information
- Application Number
- CN202011115886.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-16
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-10-16
AI Technical Summary
In the prior art, deep learning models trained in unattacked modes are used for data processing, resulting in reduced data processing efficiency and accuracy.
Adopt the adaptive data processing method based on federal learning. By detecting the data processing instruction, obtain the data to be processed and enter it to the preset dynamic federal network model, obtain the preset dynamic federal network model for prediction processing Later prediction results. This preset dynamic federal network model is based on preset training data with a preset label and the first private disturbance factors. The target model is obtained for the first training model to perform the preset dynamic federal process.
By adding the first private disturbance factors of the first participant, the defense capabilities of deep neural network models on various attacks were enhanced, thereby improving the efficiency and accuracy of data processing.
Smart Images

Figure CN112329010B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to an adaptive data processing method, device, equipment and storage medium based on federated learning. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies are applied in the financial field, but the financial industry also puts forward higher requirements on technology. For example, the financial industry also has higher requirements for adaptive data processing based on federated learning.
[0003] Deep learning models are a type of model that is widely used. Deep learning models are often used for data processing in the field of artificial intelligence. However, existing deep learning models are often attacked by various means that interfere with learning, such as stealing the training data of model contributors, stealing the privacy information of model contributors, poisoning the data of model contributors, forging test adversarial samples, etc. The existing deep learning models are still trained and learned in an unattacked mode (ideal state), which leads to a decrease in the performance of the deep learning models actually trained, resulting in reduced data processing efficiency and accuracy. Summary of the invention
[0004] The main purpose of this application is to provide an adaptive data processing method, device and storage medium based on federated learning, aiming to solve the technical problem in the prior art of using a deep learning model trained and learned in an unattacked mode for data processing, resulting in reduced data processing efficiency and accuracy.
[0005] To achieve the above objectives, the present application provides an adaptive data processing method based on federated learning, which is applied to a first participant. The adaptive data processing method based on federated learning includes:
[0006] When a data processing instruction is detected, the data to be processed is obtained, and the data to be processed is input into a preset dynamic federated network model;
[0007] Obtaining a prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed;
[0008] The preset dynamic federated network model is a target model obtained by executing a preset dynamic federated process on a first model to be trained based on preset training data with preset labels and a first private disturbance factor.
[0009] Optionally, the preset dynamic federated network model includes one or more dynamic federated sub-network models;
[0010] The step of obtaining the prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed comprises:
[0011] determining private perturbation-related information in the data processing instruction;
[0012] If the private disturbance association information includes multiple disturbance factors, determining a disturbance weight corresponding to each disturbance factor;
[0013] Based on the disturbance factors and the corresponding disturbance weights, obtaining each prediction sub-result obtained after the preset dynamic disturbance neural network model corresponding to each disturbance factor performs prediction processing on the data to be processed;
[0014] Based on the various prediction sub-results, a prediction result of the data to be processed is obtained.
[0015] Optionally, before the step of obtaining a prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed, the method includes:
[0016] Get preset training data with preset labels;
[0017] Based on the preset training data with the preset label and the first private perturbation factor, executing a preset dynamic federation process on the first model to be trained to obtain a target model;
[0018] The target model is set to the preset dynamic federated network model.
[0019] Optionally, the step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes:
[0020] Determine a second model to be trained based on the first private perturbation factor and the first model to be trained;
[0021] Based on the preset training data with preset labels, iteratively train the second model to be trained to train and update model variables of the second model to be trained;
[0022] Determine whether the iteratively trained second model to be trained meets the preset replacement and update conditions. If the iteratively trained second model to be trained meets the preset replacement and update conditions, replace and update the model variables of the training update by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained;
[0023] Continue to iteratively train and replace and update the replaced and updated second model to be trained until the second model to be trained meets the preset training completion condition, thereby obtaining a target model.
[0024] Optionally, if the iteratively trained second model to be trained meets a preset replacement and update condition, the step of replacing and updating the model variables of the training update by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained includes:
[0025] If the second model to be trained by the iterative training meets the preset replacement and update conditions, the model variables of the training update are encrypted and sent to a third party associated with the first participant, so that the third party can aggregate the model variables sent by multiple other second participants to obtain aggregated model variables, and feed back the aggregated model variables to the first participant and each second participant;
[0026] Wherein, each of the other second participants determines their own model variables based on the corresponding second private perturbation factor sent by the third party and the first model to be trained;
[0027] The aggregate model variables fed back by the third party are received, and the model variables updated through training are replaced and updated with the aggregate model variables to obtain the replaced and updated preset prediction model to be trained.
[0028] Optionally, the first private disturbance factor includes a first private network layer structure factor;
[0029] The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes:
[0030] Determining weight information of the first private network layer structural factor;
[0031] Based on the weight information, determining a network layer structure to be added;
[0032] Based on the network layer structure to be added and the first model to be trained, a second model to be trained is determined.
[0033] Optionally, the first private disturbance factor includes a second private network layer structure factor;
[0034] The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes:
[0035] Receiving a second private network layer structure factor sent by the server;
[0036] Determining a network layer structure to be removed based on the second private network layer structure factor;
[0037] Based on the network layer structure to be removed and the first model to be trained, a second model to be trained is determined.
[0038] Optionally, the first private perturbation factor comprises a private loss function factor,
[0039] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes:
[0040] Based on the preset training data with preset labels, locally iteratively train the first model to be trained to obtain an intermediate training result;
[0041] Determining a disturbance loss function based on the private loss function factor and a first preset disturbance amplitude;
[0042] Based on the perturbation loss function, randomly or adaptively perform private perturbation adjustment on the preset loss function in the local iterative training process to obtain a target loss function;
[0043] Based on the intermediate training results, the preset labels and the target loss function, the first model to be trained is locally iteratively trained to obtain a target model.
[0044] Optionally, the first private disturbance factor includes a private model parameter factor;
[0045] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes:
[0046] Based on the preset training data with preset labels, local iterative training is performed on initial model parameters of the first to-be-trained model to obtain intermediate model parameters;
[0047] Determining disturbance model parameters based on the private model parameter factor and a second preset disturbance amplitude;
[0048] Based on the perturbation model parameters, the intermediate model parameters in the local iterative training process are randomly or adaptively perturbed and adjusted to obtain the target model.
[0049] Optionally, the first private perturbation factor includes a gradient factor;
[0050] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes:
[0051] Based on the preset training data with preset labels, locally iteratively train the first model to be trained to obtain an intermediate gradient;
[0052] Determining a disturbance gradient based on the gradient factor and a third preset disturbance amplitude;
[0053] Based on the perturbation gradient, randomly or adaptively perturb the intermediate gradient in the iterative training process to obtain a target intermediate gradient;
[0054] Based on the target intermediate gradient and preset training data with preset labels, the preset basic model is dynamically iteratively trained to obtain the target model.
[0055] The present application also provides an adaptive data processing device based on federated learning, which is applied to a first participant. The adaptive data processing device based on federated learning includes:
[0056] A first acquisition module, configured to acquire the data to be processed when a data processing instruction is detected, and input the data to be processed into a preset dynamic federated network model;
[0057] A second acquisition module is used to obtain a prediction result of the data to be processed obtained after the preset dynamic federated network model performs prediction processing on the data to be processed;
[0058] The preset dynamic federated network model is a target model obtained by executing a preset dynamic federated process on a first model to be trained based on preset training data with preset labels and a first private disturbance factor.
[0059] Optionally, the preset dynamic federated network model includes one or more dynamic federated sub-network models;
[0060] The second acquisition module includes:
[0061] A first determining unit, configured to determine private perturbation associated information in the data processing instruction;
[0062] A second determining unit, configured to determine a disturbance weight corresponding to each disturbance factor if the private disturbance association information includes multiple disturbance factors;
[0063] A first acquisition unit is used to acquire, based on the disturbance factors and the corresponding disturbance weights, each prediction sub-result obtained after the preset dynamic disturbance neural network model corresponding to each disturbance factor performs prediction processing on the data to be processed;
[0064] The second acquisition unit is used to obtain the prediction result of the data to be processed based on the various prediction sub-results.
[0065] Optionally, the adaptive data processing device based on federated learning further includes:
[0066] A third acquisition module is used to acquire preset training data with preset labels;
[0067] A fourth acquisition module, configured to execute a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model;
[0068] A setting module is used to set the target model as the preset dynamic federated network model.
[0069] Optionally, the fourth acquisition module includes:
[0070] a third determining unit, configured to determine a second model to be trained based on the first private perturbation factor and the first model to be trained;
[0071] A first training unit, configured to iteratively train the second model to be trained based on the preset training data with preset labels, so as to train and update model variables of the second model to be trained;
[0072] A judging unit, used for judging whether the iteratively trained second model to be trained meets a preset replacement and update condition, and if the iteratively trained second model to be trained meets the preset replacement and update condition, replacing and updating the model variables of the training update by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained;
[0073] The second training unit is used to continuously iteratively train and replace and update the second model to be trained until the second model to be trained meets a preset training completion condition to obtain a target model.
[0074] Optionally, the judging unit includes:
[0075] an aggregation subunit, configured to encrypt and send the model variables updated by the training to a third party associated with the first participant if the second model to be trained by the iterative training meets a preset replacement and update condition, so that the third party can aggregate the model variables sent by multiple other second participants to obtain an aggregated model variable, and feed back the aggregated model variable to the first participant and each second participant;
[0076] Wherein, each of the other second participants determines their own model variables based on the corresponding second private perturbation factor sent by the third party and the first model to be trained;
[0077] The first receiving subunit is used to receive the aggregated model variables fed back by the third party, and replace and update the model variables updated by training with the aggregated model variables to obtain the replaced and updated preset prediction model to be trained.
[0078] Optionally, the first private disturbance factor includes a first private network layer structure factor;
[0079] The third determining unit includes:
[0080] A first determining subunit, configured to determine weight information of the first private network layer structural factor;
[0081] A second determining subunit, configured to determine a network layer structure to be added based on the weight information;
[0082] The third determining subunit is used to determine the second model to be trained based on the network layer structure to be added and the first model to be trained.
[0083] Optionally, the first private disturbance factor includes a second private network layer structure factor;
[0084] The third determining unit further includes:
[0085] A second receiving subunit, configured to receive a second private network layer structure factor sent by the server;
[0086] a fourth determining subunit, configured to determine a network layer structure to be removed based on the second private network layer structure factor;
[0087] The fifth determining subunit is used to determine the second model to be trained based on the network layer structure to be removed and the first model to be trained.
[0088] Optionally, the first private perturbation factor comprises a private loss function factor,
[0089] The fourth acquisition module further includes:
[0090] A third training unit is used to perform local iterative training on the first to-be-trained model based on the preset training data with the preset labels to obtain an intermediate training result;
[0091] A fourth determining unit, configured to determine a disturbance loss function based on the private loss function factor and a first preset disturbance amplitude;
[0092] A first adjustment unit, configured to perform a private perturbation adjustment on a preset loss function in a local iterative training process randomly or adaptively based on the perturbation loss function to obtain a target loss function;
[0093] The third acquisition unit is used to perform local iterative training on the first model to be trained based on the intermediate training result, the preset label and the target loss function to obtain a target model.
[0094] Optionally, the first private disturbance factor includes a private model parameter factor;
[0095] The fourth acquisition module further includes:
[0096] A fourth training unit, configured to perform local iterative training on initial model parameters of the first to-be-trained model based on the preset training data with preset labels to obtain intermediate model parameters;
[0097] a fifth determining unit, configured to determine a disturbance model parameter based on the private model parameter factor and a second preset disturbance amplitude;
[0098] The second adjustment unit is used to randomly or adaptively perform perturbation adjustment on the intermediate model parameters in the local iterative training process based on the perturbation model parameters to obtain a target model.
[0099] Optionally, the first private perturbation factor includes a gradient factor;
[0100] The fourth acquisition module further includes:
[0101] A fifth training unit, configured to perform local iterative training on the first to-be-trained model based on the preset training data with preset labels to obtain an intermediate gradient;
[0102] a sixth determining unit, configured to determine a disturbance gradient based on the gradient factor and a third preset disturbance amplitude;
[0103] A third adjustment unit, configured to perform a perturbation adjustment on an intermediate gradient in an iterative training process randomly or adaptively based on the perturbation gradient to obtain a target intermediate gradient;
[0104] The sixth training unit is used to dynamically iteratively train the preset basic model based on the target intermediate gradient and the preset training data with preset labels to obtain the target model.
[0105] The present application also provides an adaptive data processing device based on federated learning, which is a physical node device. The adaptive data processing device based on federated learning includes: a memory, a processor, and a program of the adaptive data processing method based on federated learning stored in the memory and executable on the processor. When the program of the adaptive data processing method based on federated learning is executed by the processor, the steps of the adaptive data processing method based on federated learning as described above can be implemented.
[0106] The present application also provides a storage medium, on which is stored a program for implementing the above-mentioned adaptive data processing method based on federated learning. When the program for the adaptive data processing method based on federated learning is executed by a processor, the steps of the above-mentioned adaptive data processing method based on federated learning are implemented.
[0107] The present application provides an adaptive data processing method, device and storage medium based on federated learning. Compared with the prior art in which data is processed by using a deep learning model obtained by training and learning in an unattacked mode, resulting in reduced data processing efficiency and accuracy, the present application obtains data to be processed when a data processing instruction is detected, and inputs the data to be processed into a preset dynamic federated network model; obtains a prediction result of the data to be processed after the preset dynamic federated network model performs predictive processing on the data to be processed; wherein the preset dynamic federated network model is based on preset training data with preset labels and a first private perturbation factor, and a preset dynamic federated process is executed on a first model to be trained to obtain a target model. In the present application, after obtaining the data to be processed, the data to be processed is processed based on a preset dynamic federated network model, and the preset dynamic federated network model is based on preset training data with preset labels and a first private perturbation factor, and a preset dynamic federated process is executed on the first model to be trained, that is, the preset dynamic federated network model is obtained through federated learning after adding the first private perturbation factor of the first participant, that is, the first participant holds the first private perturbation factor, so that the attacker cannot effectively launch an attack when only knowing the public neural network model in the federation process, or even when the model is attacked, due to the addition of the first private perturbation factor of the first participant, the attack impact on the deep neural network model is generalized, thereby improving the deep neural network model's defense capability against various attacks, and processing the data to be processed based on the preset dynamic federated network model that has defense capabilities against various attacks, thereby being able to improve the processing efficiency and accuracy of the data to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0109] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0110] Figure 1This is a flow chart of the first embodiment of the adaptive data processing method based on federated learning of the present application;
[0111] Figure 2 This is a schematic diagram of the detailed step flow of step S20 in the adaptive data processing method based on federated learning in this application;
[0112] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0113] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0114] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0115] The present application embodiment provides an adaptive data processing method based on federated learning. In the first embodiment of the adaptive data processing method based on federated learning of the present application, refer to Figure 1 , applied to the first participant, the adaptive data processing method based on federated learning includes:
[0116] Step S10, when a data processing instruction is detected, obtaining the data to be processed, and inputting the data to be processed into a preset dynamic federated network model;
[0117] Step S20, obtaining a prediction result of the data to be processed obtained after the preset dynamic federated network model performs prediction processing on the data to be processed;
[0118] The preset dynamic federated network model is a target model obtained by executing a preset dynamic federated process on a first model to be trained based on preset training data with preset labels and a first private disturbance factor.
[0119] The specific steps are as follows:
[0120] Step S10, when a data processing instruction is detected, obtaining the data to be processed, and inputting the data to be processed into a preset dynamic federated network model;
[0121] In this embodiment, it should be noted that the adaptive data processing method based on federated learning can be applied to an adaptive data processing system based on federated learning, in particular, to a first participant in an adaptive data processing system based on federated learning, the first participant being connected to other second participants in the adaptive data processing system based on federated learning, or being connected to other second participants in the adaptive data processing system based on federated learning through a server (in an adaptive data processing system based on federated learning), and the adaptive data processing system based on federated learning is subordinate to an adaptive data processing device based on federated learning. For the first participant, a preset dynamic federated network model is built in to ensure that after a data processing instruction is detected and the data to be processed is obtained, the data to be processed can be input into the preset dynamic federated network model.
[0122] In this embodiment, it should be noted that the preset dynamic federated network model used may be a trained model, wherein the trained preset dynamic federated network model may be obtained in the following manner:
[0123] Method 1: The preset dynamic federated network model is a target model obtained by adding a single first private perturbation factor to the first model to be trained during the training process;
[0124] Method 2: The preset dynamic federated network model is a target model obtained by adding multiple first private perturbation factors to the first to-be-trained model during the training process to perform perturbation training. For example, the first private perturbation factor may be a first private network layer structure factor or a private loss function factor, etc.;
[0125] Method 3: The preset dynamic federated network model is an overall model consisting of multiple sub-network models, wherein each sub-network model is a target model obtained by adding a single first private perturbation factor to the first model to be trained during the training process.
[0126] In this embodiment, the perturbation factor is a private perturbation factor of the first participant, that is, the private perturbation factor of the first participant is private information of the first participant.
[0127] In this embodiment, the data to be processed may be chip data to be processed or financial data to be processed.
[0128] When a data processing instruction is detected, the data to be processed is obtained and input into a preset dynamic federated network model. When the preset dynamic federated network model is an overall model composed of multiple sub-network models (preset dynamic federated sub-network models), the data to be processed can be input into a certain sub-network model, or the data to be processed can be input into each sub-network model, wherein the sub-network model can be obtained by the first participant (model holder) performing random global / private information fusion during the prediction process, or by the first participant (model holder) performing random global / private information switching, or by the first participant (model holder) performing adaptive global / private information fusion, or by the first participant (model holder) performing adaptive global / private information switching, thereby making the model a dynamically changing model.
[0129] Step S20, obtaining a prediction result of the data to be processed obtained after the preset dynamic federated network model performs prediction processing on the data to be processed;
[0130] The preset dynamic federated network model is a target model obtained by executing a preset dynamic federated process on a first model to be trained based on preset training data with preset labels and a first private disturbance factor.
[0131] In this embodiment, it should be emphasized that the first private perturbation factor is a private perturbation factor added by the first participant during the local model training process.
[0132] In this embodiment, after obtaining the preset dynamic federated network model to perform prediction processing on the data to be processed, the prediction results of the data to be processed obtained include:
[0133] If the preset dynamic federated network model includes multiple sub-network models (dynamic federated sub-network models), the prediction sub-result obtained after the data to be processed is predicted based on a certain sub-network model is used as the prediction result; or if the preset dynamic federated network model includes multiple sub-network models, the multiple prediction sub-results obtained after the data to be processed is predicted based on the multiple sub-network models are averaged to obtain the prediction result;
[0134] Among them, refer to Figure 2 The step of obtaining the prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed comprises steps S21-S24:
[0135] Step S21, determining the private disturbance association information in the data processing instruction;
[0136] In this embodiment, private disturbance association information is extracted from the data processing instruction, and the private disturbance association information includes information on the number of disturbance factors (private disturbance factors), that is, determining whether it is multiple or single private disturbance association information.
[0137] Step S22, if the private disturbance association information includes multiple disturbance factors, determine the disturbance weight corresponding to each disturbance factor;
[0138] If the private disturbance association information includes multiple disturbance factors, determine the disturbance weight corresponding to each disturbance factor. For example, the disturbance weights of the three disturbance factors may be 50%, 25%, and 25%. The three disturbance factors may be the first private network layer structure factor, the model parameter factor, or the gradient factor, etc. It should be noted that the disturbance factor is associated with the first private disturbance factor added during the model training process. For example, if the disturbance factor is the first private network layer structure factor, the first private disturbance factor is the first private network layer structure factor. If the disturbance factor is the model parameter factor, the first private disturbance factor is the model parameter factor.
[0139] Step S23, based on the disturbance factors and the corresponding disturbance weights, obtaining each prediction sub-result obtained after the preset dynamic federated sub-network model corresponding to each disturbance factor in the preset dynamic disturbance neural network model performs prediction processing on the data to be processed;
[0140] Specifically, based on the disturbance factor, the corresponding preset dynamic federated sub-network model (dynamic federated sub-network model) is determined. For example, based on the model parameter disturbance factor, the corresponding preset dynamic federated sub-network model is determined to be a preset dynamic model parameter disturbance federated sub-network model. Based on the disturbance factor and the corresponding disturbance weight, the preset dynamic federated sub-network model corresponding to each disturbance factor in the preset dynamic federated network model is obtained. After performing predictive processing on the data to be processed, each predicted sub-result (each initial predicted sub-result is multiplied by the corresponding disturbance weight) is obtained.
[0141] Step S24: obtaining a prediction result of the data to be processed based on the prediction sub-results.
[0142] The prediction results are obtained by adding or fusing the prediction sub-results.
[0143] In this embodiment, it should be noted that if the preset dynamic federated network model does not include multiple sub-network models, the data to be processed is predicted based on the preset dynamic federated network model to obtain a prediction result.
[0144] In this embodiment, it should be noted that the preset dynamic federated network model is obtained by dynamically iteratively training the first model to be trained based on preset training data with preset labels and a first private perturbation factor, that is, the preset dynamic federated network model is a trained model that can accurately process the data to be processed. Therefore, after predicting the data to be processed based on the preset dynamic federated network model, an accurate prediction result can be obtained.
[0145] Wherein, before the step of obtaining the prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed, the method includes steps S01-S03:
[0146] Step S01, obtaining preset training data with preset labels;
[0147] Step S02, based on the preset training data with the preset label and the first private perturbation factor, executing a preset dynamic federation process on the first model to be trained to obtain a target model;
[0148] In this embodiment, preset training data with preset labels and a first private perturbation factor are obtained, wherein the first private perturbation factor includes factors such as model parameters, objective function, gradient, and first private network layer structure.
[0149] Based on the preset training data with the preset label and the first private disturbance factor, executing a preset dynamic federation process on the first model to be trained to obtain a target model includes:
[0150] Method 1: Based on the preset training data with preset labels and a first private perturbation factor, dynamically iteratively train the first model to be trained to obtain a target model;
[0151] The method of dynamically iteratively training the first model to be trained based on the preset training data with the preset label and a first private disturbance factor to obtain the target model includes:
[0152] Sub-method 1: Based on the preset training data with preset labels, dynamically iteratively train the first model to be trained, and during the iterative training process, randomly add a first private perturbation factor to perform perturbation to obtain a target model;
[0153] Sub-method 2: Based on the preset training data with preset labels, the first model to be trained is dynamically iteratively trained. During the iterative training process, the first private perturbation factor is added to perform perturbation in each round of iterative training to obtain a target model.
[0154] Method 2: Based on the preset training data with preset labels and multiple first private perturbation factors, the first model to be trained is dynamically iteratively trained to obtain a target model.
[0155] Step S03: setting the target model to the preset dynamic federated network model.
[0156] In this embodiment, after the target model is obtained through iteration, the target model is set as the preset dynamic federated network model.
[0157] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes the following steps A1-A4:
[0158] Step A1, determining a second model to be trained based on the first private perturbation factor and the first model to be trained;
[0159] Based on the first private perturbation factor and the first model to be trained, the second model to be trained is determined, that is, the network layer structure of the first model to be trained is changed (added or removed) based on the first private perturbation factor to obtain the second model to be trained.
[0160] Step A2, based on the preset training data with preset labels, iteratively training the second model to be trained to train and update the model variables of the second model to be trained;
[0161] Step A3, determining whether the iteratively trained second model to be trained meets the preset replacement and update conditions. If the iteratively trained second model to be trained meets the preset replacement and update conditions, replacing and updating the model variables of the training update by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained;
[0162] Specifically, in this embodiment, the first participant establishes a federated communication connection with the other second participants, and the preset dynamic federation process requires the first participant and the other second participants to participate together.
[0163] In this embodiment, the first participant first performs iterative training on the second model to be trained based on the preset training data with preset labels to train and update the model variables of the second model to be trained. In this embodiment, the iterative training method includes but is not limited to the gradient descent method.
[0164] It should be noted that the preset replacement and update conditions include reaching a first iteration number threshold, reaching a first training round number threshold, etc. In this embodiment, if the second model to be trained after training reaches the preset replacement and update conditions, the model variables of the training update are replaced and updated by executing the preset dynamic federation process to obtain the replaced and updated second model to be trained. Specifically, replacing and updating the model variables of the training update includes: obtaining corresponding other model variables of other second participants, and then obtaining aggregated model variables based on the other model variables of other second participants and the model variables of the first participant. After obtaining the aggregated model variables, the model variables of the first participant are replaced and updated based on the aggregated model variables. Specifically, if the second model to be trained reaches the preset replacement and update conditions, the model variables that are being trained and updated in the second model to be trained are directly replaced with the aggregated model variables. If the second model to be trained does not reach the preset replacement and update conditions, the second model to be trained is iteratively trained until the second model to be trained reaches the preset replacement and update conditions.
[0165] Step A4: Continue to iteratively train and replace and update the replaced and updated second model to be trained until the second model to be trained meets the preset training completion condition, thereby obtaining a target model.
[0166] In this embodiment, based on the model variables after replacement and update, iterative training of the second model to be trained and a judgment on whether the preset replacement and update conditions are met are performed again until the second model to be trained reaches the preset training completion conditions, and the preset training completion conditions include reaching a second iteration number threshold, reaching a second training round number threshold, etc.
[0167] wherein the first private perturbation factor comprises an input data factor;
[0168] The first private perturbation factor includes a private loss function factor;
[0169] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes the following steps B1-B4:
[0170] Step B1, based on the preset training data with preset labels, performing local iterative training on the first to-be-trained model to obtain an intermediate training result;
[0171] Step B2, determining a disturbance loss function based on the private loss function factor and a first preset disturbance amplitude;
[0172] Step B3, based on the perturbation loss function, randomly or adaptively perform private perturbation adjustment on the preset loss function in the local iterative training process to obtain a target loss function;
[0173] Step B4: Based on the intermediate training results, the preset labels and the target loss function, the first model to be trained is locally iteratively trained to obtain a target model.
[0174] In this embodiment, the first private perturbation factor is a private loss function factor. Based on the preset training data with preset labels, the process of iteratively training the first model to be trained (one iterative training or multiple iterative training) is to obtain an intermediate training result. After determining that the first private perturbation factor is a private loss function factor, the perturbation loss function is determined based on the private loss function factor and the first preset perturbation amplitude. Based on the perturbation loss function, the preset loss function in the local iterative training process is randomly or adaptively adjusted to obtain a target loss function, that is, the perturbed Δl is determined. t , after adding the disturbance Δl t After that, the preset loss function and the perturbation Δl t The target loss function is obtained by integrating them together. During the iterative training (one iterative training or multiple iterative training) of the first model to be trained, based on the intermediate training result (intermediate prediction label), the preset label and the target loss function, the first model to be trained is locally iteratively trained to obtain the target model.
[0175] The present application provides an adaptive data processing method, device and storage medium based on federated learning. Compared with the prior art in which data is processed by using a deep learning model obtained by training and learning in an unattacked mode, resulting in reduced data processing efficiency and accuracy, the present application obtains data to be processed when a data processing instruction is detected, and inputs the data to be processed into a preset dynamic federated network model; obtains a prediction result of the data to be processed after the preset dynamic federated network model performs predictive processing on the data to be processed; wherein the preset dynamic federated network model is based on preset training data with preset labels and a first private perturbation factor, and a preset dynamic federated process is executed on a first model to be trained to obtain a target model. In the present application, after obtaining the data to be processed, the data to be processed is processed based on a preset dynamic federated network model, and the preset dynamic federated network model is based on preset training data with preset labels and a first private perturbation factor, and a preset dynamic federated process is executed on the first model to be trained, that is, the preset dynamic federated network model is obtained through federated learning after adding the first private perturbation factor of the first participant, that is, the first participant holds the first private perturbation factor, so that the attacker cannot effectively launch an attack when only knowing the public neural network model in the federation process, or even when the model is attacked, due to the addition of the first private perturbation factor of the first participant, the attack impact on the deep neural network model is generalized, thereby improving the deep neural network model's defense capability against various attacks, and processing the data to be processed based on the preset dynamic federated network model that has defense capabilities against various attacks, thereby being able to improve the processing efficiency and accuracy of the data to be processed.
[0176] Further, based on the first embodiment of the present application, another embodiment of the present application is provided, wherein the first private disturbance factor includes a private model parameter factor;
[0177] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes the following steps C1-C4:
[0178] Step C1, based on the preset training data with preset labels, performing local iterative training on the initial model parameters of the first to-be-trained model to obtain intermediate model parameters;
[0179] Step C2, determining disturbance model parameters based on the private model parameter factor and the second preset disturbance amplitude;
[0180] Step C3: randomly or adaptively perturb and adjust the intermediate model parameters in the local iterative training process based on the perturbation model parameters to obtain a target model.
[0181] In this embodiment, the first private perturbation factor is a private model parameter factor. After determining that the first private perturbation factor is a private model parameter factor, based on the preset training data with the preset label, the initial model parameters of the first model to be trained are iteratively trained (one iterative training or multiple iterative trainings). In the process (during the local iterative training process of the first participant), intermediate model parameters to be adjusted (to be adjusted by reverse feedback) are obtained. Based on the private model parameter factor and the second preset perturbation amplitude, the perturbation network parameters are determined, that is, during model training, the perturbation Δw is determined by the private model parameter factor and the second preset perturbation amplitude. s , after adding the disturbance Δw s After that, the intermediate model parameters to be adjusted (to be adjusted by backward feedback) are combined with the disturbance Δw s The intermediate model parameters in the iterative training process are randomly or adaptively perturbed and adjusted based on the perturbation network parameters, and then based on the intermediate model parameters after the perturbation adjustment, the preset training data with preset labels are continued to iteratively train the intermediate model parameters after the perturbation adjustment of the first model to be trained to obtain the target model.
[0182] The first private perturbation factor includes a gradient factor;
[0183] The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes steps D1-D4:
[0184] Step D1, based on the preset training data with preset labels, performing local iterative training on the first to-be-trained model to obtain an intermediate gradient;
[0185] Step D2, determining a disturbance gradient based on the gradient factor and a third preset disturbance amplitude;
[0186] Step D3, randomly or adaptively perturbing and adjusting the intermediate gradient in the iterative training process based on the perturbed gradient to obtain a target intermediate gradient;
[0187] Step D4, based on the target intermediate gradient and the preset training data with preset labels, dynamically iteratively train the preset basic model to obtain the target model.
[0188] In this embodiment, the first private perturbation factor is a gradient factor. After dynamically iterating the training of the first to-be-trained model based on the preset training data with the preset label to obtain the intermediate gradient, the perturbation gradient such as Δg is determined based on the gradient factor and the third preset perturbation amplitude. t Based on the disturbance gradient Δgt Randomly or adaptively perturb and adjust the intermediate gradient during the iterative training process (during the local iterative training process of the first participant) to obtain a target intermediate gradient; based on the target intermediate gradient and preset training data with preset labels, dynamically iteratively train the first model to be trained to obtain a target model.
[0189] In this embodiment, the initial model parameters of the first model to be trained are locally iteratively trained based on the preset training data with preset labels to obtain intermediate model parameters; the perturbation model parameters are determined based on the private model parameter factor and the second preset perturbation amplitude; the intermediate model parameters in the local iterative training process are randomly or adaptively perturbed and adjusted based on the perturbation model parameters to obtain the target model. In this embodiment, the perturbation in the model training process is performed from the perspective of changing the private model parameters of the first participant, etc., to accurately obtain the target model.
[0190] Further, based on the first embodiment of the present application, another embodiment of the present application is provided, in which the first private disturbance factor includes a first private network layer structure factor;
[0191] The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes:
[0192] Step E1, determining weight information of the first private network layer structure factor;
[0193] In this embodiment, the first private disturbance factor includes a first private network layer structure factor (a factor adding a network layer structure), and the method for determining the weight information of the first private network layer structure factor may be: obtaining the preset weight information of the first private network layer structure factor.
[0194] Step E2, determining the network layer structure to be added based on the weight information;
[0195] Based on the weight information, the network layer structure to be added is determined. If the weight information is 0, the network layer structure to be added (private network layer) is not added on the basis of the global network structure. If the weight information is not 0, the network layer structure to be added (private network layer) is added according to the weight on the basis of the global network (the global network structure of the first model to be trained).
[0196] Step E3: determining a second model to be trained based on the network layer structure to be added and the first model to be trained.
[0197] After obtaining the network layer structure to be added, based on the network layer structure to be added and the first model to be trained, a second model to be trained is determined according to a preset logic of adding the network layer structure.
[0198] The first private disturbance factor includes a second private network layer structure factor;
[0199] The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes:
[0200] Step F1, receiving a second private network layer structure factor sent by the server;
[0201] Specifically, against data poisoning and attacks, the server side can also adopt private information to defend itself. For example, it can randomly hide certain layers of the network layer structure of the first model to be trained, and only send the remaining layers to each participant for training. As a result, the data poisoning / implantation by the data attacker can only affect the limited layers of the first model to be trained, but cannot affect the model as a whole.
[0202] In this embodiment, the first private disturbance factor includes a second private network layer structure factor (a factor removing the network layer structure), and the first participant receives the second private network layer structure factor or the second model to be trained sent by the server.
[0203] Step F2, determining the network layer structure to be removed based on the second private network layer structure factor;
[0204] Step F3: determining a second model to be trained based on the network layer structure to be removed and the first model to be trained.
[0205] If the first participant receives the second private network layer structure factor sent by the server, the network layer structure to be removed or the network layer structure to be hidden is determined based on the second private network layer structure factor. In this embodiment, the second model to be trained is determined based on the network layer structure to be removed and the first model to be trained.
[0206] In this embodiment, by determining the weight information of the first private network layer structure factor; determining the network layer structure to be added based on the weight information; and determining the second model to be trained based on the network layer structure to be added and the first model to be trained. In this embodiment, the second model to be trained is accurately determined, laying a foundation for processing the data to be processed based on the preset dynamic federated network model with defense capabilities against various attacks.
[0207] Further, based on the first embodiment of the present application, another embodiment of the present application is provided. In this embodiment, if the iteratively trained second model to be trained meets the preset replacement and update conditions, the model variables of the training update are replaced and updated by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained, including the following steps H1-H2:
[0208] Step H1, if the second to-be-trained model of the iterative training meets the preset replacement and update conditions, the model variables of the training and update are encrypted and sent to a third party associated with the first participant, so that the third party can aggregate the model variables sent by multiple other second participants to obtain aggregated model variables, and feed back the aggregated model variables to the first participant and each second participant;
[0209] Wherein, each of the other second participants determines their own model variables based on the corresponding second private perturbation factor sent by the third party and the first model to be trained;
[0210] Step H2, receiving the aggregate model variables fed back by the third party, and replacing and updating the model variables updated through training with the aggregate model variables, to obtain the replaced and updated preset prediction model to be trained.
[0211] In this embodiment, if the iteratively trained second model to be trained meets the preset replacement and update conditions, the model variables of the training update are encrypted and sent to a third party associated with the first participant, so that the third party can aggregate the model variables sent by multiple other second participants to obtain aggregated model variables, receive the aggregated model variables fed back by the third party, and replace and update the model variables of the training update with the aggregated model variables to obtain the replaced and updated preset prediction model to be trained, thereby avoiding information leakage and ensuring security during the model training process.
[0212] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0213] like Figure 3 As shown, the adaptive data processing device based on federated learning may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0214] Optionally, the adaptive data processing device based on federated learning may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0215] Those skilled in the art will understand that Figure 3 The structure of the adaptive data processing device based on federated learning shown in the figure does not constitute a limitation of the adaptive data processing device based on federated learning, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0216] like Figure 3 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, and an adaptive data processing program based on federated learning. The operating system is a program that manages and controls the hardware and software resources of the adaptive data processing device based on federated learning, and supports the operation of the adaptive data processing program based on federated learning and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the adaptive data processing system based on federated learning.
[0217] exist Figure 3 In the adaptive data processing device based on federated learning shown, the processor 1001 is used to execute the adaptive data processing program based on federated learning stored in the memory 1005 to implement the steps of any of the adaptive data processing methods based on federated learning described above.
[0218] The specific implementation of the adaptive data processing device based on federated learning in the present application is basically the same as the above-mentioned embodiments of the adaptive data processing method based on federated learning, and will not be repeated here.
[0219] The present application also provides an adaptive data processing device based on federated learning, which is applied to a first participant. The adaptive data processing device based on federated learning includes:
[0220] A first acquisition module, configured to acquire the data to be processed when a data processing instruction is detected, and input the data to be processed into a preset dynamic federated network model;
[0221] A second acquisition module is used to obtain a prediction result of the data to be processed obtained after the preset dynamic federated network model performs prediction processing on the data to be processed;
[0222] The preset dynamic federated network model is a target model obtained by executing a preset dynamic federated process on a first model to be trained based on preset training data with preset labels and a first private disturbance factor.
[0223] Optionally, the preset dynamic federated network model includes one or more dynamic federated sub-network models;
[0224] The second acquisition module includes:
[0225] A first determining unit, configured to determine private perturbation associated information in the data processing instruction;
[0226] A second determining unit, configured to determine a disturbance weight corresponding to each disturbance factor if the private disturbance association information includes multiple disturbance factors;
[0227] A first acquisition unit is used to acquire, based on the disturbance factors and the corresponding disturbance weights, each prediction sub-result obtained after the preset dynamic disturbance neural network model corresponding to each disturbance factor performs prediction processing on the data to be processed;
[0228] The second acquisition unit is used to obtain the prediction result of the data to be processed based on the various prediction sub-results.
[0229] Optionally, the adaptive data processing device based on federated learning further includes:
[0230] A third acquisition module is used to acquire preset training data with preset labels;
[0231] A fourth acquisition module, configured to execute a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model;
[0232] A setting module is used to set the target model as the preset dynamic federated network model.
[0233] Optionally, the fourth acquisition module includes:
[0234] a third determining unit, configured to determine a second model to be trained based on the first private perturbation factor and the first model to be trained;
[0235] A first training unit, configured to iteratively train the second model to be trained based on the preset training data with preset labels, so as to train and update model variables of the second model to be trained;
[0236] A judging unit, used for judging whether the iteratively trained second model to be trained meets a preset replacement and update condition, and if the iteratively trained second model to be trained meets the preset replacement and update condition, replacing and updating the model variables of the training update by executing a preset dynamic federation process to obtain the replaced and updated second model to be trained;
[0237] The second training unit is used to continuously iteratively train and replace and update the second model to be trained until the second model to be trained meets a preset training completion condition to obtain a target model.
[0238] Optionally, the judging unit includes:
[0239] an aggregation subunit, configured to encrypt and send the model variables updated by the training to a third party associated with the first participant if the second model to be trained by the iterative training meets a preset replacement and update condition, so that the third party can aggregate the model variables sent by multiple other second participants to obtain an aggregated model variable, and feed back the aggregated model variable to the first participant and each second participant;
[0240] Wherein, each of the other second participants determines their own model variables based on the corresponding second private perturbation factor sent by the third party and the first model to be trained;
[0241] The first receiving subunit is used to receive the aggregated model variables fed back by the third party, and replace and update the model variables updated by training with the aggregated model variables to obtain the replaced and updated preset prediction model to be trained.
[0242] Optionally, the first private disturbance factor includes a first private network layer structure factor;
[0243] The third determining unit includes:
[0244] A first determining subunit, configured to determine weight information of the first private network layer structural factor;
[0245] A second determining subunit, configured to determine a network layer structure to be added based on the weight information;
[0246] The third determining subunit is used to determine the second model to be trained based on the network layer structure to be added and the first model to be trained.
[0247] Optionally, the first private disturbance factor includes a second private network layer structure factor;
[0248] The third determining unit further includes:
[0249] A second receiving subunit, configured to receive a second private network layer structure factor sent by the server;
[0250] a fourth determining subunit, configured to determine a network layer structure to be removed based on the second private network layer structure factor;
[0251] The fifth determining subunit is used to determine the second model to be trained based on the network layer structure to be removed and the first model to be trained.
[0252] Optionally, the first private perturbation factor comprises a private loss function factor,
[0253] The fourth acquisition module further includes:
[0254] A third training unit is used to perform local iterative training on the first to-be-trained model based on the preset training data with the preset labels to obtain an intermediate training result;
[0255] A fourth determining unit, configured to determine a disturbance loss function based on the private loss function factor and a first preset disturbance amplitude;
[0256] A first adjustment unit, configured to perform a private perturbation adjustment on a preset loss function in a local iterative training process randomly or adaptively based on the perturbation loss function to obtain a target loss function;
[0257] The third acquisition unit is used to perform local iterative training on the first model to be trained based on the intermediate training result, the preset label and the target loss function to obtain a target model.
[0258] Optionally, the first private disturbance factor includes a private model parameter factor;
[0259] The fourth acquisition module further includes:
[0260] A fourth training unit, configured to perform local iterative training on initial model parameters of the first to-be-trained model based on the preset training data with preset labels to obtain intermediate model parameters;
[0261] a fifth determining unit, configured to determine a disturbance model parameter based on the private model parameter factor and a second preset disturbance amplitude;
[0262] The second adjustment unit is used to randomly or adaptively perform perturbation adjustment on the intermediate model parameters in the local iterative training process based on the perturbation model parameters to obtain a target model.
[0263] Optionally, the first private perturbation factor includes a gradient factor;
[0264] The fourth acquisition module further includes:
[0265] A fifth training unit, configured to perform local iterative training on the first to-be-trained model based on the preset training data with preset labels to obtain an intermediate gradient;
[0266] a sixth determining unit, configured to determine a disturbance gradient based on the gradient factor and a third preset disturbance amplitude;
[0267] A third adjustment unit, configured to perform a perturbation adjustment on an intermediate gradient in an iterative training process randomly or adaptively based on the perturbation gradient to obtain a target intermediate gradient;
[0268] The sixth training unit is used to dynamically iteratively train the preset basic model based on the target intermediate gradient and the preset training data with preset labels to obtain the target model.
[0269] The specific implementation of the adaptive data processing device based on federated learning in the present application is basically the same as the above-mentioned embodiments of the adaptive data processing method based on federated learning, and will not be repeated here.
[0270] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned adaptive data processing methods based on federated learning.
[0271] The specific implementation methods of the storage medium of the present application are basically the same as the above-mentioned embodiments of the adaptive data processing method based on federated learning, and will not be repeated here.
[0272] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0273] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0274] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0275] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An adaptive data processing method based on federated learning, characterized in that: Applied to a first participant, the first participant performs a federated communication connection with other second participants, and the adaptive data processing method based on federated learning includes: When a data processing instruction is detected, the data to be processed is obtained, and the data to be processed is input into a preset dynamic federated network model; Obtaining a prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed; The preset dynamic federated network model is a target model obtained by the first participant and other second participants jointly executing a preset dynamic federated process on the first model to be trained based on preset training data with preset labels; The preset dynamic federation process includes: Based on the preset training data with the preset label, iteratively train the second model to be trained to train and update the model variables of the second model to be trained, wherein the second model to be trained is determined based on the first private perturbation factor and the first model to be trained; Determine whether the iteratively trained second model to be trained meets the preset replacement and update conditions. If the iteratively trained second model to be trained meets the preset replacement and update conditions, encrypt the model variables of the training update and send them to a third party associated with the first party, so that the third party can aggregate the model variables sent by multiple other second parties to obtain aggregated model variables, and feed back the aggregated model variables to the first party and each second party; Wherein, each of the other second participants determines their own model variables based on the corresponding second private perturbation factor sent by the third party and the first model to be trained; receiving the aggregate model variables fed back by the third party, and replacing and updating the model variables updated through training with the aggregate model variables, to obtain the replaced and updated second model to be trained; Continue to iteratively train and replace and update the replaced and updated second model to be trained until the second model to be trained meets the preset training completion condition, thereby obtaining a target model.
2. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The preset dynamic federated network model includes one or more dynamic federated sub-network models; The step of obtaining the prediction result of the data to be processed after the preset dynamic federated network model performs prediction processing on the data to be processed comprises: determining private perturbation-related information in the data processing instruction; If the private disturbance association information includes multiple disturbance factors, determining a disturbance weight corresponding to each disturbance factor; Based on the disturbance factors and the corresponding disturbance weights, obtaining each prediction sub-result obtained after the preset dynamic federated sub-network model corresponding to each disturbance factor in the preset dynamic federated network model performs prediction processing on the data to be processed; Based on the various prediction sub-results, a prediction result of the data to be processed is obtained.
3. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: Before the step of obtaining the prediction result of the data to be processed after the preset dynamic federated network model is used to perform prediction processing on the data to be processed, the method includes: Get preset training data with preset labels; Based on the preset training data with the preset label and the first private perturbation factor, executing a preset dynamic federation process on the first model to be trained to obtain a target model; The target model is set to the preset dynamic federated network model.
4. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The first private disturbance factor includes a first private network layer structure factor; The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes: Determining weight information of the first private network layer structural factor; Based on the weight information, determining a network layer structure to be added; Based on the network layer structure to be added and the first model to be trained, a second model to be trained is determined.
5. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The first private disturbance factor includes a second private network layer structure factor; The step of determining the second model to be trained based on the first private perturbation factor and the first model to be trained includes: Receiving a second private network layer structure factor sent by the server; Determining a network layer structure to be removed based on the second private network layer structure factor; Based on the network layer structure to be removed and the first model to be trained, a second model to be trained is determined.
6. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The first private perturbation factor includes a private loss function factor, The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes: Based on the preset training data with preset labels, locally iteratively train the first model to be trained to obtain an intermediate training result; Determining a disturbance loss function based on the private loss function factor and a first preset disturbance amplitude; Based on the perturbation loss function, randomly or adaptively perform private perturbation adjustment on the preset loss function in the local iterative training process to obtain a target loss function; Based on the intermediate training results, the preset labels and the target loss function, the first model to be trained is locally iteratively trained to obtain a target model.
7. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The first private disturbance factor includes a private model parameter factor; The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes: Based on the preset training data with preset labels, local iterative training is performed on initial model parameters of the first to-be-trained model to obtain intermediate model parameters; Determining disturbance model parameters based on the private model parameter factor and a second preset disturbance amplitude; Based on the perturbation model parameters, the intermediate model parameters in the local iterative training process are randomly or adaptively perturbed and adjusted to obtain the target model.
8. The method for adaptive data processing based on federated learning according to claim 1, characterized in that: The first private perturbation factor includes a gradient factor; The step of executing a preset dynamic federation process on the first model to be trained based on the preset training data with the preset label and the first private perturbation factor to obtain a target model includes: Based on the preset training data with preset labels, locally iteratively train the first model to be trained to obtain an intermediate gradient; Determining a disturbance gradient based on the gradient factor and a third preset disturbance amplitude; Based on the perturbation gradient, randomly or adaptively perturb the intermediate gradient in the iterative training process to obtain a target intermediate gradient; Based on the target intermediate gradient and preset training data with preset labels, the first model to be trained is dynamically iteratively trained to obtain a target model.
9. An adaptive data processing device based on federated learning, characterized in that: The adaptive data processing device based on federated learning comprises: a memory, a processor, and a program stored in the memory for implementing the adaptive data processing method based on federated learning. The memory is used to store a program for implementing an adaptive data processing method based on federated learning; The processor is used to execute a program for implementing the adaptive data processing method based on federated learning, so as to implement the steps of the adaptive data processing method based on federated learning as described in any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium stores a program for implementing an adaptive data processing method based on federated learning, and the program for implementing an adaptive data processing method based on federated learning is executed by a processor to implement the steps of the adaptive data processing method based on federated learning as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Collaborative federative learning approach for internet of vehicles traffic prediction
AU2020101613A4
Federation learning development method, device and equipment and storage medium
CN111340453A