CN116933898A - Data interaction method, device and computer readable storage medium - Google Patents

Data interaction method, device and computer readable storage medium Download PDF

Info

Publication number
CN116933898A
CN116933898A CN202210349034.6A CN202210349034A CN116933898A CN 116933898 A CN116933898 A CN 116933898A CN 202210349034 A CN202210349034 A CN 202210349034A CN 116933898 A CN116933898 A CN 116933898A
Authority
CN
China
Prior art keywords
model
target
data
hidden variable
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210349034.6A
Other languages
Chinese (zh)
Inventor
信伦
于路
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210349034.6A priority Critical patent/CN116933898A/en
Publication of CN116933898A publication Critical patent/CN116933898A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a data interaction method, which comprises the following steps: after model training is carried out on the initial model based on training data to obtain a first model and first model parameters, a target hidden variable conversion algorithm is adopted to process the first model parameters to obtain first conversion data, and the first conversion data is sent to a cooperative node; receiving target conversion data sent by a cooperative node, and processing the target conversion data by adopting a target hidden variable conversion algorithm to obtain a model total parameter; the target conversion data are obtained by processing model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting a target hidden variable conversion algorithm; updating the first model based on the model total parameters, and performing model training on the updated first model based on training data until a target model is obtained. The embodiment of the application also discloses a data interaction device and a computer readable storage medium.

Description

Data interaction method, device and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data interaction method, apparatus, and computer readable storage medium.
Background
Federal learning is a distributed machine learning framework that enables each participating node to collaborate to perform model training for machine learning without revealing private data to other participating nodes. In the related technology, federal learning is adopted in text classification scenes and image classification scenes, and each participating node encrypts model parameters obtained through training and then interacts through the encrypted model parameters so as to realize collaborative model training on the basis of not revealing privacy data to other participating nodes. However, the interaction manner through the encrypted model parameters can have the risk of data leakage of the participating nodes caused by reversely deducing the model parameters from the encrypted model parameters.
Disclosure of Invention
In order to solve the technical problems, the embodiments of the present application desire to provide a data interaction method, apparatus, and computer readable storage medium, which solve the problem in the related art that the risk of participating in node data leakage is caused by the model parameter being reversely deduced by the encrypted model parameter.
The technical scheme of the application is realized as follows:
a data interaction method applied to a first participating node, the method comprising:
After model training is carried out on an initial model based on training data to obtain a first model and first model parameters, a target hidden variable conversion algorithm is adopted to process the first model parameters to obtain first conversion data, and the first conversion data is sent to a cooperative node;
receiving target conversion data sent by the cooperative node, and processing the target conversion data by adopting the target hidden variable conversion algorithm to obtain a model total parameter; the target conversion data are obtained by processing the model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting the target hidden variable conversion algorithm;
updating the first model based on the model total parameters, and performing model training on the updated first model based on the training data until a target model is obtained.
In the above scheme, the method further comprises:
negotiating with the second participating node and the cooperative node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the second participating node and the cooperative node, and determining the target hidden variable conversion algorithm from the hidden variable algorithm library.
In the above scheme, the processing the first model parameter by using the target hidden variable conversion algorithm to obtain first conversion data includes:
converting the first model parameters by adopting the target hidden variable conversion algorithm to obtain first intermediate conversion data;
and encrypting the first intermediate conversion data by adopting a target key to obtain the first conversion data.
A data interaction method applied to a cooperative node, the method comprising:
receiving first conversion data sent by a first participating node and second conversion data sent by a second participating node; the first conversion data is obtained by processing a first model parameter by adopting a target hidden variable conversion algorithm, and the second conversion data is obtained by processing a second model parameter by adopting the target hidden variable conversion algorithm;
the target hidden variable conversion algorithm is adopted to respectively process the first conversion data and the second conversion data to obtain the first model parameter and the second model parameter;
obtaining a model total parameter based on the first model parameter and the second model parameter;
and processing the model total parameters by adopting the target hidden variable conversion algorithm to obtain target conversion data, and sending the target conversion data to the first participating node and the second participating node.
In the above scheme, the method further comprises:
negotiating with the first participating node and the second participating node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the first participating node and the second participating node, and determining the target hidden variable conversion algorithm from the hidden variable algorithm library.
In the above solution, the obtaining the model total parameter based on the first model parameter and the second model parameter includes:
and integrating the first model parameters and at least one second model parameter to obtain the model total parameters.
In the above solution, the processing the model total parameter by using the target hidden variable conversion algorithm to obtain target conversion data includes:
converting the model total parameters by adopting the target hidden variable conversion algorithm to obtain second intermediate conversion data;
and encrypting the second intermediate conversion data by using a target key to obtain the target conversion data.
A participating node, the participating node comprising: a first processor, a first memory, and a first communication bus;
The first communication bus is used for realizing communication connection between the first processor and the first memory;
the first processor is configured to execute the data interaction program in the first memory, so as to implement the steps of the data interaction method.
A participating node, the participating node comprising: a second processor, a second memory, and a second communication bus;
the second communication bus is used for realizing communication connection between the second processor and the second memory;
the second processor is configured to execute the data interaction program in the second memory, so as to implement the steps of the data interaction method.
A computer readable storage medium storing one or more programs executable by one or more processors to implement the steps of the data interaction method described above.
The data interaction method, the device and the computer readable storage medium provided by the embodiment of the application can be used for carrying out model training on the initial model based on training data to obtain the first model and the first model parameters, then adopting the target hidden variable conversion algorithm to process the first model parameters to obtain the first conversion data and send the first conversion data to the cooperative node, receiving the target conversion data sent by the cooperative node and adopting the target hidden variable conversion algorithm to process the target conversion data to obtain the model total parameters, updating the first model based on the model total parameters and carrying out model training on the updated first model based on the training data until the target model is obtained, so that the model parameters obtained by carrying out model training on the participating nodes by adopting the target hidden variable algorithm are transmitted after being processed, the safety of the model parameters can be ensured, the problem that the model parameters are stolen in the data interaction process to cause data leakage is solved, and the risk of the participating node data leakage caused by the reverse pushing of the model parameters by the encrypted model parameters in the related technology is solved.
Drawings
Fig. 1 is a schematic flow chart of a data interaction method according to an embodiment of the present application;
FIG. 2 is a flow chart of another data interaction method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating another data interaction method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a data interaction method according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of a data interaction device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another data interaction device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application.
It should be appreciated that reference throughout this specification to "an embodiment of the present application" or "the foregoing embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrase "in an embodiment of the application" or "in the foregoing embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In various embodiments of the present application, the sequence number of each process does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
Without being specifically illustrated, the electronic device may perform any step in the embodiments of the present application, and the processor of the electronic device may perform the step. It is further noted that the embodiment of the present application does not limit the sequence of the following steps performed by the electronic device. In addition, the manner in which the data is processed in different embodiments may be the same method or different methods. It should be further noted that any step in the embodiments of the present application may be executed by the electronic device independently, that is, the electronic device may not depend on execution of other steps when executing any step in the embodiments described below.
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a data interaction method which can be applied to any participating node of federal learning. Referring to fig. 1, the method comprises the steps of:
and step 101, after the initial model is subjected to model training based on training data to obtain a first model and first model parameters, processing the first model parameters by adopting a target hidden variable conversion algorithm to obtain first conversion data, and sending the first conversion data to the cooperative nodes.
In the embodiment of the application, the first model is a model obtained by model training an initial model based on training data of the first participating node, and the first model parameter is a model parameter obtained by model training the initial model based on the training data. The target hidden variable conversion algorithm is a hidden variable conversion algorithm which is negotiated in advance by each participating node and the cooperative node, and can convert the apparent variables such as model parameters and the like into hidden variables. The method comprises the steps of obtaining a model parameter, wherein the model parameter is a hidden variable which is converted into first converted data by a target hidden variable conversion algorithm, and the hidden variable is a hidden variable which can be directly observed and measured data, and mainly is the data which cannot be directly observed and measured, so that the safety of the model parameter can be protected, and the model parameter is prevented from being stolen by other people in the data interaction process to cause data leakage. The first participatory node adopts the target hidden variable conversion algorithm to process the first model parameters obtained by model training of the initial model based on training data and then transmits the processed first model parameters to the cooperative node, so that the safety of the first model parameters can be protected, and the first model parameters are prevented from being leaked to cause data leakage of the participatory node.
And 102, receiving target conversion data sent by the cooperative node, and processing the target conversion data by adopting a target hidden variable conversion algorithm to obtain a model total parameter.
The target conversion data is obtained by processing model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting a target hidden variable conversion algorithm.
In the embodiment of the application, the second participating node is a plurality of other participating nodes except the first participating node in the federal learning. The cooperative nodes are used for obtaining model total parameters based on model parameters of each participating node. The second model parameters are obtained by the second participating node performing model training on the initial model based on training data of the second participating node. After the model total parameters are obtained based on the first model parameters and the second model parameters, the cooperative nodes also need to process the model total parameters by adopting a target hidden variable conversion algorithm, so that the safety of the model total parameters is protected, and the data leakage caused by the fact that the model total parameters are stolen by other people is prevented.
And step 103, updating the first model based on the model total parameters, and performing model training on the updated first model based on training data until a target model is obtained.
In the embodiment of the application, the target model is a model obtained by continuously training the initial model based on training data. The first participating node updates the first model based on the model total parameters, namely, updates the model parameters of the first model, then continues to train the updated first model based on training data to obtain a new trained model and a new trained model parameter, adopts a target hidden variable conversion algorithm to process the new trained model parameter, then sends the processed new trained model parameter to the cooperative node, continues to receive the new model total parameters sent by the cooperative node and updates the new trained model parameter based on the received new model total parameters, and the cycle is repeated until the target model is obtained to complete model training. It should be noted that, when model parameters are transmitted, all participating nodes and cooperating nodes of federal learning process and retransmit the model parameters by adopting a target hidden variable conversion algorithm, so that the safety of the model parameters can be ensured, and the model parameters are prevented from being stolen by others in the data interaction process to cause data leakage.
According to the data interaction method provided by the embodiment of the application, after the initial model is subjected to model training based on training data to obtain the first model and the first model parameters, the first model parameters are processed by adopting the target hidden variable conversion algorithm to obtain the first conversion data and are sent to the cooperative nodes, the target conversion data sent by the cooperative nodes are received and are processed by adopting the target hidden variable conversion algorithm to obtain the model total parameters, the first model is updated based on the model total parameters, the updated first model is subjected to model training based on the training data until the target model is obtained, and the model parameters obtained by the model training of the participating nodes are processed by adopting the target hidden variable algorithm and are then transmitted, so that the safety of the model parameters can be ensured, the data leakage caused by the fact that the model parameters are stolen by other people in the data interaction process is prevented, and the problem that the model parameters are reversely deduced by the encrypted model parameters to cause the data leakage of the participating nodes in the related technology is solved.
Based on the foregoing embodiments, an embodiment of the present application provides a data interaction method, applied to a cooperative node, and shown with reference to fig. 2, the method includes the following steps:
step 201, receiving first conversion data sent by a first participating node and second conversion data sent by a second participating node.
The first conversion data is obtained by processing the first model parameters by adopting a target hidden variable conversion algorithm, and the second conversion data is obtained by processing the second model parameters by adopting the target hidden variable conversion algorithm.
In the embodiment of the application, the first participation node is any participation node in federal learning, and the second participation node is a plurality of other participation nodes except the first participation node. The cooperative nodes are used for obtaining model total parameters based on the first model parameters and the second model parameters, namely, the model parameters of all the participating nodes are processed to obtain the model total parameters. The first model parameters are obtained by the first participatory node performing model training on the initial model based on training data of the first participatory node, and the second model parameters are obtained by the second participatory node performing model training on the initial model based on training data of the second participatory node.
And 202, respectively processing the first conversion data and the second conversion data by adopting a target hidden variable conversion algorithm to obtain a first model parameter and a second model parameter.
In the embodiment of the application, the first conversion data is obtained by adopting the target conversion algorithm to the first model parameters, and the second conversion data is obtained by adopting the target conversion algorithm to the second model parameters, so that the collaboration node can process the first conversion data by adopting the target hidden variable conversion algorithm to obtain the first model parameters, and the collaboration node can process the first conversion data by adopting the target hidden variable conversion algorithm to obtain the second model parameters.
And 203, obtaining the model total parameters based on the first model parameters and the second model parameters.
In the embodiment of the application, the cooperative node can obtain the model total parameters based on the first model parameters and the second model parameters, namely the cooperative node can process the model parameters sent by each participating node (the first participating node and the second participating node) to obtain the model total parameters.
And 204, processing the model total parameters by adopting a target hidden variable conversion algorithm to obtain target conversion data, and transmitting the target conversion data to the first participating node and the second participating node.
In the embodiment of the application, the cooperative node processes the model total parameters by adopting the target hidden variable conversion algorithm and then transmits the processed model total parameters to the first participating node and the second participating node, so that the safety of the model total parameters can be ensured, and the model total parameters are prevented from being stolen by others in the data interaction process to cause data leakage.
According to the data interaction method provided by the embodiment of the application, the first conversion data sent by the first participation node and the second conversion data sent by the second participation node are received, the first conversion data and the second conversion data are respectively processed by adopting the target hidden variable conversion algorithm to obtain the first model parameter and the second model parameter, the model total parameter is obtained based on the first model parameter and the second model parameter, the target hidden variable conversion algorithm is adopted to process the model total parameter to obtain the target conversion data and send the target conversion data to the first participation node and the second participation node, and the model total parameter obtained based on the first model parameter and the second model parameter is processed by adopting the target hidden variable algorithm and then transmitted, so that the safety of the model parameter can be ensured, the data leakage caused by the fact that the model parameter is stolen by other people in the data interaction process is prevented, and the problem that the model parameter is reversely deduced by the encrypted model parameter to cause the risk of the participation node data leakage in the related technology is solved.
Based on the foregoing embodiments, an embodiment of the present application provides a data interaction method, referring to fig. 3, including the following steps:
step 301, the first participating node negotiates with the second participating node and the cooperative node to determine that the data interaction mode is the hidden variable mode, and synchronizes the hidden variable algorithm library.
Wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm.
In the embodiment of the application, each participating node (i.e., the first participating node and the second participating node) and the cooperative node of federal learning may negotiate to determine that the data interaction mode is an hidden variable mode before training the model, and synchronize respective hidden variable algorithm libraries, which may include a plurality of hidden variable conversion algorithms. In one implementation, the hidden variable mode may be to directly use a hidden variable conversion algorithm to convert the model parameters and then transmit the converted model parameters; in another implementation manner, the hidden variable mode may be that the model parameters are converted by using a hidden variable conversion algorithm to obtain intermediate conversion data, and then the intermediate conversion data is encrypted by using the target key and then transmitted.
Step 302, the first participating node negotiates with the second participating node and the cooperative node, and a target hidden variable conversion algorithm is determined from a hidden variable algorithm library.
In the embodiment of the application, the first participating node, the second participating node and the cooperative node can negotiate to determine a target hidden variable conversion algorithm from a hidden variable algorithm library, and can also determine an initial model, initial parameters and a target key.
In step 303, after performing model training on the initial model based on the training data to obtain a first model and first model parameters, the first participating node converts the first model parameters by using a target hidden variable conversion algorithm to obtain first intermediate conversion data.
In the embodiment of the application, after the first model parameter is obtained by the first participating node, the first model parameter can be processed by adopting a target hidden variable conversion algorithm, and the first model parameter, namely the apparent variable, is converted into the hidden variable, namely the first converted data, so that the safety of the model parameter is protected in the data interaction process. It should be noted that, the higher the complexity of the target hidden variable conversion algorithm is, the greater the difficulty in cracking.
In one implementation manner, if the complexity of the target hidden variable conversion algorithm is high enough, the step 304 may not be executed, and the first intermediate conversion data obtained after the conversion of the first model parameter by using the target hidden variable conversion algorithm is directly sent to the collaboration node as the first conversion data; in this case, the hidden variable mode determined by negotiation between each participating node and the cooperative node is to directly adopt the hidden variable conversion algorithm to convert the model parameters and then transmit the model parameters.
In another implementation manner, to further secure the model parameters, step 304 may be performed after the first intermediate conversion data is obtained; in this case, the hidden variable mode determined by negotiation between each participating node and the cooperative node is transmitted after the model parameters are converted by using the hidden variable conversion algorithm and then the converted model parameters are encrypted by using the target key.
And step 304, the first participating node encrypts the first intermediate conversion data by adopting the target key to obtain the first conversion data and sends the first conversion data to the cooperative node.
In the embodiment of the application, in order to further protect the safety of the model parameters, each participating node and the cooperative node can also negotiate to determine a target key, encrypt the first intermediate conversion data by using the target key to obtain the first conversion data and send the first conversion data to the cooperative node.
Step 305, the cooperative node receives the first conversion data sent by the first participant node and the second conversion data sent by the second participant node.
The first conversion data is obtained by processing the first model parameters by adopting a target hidden variable conversion algorithm, and the second conversion data is obtained by processing the second model parameters by adopting the target hidden variable conversion algorithm.
And 306, the cooperative node adopts a target hidden variable conversion algorithm to respectively process the first conversion data and the second conversion data to obtain a first model parameter and a second model parameter.
In the embodiment of the application, if the first conversion data and the second conversion data are obtained by directly converting the first model parameter and the second model parameter respectively by adopting a target hidden variable conversion algorithm, after receiving the first conversion data and the second conversion data, the cooperative node can respectively reversely convert the first conversion data and the second conversion data by adopting the target hidden variable conversion algorithm to obtain the first model parameter and the second model parameter; if the first conversion data and the second conversion data are obtained by adopting a target hidden variable conversion algorithm and then adopting a target secret key to process the first model parameter and the second model parameter respectively, after the first conversion data and the second conversion data are received by the cooperative node, the first conversion data and the second conversion data can be decrypted by adopting the target secret key to obtain first intermediate conversion data and second intermediate conversion data, and then the first intermediate conversion data and the second intermediate conversion data are reversely converted by adopting the target hidden variable conversion algorithm to obtain the first model parameter and the second model parameter respectively.
Step 307, the collaboration node integrates the first model parameter and at least one second model parameter to obtain a model total parameter.
In the embodiment of the application, the cooperative node performs an integration process on the first model parameter and at least one second model parameter, that is, performs an integration process on the model parameters of each participating node, so as to obtain a model total parameter.
And 308, converting the model total parameters by the cooperative node by adopting a target hidden variable conversion algorithm to obtain second intermediate conversion data.
In one implementation manner, if the complexity of the target hidden variable conversion algorithm is high enough, step 309 may not be executed, and the second intermediate conversion data obtained by converting the model total parameter by using the target hidden variable conversion algorithm is directly sent to the first participating node and the second participating node as target conversion data; in this case, the hidden variable mode determined by negotiation between each participating node and the cooperative node is to directly adopt the hidden variable conversion algorithm to convert the model parameters and then transmit the model parameters.
In another implementation manner, to further protect the security of the model parameters, the cooperative node may execute step 309 after converting the model total parameters to obtain second intermediate conversion data by using the target hidden variable conversion algorithm; in this case, the hidden variable mode determined by negotiation between each participating node and the cooperative node is transmitted after the model parameters are converted by using the hidden variable conversion algorithm and then the converted model parameters are encrypted by using the target key.
And 309, encrypting the second intermediate conversion data by the cooperative node by adopting the target key, obtaining target conversion data and sending the target conversion data to the first participating node and the second participating node.
In the embodiment of the application, in order to further protect the safety of the model parameters, the cooperative node and each participating node can also negotiate to determine a target key, and then the cooperative node encrypts the second intermediate conversion data by adopting the target key to obtain second conversion data and sends the second conversion data to the first participating node and the second participating node.
Step 310, the first participating node receives the target conversion data sent by the cooperative node, and processes the target conversion data by adopting a target hidden variable conversion algorithm to obtain a model total parameter.
The target conversion data is obtained by processing model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting a target hidden variable conversion algorithm.
In an implementation manner of the embodiment of the present application, if the target transformation data is obtained by directly transforming the model total parameters by using a target hidden variable transformation algorithm, the target transformation data may be inversely transformed by using the target hidden variable transformation algorithm to obtain the model total parameters. In another implementation manner, if the target conversion data is obtained by processing the model total parameter by using the target hidden variable conversion algorithm and then using the target key, the first participating node may decrypt the target conversion data by using the target key to obtain the second intermediate conversion data, and then inversely convert the second intermediate conversion data by using the target hidden variable conversion algorithm to obtain the model total parameter.
Step 311, the first participating node updates the first model based on the model total parameters, and performs model training on the updated first model based on the training data until the target model is obtained.
It should be noted that, in this embodiment, the descriptions of the same steps and the same content as those in other embodiments may refer to the descriptions in other embodiments, and are not repeated here.
As shown in fig. 4, the first participating node may perform model training on the initial model by using training data (data source a) of the first participating node to obtain a first model and first model parameters, then use a target hidden variable conversion algorithm to convert the first model parameters to obtain first intermediate conversion data, and then use a target secret key to encrypt the first intermediate conversion data to obtain first conversion data and send the first conversion data to the cooperative node. Similarly, the second participating node may perform model training on the initial model by using training data (data source B) of the second participating node to obtain a second model and second model parameters, then use a target hidden variable conversion algorithm to convert the second model parameters to obtain third intermediate conversion data, and then use a target secret key to encrypt the third intermediate conversion data to obtain second conversion data and send the second conversion data to the cooperative node. After receiving the first conversion data and the second conversion data, the cooperative node decrypts the first conversion data and the second conversion data by adopting a target secret key to obtain first intermediate conversion data and third intermediate conversion data, then respectively inversely converts the first intermediate conversion data and the third intermediate conversion data by adopting a target hidden variable conversion algorithm to obtain a first model parameter and a second model parameter, obtains a model total parameter based on the first model parameter and the second model parameter, converts the model total parameter by adopting the target hidden variable conversion algorithm to obtain second intermediate conversion data, encrypts the second intermediate conversion data by adopting the target secret key to obtain target conversion data, and sends the target conversion data to the first participating node and the second participating node. After the first participating node and the second participating node receive the target conversion data, the target key is adopted to decrypt the target conversion data to obtain second intermediate conversion data, then the target hidden variable conversion algorithm is adopted to reversely convert the second intermediate conversion data to obtain model total parameters, the model is updated based on the model total parameters, the updated model is trained based on the training data of the model until the target model is obtained, and the model parameters are processed by the target hidden variable conversion algorithm and the target key and then transmitted, so that the safety of the model parameters can be ensured, and the model parameters are prevented from being stolen by others in the data interaction process to cause data leakage.
In other embodiments of the present application, the data interaction method provided by the present application may be applied to a scenario where a text classification model is obtained, where each participating node and the cooperative node may negotiate in advance to determine that the data interaction mode is a hidden variable mode, the target hidden variable conversion algorithm is F, and the initial model is a recurrent neural network (Recurrent Neural Network, RNN), specifically: each participating node can perform model training on the initial RNN model based on own training data to obtain a text classification model after the first training and a model parameter x of the text classification model after the first training, wherein the model parameter x can comprise a learning rate, a weight matrix from an input layer to a hidden layer, a weight matrix from the hidden layer to an output layer and the like; then, a target hidden variable conversion algorithm F is adopted to convert the model parameter x to obtain a converted model parameter y: y=f (x), sending the converted model parameter y to the cooperative node; the cooperative node adopts a target hidden variable conversion algorithm F to respectively perform inverse conversion on the converted model parameters y sent by each participating node to obtain model parameters x of each participating node, then obtains model total parameters a based on the model parameters x of each participating node, and then adopts the target hidden variable conversion algorithm F to convert the model total parameters a to obtain target conversion data b: b=f (a) and sent to each participating node; each participating node adopts a target hidden variable conversion algorithm F to carry out inverse conversion on the target conversion data b to obtain a model total parameter a, updates a model of the participating node based on the model total parameter a, and trains the updated model based on self training data until a text classification model is obtained.
In other embodiments of the present application, the data interaction method provided by the present application may also be used in a scenario where an image classification model is obtained, where each participating node and the cooperative node may negotiate in advance to determine that the data interaction mode is a hidden variable mode, the target hidden variable conversion algorithm is F, and the initial model is a convolutional neural network (Convolutional Neural Network, CNN), specifically: each participating node can perform model training on the initial CNN model based on own training data to obtain a first trained image classification model and model parameters v of the first trained image classification model, wherein the model parameters v can comprise batch-processing parameters (batch_size), learning rate (learning_rate), connection pool size (poolsize) and the like; then, a target hidden variable conversion algorithm F is adopted to convert the model parameter v to obtain a converted model parameter u: u=f (v), sending the converted model parameters u to the cooperative node; the cooperative node adopts a target hidden variable conversion algorithm F to respectively carry out inverse conversion on the converted model parameters u sent by each participating node to obtain model parameters v of each participating node, then obtains model total parameters n based on the model parameters v of each participating node, and then adopts the target hidden variable conversion algorithm F to convert the model total parameters n to obtain target conversion data m: m=f (n) and sent to each participating node; each participating node adopts a target hidden variable conversion algorithm F to carry out inverse conversion on target conversion data m to obtain a model total parameter n, updates a model of the participating node based on the model total parameter n, and trains the updated model based on self training data until an image classification model is obtained.
It should be noted that, since the objective hidden variable conversion algorithm F is secret agreed by each participating node and the cooperative node, the external world cannot know the specific form and details of the objective hidden variable conversion algorithm F, and therefore cannot perform inverse conversion on the intercepted data (such as the converted model parameter n), so as to achieve the effect of protecting the model parameters (such as the model parameter v) of each participating node. Therefore, the transformation/inverse transformation by adopting the target hidden variable transformation algorithm is more flexible and variable than the encryption algorithm, and the data of each participating node can be hidden and protected. Of course, the data interaction method provided by the embodiment of the application can also be applied to the fields of computing biology, recommendation systems and the like.
According to the data interaction method provided by the embodiment of the application, the model parameters obtained by the participating node and the cooperative node are processed by adopting the target hidden variable algorithm and then transmitted, so that the safety of the model parameters can be ensured, the data leakage caused by the fact that the model parameters are stolen by others in the data interaction process is prevented, and the problem of the risk of the data leakage of the participating node caused by the fact that the model parameters are reversely deduced by the encrypted model parameters in the related technology is solved.
Based on the foregoing embodiments, an embodiment of the present application provides a participating node, where the participating node may be applied to the data interaction method provided in the corresponding embodiment of fig. 1 and 3, and referring to fig. 5, the participating node 4 may include: a first processor 41, a first memory 42 and a first communication bus 43, wherein:
the first communication bus 43 is used to implement a communication connection between the first processor 41 and the first memory 42;
the first processor 41 is configured to execute a data interaction program in the first memory 42 to implement the following steps:
after model training is carried out on the initial model based on training data to obtain a first model and first model parameters, a target hidden variable conversion algorithm is adopted to process the first model parameters to obtain first conversion data, and the first conversion data is sent to a cooperative node;
receiving target conversion data sent by a cooperative node, and processing the target conversion data by adopting a target hidden variable conversion algorithm to obtain a model total parameter; the target conversion data are obtained by processing model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting a target hidden variable conversion algorithm;
updating the first model based on the model total parameters, and performing model training on the updated first model based on training data until a target model is obtained.
In other embodiments of the present application, the first processor 41 is configured to execute the data interaction program in the first memory 42, and the following steps may be implemented:
negotiating with a second participating node and a cooperative node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the second participating node and the cooperative node, and determining a target hidden variable conversion algorithm from a hidden variable algorithm library.
In other embodiments of the present application, the first processor 41 is configured to execute the data interaction program in the first memory 42 and process the first model parameter by using the target hidden variable conversion algorithm to obtain the first conversion data, so as to implement the following steps:
converting the first model parameters by adopting a target hidden variable conversion algorithm to obtain first intermediate conversion data;
and encrypting the first intermediate conversion data by using the target key to obtain the first conversion data.
It should be noted that, in the data interaction method provided by the embodiments corresponding to fig. 1 and 3, details of the steps executed by the processor may not be repeated herein.
According to the first participating node provided by the embodiment of the application, the model parameters obtained by model training are processed by adopting the target hidden variable algorithm and then transmitted, so that the safety of the model parameters can be ensured, the data leakage caused by the fact that the model parameters are stolen by others in the data interaction process is prevented, and the problem of the risk of participating node data leakage caused by the fact that the model parameters are reversely deduced by the encrypted model parameters in the related technology is solved.
Based on the foregoing embodiments, an embodiment of the present application provides a collaboration node, where the collaboration node may be applied to the data interaction method provided in the corresponding embodiment of fig. 2 and 3, and referring to fig. 6, the collaboration node 5 may include: a second processor 51, a second memory 52 and a second communication bus 53, wherein:
the second communication bus 53 is used to implement a communication connection between the second processor 51 and the second memory 52;
the second processor 51 is configured to execute a data interaction program in the second memory 52 to implement the following steps:
receiving first conversion data sent by a first participating node and second conversion data sent by a second participating node; the first conversion data is obtained by processing the first model parameters by adopting a target hidden variable conversion algorithm, and the second conversion data is obtained by processing the second model parameters by adopting the target hidden variable conversion algorithm;
Processing the first conversion data and the second conversion data respectively by adopting a target hidden variable conversion algorithm to obtain a first model parameter and a second model parameter;
obtaining a model total parameter based on the first model parameter and the second model parameter;
and processing the model total parameters by adopting a target hidden variable conversion algorithm to obtain target conversion data, and transmitting the target conversion data to the first participating node and the second participating node.
In other embodiments of the present application, the second processor 51 is configured to execute the data interaction program in the second memory 52, and the following steps may be implemented:
negotiating with a first participating node and a second participating node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the first participating node and the second participating node, and determining a target hidden variable conversion algorithm from a hidden variable algorithm library.
In other embodiments of the present application, the second processor 51 is configured to execute the data interaction program in the second memory 52 to obtain the model total parameters based on the first model parameters and the second model parameters, and further implement the following steps:
And integrating the first model parameters and at least one second model parameter to obtain the model total parameters.
In other embodiments of the present application, the second processor 51 is configured to execute the data interaction program in the second memory 52 and process the model total parameters by using the target hidden variable conversion algorithm to obtain the target conversion data, and further implement the following steps:
converting the model total parameters by adopting a target hidden variable conversion algorithm to obtain second intermediate conversion data;
and encrypting the second intermediate conversion data by using the target key to obtain target conversion data.
It should be noted that, in the data interaction method provided by the embodiments corresponding to fig. 2 and 3, specific descriptions of the steps executed by the processor may be omitted here.
The cooperative node provided by the embodiment of the application adopts the target hidden variable algorithm to process and then transmit the model total parameters obtained based on the first model parameters and the second model parameters, can ensure the safety of the model parameters, prevent the model parameters from being stolen by others in the data interaction process to cause data leakage, and solve the problem of risk of participating in node data leakage caused by the fact that the model parameters are reversely deduced by the encrypted model parameters in the related technology.
Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs executable by one or more processors to implement the steps of the data interaction method provided by the corresponding embodiments of fig. 1 to 3.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application.

Claims (10)

1. A method of data interaction, applied to a first participating node, the method comprising:
after model training is carried out on an initial model based on training data to obtain a first model and first model parameters, a target hidden variable conversion algorithm is adopted to process the first model parameters to obtain first conversion data, and the first conversion data is sent to a cooperative node;
Receiving target conversion data sent by the cooperative node, and processing the target conversion data by adopting the target hidden variable conversion algorithm to obtain a model total parameter; the target conversion data are obtained by processing the model total parameters obtained based on the first model parameters and the second model parameters of the second participating nodes by adopting the target hidden variable conversion algorithm;
updating the first model based on the model total parameters, and performing model training on the updated first model based on the training data until a target model is obtained.
2. The method according to claim 1, wherein the method further comprises:
negotiating with the second participating node and the cooperative node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the second participating node and the cooperative node, and determining the target hidden variable conversion algorithm from the hidden variable algorithm library.
3. The method of claim 1, wherein processing the first model parameters using a target hidden variable transformation algorithm to obtain first transformation data comprises:
Converting the first model parameters by adopting the target hidden variable conversion algorithm to obtain first intermediate conversion data;
and encrypting the first intermediate conversion data by adopting a target key to obtain the first conversion data.
4. A method of data interaction, applied to a collaboration node, the method comprising:
receiving first conversion data sent by a first participating node and second conversion data sent by a second participating node; the first conversion data is obtained by processing a first model parameter by adopting a target hidden variable conversion algorithm, and the second conversion data is obtained by processing a second model parameter by adopting the target hidden variable conversion algorithm;
the target hidden variable conversion algorithm is adopted to respectively process the first conversion data and the second conversion data to obtain the first model parameter and the second model parameter;
obtaining a model total parameter based on the first model parameter and the second model parameter;
and processing the model total parameters by adopting the target hidden variable conversion algorithm to obtain target conversion data, and sending the target conversion data to the first participating node and the second participating node.
5. The method according to claim 4, wherein the method further comprises:
negotiating with the first participating node and the second participating node to determine that the data interaction mode is a hidden variable mode, and synchronizing a hidden variable algorithm library; wherein, the hidden variable mode characterization model parameters are transmitted after being processed by a hidden variable conversion algorithm;
negotiating with the first participating node and the second participating node, and determining the target hidden variable conversion algorithm from the hidden variable algorithm library.
6. The method of claim 4, wherein the deriving model total parameters based on the first model parameters and the second model parameters comprises:
and integrating the first model parameters and at least one second model parameter to obtain the model total parameters.
7. The method of claim 4, wherein the processing the model total parameters using the target hidden variable transformation algorithm to obtain target transformation data comprises:
converting the model total parameters by adopting the target hidden variable conversion algorithm to obtain second intermediate conversion data;
and encrypting the second intermediate conversion data by using a target key to obtain the target conversion data.
8. A first participating node, the first participating node comprising: a first processor, a first memory, and a first communication bus;
the first communication bus is used for realizing communication connection between the first processor and the first memory;
the first processor is configured to execute a data interaction program in the first memory to implement the steps of the data interaction method according to any of claims 1-3.
9. A collaboration node, the collaboration node comprising: a second processor, a second memory, and a second communication bus;
the second communication bus is used for realizing communication connection between the second processor and the second memory;
the second processor is configured to execute a data interaction program in the second memory to implement the steps of the data interaction method according to any of claims 4-7.
10. A computer readable storage medium storing one or more programs executable by one or more processors to implement the steps of the data interaction method of any of claims 1-3 or 4-7.
CN202210349034.6A 2022-04-01 2022-04-01 Data interaction method, device and computer readable storage medium Pending CN116933898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210349034.6A CN116933898A (en) 2022-04-01 2022-04-01 Data interaction method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210349034.6A CN116933898A (en) 2022-04-01 2022-04-01 Data interaction method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116933898A true CN116933898A (en) 2023-10-24

Family

ID=88376110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210349034.6A Pending CN116933898A (en) 2022-04-01 2022-04-01 Data interaction method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116933898A (en)

Similar Documents

Publication Publication Date Title
Xiong et al. Toward lightweight, privacy-preserving cooperative object classification for connected autonomous vehicles
US9158925B2 (en) Server-aided private set intersection (PSI) with data transfer
CN110944011B (en) Joint prediction method and system based on tree model
CN106452750B (en) A kind of quantum encryption communication method for mobile device
CN112818369B (en) Combined modeling method and device
CN114650134A (en) Longitudinal privacy protection logistic regression method based on secret sharing
CN113014386B (en) Cryptographic system based on multiparty collaborative computing
CN114003950A (en) Federal machine learning method, device, equipment and medium based on safety calculation
CN115037438A (en) Safety communication method and system based on neural network predefined time synchronization control
CN113992325A (en) Private data sharing method and device
CN114239862A (en) anti-Byzantine attack federal learning method for protecting user data privacy
CN116502732B (en) Federal learning method and system based on trusted execution environment
CN114301677A (en) Key negotiation method, device, electronic equipment and storage medium
Elboukhari et al. Implementation of secure key distribution based on quantum cryptography
CN117421762A (en) Federal learning privacy protection method based on differential privacy and homomorphic encryption
CN108134777A (en) A kind of communication encryption system based on timestamp
CN114205144B (en) Data transmission method, apparatus, device, storage medium and program product
CN116933898A (en) Data interaction method, device and computer readable storage medium
CN114462626B (en) Federal model training method and device, terminal equipment and storage medium
CN113420886B (en) Training method, device, equipment and storage medium for longitudinal federal learning model
CN114844635A (en) Method for safely carrying out Shuffle on data
JP2024510658A (en) Data processing methods, devices, electronic devices, and storage media for multi-source data
CN114553418A (en) Service method, device, system and terminal
CN116415267A (en) Iterative updating method, device and system for joint learning model and storage medium
Li et al. Efficient and traceable data sharing for the Internet of Things in smart cities

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination