Data sharing and arbitration method based on block chainTechnical Field
The invention belongs to the technical field of a block chain consensus protocol, and particularly relates to a data sharing and arbitration method based on a block chain.
Background
With the rapid development of network applications, the data volume of users also grows exponentially, but many enterprises or organizations with data do not have the capability of analyzing data, and people with the capability and the requirement of analyzing cannot obtain the data, so that a so-called data islanding phenomenon is caused, and the data sharing technology based on the block chain can solve the problem. However, in the sharing process, data is not disclosed, so that the data sharing process is not easy to verify, disputes in the data sharing process are solved under the condition of the lowest data exposure, and the arbitration method is designed to ensure that malicious nodes cannot obtain shared data through malicious arbitration, which are two most important problems in the data sharing technology based on the block chain.
The current block chain-based data sharing method mainly comprises the following steps:
the account book type data sharing method comprises the following steps: at present, most of data sharing based on block chains adopts an account book type data sharing method, a data demand side and a data provider side separately sign an agreement, offline data exchange is carried out, the agreement and the process of the data exchange are recorded on the block chains, and after the two sides achieve consensus on the block chains, messages are broadcast to the whole network, so that traceability of the data sharing process is realized. Since both parties of data sharing do not agree through the blockchain and only save the sharing process through the blockchain, an arbitration mechanism based on blockchain consensus is not needed.
The contract type data sharing method comprises the following steps: at present, an intelligent contract-based data sharing method exists, all data sharing parties form a alliance chain, data sharing is carried out through a block chain intelligent contract, the sharing process is identified in the whole network, and shared data are not exposed. In this data sharing method, since the shared data is not exposed, an arbitration mechanism is required to ensure the correctness of the data on the chain when disputes occur.
The existing block chain arbitration method is ECAF of EOS and EOS core arbitration court, which is a centralized arbitration mechanism formed by EOS after special training and is responsible for dispute arbitration in EOS system.
The existing accounting book type data sharing method does not realize dispute arbitration through a block chain technology, but solves contradiction disputes through a method of negotiation under a line, and the negotiation process is not seen by others. When disputes occur in the conventional contract type data sharing method, data provided by a default data provider is credible, so that the behavior of providing false data by the data provider cannot be judged, and the benefit of a data demander is damaged to a certain extent.
The current arbitration method based on the block chain mainly comprises the following steps:
the centralized arbitration method comprises the following steps: the existing arbitration mechanism based on the block chain is actually a centralized arbitration mechanism, professional people form a professional mechanism after training to arbitrate the system, the system is not in accordance with a mode of solving the problem of decentralization of the block chain to a certain extent, and the traditional arbitration mode of core and power has impact on the structure of the block chain.
Disclosure of Invention
In order to solve the above problems, an object of the present invention is to provide a block chain-based data sharing arbitration method.
In order to achieve the above object, the method for sharing and arbitrating data based on block chains according to the present invention comprises the following steps performed in sequence:
1) initializing a blockchain network: each data sharing party as a data sharing member signs a treaty to form a block chain network for common maintenance management and data sharing, and negotiates a communication protocol;
2) setting a data sharing member admission rule: when a non-data sharing member sends a request for joining the block chain network, judging the request, utilizing a consensus mechanism to achieve consensus on the request and carrying out corresponding operation aiming at different requests;
3) data sharing based on block chains: the data requester shares a data processing model based on the block chain, and the data provider shares data based on the data processing model;
4) election arbitration committee members and randomly generating arbitration position order: voting according to the contribution degree of each data sharing member to the block chain network, then electing the first few data sharing members with more votes as arbitration committee members, then randomly generating an arbitration position sequence based on the arbitration committee members, and acquiring arbitration effective time determined when the block chain network is initialized;
5) initiate an arbitration request to validate data based on blockchain consensus and determine an arbitration cost: if the data demand side considers that the data has problems, the data demand side can be used as an arbitration initiator to initiate an arbitration request for the data; the data demand side writes an intelligent contract, then the arbitration cost is put into the intelligent contract, and meanwhile, the data supply side also puts the arbitration cost into the intelligent contract;
6) data arbitration based on arbitration mechanism and determination of whether arbitration committee needs to reorganize: after the data demander initiates an arbitration request, the corresponding arbitration committee members carry out data arbitration and generate an arbitration result according to the arbitration position sequence obtained in the step 4), and whether the arbitration committee needs to be recombined or not is judged according to the arbitration effective time;
7) paying an arbitration fee based on the smart contract: after the arbitration process is finished, the intelligent contract autonomously pays the arbitration cost; if the arbitration result is that the data is true and credible, an arbitration initiator, namely a data requester, provides arbitration cost and returns the arbitration cost of a data provider; if the arbitration result is that the data is false data, the data provider provides arbitration cost, and the arbitration cost of the data requester is returned, so that automatic arbitration cost payment based on the intelligent contract is realized.
In step 3), the method for sharing the data processing model based on the block chain by the data requester includes the following steps:
101) the data requester i generates a data processing model M according to the task requirement of the data requester ii;
102) Data requester i processes data processing model MiBroadcasting to a blockchain network to achieve model uploading;
103) the blockchain network agrees by consensus and assigns the data processing model MiAnd storing the data in the block chain for the data provider to call and operate.
In step 3), the method for the data provider to share data based on the data processing model includes the following steps:
201) all received data processing model M in blockchain networkiThe data sharing member selects a corresponding data processing model M according to the interest and the capability of the data sharing memberiSharing is carried out;
202) data provider j participating in data sharing collects sharing process related data Dj;
203) Data provider j uses the acquired data processing model MiProcessing shared Process related data DjObtaining processed data Mi(Dj);
204) Data provider j sends data Mi(Dj) Uploading to a block chain to wait for confirmation;
205) the blockchain network determines the data M uploaded by the data provider j through a consensus mechanismi(Dj) And if the data is valid, writing the data meeting the requirement as a new block into the block chain.
In step 4), the method for voting according to the contribution degree of each data sharing member to the blockchain network and then electing the first few data sharing members with more votes as arbitration committee members comprises the following steps:
301) data sharing member
The own share right is taken as a vote
Deliver it to selected data sharing members
302) And (3) counting the final vote of each data sharing member by the blockchain network:
wherein
Representing data sharing members
Received from a data sharing Member
Ballot of
n represents the total number of data sharing members in the blockchain network;
303) the blockchain network collects a final vote set { Sto }according to the collected vote
1,Sto
2,…,Sto
n}, call Sorted (Sto)
1,Sto
2,…,Sto
n) The final votes obtained by each data sharing member are sorted in descending order, and the first N data sharing members are selected
As arbitration committee members, where N is the number of arbitration committee members set when initializing the blockchain network.
In step 4), the method for randomly generating the arbitration position sequence based on the arbitration committee members comprises the following steps:
401) according to the formula
Calculating the total number of votes of the members of the arbitration committee;
402) sharing the data with members according to the formula j-Sum% n
As a member of the arbitration committee at the jth location;
403) sharing the data with the members according to the formula j-Sum% (n-1)
Considered as an arbitration committee member for the j-1 th location;
404) repeating the above operations, and randomly disordering the arbitration position sequence of the members of the arbitration committee;
wherein when the data shares the member
When the calculated random position is occupied by other data sharing members, continuing to arrange backwards until a first vacant position is found; if no empty position is found until the end, the search is continued from the first position.
In step 5), the arbitration fee CjIs determined by the time T of generating the arbitration resultjAnd resource S of occupied block chain networkjIs determined by the following parameters:
in step 6), the method for performing data arbitration and generating arbitration result is that firstly, an arbitration committee member requests a data provider to provide original data and verifies the original data, if the original data are not in accordance, an arbitration result is directly generated, otherwise, a data processing model of the data requester is obtained, then, the original data is calculated by using the data processing model to generate a calculation result, the calculation result is compared with the processed data obtained in the step 3), an arbitration result is generated according to the comparison result, and finally, the arbitration result is generated into a block and is placed at the end of an arbitration chain.
In step 6), the method for determining whether the arbitration committee needs to be reconfigured according to the arbitration valid time is to determine the next arbitration committee member for arbitration according to the arbitration position sequence
And waiting for the arbitration committee member to generate an arbitration result within the arbitration valid time(ii) a If the arbitration committee member fails to generate the arbitration result, selecting the next arbitration committee member according to the arbitration position sequence
Carrying out arbitration; if the arbitration committee member does not generate the arbitration result within the arbitration valid time, the arbitration committee is required to be regenerated according to the step 4).
The block chain-based data sharing and arbitration method provided by the invention has the beneficial effects that:
(1) data sharing is carried out in a block chain network sharing record mode, and under the condition of sharing data, data privacy is effectively protected from being disclosed; (2) when data sharing is carried out among the data sharing members, the data on the block chain can be guaranteed to be real and reliable under the condition that the data are not disclosed; (3) the decentralized characteristic of the block chain can reduce the maintenance cost of the platform and reduce the implementation difficulty of the data sharing and arbitration mechanism; the block chain is not capable of being tampered, so that the credibility of the shared data and the arbitration result is improved; (4) the distributed architecture of the blocks can ensure that the system is not paralyzed due to the fault of a single node in the arbitration process, and the calculation power dispersion of the data sharing process and the arbitration process is realized; (5) the selection process of the arbitration committee members is a recommendation system, the higher the contribution degree of the system is, the higher the recommendation ticket weight of the person is, the more the person with more system rights can not actively do harm, and the credibility and stability of the system are ensured.
Drawings
Fig. 1 is a flowchart of a block chain-based data sharing and arbitration method according to the present invention.
Fig. 2 is a flow chart of a request initiation process for joining a blockchain network.
FIG. 3 is a flow chart of a block chain based data sharing process
FIG. 4 is a flow chart of the process of electing arbitration committee members and randomly generating arbitration sequences.
Fig. 5 is a flow chart of the data arbitration process based on the arbitration mechanism.
FIG. 6 is a flow chart of a method for arbitrating fee payment based on smart contracts.
Detailed Description
The invention is described in further detail below with reference to the figures and examples.
As shown in fig. 1, the block chain-based data sharing and arbitration method provided by the present invention includes the following steps performed in sequence:
1) initializing a blockchain network: each data sharing party as a data sharing member signs a treaty to form a block chain network for common maintenance management and data sharing, and negotiates a communication protocol;
2) setting a data sharing member admission rule: when a non-data sharing member sends a request for joining a blockchain network, the request is judged, a consensus mechanism is used for achieving consensus on the request, and corresponding operations are performed on different requests, and the specific process is shown in fig. 2.
3) Data sharing based on block chains: the data requester performs data processing model sharing based on the blockchain, and the data provider performs data sharing based on the data processing model, and the specific process is as shown in fig. 3.
In step 3), the method for sharing the data processing model based on the block chain by the data requester includes the following steps:
101) the data requester i generates a data processing model M according to the task requirement of the data requester ii;
102) Data requester i processes data processing model MiBroadcasting to a blockchain network to achieve model uploading;
103) the blockchain network agrees by consensus and assigns the data processing model MiAnd storing the data in the block chain for the data provider to call and operate.
In step 3), the method for the data provider to share data based on the data processing model includes the following steps:
201) all received data processing model M in blockchain networkiThe data sharing member selects a corresponding data processing model M according to the interest and the capability of the data sharing memberiSharing is carried out;
202) number participating in data sharingCollecting sharing Process related data D according to provider jj;
203) Data provider j uses the acquired data processing model MiProcessing shared Process related data DjObtaining processed data Mi(Dj);
204) Data provider j sends data Mi(Dj) Uploading to a block chain to wait for confirmation;
205) the blockchain network determines the data M uploaded by the data provider j through a consensus mechanismi(Dj) And if the data is valid, writing the data meeting the requirement as a new block into the block chain.
4) Election arbitration committee members and randomly generating arbitration position order: voting is carried out according to the contribution degree of each data sharing member to the block chain network, then the first few data sharing members with more votes are elected as arbitration committee members, then an arbitration position sequence is randomly generated based on the arbitration committee members, and the arbitration effective time determined when the block chain network is initialized is obtained. The arbitration valid time is the time when the arbitration committee member obtains the arbitration right according to the arbitration sequence and generates the arbitration result for a certain arbitration request. The process of electing arbitration committee members and randomly generating arbitration sequence is shown in fig. 4.
In step 4), the method for voting according to the contribution degree of each data sharing member to the blockchain network and then electing the first few data sharing members with more votes as arbitration committee members comprises the following steps:
301) data sharing member
The own share right is taken as a vote
Deliver it to selected data sharing members
302) And (3) counting the final vote of each data sharing member by the blockchain network:
wherein
Representing data sharing members
Received from a data sharing Member
Ballot of
n represents the total number of data sharing members in the blockchain network;
303) the blockchain network collects a final vote set { Sto }according to the collected vote
1,Sto
2,…,Sto
n}, call Sorted (Sto)
1,Sto
2,…,Sto
n) The final votes obtained by each data sharing member are sorted in descending order, and the first N data sharing members are selected
As arbitration committee members, where N is the number of arbitration committee members set when initializing the blockchain network.
In step 4), the method for randomly generating the arbitration position sequence based on the arbitration committee members comprises the following steps:
401) according to the formula
Calculating the total number of votes of the members of the arbitration committee;
402) sharing the data with members according to the formula j-Sum% n
As a member of the arbitration committee at the jth location;
403) sharing the data with the members according to the formula j-Sum% (n-1)
Considered as an arbitration committee member for the j-1 th location;
404) repeating the above operations, and randomly disordering the arbitration position sequence of the members of the arbitration committee;
wherein when the data shares the member
When the calculated random position is occupied by other data sharing members, continuing to arrange backwards until a first vacant position is found; if no empty position is found until the end, the search is continued from the first position.
5) Initiate an arbitration request to validate data based on blockchain consensus and determine an arbitration cost: the consensus content in the new block chain is data, and only the source of the data can be identified, but the authenticity of the result can not be verified, so that the data can be used as an arbitration initiator to initiate an arbitration request for the data if the data demand side considers that the data has a problem;
in the process of initiating the arbitration request, because the arbitration request consumes a large amount of computing resources of the members of the arbitration committee, and in order to avoid abuse of the arbitration mechanism and avoid malicious nodes from acquiring shared data through the arbitration mechanism, the arbitration cost payment mechanism based on the intelligent contract is adopted in the invention, and the arbitration cost C is chargedjIs determined by the time T of generating the arbitration resultjAnd resource S of occupied block chain networkjIs determined by the following parameters:
the intelligent contract is written by the data demand side, then the arbitration fee is put into the intelligent contract, and meanwhile, the data supply side also puts the arbitration fee into the intelligent contract.
6) Data arbitration based on arbitration mechanism and determination of whether arbitration committee needs to reorganize: after the data demander initiates an arbitration request, the corresponding arbitration committee members carry out data arbitration and generate an arbitration result according to the arbitration position sequence obtained in the step 4), and whether the arbitration committee needs to be recombined or not is judged according to the arbitration effective time;
the method for arbitrating data and generating arbitration result is that firstly, the member of arbitration committee requests the data provider to provide original data and checks the original data, if the original data is not in accordance with the original data, the arbitration result is directly generated, otherwise, a data processing model of the data requester is obtained, then the original data is calculated by using the data processing model to generate a calculation result, the calculation result is compared with the processed data obtained in the step 3), the arbitration result is generated according to the comparison result, and finally, the arbitration result is generated into a block and is placed at the tail end of the arbitration chain. A flow chart of the data arbitration process based on the arbitration mechanism is shown in fig. 5;
the method for judging whether the arbitration committee needs to be recombined according to the arbitration valid time is to judge the arbitration committee member for arbitration next according to the arbitration position sequence
Waiting for the arbitration committee member to generate an arbitration result within the arbitration valid time; if the arbitration committee member fails to generate the arbitration result, selecting the next arbitration committee member according to the arbitration position sequence
Carrying out arbitration; if the arbitration committee member does not generate the arbitration result within the arbitration valid time, the arbitration committee is required to be generated again according to the step 4);
7) paying an arbitration fee based on the smart contract: after the arbitration process is finished, the intelligent contract autonomously pays the arbitration cost; if the arbitration result is that the data is true and credible, an arbitration initiator, namely a data requester, provides arbitration cost and returns the arbitration cost of a data provider; if the arbitration result is that the data is false data, the data provider provides arbitration cost, and the arbitration cost of the data requester is returned, so that automatic arbitration cost payment based on the intelligent contract is realized. The arbitration fee payment method based on the smart contract is shown in fig. 6.