CN113822436A - Communication method and device for federal learning model training and electronic equipment - Google Patents

Communication method and device for federal learning model training and electronic equipment Download PDF

Info

Publication number
CN113822436A
CN113822436A CN202110270873.4A CN202110270873A CN113822436A CN 113822436 A CN113822436 A CN 113822436A CN 202110270873 A CN202110270873 A CN 202110270873A CN 113822436 A CN113822436 A CN 113822436A
Authority
CN
China
Prior art keywords
communication
block
training
user node
communication record
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
CN202110270873.4A
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110270873.4A priority Critical patent/CN113822436A/en
Publication of CN113822436A publication Critical patent/CN113822436A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2151Time stamp

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Optimization (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Pure & Applied Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a communication method, a device and electronic equipment for training a federated learning model, wherein the method comprises the following steps: acquiring a communication record of a user node during the training task execution; generating a Merck tree according to the hash value corresponding to the communication record; and storing the Merckel tree into a corresponding block in a block chain. Therefore, communication records of the user nodes during the training task execution are obtained, the Mercker tree is generated according to the Hash values corresponding to the communication records, and the Mercker tree is stored in the corresponding blocks in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.

Description

Communication method and device for federal learning model training and electronic equipment
Technical Field
The present application relates to the field of deep learning technologies, and in particular, to a communication method and apparatus for federated learning model training, an electronic device, and a storage medium.
Background
At present, federal learning can realize federal modeling and federal training without data sharing, data safety is high, the problem of data island can be solved, and the method is widely applied. However, in the federal learning model training process in the related art, the training process is low in transparency, some participants generate false data and conduct federal training with other participants to acquire privacy data of other participants, the training process is not traceable, and problems cannot be verified.
Disclosure of Invention
The method aims to solve one of the technical problems that in the federal learning model training process in the related technology, the transparency of the training process is low, the training process is not traceable, and the problems cannot be checked at least to a certain extent.
Therefore, an embodiment of the first aspect of the present application provides a communication method for federated learning model training, which obtains a communication record of a user node during a training task, generates a mercker tree according to a hash value corresponding to the communication record, and stores the mercker tree into a corresponding block in a block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
The embodiment of the second aspect of the application provides a communication device for the training of the federated learning model.
The embodiment of the third aspect of the application provides an electronic device.
An embodiment of a fourth aspect of the present application provides a computer-readable storage medium.
An embodiment of a first aspect of the present application provides a communication method for federated learning model training, including: acquiring a communication record of a user node during the training task execution; generating a Merck tree according to the hash value corresponding to the communication record; and storing the Merckel tree into a corresponding block in a block chain.
According to the communication method for the federal learning model training, communication records of user nodes during the period of executing a training task are obtained, the Mercker tree is generated according to the Hash values corresponding to the communication records, and the Mercker tree is stored in the corresponding blocks in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
In addition, the communication method trained by the federal learning model according to the above embodiment of the present application may also have the following additional technical features:
in one embodiment of the present application, the communication record includes at least one of the following information: sender, receiver, variable unique identifier, message size and communication content.
In one embodiment of the present application, further comprising: and storing the communication content by adopting an interplanetary file system to generate a hash value corresponding to the communication content.
In one embodiment of the application, the communication content comprises local training data and/or intermediate training results.
In an embodiment of the present application, before the obtaining of the communication record of the user node during the training task, the method further includes: establishing the block in the block chain; storing the block attribute information into the block.
In one embodiment of the present application, the block attribute information includes at least one of the following information: the hash value of the block preceding the block, a timestamp, a random number, and the hash value of the block succeeding the block.
In an embodiment of the present application, before the obtaining of the communication record of the user node during the training task, the method further includes: acquiring training task information submitted by the user node, wherein the training task information comprises configuration information of the training task; storing the configuration information into the block.
In one embodiment of the present application, the configuration information includes at least one of the following information: the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
In one embodiment of the present application, further comprising: determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node; determining the excitation of the user node according to the contribution value; storing the stimulus into the block.
In one embodiment of the present application, further comprising: and displaying the communication record.
In one embodiment of the present application, further comprising: and sending the communication record to a supervision node so that the supervision node supervises the training task.
In one embodiment of the application, the user node communicates with the user node agreed in the communication contract according to a communication contract, and the communication contract is determined according to the matching degree of the local training data of the user node and other user nodes.
An embodiment of a second aspect of the present application provides a communication device for federated learning model training, including: the acquisition module is used for acquiring a communication record of the user node during the training task execution; the generation module is used for generating a Mercker tree according to the hash value corresponding to the communication record; and the storage module is used for storing the Mercker tree into a corresponding block in a block chain.
The communication device for federal learning model training in the embodiment of the application obtains the communication record of a user node during the training task execution, generates the Mercker tree according to the hash value corresponding to the communication record, and stores the Mercker tree into the corresponding block in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
In addition, the communication device trained according to the federal learning model of the above embodiment of the present application may have the following additional technical features:
in one embodiment of the present application, the communication record includes at least one of the following information: sender, receiver, variable unique identifier, message size and communication content.
In an embodiment of the application, the generating module is further configured to: and storing the communication content by adopting an interplanetary file system to generate a hash value corresponding to the communication content.
In one embodiment of the application, the communication content comprises local training data and/or intermediate training results.
In an embodiment of the application, before the obtaining of the communication record of the user node during the training task, the storage module is further configured to: establishing the block in the block chain; storing the block attribute information into the block.
In one embodiment of the present application, the block attribute information includes at least one of the following information: the hash value of the block preceding the block, a timestamp, a random number, and the hash value of the block succeeding the block.
In an embodiment of the application, before the obtaining of the communication record of the user node during the training task, the storage module is further configured to: acquiring training task information submitted by the user node, wherein the training task information comprises configuration information of the training task; storing the configuration information into the block.
In one embodiment of the present application, the configuration information includes at least one of the following information: the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
In an embodiment of the application, the storage module is further configured to: determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node; determining the excitation of the user node according to the contribution value; storing the stimulus into the block.
In one embodiment of the present application, further comprising: a display module for: and displaying the communication record.
In one embodiment of the present application, further comprising: a sending module configured to: and sending the communication record to a supervision node so that the supervision node supervises the training task.
In one embodiment of the application, the user node communicates with the user node agreed in the communication contract according to a communication contract, and the communication contract is determined according to the matching degree of the local training data of the user node and other user nodes.
An embodiment of a third aspect of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the communication method of federal learning model training as described in the foregoing embodiments of the first aspect when executing the program.
The electronic device of the embodiment of the application executes the computer program stored in the memory through the processor, obtains the communication record of the user node during the training task execution, generates the merkel tree according to the hash value corresponding to the communication record, and stores the merkel tree into the corresponding block in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
An embodiment of a fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a communication method for federal learning model training as described in the embodiment of the first aspect.
The computer-readable storage medium of the embodiment of the application, by storing a computer program and being executed by a processor, obtains a communication record of a user node during a training task, generates a merkel tree according to a hash value corresponding to the communication record, and stores the merkel tree in a corresponding block in a block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a communication method for federated learning model training according to one embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a communication method for federated learning model training according to an embodiment of the present application before obtaining a communication record of a user node during a training task;
FIG. 3 is a schematic flow chart illustrating a method for communication training of a federated learning model according to an embodiment of the present application after building blocks in a block chain;
FIG. 4 is a block diagram of a communicator trained by the federated learning model according to one embodiment of the present application; and
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
A communication method, an apparatus, an electronic device, and a storage medium for federal learning model training according to embodiments of the present application are described below with reference to the accompanying drawings.
FIG. 1 is a flow diagram illustrating a communication method for federated learning model training according to one embodiment of the present application.
As shown in fig. 1, a communication method for federal learning model training in an embodiment of the present application includes:
s101, acquiring a communication record of the user node during the training task.
It should be noted that the executing subject of the communication method for federal learning model training in the embodiment of the present application may be a communication device for federal learning model training, and the communication device for federal learning model training in the embodiment of the present application may be configured in any electronic device, so that the electronic device may execute the communication method for federal learning model training in the embodiment of the present application. The electronic device may be a Personal Computer (PC), a cloud device, a mobile device, and the like, and the mobile device may be a hardware device having various operating systems, touch screens, and/or display screens, such as a mobile phone, a tablet Computer, a Personal digital assistant, a wearable device, and an in-vehicle device.
In the embodiment of the application, the communication record of the user node during the training task execution can be obtained. The user node refers to a node participating in a federal learning model training task. It is understood that a federated learning model training task requires multiple user nodes to train cooperatively, i.e., the number of user nodes may be multiple. Alternatively, the user nodes may be organized for entities. For example, user nodes include, but are not limited to, individuals, businesses, and the like.
Optionally, the user nodes communicate according to the user nodes appointed in the communication contract, and the communication contract is determined according to the matching degree of the local training data of the user nodes and other user nodes. It can be understood that each user node may correspond to a set of local training data, and the matching degree of the local training data of the user node and the local training data of other user nodes may be obtained, and the communication contract may be determined according to the matching degree. For example, if the matching degree is higher than the preset matching degree threshold, the corresponding other user node is used as the user node appointed in the communication contract. It is to be understood that the communication contract may be determined in other manners according to the matching degree, and is not limited herein. Therefore, the method can determine the communication authority of the user node through the communication contract, and is beneficial to ensuring the communication security.
Optionally, the communication record includes at least one of the following information: sender, receiver, variable unique identifier, message size and communication content. Wherein, the communication content includes local training data and/or intermediate training results, and the intermediate training results include but are not limited to binning, gradient, and the like. Thus, the communication record may include local training data and/or intermediate training results, helping to ensure the integrity of the model training backtrack.
S102, generating a Mercker tree according to the hash value corresponding to the communication record.
In an embodiment of the present application, a merkel (Merkle) tree may be generated according to a hash value corresponding to a communication record. It is understood that each communication record may correspond to a hash value, and the merkel tree may be generated from a plurality of hash values.
Optionally, when the communication record includes the communication content, an InterPlanetary File System (IPFS) may be used to store the communication content, so as to generate a hash value corresponding to the communication content. Therefore, the method stores the communication content data through the interplanetary file system and generates the hash value corresponding to the communication content, the communication content data does not need to be stored on the block chain, and the network bandwidth of the block chain can be saved.
Optionally, generating the mercker tree according to the hash value corresponding to the communication record may include performing hash operation on the hash value in the direction of the root node to obtain a mercker root, and generating the mercker tree according to the mercker root.
S103, storing the Mercker tree into a corresponding block in the block chain.
At present, federal learning can realize federal modeling and federal training without data sharing, data safety is high, the problem of data island can be solved, and the method is widely applied. However, in the federal learning model training process in the related art, the training process is low in transparency, some participants generate false data and conduct federal training with other participants to acquire privacy data of other participants, the training process is not traceable, and problems cannot be verified.
In the embodiment of the present application, the merkel tree may be stored in a corresponding block in the block chain. It is understood that a blockchain may include a plurality of blocks. Optionally, the target block may be established in the block chain in advance for storing the training task information. Accordingly, the merkel tree may be stored into a target block in the block chain.
It can be understood that the data stability and reliability in the block chain are high, and the method can store the merkel tree into the corresponding block in the block chain, which helps to ensure the data stability and reliability of the merkel tree.
In summary, according to the communication method for federal learning model training in the embodiment of the present application, a communication record of a user node during execution of a training task is obtained, a mercker tree is generated according to a hash value corresponding to the communication record, and the mercker tree is stored in a corresponding block in a block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
On the basis of any of the above embodiments, after the communication record of the user node during the training task is acquired in step S101, the communication record may be presented. The communication record includes, but is not limited to, a message body, a communication content size, and the like, which is not limited herein. Therefore, the method can display the communication records, enables the communication records to be visualized and improves the transparency of the training process.
On the basis of any of the above embodiments, after the communication record of the user node during the execution of the training task is acquired in step S101, the communication record may be sent to the supervision node, so that the supervision node supervises the training task. It can be understood that a supervision node can be further arranged in the federal learning model training process, and the communication records are sent to the supervision node so that the supervision node supervises the training tasks, and information synchronization and common supervision of user nodes can be achieved.
On the basis of any of the above embodiments, before acquiring the communication record of the user node during the training task in step S101, the method further includes establishing a block in the block chain, and storing the block attribute information into the block.
Optionally, the block attribute information includes at least one of the following information: the hash value of the block before the block, the timestamp, the random number, and the hash value of the block after the block.
Therefore, the method can establish the block in the block chain and store the block attribute information into the block so as to store the Mercker tree into the block in the block chain in the following.
On the basis of any of the above embodiments, as shown in fig. 2, before acquiring the communication record of the user node during the training task in step S101, the method further includes:
s201, training task information submitted by a user node is obtained, and the training task information comprises configuration information of a training task.
In the embodiment of the application, the user node can generate and submit the training task information, and correspondingly, the training task information submitted by the user node can be obtained. The training task information comprises configuration information of the training task.
Optionally, the configuration information includes at least one of the following information: the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
It is understood that a corresponding identifier may be set for each user node in advance to distinguish different user nodes, a corresponding role may also be set for each user node in advance, the role includes, but is not limited to, a supplier, a demander, etc., and a corresponding training parameter of the federal learning model may also be set for each user node in advance, the training parameter includes, but is not limited to, a training number, a model precision, a gradient, etc., which are not limited herein.
S202, storing the configuration information into the block.
Therefore, the method can acquire the training task information submitted by the user node, and store the configuration information of the training task in the training task information into the block, namely, the configuration information of the training task can be stored into the block chain, thereby being beneficial to ensuring the data stability and reliability of the configuration information.
On the basis of any of the above embodiments, as shown in fig. 3, after building a block in a block chain, the method further includes:
s301, determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node.
It will be appreciated that each user node may correspond to a local training model, and that different user nodes may correspond to different local and federal training models for their effectiveness, including but not limited to model accuracy, etc.
Optionally, determining the contribution value of the user node according to the effects of the local training model of the user node and the federal learning model, which may include determining the contribution value of the user node according to a difference between the effect of the federal learning model and the effect of the local training model of the user node. It can be understood that the difference between the effect of the federal learning model and the effect of the local training model of the user node can represent the effect improvement value of the federal learning model compared with the local training model, so that the contribution value of the user node can be determined according to the effect improvement value.
And S302, determining the excitation of the user node according to the contribution value.
Optionally, a mapping relationship or a mapping table between the contribution value of the user node and the excitation of the user node may be pre-established, and after the contribution value of the user node is obtained, the mapping relationship or the mapping table is queried, so that the excitation of the corresponding user node can be determined. It should be noted that the mapping relationship or the mapping table can be set according to actual situations.
S303, storing the excitation into the block.
Therefore, the method can comprehensively consider the influence of the effects of the local training model and the federal learning model of the user node on the contribution value of the user node, determine the excitation of the user node according to the contribution value of the user node, and store the excitation into the block, thereby being beneficial to ensuring the stability and reliability of the excited data.
Corresponding to the communication method for the federal learning model training provided in the embodiments of fig. 1 to 3, the present disclosure also provides a communication device for the federal learning model training, and since the communication device for the federal learning model training provided in the embodiments of the present disclosure corresponds to the communication method for the federal learning model training provided in the embodiments of fig. 1 to 3, the embodiments of the communication method for the federal learning model training are also applicable to the communication device for the federal learning model training provided in the embodiments of the present disclosure, and will not be described in detail in the embodiments of the present disclosure.
FIG. 4 is a block diagram of a communication device trained by the Federal learning model according to an embodiment of the present application.
As shown in fig. 4, the communication device 100 trained by the federal learning model according to the embodiment of the present application may include: an acquisition module 110, a generation module 120, and a storage module 130.
An obtaining module 110, configured to obtain a communication record of a user node during a training task;
a generating module 120, configured to generate a mercker tree according to the hash value corresponding to the communication record;
a storage module 130, configured to store the merkel tree into a corresponding block in a block chain.
In one embodiment of the present application, the communication record includes at least one of the following information: sender, receiver, variable unique identifier, message size and communication content.
In an embodiment of the present application, the generating module 120 is further configured to: and storing the communication content by adopting an interplanetary file system to generate a hash value corresponding to the communication content.
In one embodiment of the application, the communication content comprises local training data and/or intermediate training results.
In an embodiment of the application, before acquiring the communication record of the user node during the training task, the storage module 130 is further configured to: establishing the block in the block chain; storing the block attribute information into the block.
In one embodiment of the present application, the block attribute information includes at least one of the following information: the hash value of the block preceding the block, a timestamp, a random number, and the hash value of the block succeeding the block.
In an embodiment of the application, before acquiring the communication record of the user node during the training task, the storage module 130 is further configured to: acquiring training task information submitted by the user node, wherein the training task information comprises configuration information of the training task; storing the configuration information into the block.
In one embodiment of the present application, the configuration information includes at least one of the following information: the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
In an embodiment of the present application, the storage module 130 is further configured to: determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node; determining the excitation of the user node according to the contribution value; storing the stimulus into the block.
In one embodiment of the present application, the communication device 100 trained by the federal learning model further includes: a display module for: and displaying the communication record.
In one embodiment of the present application, the communication device 100 trained by the federal learning model further includes: a sending module configured to: and sending the communication record to a supervision node so that the supervision node supervises the training task.
In one embodiment of the application, the user node communicates with the user node agreed in the communication contract according to a communication contract, and the communication contract is determined according to the matching degree of the local training data of the user node and other user nodes.
The communication device for federal learning model training in the embodiment of the application obtains the communication record of a user node during the training task execution, generates the Mercker tree according to the hash value corresponding to the communication record, and stores the Mercker tree into the corresponding block in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
In order to implement the above-mentioned embodiment, as shown in fig. 5, the present application further proposes an electronic device 200, including: the memory 210, the processor 220, and a computer program stored on the memory 210 and operable on the processor 220, when the processor 220 executes the program, implement the communication method of federal learning model training as proposed in the previous embodiments of the present application.
The electronic device of the embodiment of the application executes the computer program stored in the memory through the processor, obtains the communication record of the user node during the training task execution, generates the merkel tree according to the hash value corresponding to the communication record, and stores the merkel tree into the corresponding block in the block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
To achieve the above embodiments, the present application further proposes a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the communication method of federal learning model training as proposed in the foregoing embodiments of the present application.
The computer-readable storage medium of the embodiment of the application, by storing a computer program and being executed by a processor, obtains a communication record of a user node during a training task, generates a merkel tree according to a hash value corresponding to the communication record, and stores the merkel tree in a corresponding block in a block chain. Therefore, the method can generate the Mercker tree from the hash value corresponding to the communication record of the user node and store the Mercker tree into the blockchain, namely, the communication record in the training process can be stored into the blockchain, so that the communication record can be traced back, the follow-up verification can be conveniently carried out when problems occur, and the transparency and the safety of the training process are improved.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (26)

1. A communication method for the training of a federated learning model is characterized by comprising the following steps:
acquiring a communication record of a user node during the training task execution;
generating a Merck tree according to the hash value corresponding to the communication record;
and storing the Merckel tree into a corresponding block in a block chain.
2. The communication method of claim 1, wherein the communication record comprises at least one of the following information:
sender, receiver, variable unique identifier, message size and communication content.
3. The communication method according to claim 2, further comprising:
and storing the communication content by adopting an interplanetary file system to generate a hash value corresponding to the communication content.
4. The communication method according to claim 3, wherein the communication content comprises local training data and/or intermediate training results.
5. The communication method according to claim 1, wherein the obtaining the communication record of the user node during the training task further comprises:
establishing the block in the block chain;
storing the block attribute information into the block.
6. The communication method according to claim 5, wherein the block attribute information comprises at least one of the following information:
the hash value of the block preceding the block, a timestamp, a random number, and the hash value of the block succeeding the block.
7. The communication method according to claim 1, wherein the obtaining the communication record of the user node during the training task further comprises:
acquiring training task information submitted by the user node, wherein the training task information comprises configuration information of the training task;
storing the configuration information into the block.
8. The communication method according to claim 7, wherein the configuration information comprises at least one of the following information:
the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
9. The communication method according to claim 1, further comprising:
determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node;
determining the excitation of the user node according to the contribution value;
storing the stimulus into the block.
10. The communication method according to claim 1, further comprising:
and displaying the communication record.
11. The communication method according to claim 1, further comprising:
and sending the communication record to a supervision node so that the supervision node supervises the training task.
12. The communication method according to claim 1, wherein the user node communicates with a user node agreed in the communication contract according to a communication contract determined according to a matching degree of local training data of the user node and other user nodes.
13. The utility model provides a communication device of nation learning model training which characterized in that includes:
the acquisition module is used for acquiring a communication record of the user node during the training task execution;
the generation module is used for generating a Mercker tree according to the hash value corresponding to the communication record;
and the storage module is used for storing the Mercker tree into a corresponding block in a block chain.
14. The communications apparatus of claim 13, wherein the communication record comprises at least one of:
sender, receiver, variable unique identifier, message size and communication content.
15. The communications apparatus of claim 14, wherein the generating module is further configured to:
and storing the communication content by adopting an interplanetary file system to generate a hash value corresponding to the communication content.
16. The communications apparatus as claimed in claim 15, wherein the communication content comprises local training data and/or intermediate training results.
17. The communications apparatus of claim 13, wherein the storage module, prior to obtaining the communication record of the user node during the training task, is further configured to:
establishing the block in the block chain;
storing the block attribute information into the block.
18. The communications apparatus of claim 17, wherein the block attribute information comprises at least one of:
the hash value of the block preceding the block, a timestamp, a random number, and the hash value of the block succeeding the block.
19. The communications apparatus of claim 13, wherein the storage module, prior to obtaining the communication record of the user node during the training task, is further configured to:
acquiring training task information submitted by the user node, wherein the training task information comprises configuration information of the training task;
storing the configuration information into the block.
20. The communications apparatus of claim 19, wherein the configuration information comprises at least one of:
the identity of the user node, the role of the user node, and the training parameters of the federated learning model.
21. The communications apparatus of claim 13, wherein the storage module is further configured to:
determining the contribution value of the user node according to the effects of the local training model and the federal learning model of the user node;
determining the excitation of the user node according to the contribution value;
storing the stimulus into the block.
22. The communications device of claim 13, further comprising: a display module for:
and displaying the communication record.
23. The communications device of claim 13, further comprising: a sending module configured to:
and sending the communication record to a supervision node so that the supervision node supervises the training task.
24. A communications arrangement according to claim 13, wherein the user nodes communicate with user nodes agreed upon in the communications contract according to a communications contract determined from the degree of matching of local training data of the user nodes and other user nodes.
25. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the program, implementing the federal learning model trained communications method as in any of claims 1-12.
26. A computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, implements a method of communication for federal learning model training as claimed in any of claims 1-12.
CN202110270873.4A 2021-03-12 2021-03-12 Communication method and device for federal learning model training and electronic equipment Pending CN113822436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110270873.4A CN113822436A (en) 2021-03-12 2021-03-12 Communication method and device for federal learning model training and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110270873.4A CN113822436A (en) 2021-03-12 2021-03-12 Communication method and device for federal learning model training and electronic equipment

Publications (1)

Publication Number Publication Date
CN113822436A true CN113822436A (en) 2021-12-21

Family

ID=78912405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110270873.4A Pending CN113822436A (en) 2021-03-12 2021-03-12 Communication method and device for federal learning model training and electronic equipment

Country Status (1)

Country Link
CN (1) CN113822436A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785810A (en) * 2022-03-31 2022-07-22 海南师范大学 Tree broadcast data synchronization algorithm suitable for federal learning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539731A (en) * 2020-06-19 2020-08-14 支付宝(杭州)信息技术有限公司 Block chain-based federal learning method and device and electronic equipment
CN111552986A (en) * 2020-07-10 2020-08-18 鹏城实验室 Block chain-based federal modeling method, device, equipment and storage medium
CN112100659A (en) * 2020-09-14 2020-12-18 电子科技大学 Block chain federal learning system and Byzantine attack detection method
CN112132292A (en) * 2020-09-16 2020-12-25 建信金融科技有限责任公司 Block chain-based longitudinal federated learning data processing method, device and system
WO2021017419A1 (en) * 2019-07-29 2021-02-04 创新先进技术有限公司 Operation record storage method, device, and apparatus based on trusted execution environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021017419A1 (en) * 2019-07-29 2021-02-04 创新先进技术有限公司 Operation record storage method, device, and apparatus based on trusted execution environment
CN111539731A (en) * 2020-06-19 2020-08-14 支付宝(杭州)信息技术有限公司 Block chain-based federal learning method and device and electronic equipment
CN111552986A (en) * 2020-07-10 2020-08-18 鹏城实验室 Block chain-based federal modeling method, device, equipment and storage medium
CN112100659A (en) * 2020-09-14 2020-12-18 电子科技大学 Block chain federal learning system and Byzantine attack detection method
CN112132292A (en) * 2020-09-16 2020-12-25 建信金融科技有限责任公司 Block chain-based longitudinal federated learning data processing method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785810A (en) * 2022-03-31 2022-07-22 海南师范大学 Tree broadcast data synchronization algorithm suitable for federal learning
CN114785810B (en) * 2022-03-31 2023-05-16 海南师范大学 Tree-like broadcast data synchronization method suitable for federal learning

Similar Documents

Publication Publication Date Title
US11824996B2 (en) Parachain data synchronization method, device and storage medium
CN111416704B (en) Data processing method, device and system based on block chain
JP6882512B2 (en) Preventing inaccurate notification of input data by participants in secure multi-party calculations
CN108848148B (en) Transaction information confirmation method and device based on block chain
US20140129912A1 (en) System and Method for Express Spreadsheet Visualization for Building Information Modeling
CN113900598B (en) Data storage method, device, equipment and storage medium based on block chain
CN113792347A (en) Block chain-based federal learning method, device, equipment and storage medium
CN111161075B (en) Blockchain transaction data proving and supervising method, system and related equipment
CN113822436A (en) Communication method and device for federal learning model training and electronic equipment
CN113204599A (en) Equipment monitoring method and device based on Internet of things, monitoring equipment and storage medium
US10810332B2 (en) Method, apparatus, and computer program product for simulating client and application interface integration
CN110737655A (en) Method and device for reporting data
CN111092935B (en) Data sharing method and virtual training device for machine learning
CN105022663A (en) Power system monitoring and control system
CN114298699B (en) Method for generating and acquiring non-homogeneous general evidence and device
EP3921747A1 (en) Systems and methods for item response modelling of digital assessments
CN112286703B (en) User classification method and device, client device and readable storage medium
CN108882005B (en) Barrage verification method, computer equipment and storage medium
CN111552715B (en) User query method and device
CN113761585B (en) Data processing method, device and system
CN111564165B (en) Data storage method, device, equipment and storage medium
CN116226116A (en) Joint learning task viewing method and device, electronic equipment and storage medium
CN115758127A (en) Model training system and method based on federal learning
CN106301904A (en) A kind of cluster server management method and device
US10360505B2 (en) Applying a plurality of rules to a multiplicity of streaming messages to perform intelligent data analytics

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