CN114037086A - Block chain-based machine learning task distribution method, equipment and system - Google Patents

Block chain-based machine learning task distribution method, equipment and system Download PDF

Info

Publication number
CN114037086A
CN114037086A CN202111216664.8A CN202111216664A CN114037086A CN 114037086 A CN114037086 A CN 114037086A CN 202111216664 A CN202111216664 A CN 202111216664A CN 114037086 A CN114037086 A CN 114037086A
Authority
CN
China
Prior art keywords
user node
task
user
node
blockchain
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.)
Granted
Application number
CN202111216664.8A
Other languages
Chinese (zh)
Other versions
CN114037086B (en
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 United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111216664.8A priority Critical patent/CN114037086B/en
Publication of CN114037086A publication Critical patent/CN114037086A/en
Application granted granted Critical
Publication of CN114037086B publication Critical patent/CN114037086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a method, equipment and a system for distributing machine learning tasks based on a block chain, relates to the technical field of the block chain, and can better realize self-consistent operation of the machine learning task distribution system based on the block chain by using the block chain technology. The machine learning task distribution method based on the block chain is applied to a machine learning task distribution system based on the block chain, the machine learning task distribution system based on the block chain comprises a block chain server node and a plurality of user nodes, wherein a first user node selects a second user node according to the credit score of the second user node, the first user node sends training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model; the third user node tests the task model, and the block chain server node pays the first preset number of tokens to the second user node; the first user node generates a tile and broadcasts.

Description

Block chain-based machine learning task distribution method, equipment and system
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method, a device, and a system for distributing machine learning tasks based on blockchains.
Background
Machine learning refers to training a large amount of task data into a suitable task model for subsequent use. The machine learning task distribution system based on the block chain can distribute task data in machine learning to different users in the machine learning task distribution system, so that the different users can synchronously process the task data, and a task model is trained together.
However, if the leaked task data is analyzed and collated, information of a user who publishes the task data is also leaked. Along with the leakage of user information, the identity of the user is in a public and transparent environment in the machine learning task distribution system, so that the activities of the user for task data distribution or task model training in the machine learning task distribution system are influenced by different degrees, meanwhile, an unfair phenomenon occurs in the machine learning task distribution system, and the machine learning task distribution system cannot run in a self-consistent manner.
Therefore, the development of a machine learning task distribution system capable of self-consistent operation is an urgent problem to be solved at present.
Disclosure of Invention
The application provides a block chain-based machine learning task distribution method, equipment and system, which are applied to a block chain-based machine learning task distribution system and can better realize self-consistent operation of the block chain-based machine learning task distribution system by using a block chain technology.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, a machine learning task distribution method based on a block chain is provided, and is applied to a machine learning task distribution system based on the block chain, the machine learning task distribution system based on the block chain comprises a block chain server node and a plurality of user nodes, wherein a first user node selects a second user node according to a credit score of the second user node to generate a selection result; the first user node broadcasts a selection result; the first user node sends training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model; the first user node sends test task data to a third user node, wherein the test task data comprises a test sample set, and the third user node tests a task model obtained from the second user node according to the test task data to generate a test result; the first user node receives a test result broadcasted by the third user node; when the first user node determines to pay the token for the second user node according to the test result, generating payment information; the first user node broadcasts payment information; the block chain server node deducts a first preset number of tokens of the first user node according to the payment information; the blockchain server node pays the first predetermined number of tokens to the second user node; a first user node receives a task model sent by a second user node; the first user node generates a block according to the credit score thereof, wherein the block at least comprises one or more of the following items: selecting a result, a test result, payment information, a credit score of the first user node, and a credit score of the second user node; the first user node broadcasts a block. In the above machine learning task distribution method based on the block chain, the first user node selects the second user node according to the credit score of the second user node, so that the accuracy of the second user node selected by the first user node is ensured to a certain extent. The first user node sends training task data to the second user node, and the second user node conducts task model training according to the training task data to generate a task model, so that the task model trained by the second user node meets the requirements of the first user node, and the possibility of leakage of the training task data is reduced. The first user node sends the test task data to the third user node, the third user node tests the task model obtained from the second user node according to the test task data, a test result is generated and broadcasted, and the third user node tests the task model generated by the second user node, so that the fairness and fairness of the test are guaranteed. And when the first user node determines to pay the tokens to the second user node according to the test result, payment information is generated, and the number of the tokens of the first preset number to be paid is deducted in advance by the blockchain server node and paid, so that the payment safety is ensured. Meanwhile, the data broadcasted in the whole machine learning task distribution method can be partially or completely linked, so that a complete machine learning task distribution process can be traced, later verification is facilitated, and individual bad user nodes are prevented from tampering the data. The machine learning task distribution method based on the block chain enables the whole task distribution process to be transparent and safe, and enables the machine learning task distribution system based on the block chain to run automatically and consistently.
Optionally, before the first user node selects the second user node according to the credit score of the second user node, the method further includes: a first user node broadcasting example task data, the example task data including an example sample set; the first user node receives a task receiving result broadcasted by the second user node, wherein the second user node generates the task receiving result when determining to receive the training task according to the example task data; the first user node selects the second user node according to the credit score of the second user node, and the method comprises the following steps: and the first user node selects the second user node according to the task receiving result and the credit score of the second user node. In this alternative, the second user node may select whether to receive the training task by itself, which may increase the probability that the task model trained by the second user node meets the requirements to some extent, and also enable the second user node to use the right for active selection.
Optionally, the sending, by the first user node, the training task data to the second user node includes: the first user node broadcasts abstract information of training task data; and the second user node checks the training task data sent by the first user node according to the abstract information of the training task data. In this alternative, the first user node broadcasts the summary information of the training task data before sending the training task data to the second user node, and then the second user node can compare the training task data with the summary information of the training task data when receiving the training task data, so as to ensure that the training task data is accurate and correct, and increase the reliability of the machine learning task distribution system based on the block chain.
Optionally, the machine learning task distribution system based on the blockchain further includes a transaction mixing server; the payment information includes a payment address of the first user node, a collection address of the second user node, a first predetermined number of tokens paid; wherein, the first user node broadcasts payment information, including: the first user node sends the payment information to the transaction mixing server so that the transaction mixing server broadcasts the payment addresses of the payment information and the payment addresses of other payment information after arranging the payment addresses of the payment information and the payment addresses of other payment information according to the first order. In the alternative, the transaction mixing server can eliminate the relation between the collection address and the payment address in the payment information, so that the payment address of the first user node and the collection address of the second user node are not easy to identify, and the identity information of the first user node and the second user node is protected.
Optionally, the machine learning task distribution system based on the blockchain further includes an identity authentication server; the first user node sends registration information to an identity authentication server, wherein the registration information comprises a private key address of the first user node; the first user node receives a registration success message sent by the identity authentication server, wherein the registration success message carries a public key address set distributed by the identity authentication server for the first user node, and the public key address set comprises at least one public key address. In this alternative, when the first user node issues task data or performs task model training, one public key address may be selected as a payment address after issuing task data or a collection address after performing task model training. The identity authentication server enables the private key address of the user node to be separated from the public key address used in the machine learning task distribution system based on the block chain, and identity information and privacy of the user node are better protected.
Optionally, the first user node sends an identity disclosure request to the identity authentication server, where the identity disclosure request includes public key addresses of other user nodes; and the first user node receives response information fed back by the identity authentication server, wherein the response information comprises private key addresses of other user nodes. In this alternative, the identity authentication server may also monitor an identity revealing request in the blockchain-based machine learning task distribution system, and may publish identity information of a user node in which a malicious behavior occurs through the identity revealing request, where such an identity revealing request may restrict a behavior of each user node in the blockchain-based machine learning task distribution system, and ensure self-consistent operation of the blockchain-based machine learning task distribution system to a certain extent.
In a second aspect, a blockchain-based machine learning task distribution method is provided, which is applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and a second user node receives a selection result broadcasted by a first user node, where the selection result is used to indicate the second user node selected by the first user node according to a credit score of the second user node; the second user node receives training task data sent by the first user node; the second user node performs task model training according to the training task data to generate a task model; the second user node broadcasts completion information, and the completion information is used for indicating the second user node to complete the training of the task model; the second user node receives payment information broadcasted by the first user node, wherein the payment information is generated by the first user node according to a test result broadcasted by a third user node, the test result is generated by the third user node through testing a task model obtained from the second user node according to test task data sent by the first user node, and the test task data comprises a test sample set; the second user node receives a first preset number of tokens paid by the block chain server node, wherein the first preset number of tokens are obtained by deducting the first user node by the block chain server node according to the payment information; the second user node sends the task model to the first user node; the second user node receives the block broadcasted by the first user node, wherein the block at least comprises one or more of the following items: selecting a result, a test result, payment information, and a credit score of the second user node; the second user node votes for the block to generate a voting result; the second user node broadcasts the voting result.
Optionally, before the second user node receives the selection result broadcasted by the first user node, the method further includes: the second user node receives example task data sent by the first user node, wherein the example task data comprises an example sample set; the second user node broadcasts a task receiving result, wherein the second user node generates the task receiving result when determining to receive the training task according to the example task data; the selection result is used to indicate the second user node selected by the first user node according to the task reception result and the credit score of the second user node.
Optionally, the receiving, by the second user node, the training task data sent by the first user node includes: and the second user node receives the summary information of the training task data broadcasted by the first user node, and the second user node checks the training task data sent by the first user node according to the summary information of the training task data.
Optionally, the second user node sends the task model to the first user node, where the sending includes: the second user node broadcasts abstract information of the task model; and the first user node checks the task model according to the abstract information of the task model.
In a third aspect, a machine learning task distribution method based on a block chain is provided, and is applied to a machine learning task distribution system based on the block chain, the machine learning task distribution system based on the block chain comprises a block chain server node and a plurality of user nodes, a third user node receives test task data sent by a first user node, and the third user node tests a task model obtained from a second user node according to the test task data to generate a test result, wherein the test task data comprises a test sample set, and the task model is generated by the second user node through task model training according to training task data sent by the first user node; the third user node broadcasts the test result; the third user node receives the block broadcasted by the first user node, wherein the block comprises: testing results; the third user node votes the block to generate a voting result; the third user node broadcasts the voting result.
In a fourth aspect, a blockchain-based machine learning task distribution method is provided, which is applied to a blockchain-based machine learning task distribution system, the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, the blockchain server node receives payment information broadcast by a first user node, wherein the payment information is generated when the first user node pays tokens to a second user node; the block chain server node deducts a first preset number of tokens of the first user node according to the payment information; the blockchain server node pays the first predetermined number of tokens to the second user node; the block chain server node acquires the voting result of the fourth user node on the block broadcast by the first user node, wherein the block at least comprises one or more of the following items: the payment information, the credit score of the first user node, and the credit score of the fourth user node; when the block chain server node determines to chain the block according to the voting result, deducting the credit score of the first user node by a second preset number to update the credit score of the first user node, and adding the credit score of the fourth user node by a third preset number to update the credit score of the fourth user node, wherein the second preset number and the third preset number meet a first preset relationship; adding the updated credit score of the first user node and the updated credit score of the fourth user node to the block by the block chain server node, and chaining the block; the blockchain server node adds a fourth predetermined number of tokens to the first user node, the fourth predetermined number satisfying a second predetermined relationship with the second predetermined number and the third predetermined number.
Optionally, the first predetermined relationship is:
Figure BDA0003310922640000051
wherein, the creditmintBy deducting a second predetermined number of credits, nodes, of the first user nodeprenIs the total number of user nodes, height corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainnowIs the height, of the block generated by the first user nodepre1Is the height, credit, of the last generated block of the first user nodeconIs to add a third predetermined number of credits, credit, to the fourth user nodeaddIs the credit score additionally paid by the first user node.
Optionally, the second predetermined relationship is:
Figure BDA0003310922640000061
wherein, tokenmintThe first user node adds a fourth predetermined number of tokens, token being a constant, creditallIs the sum of the credit scores, token, of all user nodes within a blockchain based machine learning task distribution systemallIs the sum of tokens, nodes, for all user nodes within a blockchain based machine learning task distribution systemprenIs the total number of user nodes, nodes corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainallIs the total number of user nodes within the blockchain based machine learning task distribution system.
Optionally, the fourth user node at least includes one or more of the following items: a second user node, a third user node, and other user nodes.
In a fifth aspect, a first user node is provided, which is applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the first user node includes: processing unit, receiving unit and transmitting unit. The processing unit is used for selecting the second user node according to the credit score of the second user node and generating a selection result; a transmitting unit for broadcasting the selection result generated by the processing unit; the sending unit is also used for sending the training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model; the sending unit is further used for sending test task data to a third user node, wherein the test task data comprises a test sample set, and the third user node tests the task model obtained from the second user node according to the test task data to generate a test result; the receiving unit is used for receiving the test result broadcasted by the third user node; the processing unit is also used for generating payment information when determining to pay the token for the second user node according to the test result received by the receiving unit; the sending unit is further used for broadcasting the payment information generated by the processing unit so that the blockchain server node deducts a first preset number of tokens of the first user node according to the payment information and pays the first preset number of tokens to the second user node; the receiving unit is also used for receiving the task model sent by the second user node; the processing unit is further used for generating a block according to the credit score of the block, and the block at least comprises one or more of the following items: selecting a result, a test result, payment information, a credit score of the first user node, and a credit score of the second user node; and the sending unit is also used for broadcasting the blocks generated by the processing unit.
Optionally, the sending unit is further configured to broadcast example task data, where the example task data includes an example sample set; the receiving unit is further used for receiving a task receiving result broadcasted by the second user node, wherein the second user node generates the task receiving result when determining to receive the training task according to the example task data broadcasted by the sending unit; and the processing unit is specifically used for selecting the second user node according to the task receiving result received by the receiving unit and the credit score of the second user node.
Optionally, the sending unit is further configured to broadcast summary information of the training task data; so that the second user node can check the training task data sent by the sending unit according to the abstract information of the training task data.
Optionally, the machine learning task distribution system based on the blockchain further includes a transaction mixing server; the payment information includes a payment address of the first user node, a collection address of the second user node, a first predetermined number of tokens paid; and the sending unit is specifically used for sending the payment information generated by the processing unit to the transaction mixing server so that the transaction mixing server can broadcast the payment addresses of the payment information and the payment addresses of other payment information after the payment addresses of the payment information and the payment addresses of other payment information are arranged according to a first order.
Optionally, the machine learning task distribution system based on the blockchain further includes an identity authentication server; the sending unit is further configured to send registration information to the identity authentication server, where the registration information includes a private key address of the first user node; the receiving unit is further configured to receive a registration success message sent by the identity authentication server, where the registration success message carries a public key address set allocated by the identity authentication server to the first user node, and the public key address set includes at least one public key address.
Optionally, the sending unit is further configured to send an identity disclosure request to the identity authentication server, where the identity disclosure request includes public key addresses of other user nodes; and the receiving unit is also used for receiving response information fed back by the identity authentication server, wherein the response information comprises private key addresses of other user nodes.
In a sixth aspect, a second user node is provided, where the second user node is applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the second user node includes: processing unit, receiving unit and transmitting unit. The receiving unit is used for receiving a selection result broadcasted by the first user node, wherein the selection result is used for indicating a second user node selected by the first user node according to the credit score of the second user node; the receiving unit is further used for receiving training task data sent by the first user node; the processing unit is used for carrying out task model training according to the training task data received by the receiving unit to generate a task model; the sending unit is used for broadcasting completion information, and the completion information is used for indicating the second user node to complete the training of the task model; the receiving unit is further configured to receive payment information broadcasted by the first user node, where the payment information is generated by the first user node according to a test result broadcasted by a third user node, the test result is generated by the third user node through testing a task model obtained from the second user node according to test task data sent by the first user node, and the test task data includes a test sample set; the receiving unit is further used for receiving a first preset number of tokens paid by the blockchain server node, wherein the first preset number of tokens are obtained by deducting the first user node by the blockchain server node according to the payment information; the sending unit is also used for sending the task model generated by the processing unit to the first user node; a receiving unit, further configured to receive a block broadcasted by the first user node, where the block at least includes one or more of the following items: selecting a result, a test result, payment information, and a credit score of the second user node; the processing unit is also used for voting the blocks and generating voting results; and the sending unit is also used for broadcasting the voting result generated by the processing unit.
Optionally, the receiving unit is further configured to receive example task data sent by the first user node, where the example task data includes an example sample set; the processing unit is used for generating a task receiving result when determining to receive the training task according to the example task data received by the receiving unit; the selection result is used for indicating the second user node selected by the first user node according to the task receiving result and the credit score of the second user node.
Optionally, the receiving unit is further configured to receive summary information of the training task data broadcast by the first user node, and the second user node checks the training task data received by the receiving unit according to the summary information of the training task data.
Optionally, the sending unit is further configured to broadcast summary information of the task model; and the first user node checks the task model sent by the sending unit according to the abstract information of the task model.
In a seventh aspect, a third user node is provided, which is applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the third user node includes: processing unit, receiving unit and transmitting unit. The receiving unit is used for receiving test task data sent by a first user node; the processing unit is used for testing the task model obtained from the second user node according to the test task data received by the receiving unit to generate a test result, wherein the test task data comprises a test sample set, and the task model is generated by the second user node through task model training according to the training task data sent by the first user node; the sending unit is used for broadcasting the test result generated by the processing unit; a receiving unit, further configured to receive a block broadcasted by the first user node, where the block includes: testing results; the processing unit is also used for voting the blocks received by the receiving unit and generating voting results; and the sending unit is also used for broadcasting the voting result generated by the processing unit.
In an eighth aspect, a blockchain server node is provided, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the blockchain server node includes: the processing unit and the receiving unit are used for receiving payment information broadcast by the first user node, wherein the payment information is generated when the first user node pays the token to the second user node; the processing unit is used for deducting a first preset number of tokens of the first user node according to the payment information received by the receiving unit; a processing unit further for paying out a first predetermined number of tokens to a second user node; the receiving unit is further configured to obtain a result of voting by the fourth user node on a block broadcast by the first user node, where the block at least includes one or more of the following items: the payment information, the credit score of the first user node, and the credit score of the fourth user node; the processing unit is further configured to deduct the credit score of the first user node by a second predetermined number when determining to uplink the block according to the voting result obtained by the receiving unit, so as to update the credit score of the first user node, and add the credit score of a third predetermined number to a fourth user node so as to update the credit score of the fourth user node, where the second predetermined number and the third predetermined number satisfy a first predetermined relationship; the processing unit is further used for adding the updated credit score of the first user node and the updated credit score of the fourth user node to the block and then chaining the block; the processing unit is further used for adding a fourth preset number of tokens to the first user node, and the fourth preset number, the second preset number and the third preset number meet a second preset relation.
Optionally, the first predetermined relationship is:
Figure BDA0003310922640000091
wherein, the creditmintBy deducting a second predetermined number of credits, nodes, of the first user nodeprenIs the total number of user nodes, height, corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainnowIs the height, of the block generated by the first user nodepre1Is the height, credit, of the last generated block of the first user nodeconIs to add a third predetermined number of credits, credit, to the fourth user nodeaddIs the credit score additionally paid by the first user node.
Optionally, the second predetermined relationship is:
Figure BDA0003310922640000092
wherein, tokenmintThe first user node adds a fourth predetermined number of tokens, token being a constant, creditallIs a groupSummation of credit scores, token, for all user nodes within a blockchain machine learning task distribution systemallIs the sum of tokens, nodes, for all user nodes within a blockchain based machine learning task distribution systemprenIs the total number of user nodes, nodes corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainallIs the total number of user nodes within the blockchain based machine learning task distribution system.
In a ninth aspect, there is provided a user node comprising one or more processors, transceiver circuitry, and memory; the memory, the transceiver circuitry, and the one or more processors; the memory is configured to store computer program code comprising instructions which, when executed by the one or more processors, cause the blockchain based machine learning task distribution system to perform the blockchain based machine learning task distribution method as described in any one of the first to third aspects above.
In a tenth aspect, there is provided a blockchain server node comprising one or more processors, transceiver circuitry, and a memory; the memory, the transceiver circuitry, and the one or more processors; the memory is configured to store computer program code comprising instructions which, when executed by the one or more processors, cause the blockchain based machine learning task distribution system to perform the method of blockchain based machine learning task distribution as defined in any one of the fourth aspects above.
In an eleventh aspect, there is provided a computer-readable storage medium comprising computer instructions which, when run on a computer, cause the computer to perform the blockchain-based machine learning task distribution method according to any one of the first to fourth aspects.
In a twelfth aspect, there is provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium, which when run on a computer, cause the computer to perform the method for blockchain based machine learning task distribution as described in any of the first to fourth aspects above.
For a detailed description of the second to twelfth aspects and various implementations thereof, reference may be made to the detailed description of the first aspect and various implementations thereof; also, the beneficial effects of the second to twelfth aspects and various implementations thereof can be analyzed with reference to the beneficial effects of the first aspect and various implementations thereof.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
Fig. 1 is a schematic flowchart of a block chain-based machine learning task distribution method according to an embodiment of the present application;
FIG. 2 is a schematic workflow diagram of a transaction blending server provided by an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating identity disclosure performed by an identity authentication server according to an embodiment of the present application;
FIG. 4 is a flow diagram illustrating a consensus process provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of a user node according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a blockchain server node according to an embodiment of the present disclosure;
fig. 7 is a schematic hardware structure diagram of a user node according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. Where in the description of the present application, "/" indicates a relationship where the objects associated before and after are an "or", unless otherwise stated, for example, a/B may indicate a or B; in the present application, "and/or" is only an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. Also, in the description of the present application, "a plurality" means two or more than two unless otherwise specified. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
In addition, the network architecture and the service scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that along with the evolution of the network architecture and the appearance of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
In addition, the appearances of "less than" or "greater than" in the embodiments of the present application may include the same thing but it is to be understood that if two ranges exist and have a common extreme, only one of the two ranges may include equal. For example, if a is greater than 1, then a equals b; if a is less than 1, a is equal to c; in this case, a is not less than 1 or a is not more than 1 can be selected. The selection can be specifically performed according to the actual situation, and in the embodiment of the present application, a certain range can be selected according to the actual situation, and the range can include the value equal to the value.
Technical terms provided in the examples of the present application are described as follows:
blocks (blocks), which record the data structure of the ledger data updated by the exchange over a period of time, are marked with a timestamp and a unique mark (e.g. a digital fingerprint) of the previous block, and after the block is verified by the consensus of the nodes in the block chain network, the block is appended to the end of the block chain to become an uplink block.
Blockchain (blockchain), a chain data structure of blocks assembled in a sequential manner, references in each block the hash value of the previous block or a subset thereof, thus cryptographically guaranteeing the recorded data to be non-falsifiable and non-falsifiable.
A blockchain network incorporates new blocks into a set of centerless nodes of the blockchain in a consensus manner.
Ledger (ledger), the sum of data recorded in a blockchain network with accounts as dimensions.
A consensus (consensus) process is used when transaction results need to be agreed and uplink is confirmed among a plurality of nodes involved, and there are many consensus mechanisms for implementing the consensus process, such as proof of work (PoW), proof of rights and interests (PoS), proof of authorized shares (DPoS), and so on.
Machine learning refers to training a large amount of task data into a suitable task model for subsequent use. The machine learning task distribution system based on the block chain can distribute task data in machine learning to different users in the machine learning task distribution system, so that the different users can synchronously process the task data, and a task model is trained together.
However, if the leaked task data is analyzed and collated, information of a user who publishes the task data is also leaked. Along with the leakage of user information, the identity of the user is in a public and transparent environment in the machine learning task distribution system, so that the activities of the user for task data distribution or task model training in the machine learning task distribution system are influenced by different degrees, meanwhile, an unfair phenomenon occurs in the machine learning task distribution system, and the machine learning task distribution system cannot run in a self-consistent manner.
In order to solve the above technical problem, an embodiment of the present application provides a block chain-based machine learning task distribution system, where a block chain-based machine learning task distribution method is executed in the block chain-based machine learning task distribution system, and the block chain-based machine learning task distribution system may store data uplink generated in a machine learning task distribution process, so as to implement self-consistent operation of the block chain-based machine learning task distribution system.
Referring to fig. 1, an embodiment of the present application provides a flowchart of a blockchain-based machine learning task distribution method, which is applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes. It can be understood that, before a user node needs to participate in the flow of the blockchain-based machine learning task distribution method, registration needs to be performed first, and first, a registration process of the user node in the blockchain-based machine learning task distribution system is described as follows:
when a first user node wants to join the machine learning task distribution system based on the blockchain, the first user node sends registration information to an identity authentication server, wherein the registration information comprises a private key address of the first user node (namely the private key address corresponding to the identity information of the first user node), and the private key address is used by the first user node when various activities are carried out in the identity authentication server. When the identity authentication server judges that the identity information of the first user node meets the registration condition and is not registered, a registration success message is sent to the first user node, the identity authentication server allocates a public key address set used in the block chain-based machine learning task distribution system for the first user node, the public key address set comprises at least one public key address, and when the first user node issues task data or performs task model training, one public key address can be selected as a payment address after issuing the task data or a collection address after performing the task model training. The identity authentication server separates the private key address of the first user node from the public key address used in the machine learning task distribution system based on the block chain, and can better protect the identity information and the privacy of the first user node.
It should be noted that, many user nodes may be added to the blockchain-based machine learning task distribution system in a period of time, the identity authentication server will perform the above process to allocate different public key address sets to eligible user nodes, and any public key address in the public key address sets obtained by each user node is unique.
After the user nodes join the machine learning task distribution system based on the blockchain, the blockchain server node allocates an initial credit score (wherein the initial credit score value may be 0 or not 0) to each user node, and when each user node participates in the consensus process of the machine learning task distribution system based on the blockchain, the blockchain server node synchronously tracks and updates the credit score of the current user node. Meanwhile, the numerical value of the credit score of each user node can limit the authority of the user node to participate in the machine learning task distribution process, and meanwhile, the authority of the user node to participate in the consensus process is also limited. For example, referring to table 1, a user node with a credit score smaller than (or equal to or smaller than) the value a only has the right to vote for the block in the consensus process; the user nodes with the credit score values between the A value and the B value not only have the authority of voting on the block in the consensus process, but also have the authority of participating in a test task model in the machine learning task distribution process; the user nodes with the credit score values larger than (or equal to or larger than) the B value have the authority of voting the blocks in the consensus process, the authority of generating the blocks in the consensus process, and the authority of issuing task data, generating task models and testing task models in the machine learning task distribution process.
Figure BDA0003310922640000131
TABLE 1
It should be noted that the authority may be changed according to the specific operation condition of the current machine learning-based task distribution system.
Next, a process of implementing the blockchain-based machine learning task distribution method in the blockchain-based machine learning task distribution system will be described as follows:
the machine learning task distribution method based on the block chain provided by the embodiment of the application is described below by taking the case that the credit score of the first user node is greater than the value B, the first user node issues task data, the credit score of the second user node is greater than the value B, the second user node generates a task model, and the credit score of the third user node is greater than the value a and the third user node tests the task model.
Referring to fig. 1, the method for distributing machine learning tasks based on block chains includes the following steps:
s101, the first user node generates a selection result.
Specifically, because the first user node needs to issue task data, and the first user node needs to select a suitable and credible second user node in the block chain-based machine learning task distribution system to perform task model training to generate a task model, the first user node can select according to the credit score of the second user node when selecting the second user node, and after selecting the suitable second user node, the first user node generates a selection result.
Illustratively, before step S101, the method further includes:
p1011. the first user node broadcasting example task data, the example task data comprising; a sample set is illustrated.
Specifically, when the first user node needs to issue the task data, the first user node may firstly arrange part of the example task data, where the example task data is only a part of the task data, and the example task data may reflect the difficulty of the task data to a certain extent. If necessary, the first user node may additionally specify, in the example task data, performance requirements of the task model trained based on the task data and the amount of tokens paid for the trained task model. The example task data is then broadcast by the first user node.
And P1012, the second user node generates a task receiving result when determining to receive the training task according to the example task data.
Specifically, the second user node receives the example task data broadcast by the first user node, selects whether to receive the training task according to the example task data, the performance requirement of the task model trained according to the task data and the number of tokens paid for the trained task model, and generates a task receiving result when the second user node determines to receive the training task.
Subsequently, the second user node broadcasts the task reception result.
And P1013, the first user node selects the second user node according to the task receiving result and the credit score of the second user node.
Specifically, when the first user node selects the second user node, the credit score of the second user node and the task receiving result of the second user node need to be considered at the same time, and then one or more second user nodes are selected to perform task model training to generate a task model. Or, the first user node may not select the current second user node, and wait for the new second user node to send the task receiving result.
After the first user node selects a suitable and trusted second user node, a selection result is generated.
S102, the first user node broadcasts a selection result.
Specifically, the first user node broadcasts the selection result to the blockchain network, and all nodes in the blockchain network can receive the selection result.
And S103, the first user node sends training task data to the selected second user node.
Specifically, after the above steps are completed, the first user node needs to send training task data to the selected second user node.
For example, in order to accurately receive the training task data by the second user node, the first user node needs to broadcast the summary information (which may be a hash value) of the training task data before sending the training task data (for example, the first user node may broadcast the summary information of the training task data when performing step P1011), and then the first user node and the selected second user node agree on an encryption password, and the first user node sends the training task data to the second user node in an encrypted manner, so as to reduce the possibility of leakage of the training task data and increase the security of the machine learning task distribution system based on the block chain. Meanwhile, because the first user node broadcasts the abstract information of the training task data, the second user node can compare the training task data with the abstract information of the training task data when receiving the training task data, so as to ensure the accuracy of the training task data and increase the reliability of the machine learning task distribution system based on the block chain.
For example, when the first user node sends the training task data to the second user node, the training task data may include a set of training samples and a functional description of the task model to be trained, so that the second user node can quickly clear the requirements of knowing the trained task model.
And S104, generating a task model by the second user node.
Illustratively, the second user node performs task model training according to the training task data to generate a task model.
Or when the training task data comprises the training sample set and the functional description of the task model to be trained, the second user node performs task model training on the training sample set according to the functional description of the task model to be trained to generate the task model.
And S105, broadcasting the completion information by the second user node.
Specifically, after the second user node completes the task model training, the task model completion information is broadcast.
And S106, the first user node sends the test task data to the third user node.
Specifically, after the first user node receives the task model completion information broadcast by the second user node, the first user node may select one or more third user nodes to perform the task model test according to the credit score of the third user node, and simultaneously, the first user node broadcasts the selected third user nodes. And then the first user node appoints an encryption password with the selected one or more third user nodes, and the first user node encrypts and sends the test task data to the one or more third user nodes, so that the possibility of leakage of the test task data is reduced, and the safety of the machine learning task distribution system based on the block chain is improved.
Or a pseudo-random sequence is arranged in the machine learning task distribution system based on the block chain, after the first user node receives task model completion information broadcasted by the second user node, the first user node calls the pseudo-random sequence to enable the pseudo-random sequence to select one or more third user nodes, and meanwhile, the first user node broadcasts the selected third user nodes. And then the first user node appoints an encryption password with the selected one or more third user nodes, and the first user node encrypts and sends the test task data to the one or more third user nodes.
And S107, generating a test result by the third user node.
Specifically, after the second user node receives the selected third user node broadcasted by the first user node in step S106, the second user node encapsulates the task model and broadcasts the summary information (which may be a hash value) of the encapsulated task model, then the second user node and the selected third user node agree on an encryption password, and the second user node encrypts the encapsulated task model and sends the encrypted task model to one or more third user nodes. And comparing the encapsulated task model by the third user node according to the abstract information of the encapsulated task model, and determining that the received encapsulated task even image is accurate.
And the third user node tests the task model obtained from the second user node according to the test task data sent by the first user node to generate a test result.
And S108, broadcasting the test result by the third user node.
Specifically, after the third user node generates the test result, the test result is broadcasted.
S109, the first user node generates payment information.
Specifically, after the first user node receives the test result broadcasted by the third user node, the first user node determines whether the task model trained by the second user node meets the requirement according to the test result, where the requirement may be set and described by the first user node in step P1011, or set by the machine learning task distribution system based on the block chain.
And when the first user node judges that the task model trained by the second user node meets the performance requirement, the first user node needs to pay the token to the second user node, and then the first user node generates payment information.
S110, the first user node broadcasts payment information.
Specifically, after the first user node generates the payment information, the payment information is broadcast.
And S111, executing transaction by the blockchain server node.
Wherein the blockchain server node deducts a first predetermined number of tokens from the first user node after the blockchain server node receives the payment information broadcast by the first user node. The first predetermined amount of tokens is the amount of tokens paid by the first user node for the trained task model, and this amount of tokens may be set and described by the first user node in step P1011, or may be set by the machine learning task distribution system based on the block chain.
The blockchain server node then pays the second user node a first predetermined number of tokens based on the first predetermined number of tokens.
For example, if the first user node selects n second user nodes for task model training in step S101 and the second user node appointed to train a suitable task model can obtain a first predetermined number of tokens a1, in step S111, if only 2 second user nodes train a suitable task model, the blockchain server node will deduct the number of tokens of the first user node (a1 x 2) and pay the respective a1 number of tokens to the 2 second user nodes.
And S112, the second user node sends the task model to the first user node.
Specifically, after the second user node receives the tokens of the first preset number paid by the blockchain server node, the second user node appoints an encryption password with the first user node, and encrypts and sends the task model to the first user node.
For example, in order to ensure that the task model received by the first user node is accurate, the second user node needs to broadcast the summary information (which may be a hash value) of the task model before sending the task model (for example, the second user node may broadcast the summary information of the task model when performing step S105), and then the second user node agrees an encryption password with the first user node, and the second user node sends the task model to the first user node in an encrypted manner, so as to reduce the possibility of leakage of the task model and increase the security of the block chain-based machine learning task distribution system. Meanwhile, the second user node broadcasts the summary information of the task model first, so that the first user node can compare the task model with the summary information of the task model when receiving the task model, the task model is accurate, and the reliability of the machine learning task distribution system based on the block chain is improved.
S113, the first user node generates a block.
Specifically, the first user node generates a block according to its credit score, where the block at least includes one or more of the following items: the selection result, the test result, the payment information, the credit score of the first user node, and the credit score of the second user node.
Illustratively, the blocks may further include one or more of the following: example task data, task receiving results, summary information of training task data, task model completion information, summary information of task models, and selected third user nodes. It is understood that any data that needs to be verified during operation of the blockchain-based machine learning task distribution system may be broadcast and placed in the tiles.
S114, the first user node broadcasts the block.
Specifically, the first user node broadcasts the block after generating the block according to the credit score.
And S115, generating a voting result a by the second user section.
Specifically, after the second user node receives the block broadcasted by the first user node, the second user node compares the data in the account book recorded by the second user node with the data in the block broadcasted by the first user node. The second user node generates a confirmed voting result a when confirming that the data in the block broadcasted by the first user node has no problem; the second user node generates a negative voting result a when it is confirmed that there is a problem with the data in the block broadcast by the first user node.
It should be noted that the second user node may also choose not to vote and not generate the voting result a.
And S116, broadcasting the voting result a by the second user node.
Specifically, after the second user node generates the voting result a, the voting result a is broadcast.
And S117, generating a voting result b by the third user node.
Specifically, after the third user node receives the block broadcasted by the first user node, the third user node compares the data in the account book recorded by the third user node with the data in the block broadcasted by the first user node. The third user node generates a confirmed voting result b when confirming that the data in the block broadcasted by the first user node has no problem; the third user node generates a negative voting result b when it is confirmed that there is a problem with the data in the block broadcast by the first user node.
It should be noted that the third user node may also choose not to vote and not generate the voting result b.
And S118, broadcasting the voting result b by the third user node.
Specifically, after the third user node generates the voting result b, the voting result b is broadcast.
S119, the block chain server node chains the blocks.
Specifically, the blockchain server node receives the voting result a broadcast by the second user node and the voting result b broadcast by the third user node, and of course, other user nodes may also vote for the block generated by the first user node to generate other voting results. When the blockchain server node determines that the voting result for confirming the block generated by the first user node is greater than a predetermined first threshold (for example, the first threshold may be 50% of the total number of nodes in the machine learning task distribution system based on the blockchain), the blockchain server node uplinks the block confirmation broadcast by the first user node in step S113. Before block chaining, the blockchain server node deducts a second predetermined number of credit scores of the first user node, then updates the credit score of the first user node, and adds a third predetermined number of credit scores to a fourth user node (namely, the user node broadcasting the voting result, the fourth user node can be the second user node, the third user node or other user nodes) to update the credit score of the fourth user node, wherein the second predetermined number and the third predetermined number meet the first predetermined relationship. And adding the updated credit score of the first user node and the updated credit score of the fourth user node to the block by the block chain server node, and chaining the block.
After the block chaining, the block chain server node adds a fourth predetermined number of tokens to the first user node, the fourth predetermined number satisfying a second predetermined relationship with the second predetermined number and the third predetermined number.
Wherein, to balance the credit balance in the blockchain-based machine learning task distribution system, the second predetermined number and the third predetermined number satisfy a first predetermined relationship:
Figure BDA0003310922640000191
wherein, the creditmintBy deducting a second predetermined number of credits, nodes, of the first user nodeprenIs the total number of user nodes, height corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainnowIs the height, of the block generated by the first user nodepre1Is the height, credit, of the last generated block of the first user nodeconIs to add a third predetermined number of credits, credit, to the fourth user nodeaddIs the credit score additionally paid by the first user node.
In particular, nodesprenCan select nodespre6The total number of user nodes corresponding to the 6 th block before the block generated by the first user node in the block chain-based machine learning task distribution system is represented. creditconThe credit score obtained by voting the block generated by the first user node by the represented fourth user node is initially set by the machine learning task distribution system based on the block chain and is a constant, and the credit score can be adaptively changed in the continuous operation process of the machine learning task distribution system based on the block chainconThe specific numerical value of (1). And creditconThe denominator in the multiplied scores determines the height the lower the frequency with which the first user node generating the block generates the block, the lower the heightnow-heightpre1The larger the numerical value is, the lower the credit score consumed by the first user node for generating the block at this time is; height if the frequency of generating the block is higher for the first user node generating the blocknow-heightpre1The smaller the value of (a), the higher the credit score consumed by the first user node for generating the block this time. And creditconFraction of multiplied fraction using nodespre6Is a block chain based machine learning taskThe distribution system may prevent block divergence by distributing the total number of user nodes represented by the sixth block preceding the block generated by the first user node.
For example, when a plurality of user nodes compete to generate a block recording one transaction, the plurality of user nodes can simultaneously select credit willing to pay additionallyaddThen, the blockchain server node is willing to pay additionally for the blockchain generated by the user node with the highest credit score.
Meanwhile, in order to avoid the problem of inflation in the machine learning task distribution system based on the block chain, the fourth predetermined number and the second predetermined number and the third predetermined number satisfy a second predetermined relationship, and the second predetermined relationship is as follows:
Figure BDA0003310922640000201
wherein, tokenmintThe first user node adds a fourth predetermined number of tokens, token being a constant, creditallIs the sum of the credit scores, token, of all user nodes within a blockchain based machine learning task distribution systemallIs the sum of tokens, nodes, for all user nodes within a blockchain based machine learning task distribution systemprenIs the total number of user nodes, nodes corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chainallIs the total number of user nodes within the blockchain based machine learning task distribution system.
In particular, nodesprenCan select nodespre6The total number of user nodes corresponding to the 6 th block before the block generated by the first user node in the block chain-based machine learning task distribution system is represented. token represents the number of tokens which can be obtained by initially setting a generated block in the block chain-based machine learning task distribution system, is a constant, and can adaptively change token in the continuous operation process of the block chain-based machine learning task distribution systemSpecific values of n. The score multiplied by token exists to calculate the value of the current token in a blockchain based machine learning task distribution system.
Such a second predetermined relationship enables the growth rate to be lower as the number of tokens in the blockchain-based machine learning task distribution system is larger, so that the value of tokens and credit scores owned by user nodes in the blockchain-based machine learning task distribution system is constant and does not increase continuously with time, and such a mechanism ensures that newly added user nodes enjoy fair resources and rights with all user nodes.
In the above machine learning task distribution method based on the block chain, the first user node selects the second user node according to the credit score of the second user node, so that the accuracy of the second user node selected by the first user node is ensured to a certain extent. The first user node sends training task data to the second user node, and the second user node conducts task model training according to the training task data to generate a task model, so that the task model trained by the second user node meets the requirements of the first user node, and the possibility of leakage of the training task data is reduced. The first user node sends the test task data to the third user node, the third user node tests the task model obtained from the second user node according to the test task data, a test result is generated and broadcasted, and the third user node tests the task model generated by the second user node, so that the fairness and fairness of the test are guaranteed. And when the first user node determines to pay the tokens to the second user node according to the test result, payment information is generated, and the number of the tokens of the first preset number to be paid is deducted in advance by the blockchain server node and paid, so that the payment safety is ensured. Meanwhile, the data broadcasted in the whole machine learning task distribution method can be partially or completely linked, so that a complete machine learning task distribution process can be traced, later verification is facilitated, and individual bad user nodes are prevented from tampering the data. The machine learning task distribution method based on the block chain enables the whole task distribution process to be transparent and safe, and enables the machine learning task distribution system based on the block chain to run automatically and consistently.
Illustratively, the above machine learning task distribution system based on block chains further comprises a transaction mixing server. The first user node sends payment information to the transaction mixing server, wherein the payment information comprises a payment address of the first user node, a collection address of the second user node, and a first predetermined number of tokens to be paid. And the transaction mixing server arranges the payment addresses of the payment information and the payment addresses of other payment information according to the first order and broadcasts the arranged payment addresses.
Referring to fig. 2, an embodiment of the present application provides a workflow diagram for a transaction blending server. The transaction mixing server is provided with a timer, the timer is provided with preset time, and the transaction mixing server receives payment information 1 and payment information 2 … payment information n within the preset time, where the payment information 1 is sent by a first user node, and other payment information may be sent by the first user node or sent by other user nodes. Then, the transaction mixing server arranges and broadcasts the payment addresses in all the payment information received within the preset time according to a certain sequence, and simultaneously arranges and broadcasts the collection addresses in all the payment information according to a certain sequence, so that the connection between the collection addresses and the payment addresses in the payment information can be eliminated, the payment addresses of the first user node and the second user node of both parties of the transaction are not easy to identify, and the purpose of protecting the identity information of the first user node and the second user node is achieved. The transaction mixing server may additionally hide the paid first predetermined number of tokens from the payment information.
For example, in the above method for distributing a machine learning task based on a blockchain, if a second user node sends a malicious task model, a first user node may send an identity disclosure request for the second user node to an identity authentication server, and specifically referring to fig. 3, an embodiment of the present application provides a schematic flow diagram of identity disclosure performed by the identity authentication server. Specifically, after receiving a malicious task model sent by a second user node, a first user node generates an identity disclosure request, the first user node broadcasts the identity disclosure request, and all other nodes and an identity authentication server in the blockchain-based machine learning task distribution system receive the identity disclosure request, wherein the other user nodes can vote for the identity disclosure request, select any one of "reveal identity" and "ignore" as a voting result, and then, the other user nodes broadcast the voting result. And the first user node will also select a "disclosure identity" voting result, which the first user node broadcasts. When the identity authentication server determines that the voting result of the 'disclosure identity' of the identity disclosure request of the second user node reaches a second threshold (for example, the second threshold may be 30% of the total number of nodes in the machine learning task distribution system based on the blockchain), response information of the identity disclosure request of the second user node is generated, and the blockchain server node broadcasts the response information; and when the identity authentication server does not determine that the voting result of the 'revealing identity' of the identity revealing request of the second user node reaches the second threshold value, the identity authentication server does not pay attention to the identity revealing request. The identity revealing request can restrict the behavior of each user node in the machine learning task distribution system based on the block chain, and the self-consistent operation of the machine learning task distribution system based on the block chain is guaranteed to a certain extent.
It is understood that other user nodes may also initiate identity disclosure requests to the blockchain server node upon receipt of the malicious message.
Illustratively, referring to fig. 4, the embodiment of the present application provides an illustration of the consensus process in the above-described block chain-based machine learning task distribution method (i.e., step S113-step S119 in the machine learning task distribution flow shown in fig. 1). After a machine learning task distribution process is finished, all user nodes in the machine learning task distribution system based on the block chain need to participate in a consensus process to store data uplink generated in the machine learning task distribution process.
S401, recording the broadcasted data.
In the above steps S101 to S112, all user nodes in the machine learning task distribution system based on the block chain may receive all data broadcasted in the machine learning task distribution process, and each user node may record all data broadcasted in its own account book. The first user node records all broadcasted data in its own account book 1, the second user node records all broadcasted data in its own account book 2, the third user node records all broadcasted data in its own account book 3, and other user nodes record all broadcasted data in their own account book n. The ledger 1, ledger 2, ledger 3 and ledger n record data generated in the same machine learning task distribution process.
S402, the first user node generates a block A.
Referring to fig. 4, since the credit score of the first user node is greater than the B value, the first user node generates the block a from the data recorded in its own ledger 1 according to its credit score.
S403, the first user node broadcasts the block A.
Specifically, after the first user node generates the block a, the block a is broadcasted.
S404, the second user node generates a block B.
Since the credit score of the second user node is greater than the B value, the second user node generates the block B from the data recorded in its own ledger 2 according to its credit score.
S405, the second user node broadcasts a block B.
Specifically, after the second user node generates the block B, the block B is broadcasted.
And S406, generating a voting result 3 by the third user section.
After the third user node receives the block A broadcasted by the first user node, the third user node compares the data in the account book 3 recorded by the third user node with the data in the block A broadcasted by the first user node. Wherein the third user node generates a confirmed voting result 3-a1 when confirming that the data in the block a broadcast by the first user node has no problem; the third user node generates a negative voting result 3-a2 when it confirms that there is a problem with the data in tile a broadcast by the first user node.
After the third user node receives the block B broadcasted by the second user node, the third user node compares the data in the account book 3 recorded by the third user node with the data in the block B broadcasted by the second user node. Wherein the third user node generates a confirmed voting result 3-B1 when confirming that the data in the block B broadcast by the second user node has no problem; the third user node generates a negative voting result 3-B2 when it confirms that there is a problem with the data in tile B broadcast by the second user node.
It should be noted that the third user node may not vote for the block a and/or the block B.
And S407, broadcasting the voting result 3 by the third user node.
Specifically, after the third user node generates the voting result 3, the third user node broadcasts the voting result 3.
And S408, generating a voting result n by other user nodes.
The manner of voting the block by other user nodes to generate the voting result n is the same as the manner of voting the block by a third user node to generate the voting result 3, and the specific step may refer to step S406, which is not described herein again.
And S409, broadcasting the voting result n by other user nodes.
Specifically, after the other user nodes generate the voting result n, the other user nodes broadcast the voting result n.
S410, the block chain server node chains the blocks.
Specifically, the blockchain server node receives a voting result generated by voting on the block a and/or the block B by a third user node, and also receives a voting result generated by voting on the block a and/or the block B by other user nodes. There may be three cases for the voting result:
the first condition is as follows: the voting result for confirming block a is greater than a first threshold (e.g., the first threshold may be 50% of the total number of nodes in the machine learning task distribution system based on the block chain), and the voting result for confirming block B is less than the first threshold. The blockchain server node acknowledges block a with the uplink.
Case two: the voting result of confirming the block A is smaller than the first threshold value, and the voting result of confirming the block B is larger than the first threshold value. The blockchain server node acknowledges the uplink for the blockb.
Case three: the voting result for confirming the block A is greater than the first threshold, and the voting result for confirming the block B is also greater than the first threshold. The blockchain server node will obtain the value of the credit score that the first user node generates block a willing to pay in addition (the value of the credit score that the first user node broadcasts willing to pay in addition at any time after step S402 until before step S410, the value of the credit score that the first user node considers willing to pay in addition if the first user node does not broadcast is 0), and the value of the credit score that the second user node generates block B willing to pay in addition (the value of the credit score that the second user node broadcasts willing to pay in addition at any time after step S404 until before step S410, the value of the credit score that the first user node considers willing to pay in addition if the second user node does not broadcast is 0). When the block chain server node judges that the value of the credit score which the first user node is willing to pay additionally is larger, the block A is subjected to chain confirmation; and when the block chain server node judges that the value of the credit score which the second user node is willing to pay additionally is larger, determining the uplink of the block B.
It should be noted that, when two or more blocks are selected, the blockchain server node may set different selection conditions, and the blockchain server node may determine to record a block uplink in the one-time machine learning task distribution process according to the selection conditions.
And, before block uplink, the blockchain server node deducts a second predetermined number of credits of the user node generating the uplink block, then updates the credits of the user node, and adds a third predetermined number of credits to the user node broadcasting a voting result (the voting result may be positive or negative) generated by voting for the uplink block to update the credits of a fourth user node, wherein the second predetermined number and the third predetermined number satisfy the first predetermined relationship. And adding the updated credit score of the user node generating the uplink block and the credit score of the user node broadcasting the voting result generated by voting the uplink block to the block by the block chain server node, and then uplink the block.
After block uplink, the blockchain server node adds a fourth predetermined number of tokens to the user node generating the uplink block, the fourth predetermined number satisfying a second predetermined relationship with the second predetermined number and the third predetermined number.
The first predetermined relationship and the second predetermined relationship refer to the first predetermined relationship and the second predetermined relationship in step S119, which is not described herein again.
The above mainly introduces the scheme provided by the present application from the perspective of interaction between the nodes. It will be appreciated that each node, such as the first user node, the second user node, the third user node, and the blockchain server node, includes corresponding hardware structures and/or software modules for performing each function in order to implement the above-described functions. Those of skill in the art will readily appreciate that the steps described in connection with the embodiments disclosed herein may be implemented as hardware or a combination of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present application may perform the division of the function modules for the first user node, the second user node, the third user node, and the blockchain server node according to the above method example, for example, each function module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, the division of the modules in the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
Fig. 5 shows a schematic structural diagram of a user node according to an embodiment of the present application. As shown in fig. 5, the user node 50 includes a processing unit 501, a receiving unit 502, and a transmitting unit 503.
When the communication device 50 is configured to perform the functions of the first user node, the respective units are specifically configured to implement the following functions.
The first user node is applied to a blockchain-based machine learning task distribution system, and the blockchain-based machine learning task distribution system comprises a blockchain server node and a plurality of user nodes.
The processing unit 501 is configured to select a second user node according to the credit score of the second user node, and generate a selection result.
A sending unit 503, configured to broadcast the selection result generated by the processing unit 501.
The sending unit 503 is further configured to send training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model.
The sending unit 503 is further configured to send test task data to a third user node, where the test task data includes a test sample set, and the third user node tests the task model obtained from the second user node according to the test task data to generate a test result.
A receiving unit 502, configured to receive a test result broadcasted by a third user node.
The processing unit 501 is further configured to generate payment information when determining to pay the token to the second user node according to the test result received by the receiving unit 502.
The sending unit 503 is further configured to broadcast the payment information generated by the processing unit 501, so that the blockchain server node deducts a first predetermined number of tokens from the first user node according to the payment information, and pays the first predetermined number of tokens to the second user node.
The receiving unit 502 is further configured to receive the task model sent by the second user node.
The processing unit 501 is further configured to generate a block according to the credit score of the block, where the block at least includes one or more of the following items: the selection result, the test result, the payment information, the credit score of the first user node, and the credit score of the second user node.
The sending unit 503 is further configured to broadcast the block generated by the processing unit 501.
Optionally, the sending unit 503 is further configured to broadcast example task data, where the example task data includes an example sample set; the receiving unit 502 is further configured to receive a task receiving result broadcasted by the second user node, where the second user node generates the task receiving result when determining to receive the training task according to the example task data broadcasted by the sending unit 503; the processing unit 501 is specifically configured to select a second user node according to the task receiving result received by the receiving unit 502 and the credit score of the second user node.
Optionally, the sending unit 503 is further configured to broadcast summary information of the training task data; so that the second user node verifies the training task data sent by the sending unit 503 according to the summary information of the training task data.
Optionally, the machine learning task distribution system based on the blockchain further includes a transaction mixing server; the payment information includes a payment address of the first user node, a collection address of the second user node, a first predetermined number of tokens paid; the sending unit 503 is specifically configured to send the payment information generated by the processing unit 501 to the transaction mixing server, so that the transaction mixing server broadcasts the payment addresses of the payment information and the payment addresses of other payment information after arranging them in the first order.
Optionally, the machine learning task distribution system based on the blockchain further includes an identity authentication server; the sending unit 503 is further configured to send registration information to the identity authentication server, where the registration information includes a private key address of the first user node; the receiving unit 502 is further configured to receive a registration success message sent by the identity authentication server, where the registration success message carries a public key address set allocated by the identity authentication server for the first user node, and the public key address set includes at least one public key address.
Optionally, the sending unit 503 is further configured to send an identity disclosure request to the identity authentication server, where the identity disclosure request includes public key addresses of other user nodes; the receiving unit 502 is further configured to receive response information fed back by the identity authentication server, where the response information includes private key addresses of other user nodes.
When the user node 50 is used to implement the function of the second user node in the above embodiment, each unit is specifically used to implement the following function.
The second user node is applied to a blockchain-based machine learning task distribution system, and the blockchain-based machine learning task distribution system comprises a blockchain server node and a plurality of user nodes.
A receiving unit 502, configured to receive a selection result broadcasted by the first user node, where the selection result is used to indicate a second user node selected by the first user node according to a credit score of the second user node.
The receiving unit 502 is further configured to receive training task data sent by the first user node.
The processing unit 501 is configured to perform task model training according to the training task data received by the receiving unit 502 to generate a task model.
A sending unit 503, configured to broadcast completion information, where the completion information is used to instruct the second user node to complete training of the task model.
The receiving unit 502 is further configured to receive payment information broadcasted by the first user node, where the payment information is generated by the first user node according to a test result broadcasted by the third user node, where the test result is generated by the third user node by testing the task model obtained from the second user node according to test task data sent by the first user node, and the test task data includes a test sample set.
The receiving unit 502 is further configured to receive a first predetermined number of tokens paid by the blockchain server node, where the first predetermined number of tokens are obtained by deducting the first user node according to the payment information by the blockchain server node.
The sending unit 503 is further configured to send the task model generated by the processing unit 501 to the first user node.
The receiving unit 502 is further configured to receive a block broadcasted by the first user node, where the block at least includes one or more of the following items: the selection result, the test result, the payment information, and the credit score of the second user node.
The processing unit 501 is further configured to vote for the block, and generate a voting result.
The sending unit 503 is further configured to broadcast the voting result generated by the processing unit 501.
Optionally, the receiving unit 502 is further configured to receive example task data sent by the first user node, where the example task data includes an example sample set; the sending unit 503 is further configured to broadcast a task receiving result, where the processing unit 501 generates the task receiving result when determining to receive the training task according to the example task data received by the receiving unit 502; the selection result is used for indicating the second user node selected by the first user node according to the task receiving result and the credit score of the second user node.
Optionally, the receiving unit 502 is further configured to receive summary information of the training task data broadcast by the first user node, and the second user node checks the training task data received by the receiving unit 502 according to the summary information of the training task data.
Optionally, the sending unit 503 is further configured to broadcast summary information of the task model; the first user node checks the task model transmitted by the transmitting unit 503 according to the summary information of the task model.
When the user node 50 is used to implement the function of the third user node in the above-described embodiment, each unit is specifically used to implement the following function.
The third user node is applied to a blockchain-based machine learning task distribution system, and the blockchain-based machine learning task distribution system comprises a blockchain server node and a plurality of user nodes.
A receiving unit 502, configured to receive test task data sent by a first user node.
The processing unit 501 is configured to test a task model obtained from the second user node according to the test task data received by the receiving unit 502, and generate a test result, where the test task data includes a test sample set, and the task model is generated by the second user node through task model training according to training task data sent by the first user node.
A sending unit 503, configured to broadcast the test result generated by the processing unit 501.
The receiving unit 502 is further configured to receive a block broadcasted by the first user node, where the block includes: and (6) testing results.
The processing unit 501 is further configured to vote for the block received by the receiving unit 502, and generate a voting result.
The sending unit 503 is further configured to broadcast the voting result generated by the processing unit 501.
Fig. 6 shows a schematic structural diagram of a blockchain server node according to an embodiment of the present application. As shown in fig. 6, the blockchain server node 60 includes a processing unit 601 and a receiving unit 602.
The blockchain server node 60 is applied to a blockchain-based machine learning task distribution system, which includes a blockchain server node and a plurality of user nodes.
The receiving unit 602 is configured to receive payment information broadcast by a first user node, where the payment information is generated when the first user node pays a token to a second user node.
The processing unit 601 is configured to deduct a first predetermined number of tokens from the first user node according to the payment information received by the receiving unit 602.
The processing unit 601 is further configured to pay the second user node a first predetermined number of tokens.
The receiving unit 602 is further configured to obtain a result of voting, by the fourth user node, on a chunk broadcast by the first user node, where the chunk includes at least one or more of the following items: the payment information, the credit score of the first user node, and the credit score of the fourth user node.
The processing unit 601 is further configured to deduct the credit score of the first user node by a second predetermined number when determining to uplink the block according to the voting result obtained by the receiving unit 602, so as to update the credit score of the first user node, and add the credit score of a third predetermined number to the fourth user node, so as to update the credit score of the fourth user node, where the second predetermined number and the third predetermined number satisfy the first predetermined relationship.
The processing unit 601 is further configured to add the updated credit score of the first user node and the updated credit score of the fourth user node to the block, and then uplink the block.
The processing unit 601 is further configured to add a fourth predetermined number of tokens to the first user node, where the fourth predetermined number satisfies a second predetermined relationship with the second predetermined number and the third predetermined number.
Optionally, the first predetermined relationship is:
Figure BDA0003310922640000291
wherein, credit is deducting a second predetermined number of credit scores of the first user node, nodespren is the total number of user nodes corresponding to an nth block before a block generated by the first user node in the machine learning task distribution system based on the block chain, heightnow is the height of the block generated by the first user node, heightpre1 is the height of the last block generated by the first user node, credit is adding a third predetermined number of credit scores to a fourth user node, and credit is the additional credit score paid by the first user node.
Optionally, the second predetermined relationship is:
Figure BDA0003310922640000292
the token is a constant, credit is the sum of credit scores of all user nodes in the machine learning task distribution system based on the block chain, token is the sum of tokens of all user nodes in the machine learning task distribution system based on the block chain, nodespren is the total number of user nodes corresponding to the nth block before the block generated by the first user node in the machine learning task distribution system based on the block chain, and nodesall is the total number of user nodes in the machine learning task distribution system based on the block chain.
The units in fig. 5 and 6 may also be referred to as modules, for example, the processing units may be referred to as processing modules. In the embodiments shown in fig. 5 and 6, the names of the respective units may not be the names shown in the figures, and for example, the transmitting unit may be referred to as a communication unit. It should be noted that more or fewer elements may be included in fig. 5 and 6. The embodiment of the present application further provides a schematic diagram of a hardware structure of a user node, as shown in fig. 7, the user node 70 includes one or more processors 701, a transceiver 702, and a memory 703, where the transceiver 702, the processors 701, and the memory 703 are connected by a bus 704.
The processor 701 may be a Central Processing Unit (CPU), a general purpose processor, a Network Processor (NP), a Digital Signal Processor (DSP), a microprocessor, a Programmable Logic Device (PLD), or any combination thereof. The processor may also be any other means having a processing function such as a circuit, device or software module. The processor 701 may also include a plurality of CPUs, and the processor 701 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, or processing cores that process data (e.g., computer program instructions).
The transceiver circuitry 702 may be used to communicate with other devices or communication networks, such as ethernet, RAN, Wireless Local Area Networks (WLAN), etc. The communication interface may be a module, a circuit, a transceiver, or any device capable of enabling communication.
Memory 703 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, but is not limited to, electrically erasable programmable read-only memory (EEPROM), compact disk read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 703 may be separate or integrated with the processor 701. The memory 703 is used for storing, among other things, computer program code, which includes instructions and the like. When the one or more processors 701 execute the instructions, the blockchain server node/user node can perform the blockchain-based machine learning task distribution method provided by the embodiments of the present application. The processor 701 in the user node 70 may specifically perform the functions of the first user node/the second user node/the third user node shown in fig. 1 in the above embodiments.
The bus 704 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Embodiments of the present application further provide a schematic diagram of a hardware structure of a blockchain server node, and as still shown in fig. 7, the blockchain server node 70 includes one or more processors 701, a transceiver circuit 702, and a memory 703, where the transceiver circuit 702, the processors 701, and the memory 703 are connected by a bus 704.
The hardware structures of the blockchain server node and the user node are the same, and the specific functional description may refer to the functional description about the hardware structure of the user node, which is not described herein again.
And an embodiment of the present application provides a computer-readable storage medium, which includes computer instructions, when the computer instructions are executed on a computer, the computer is caused to execute any one of the above method for distributing a machine learning task based on a blockchain. For example, the steps of fig. 1, if implemented in software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method for distributing machine learning tasks based on a blockchain according to the embodiments of the present application. A storage medium storing a computer software product comprising: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer-executable instructions. When the computer execution instructions are loaded and executed on the computer, the computer is enabled to execute the method for distributing the machine learning task based on the block chain according to the embodiment of the application. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer executable instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, microwave, etc.). Computer-readable storage media can be any available media that can be accessed by a computer or can comprise one or more data storage devices, such as servers, data centers, and the like, that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (31)

1. A machine learning task distribution method based on a blockchain is applied to a machine learning task distribution system based on the blockchain, the machine learning task distribution system based on the blockchain comprises a blockchain server node and a plurality of user nodes, and is characterized in that,
the first user node selects the second user node according to the credit score of the second user node to generate a selection result;
the first user node broadcasts the selection result;
the first user node sends training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model;
the first user node sends test task data to a third user node, wherein the test task data comprises a test sample set, and the third user node tests the task model obtained from the second user node according to the test task data to generate a test result;
the first user node receives the test result broadcasted by the third user node;
generating payment information when the first user node determines to pay the token to the second user node according to the test result;
the first user node broadcasts the payment information so that the blockchain server node deducts a first preset number of tokens of the first user node according to the payment information and pays the first preset number of tokens to the second user node;
the first user node receives the task model sent by the second user node;
the first user node generates a block according to the credit score of the first user node, wherein the block at least comprises one or more of the following items: the selection result, the test result, the payment information, a credit score of the first user node, and a credit score of the second user node;
the first user node broadcasts the block.
2. The method of claim 1, further comprising, before the first user node selecting a second user node based on a credit score of the second user node:
the first user node broadcasting example task data, the example task data comprising an example sample set;
the first user node receives a task receiving result broadcasted by the second user node, wherein the second user node generates the task receiving result when determining to receive a training task according to the example task data;
the first user node selects a second user node according to the credit score of the second user node, and the method comprises the following steps: and the first user node selects a second user node according to the task receiving result and the credit score of the second user node.
3. The method of claim 1, wherein prior to the first user node sending training task data to the second user node, comprising: the first user node broadcasts abstract information of the training task data; so that the second user node can check the training task data sent by the first user node according to the summary information of the training task data.
4. The method of any of claims 1-3, wherein the blockchain based machine learning task distribution system further comprises a transaction blending server;
the payment information includes a payment address of the first user node, a collection address of the second user node, the first predetermined number of tokens paid;
wherein the first user node broadcasts the payment information, including: and the first user node sends the payment information to the transaction mixing server so that the transaction mixing server can broadcast the payment address of the payment information and the payment addresses of other payment information after the payment addresses of the payment information and the payment addresses of other payment information are arranged according to a first sequence.
5. The method of any of claims 1-3, wherein the blockchain based machine learning task distribution system further comprises an identity authentication server;
the first user node sends registration information to the identity authentication server, wherein the registration information comprises a private key address of the first user node;
and the first user node receives a registration success message sent by the identity authentication server, wherein the registration success message carries a public key address set distributed by the identity authentication server for the first user node, and the public key address set comprises at least one public key address.
6. The method of claim 5,
the first user node sends an identity revealing request to the identity authentication server, wherein the identity revealing request comprises public key addresses of other user nodes;
and the first user node receives response information fed back by the identity authentication server, wherein the response information comprises private key addresses of other user nodes.
7. A machine learning task distribution method based on a blockchain is applied to a machine learning task distribution system based on the blockchain, the machine learning task distribution system based on the blockchain comprises a blockchain server node and a plurality of user nodes, and is characterized in that,
a second user node receives a selection result broadcasted by a first user node, wherein the selection result is used for indicating the second user node selected by the first user node according to the credit score of the second user node;
the second user node receives training task data sent by the first user node;
the second user node performs task model training according to the training task data to generate a task model;
the second user node broadcasts completion information, and the completion information is used for indicating the second user node to complete the training of the task model;
the second user node receives payment information broadcasted by the first user node, wherein the payment information is generated by the first user node according to a test result broadcasted by a third user node, the test result is generated by the third user node through testing the task model obtained from the second user node according to test task data sent by the first user node, and the test task data comprises a test sample set;
the second user node receiving a first predetermined number of tokens paid by a blockchain server node, the first predetermined number of tokens being deducted by the blockchain server node from the first user node according to the payment information;
the second user node sends the task model to the first user node;
the second user node receives the block broadcasted by the first user node, wherein the block at least comprises one or more of the following items: the selection result, the test result, the payment information, and a credit score of the second user node;
the second user node votes for the block to generate a voting result;
the second user node broadcasts the voting result.
8. The method of claim 7, wherein before the second user node receives the selection result broadcasted by the first user node, further comprising:
the second user node receives example task data sent by the first user node, wherein the example task data comprises an example sample set;
the second user node broadcasts a task receiving result, wherein the second user node generates the task receiving result when determining to receive a training task according to the example task data;
the selection result is used for indicating the second user node selected by the first user node according to the task receiving result and the credit score of the second user node.
9. The method of claim 7, wherein before the second user node receives the training task data sent by the first user node, the method comprises: and the second user node receives the summary information of the training task data broadcasted by the first user node, and the second user node checks the training task data sent by the first user node according to the summary information of the training task data.
10. The method of claim 7,
before the second user node sends the task model to the first user node, the method includes:
the second user node broadcasts abstract information of the task model; and the first user node checks the task model according to the abstract information of the task model.
11. A machine learning task distribution method based on a blockchain is applied to a machine learning task distribution system based on the blockchain, the machine learning task distribution system based on the blockchain comprises a blockchain server node and a plurality of user nodes, and is characterized in that,
a third user node receives test task data sent by a first user node, tests a task model obtained from a second user node according to the test task data and generates a test result, wherein the test task data comprises a test sample set, and the task model is generated by the second user node through task model training according to training task data sent by the first user node;
the third user node broadcasts the test result;
the third user node receiving a block broadcast by the first user node, the block comprising: the test result;
the third user node votes for the block to generate a voting result;
the third user node broadcasts the voting result.
12. A machine learning task distribution method based on a blockchain is applied to a machine learning task distribution system based on the blockchain, the machine learning task distribution system based on the blockchain comprises a blockchain server node and a plurality of user nodes, and is characterized in that,
the blockchain server node receives payment information broadcast by a first user node, wherein the payment information is generated when the first user node pays tokens to a second user node;
the blockchain server node deducts a first predetermined number of tokens from the first user node according to the payment information;
the blockchain server node paying the first predetermined number of tokens to the second user node;
the block chain server node acquires the voting result of a fourth user node on a block broadcast by the first user node, wherein the block at least comprises one or more of the following items: the payment information, a credit score of the first user node, and a credit score of the fourth user node;
when the blockchain server node determines to chain the blocks according to the voting result, deducting a second preset number of credit scores of the first user node to update the credit score of the first user node, and adding a third preset number of credit scores to the fourth user node to update the credit score of the fourth user node, wherein the second preset number and the third preset number meet a first preset relation;
adding the updated credit score of the first user node and the updated credit score of the fourth user node to the block by the block chain server node, and chaining the block;
the blockchain server node adds a fourth predetermined number of tokens to the first user node, the fourth predetermined number satisfying a second predetermined relationship with the second predetermined number and the third predetermined number.
13. The method of claim 12, wherein the first predetermined relationship is:
Figure FDA0003310922630000051
wherein, the creditmintIs deducting a second predetermined number of credits, nodes, of said first user nodeprenIs the total number of the user nodes corresponding to the nth block before the block generated by the first user node in the block chain-based machine learning task distribution system, heightnowIs the height, of the tile generated by the first user nodepre1Is the height, credit, of the last generated block of the first user nodeconIs to add a third predetermined number of credits, credit, to said fourth user nodeaddIs the credit score additionally paid by the first user node.
14. The method of claim 12, wherein the second predetermined relationship is:
Figure FDA0003310922630000052
wherein, tokenmintA fourth predetermined number of tokens is added to the first user node, token is a constant, creditallIs the sum of the credit scores, token, of all user nodes within the blockchain based machine learning task distribution systemallIs the sum of tokens, nodes, of all user nodes within the blockchain based machine learning task distribution systemprenIs the total number of the user nodes, corresponding to the nth block before the block generated by the first user node in the block chain-based machine learning task distribution systemallIs thatA total number of the user nodes within a blockchain based machine learning task distribution system.
15. A first user node, applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the first user node includes: a processing unit, a receiving unit and a transmitting unit;
the processing unit is used for selecting the second user node according to the credit score of the second user node and generating a selection result;
the sending unit is used for broadcasting the selection result generated by the processing unit;
the sending unit is further configured to send training task data to the second user node, and the second user node performs task model training according to the training task data to generate a task model;
the sending unit is further configured to send test task data to a third user node, where the test task data includes a test sample set, and the third user node tests the task model obtained from the second user node according to the test task data to generate a test result;
the receiving unit is used for receiving the test result broadcasted by the third user node;
the processing unit is further used for generating payment information when determining to pay the token to the second user node according to the test result received by the receiving unit;
the sending unit is further configured to broadcast the payment information generated by the processing unit, so that the blockchain server node deducts a first predetermined number of tokens from the first user node according to the payment information, and pays the first predetermined number of tokens to the second user node;
the receiving unit is further configured to receive the task model sent by the second user node;
the processing unit is further configured to generate a block according to the self credit score, where the block at least includes one or more of the following items: the selection result, the test result, the payment information, a credit score of the first user node, and a credit score of the second user node;
the sending unit is further configured to broadcast the block generated by the processing unit.
16. The first user node of claim 15,
the sending unit is further configured to broadcast example task data, where the example task data includes an example sample set;
the receiving unit is further configured to receive a task receiving result broadcasted by the second user node, where the second user node generates the task receiving result when determining to receive a training task according to the example task data broadcasted by the sending unit;
the processing unit is specifically configured to select a second user node according to the task receiving result received by the receiving unit and the credit score of the second user node.
17. The first user node of claim 15,
the sending unit is further configured to broadcast summary information of the training task data; so that the second user node can check the training task data sent by the sending unit according to the summary information of the training task data.
18. The first user node of any of claims 15-17, wherein the blockchain based machine learning task distribution system further comprises a transaction blending server;
the payment information includes a payment address of the first user node, a collection address of the second user node, the first predetermined number of tokens paid;
the sending unit is specifically configured to send the payment information generated by the processing unit to the transaction mixing server, so that the transaction mixing server arranges the payment addresses of the payment information and the payment addresses of other payment information according to a first order and broadcasts the arranged payment addresses.
19. The first user node of any of claims 15-17, wherein the blockchain based machine learning task distribution system further comprises an identity authentication server;
the sending unit is further configured to send registration information to the identity authentication server, where the registration information includes a private key address of the first user node;
the receiving unit is further configured to receive a registration success message sent by the identity authentication server, where the registration success message carries a public key address set allocated by the identity authentication server to the first user node, and the public key address set includes at least one public key address.
20. The first user node of claim 19,
the sending unit is further configured to send an identity disclosure request to the identity authentication server, where the identity disclosure request includes public key addresses of other user nodes;
the receiving unit is further configured to receive response information fed back by the identity authentication server, where the response information includes the private key addresses of the other user nodes.
21. A second user node, applied to a blockchain-based machine learning task distribution system, where the blockchain-based machine learning task distribution system includes a blockchain server node and a plurality of user nodes, and the second user node includes: a processing unit, a receiving unit and a transmitting unit;
the receiving unit is used for receiving a selection result broadcasted by a first user node, wherein the selection result is used for indicating a second user node selected by the first user node according to the credit score of the second user node;
the receiving unit is further configured to receive training task data sent by the first user node;
the processing unit is used for carrying out task model training according to the training task data received by the receiving unit to generate a task model;
the sending unit is configured to broadcast completion information, where the completion information is used to instruct the second user node to complete training of the task model;
the receiving unit is further configured to receive payment information broadcasted by the first user node, where the payment information is generated by the first user node according to a test result broadcasted by a third user node, where the test result is generated by the third user node by testing the task model obtained from the second user node according to test task data sent by the first user node, and the test task data includes a test sample set;
the receiving unit is further configured to receive a first predetermined number of tokens paid by a blockchain server node, where the first predetermined number of tokens are obtained by deducting the first user node by the blockchain server node according to the payment information;
the sending unit is further configured to send the task model generated by the processing unit to the first user node;
the receiving unit is further configured to receive a block broadcasted by the first user node, where the block at least includes one or more of the following items: the selection result, the test result, the payment information, and a credit score of the second user node;
the processing unit is further configured to vote for the block to generate a voting result;
the sending unit is further configured to broadcast the voting result generated by the processing unit.
22. The second user node of claim 21,
the receiving unit is further configured to receive example task data sent by the first user node, where the example task data includes an example sample set;
the sending unit is further configured to broadcast a task receiving result, where the processing unit generates the task receiving result when determining to receive a training task according to the example task data received by the receiving unit;
the selection result is used for indicating the second user node selected by the first user node according to the task receiving result and the credit score of the second user node.
23. The second user node of claim 21,
the receiving unit is further configured to receive summary information of the training task data broadcast by the first user node, and the second user node checks the training task data received by the receiving unit according to the summary information of the training task data.
24. The second user node of claim 21,
the sending unit is further configured to broadcast summary information of the task model; and the first user node checks the task model sent by the sending unit according to the summary information of the task model.
25. A third user node, applied to a blockchain-based machine learning task distribution system, the blockchain-based machine learning task distribution system including a blockchain server node and a plurality of user nodes, wherein the third user node includes: a processing unit, a receiving unit and a transmitting unit;
the receiving unit is used for receiving test task data sent by a first user node;
the processing unit is configured to test a task model obtained from a second user node according to the test task data received by the receiving unit, and generate a test result, where the test task data includes a test sample set, and the task model is generated by the second user node through task model training according to training task data sent by the first user node;
the sending unit is used for broadcasting the test result generated by the processing unit;
the receiving unit is further configured to receive a block broadcasted by the first user node, where the block includes: the test result;
the processing unit is further configured to vote for the block received by the receiving unit, and generate a voting result;
the sending unit is further configured to broadcast the voting result generated by the processing unit.
26. A blockchain server node is applied to a blockchain-based machine learning task distribution system, and the blockchain-based machine learning task distribution system comprises the blockchain server node and a plurality of user nodes, wherein the blockchain server node comprises: a processing unit and a receiving unit;
the receiving unit is used for receiving payment information broadcast by a first user node, wherein the payment information is generated when the first user node pays tokens to a second user node;
the processing unit is used for deducting a first preset number of tokens of the first user node according to the payment information received by the receiving unit;
the processing unit further to pay the first predetermined number of tokens to the second user node;
the receiving unit is further configured to obtain a result of voting by a fourth user node on a block broadcast by the first user node, where the block includes at least one or more of: the payment information, a credit score of the first user node, and a credit score of the fourth user node;
the processing unit is further configured to deduct a second predetermined number of credits of the first user node to update the credits of the first user node when determining to uplink the block according to the voting result obtained by the receiving unit, and add a third predetermined number of credits to the fourth user node to update the credits of the fourth user node, where the second predetermined number and the third predetermined number satisfy a first predetermined relationship;
the processing unit is further configured to add the updated credit score of the first user node and the updated credit score of the fourth user node to the block, and then uplink the block;
the processing unit is further configured to add a fourth predetermined number of tokens to the first user node, where the fourth predetermined number satisfies a second predetermined relationship with the second predetermined number and the third predetermined number.
27. A blockchain server node as in claim 26 wherein the first predetermined relationship is:
Figure FDA0003310922630000091
wherein, the creditmintIs deducting a second predetermined number of credits, nodes, of said first user nodeprenIs the total number of the user nodes corresponding to the nth block before the block generated by the first user node in the block chain-based machine learning task distribution system, heightnowIs the height, of the tile generated by the first user nodepre1Is the height, credit, of the last generated block of the first user nodeconIs to add a third predetermined number of credits, credit, to said fourth user nodeaddIs the credit score additionally paid by the first user node.
28. A blockchain server node as in claim 26 wherein the second predetermined relationship is:
Figure FDA0003310922630000101
wherein, tokenmintA fourth predetermined number of tokens is added to the first user node, token is a constant, creditallIs the sum of the credit scores, token, of all user nodes within the blockchain based machine learning task distribution systemallIs the sum of tokens, nodes, of all user nodes within the blockchain based machine learning task distribution systemprenIs the total number of the user nodes, corresponding to the nth block before the block generated by the first user node in the block chain-based machine learning task distribution systemallIs a total number of the user nodes within the blockchain based machine learning task distribution system.
29. A user node, wherein the user node comprises one or more processors, transceiver circuitry, and memory;
the memory, the transceiver circuitry, and the one or more processors; the memory for storing computer program code comprising instructions which, when executed by the one or more processors, cause the blockchain based machine learning task distribution system to perform the blockchain based machine learning task distribution method of any one of claims 1-11.
30. A blockchain server node, the blockchain server node comprising one or more processors, transceiver circuitry, and memory;
the memory, the transceiver circuitry, and the one or more processors; the memory for storing computer program code comprising instructions which, when executed by the one or more processors, cause the blockchain based machine learning task distribution system to perform the blockchain based machine learning task distribution method of any one of claims 12-14.
31. A computer-readable storage medium comprising computer instructions which, when executed on a computer, cause the computer to perform the blockchain based machine learning task distribution method of any one of claims 1-14.
CN202111216664.8A 2021-10-19 2021-10-19 Block chain-based machine learning task distribution method, equipment and system Active CN114037086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111216664.8A CN114037086B (en) 2021-10-19 2021-10-19 Block chain-based machine learning task distribution method, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111216664.8A CN114037086B (en) 2021-10-19 2021-10-19 Block chain-based machine learning task distribution method, equipment and system

Publications (2)

Publication Number Publication Date
CN114037086A true CN114037086A (en) 2022-02-11
CN114037086B CN114037086B (en) 2023-01-24

Family

ID=80142004

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111216664.8A Active CN114037086B (en) 2021-10-19 2021-10-19 Block chain-based machine learning task distribution method, equipment and system

Country Status (1)

Country Link
CN (1) CN114037086B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864198A (en) * 2017-11-07 2018-03-30 济南浪潮高新科技投资发展有限公司 A kind of block chain common recognition method based on deep learning training mission
CN110490305A (en) * 2019-08-22 2019-11-22 腾讯科技(深圳)有限公司 Machine learning model processing method and node based on block chain network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864198A (en) * 2017-11-07 2018-03-30 济南浪潮高新科技投资发展有限公司 A kind of block chain common recognition method based on deep learning training mission
CN110490305A (en) * 2019-08-22 2019-11-22 腾讯科技(深圳)有限公司 Machine learning model processing method and node based on block chain network

Also Published As

Publication number Publication date
CN114037086B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
US11630808B2 (en) Proof of lottery (PoL) blockchain
CN112600841B (en) Credit record sharing method and device based on block chain and electronic equipment
CN110380858B (en) Method and system for processing game consensus protocol of block chain
CN108959621B (en) Method, device, equipment and storage medium for realizing block chain network
CN110838063B (en) Transaction processing method based on blockchain, electronic equipment and storage medium
CN109479005A (en) Method and system for realizing block chain
KR20210006934A (en) Blockchain consensus method, accounting nodes and nodes
US20190114707A1 (en) Distribution of Blockchain Tokens
CN109729068B (en) Security vulnerability auditing system based on block chain technology
US11503036B2 (en) Methods of electing leader nodes in a blockchain network using a role-based consensus protocol
Zheng et al. A strategy-proof combinatorial heterogeneous channel auction framework in noncooperative wireless networks
CN110276184A (en) A kind of cloud computing resources authorization method and device
TW202036418A (en) Block chain-based method and device for taxi operation
Batool et al. Fl-mab: client selection and monetization for blockchain-based federated learning
CN113890739B (en) Cross-blockchain authentication method and device, electronic equipment and medium
Zheng et al. Unknown combinatorial auction mechanisms for heterogeneous spectrum redistribution
CN106209751B (en) Service-oriented interface authentication method based on the operating system certificate of authority
CN112087518B (en) Consensus method, apparatus, computer system, and medium for blockchains
CN114037086B (en) Block chain-based machine learning task distribution method, equipment and system
US20230421543A1 (en) Method, apparatus, and computer-readable medium for secured data transfer over a decentrlaized computer network
CN110557394B (en) Parallel chain management method, equipment and storage medium
CN111862478A (en) Vehicle operation method and device
CN109272318B (en) Resource flow transaction method, device, equipment and medium applied to requester client
CN111311269B (en) Vehicle traveling method and device based on block chain
CN114860402B (en) Scheduling strategy model training method, scheduling device, scheduling equipment and scheduling medium

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
GR01 Patent grant
GR01 Patent grant