CN110460536A - For the data processing method and device of block chain, medium and electronic equipment - Google Patents

For the data processing method and device of block chain, medium and electronic equipment Download PDF

Info

Publication number
CN110460536A
CN110460536A CN201910789386.1A CN201910789386A CN110460536A CN 110460536 A CN110460536 A CN 110460536A CN 201910789386 A CN201910789386 A CN 201910789386A CN 110460536 A CN110460536 A CN 110460536A
Authority
CN
China
Prior art keywords
message
node
preparation
signature
verification information
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
CN201910789386.1A
Other languages
Chinese (zh)
Other versions
CN110460536B (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910789386.1A priority Critical patent/CN110460536B/en
Publication of CN110460536A publication Critical patent/CN110460536A/en
Application granted granted Critical
Publication of CN110460536B publication Critical patent/CN110460536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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

Abstract

This specification provides data processing method and device, medium and the electronic equipment for being used for block chain, and data processing method includes: to generate pre-preparation verification information according to preparation message;In the case where determining that quantity of the quantity of pre-preparation verification information for 2f+a and pre-preparation verification information identical with itself pre-preparation check information of storage is greater than f, generates second and return to message, so that host node generates common recognition message;Prepare verification information according to common recognition message generation, and determines the quantity of preparation verification information for 2f+b and in the case that the quantity for preparing verification information identical with itself preparation check information of storage is greater than f, the service request that execution is obtained from client.It is aforementioned to make the communication complexity of distributed network be maintained at O (n) order of magnitude from node;When distributed network node quantity increases significantly, communication complexity only linear increase.

Description

For the data processing method and device of block chain, medium and electronic equipment
Technical field
This specification is related to distributed system data transmission and processing technical field, specifically designs a kind of number for block chain According to treating method and apparatus, and stores the medium of preceding method and realize the electronic equipment of preceding method.
Background technique
In the distributed system with Byzantium's problem, need to make each node to network state by common recognition mechanism Reach an agreement, the service request then initiated client is handled.Currently, practical Byzantine failure tolerance algorithm (Practical Byzantine Fault Tolerance, PBFT) it has been applied in alliance's chain of some network node quantity.
Because each node in PBFT algorithm is after the message for receiving other N-1 node broadcasts, it is also necessary to Xiang Qi His N-1 node broadcasts message, therefore communication complexity is O (n2) (wherein, n=N-1).It is contemplated that if using PBFT Algorithm realizes that node is reached common understanding, and as the quantity of node increases, the communication complexity of entire distributed network can be steeply risen; In order to meet usability requirements, need strictly to limit the quantity of distributed network interior joint, be unable to satisfy in practical application to point The demand of cloth network capacity extension increase number of nodes.
Summary of the invention
The electronics of this specification offer data processing method and device below, medium and configuration for executing data processing is set It is standby.
In a first aspect, this specification provides a kind of data processing method, it is described applied to the slave node in distributed network Method includes:
Pre-preparation verification information is obtained according to message is prepared;Wherein, the preparation message is a not according to 2f+a by host node Message is returned to first sent from node to generate;It is described first return message include it is corresponding from node according to pre-preparation message The pre-preparation check information of generation and the first signature;N be the distributed network number of nodes, 1 ≤a≤f;
Whether the quantity for judging pre-preparation verification information is 2f+a, and identical with itself pre-preparation check information of storage Whether the quantity of pre-preparation verification information is greater than f;If so, generating second returns to message, and sends second to host node and return and disappear Breath;Wherein, the second return message includes the preparation check information and the second signature generated according to the preparation message;1≤b ≤f;
It is generated according to common recognition message and prepares verification information;Wherein, the common recognition message is by host node according to 2f+b second Message is returned to generate;
Judge to prepare whether the quantity of verification information is 2f+b, and preparation identical with itself preparation check information of storage Whether the quantity of verification information is greater than f;If so, executing the service request obtained from client.
Optionally, the preparation message includes the first multi-signature and the first number collection;First multi-signature is by leading Node returns to message according to 2f+a different first sent from node and generates;The first number collection is by host node according to 2f+a A number for sending the slave node that first returns to message generates;
It is described that pre-preparation verification information is obtained according to preparation message, comprising:
According to the node serial number that first number is concentrated, first is multiple described in the public key decryptions for selecting corresponding node to number Signature generates pre-preparation verification information.
Optionally, the common recognition message includes the second multi-signature and the second number collection;Second multi-signature is by leading Node returns to message according to 2f+b different second sent from node and generates;The second number collection is by host node according to 2f+b A number for sending the slave node that second returns to message generates;
Described obtained according to preparation message prepares verification information, comprising:
According to the node serial number that second number is concentrated, second is multiple described in the public key decryptions for selecting corresponding node to number Signature generates pre-preparation verification information.
Optionally, preceding method further include:
If the quantity that judgement prepares verification information is less than 2f+b, host node switching is initiated.
Optionally, preceding method further include:
If judging, the quantity of pre-preparation verification information is less than 2f+a, initiates host node switching.
On the other hand, this specification provides another data processing method, applied to the host node of distributed network, institute The method of stating includes:
It returns to message according to the 2f+a received first and generates and prepare message, and disappear to from preparation described in node broadcasts Breath, so that generating second from node returns to message;Wherein, the first return message includes that correspondence disappears from node according to pre-preparation Cease the pre-preparation check information generated and the first signature;N is the number of nodes of the distributed network, 1≤a≤f;
Message is returned according to the 2f+b received second and generates common recognition message, and is disappeared to from common recognition described in node broadcasts Breath prepares verification information so as to generate from node;Wherein, 1≤b≤f, described second return message include it is corresponding from node according to Prepare the preparation check information and the second signature that message generates.
Optionally, the basis receives 2f+a first, which returns to message and generate, prepares message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+a received described first and generates the first multi-signature, And number generation the first number collection for the slave node that described first returns to message is sent according to 2f+a;The preparation message Including first multi-signature and the first number collection.
Optionally, the basis receives 2f+b second returns to message and generates common recognition message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+b received described second and generates the second multi-signature, And number generation the second number collection for the slave node that described second returns to message is sent according to 2f+b;The common recognition message Including second multi-signature and the second number collection.
Optionally, the multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
In another aspect, this specification provides another data processing method, it is applied to distributed network, the distribution Network includes host node and from node;The described method includes:
Host node returns to message and generate according to the 2f+a received first prepares message, and to from standard described in node broadcasts Standby message;Wherein, the first return message includes the corresponding pre-preparation check information generated from node according to pre-preparation message, And first signature;N is the number of nodes of the distributed network, 1≤a≤f;
Pre-preparation verification information is obtained from node according to message is prepared;
Whether the quantity that pre-preparation verification information is judged from node is 2f+a, and the pre-preparation check information with itself storage Whether the quantity of identical pre-preparation verification information is greater than f;If so, generating second returns to message, and second is sent to host node Return to message;Wherein, the second return message includes the preparation check information and the second label generated according to the preparation message Name;
Host node returns to message according to the 2f+b received second and generates common recognition message, and to from described in node broadcasts altogether Know message;Wherein, 1≤b≤f;
It is generated from node according to common recognition message and prepares verification information;
Judge to prepare whether the quantity of verification information is 2f+b from node, and identical as itself preparation check information of storage The quantity of preparation verification information whether be greater than f;If so, executing the service request obtained from client.
Optionally, the host node returns to message and generate according to the 2f+a received first prepares message, comprising: uses Multi-signature algorithm returns to message according to the 2f+a received described first and generates the first multi-signature, and, according to 2f+a A number for sending the slave node that described first returns to message generates the first number collection;The preparation message includes more than described first Signature and the first number collection again;
It is described to obtain pre-preparation verification information according to message is prepared from node, comprising: to be concentrated according to first number Node serial number selects the first multi-signature described in the public key decryptions of corresponding node number, generates pre-preparation verification information;And/or
The host node returns to message according to the 2f+b received second and generates common recognition message, comprising: uses multiple label Name algorithm returns to message according to the 2f+b received described second and generates the second multi-signature, and, it is sent according to 2f+b Described second number for returning to the slave node of message generates the second number collection;The common recognition message includes second multi-signature With the second number collection;
Described generated from node according to common recognition message prepares verification information, comprising: the section concentrated according to second number Point number, selects the second multi-signature described in the public key decryptions of corresponding node number, generates and prepares verification information.
Optionally, the multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
Optionally, preceding method further include:
If judging that the quantity for preparing verification information is less than 2f+b from node, host node switching is initiated.
Optionally, preceding method further include:
If judging, the quantity of pre-preparation verification information is less than 2f+a, initiates host node switching.
This specification provides a data processing equipment, and described device includes:
Pre-preparation verification information generation unit, for obtaining pre-preparation verification information according to preparation message;Wherein, the standard Standby message returns to message according to 2f+a different first sent from node by host node and generates;Described first, which returns to message, includes The corresponding pre-preparation check information and the first signature generated from node according to pre-preparation message;N is The number of nodes of the distributed network, 1≤a≤f;
First judging unit, for judging whether the quantity of pre-preparation verification information is 2f+a, and it is pre- with itself storage Whether the quantity for preparing the identical pre-preparation verification information of check information is greater than f;
First execution unit is 2f+a for the quantity in pre-preparation verification information, and pre- with storing from node itself Prepare the identical pre-preparation verification information of check information quantity be greater than f in the case where, generate second and return to message, and to main section Point sends second and returns to message;Wherein, the second return message includes the preparation check information generated according to the preparation message, with And second signature;1≤b≤f;
Prepare verification information generation unit, prepares verification information for generating according to common recognition message;Wherein, the common recognition disappears Breath returns to message according to 2f+b second by host node and generates;
Second judgment unit prepares whether the quantity of verification information is 2f+b for judging, and the preparation with itself storage Whether the identical quantity for preparing verification information of check information is greater than f;
Second execution unit for being 2f+b in the quantity for preparing verification information, and verifies with the preparation of itself storage and believes The identical quantity for preparing verification information is ceased greater than in the case where f, executes the service request obtained from client.
Optionally, the preparation message includes the first multi-signature and the first number collection;First multi-signature is by leading Node returns to message according to 2f+a different first sent from node and generates;The first number collection is by host node according to 2f+a A number for sending the slave node that first returns to message generates;
It is described that pre-preparation verification information is obtained according to preparation message, comprising:
According to the node serial number that first number is concentrated, first is multiple described in the public key decryptions for selecting corresponding node to number Signature generates pre-preparation verification information.
Optionally, the common recognition message includes the second multi-signature and the second number collection;Second multi-signature is by leading Node returns to message according to 2f+b different second sent from node and generates;The second number collection is by host node according to 2f+b A number for sending the slave node that second returns to message generates;
Described obtained according to preparation message prepares verification information, comprising:
According to the node serial number that second number is concentrated, second is multiple described in the public key decryptions for selecting corresponding node to number Signature generates pre-preparation verification information.
Optionally, first execution unit is used in the case where the quantity of pre-preparation verification information is less than 2f+a, hair Play host node switching.
Optionally, second execution unit is used to initiate in the case where the quantity for preparing verification information is less than 2f+b Host node switching.
This specification provides a kind of data processing equipment, and described device includes:
First generation unit prepares message for returning to message according to 2f+a first received and generating, and Xiang Congjie Point broadcasts the preparation message, so that generating second from node returns to message;Wherein, described first return message include it is corresponding from The pre-preparation check information and the first signature that node is generated according to pre-preparation message;N is the distribution The number of nodes of formula network, 1≤a≤f;
Second generation unit generates common recognition message, and Xiang Congjie for returning to message according to 2f+b second received Point broadcasts the common recognition message, prepares verification information so as to generate from node;Wherein, 1≤b≤f, described second returns to message package Include the corresponding preparation check information and the second signature generated from node according to preparation message.
Optionally, the basis receives 2f+a first, which returns to message and generate, prepares message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+a received described first and generates the first multi-signature, And number generation the first number collection for the slave node that described first returns to message is sent according to 2f+a;The preparation message Including first multi-signature and the first number collection.
Optionally, the basis receives 2f+b second returns to message and generates common recognition message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+b received described second and generates the second multi-signature, And number generation the second number collection for the slave node that described second returns to message is sent according to 2f+b;The common recognition message Including second multi-signature and the second number collection.
Optionally, the multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
This specification provides a kind of data processing equipment, and the data processing equipment includes host node and from node,
Host node returns to message and generate according to the 2f+a received first prepares message, and to from standard described in node broadcasts Standby message;Wherein, the first return message includes the corresponding pre-preparation check information generated from node according to pre-preparation message, And first signature;N is the number of nodes of the distributed network, 1≤a≤f;
Pre-preparation verification information is obtained from node according to message is prepared;
From node judge the quantity of pre-preparation verification information for 2f+a, and with itself storage pre-preparation check information phase In the case that the quantity of same pre-preparation verification information is greater than f, generates second and return to message, and send the second return to host node Message;Wherein, the second return message includes the preparation check information and the second signature generated according to the preparation message;
Host node returns to message according to the 2f+b received second and generates common recognition message, and to from described in node broadcasts altogether Know message;Wherein, 1≤b≤f;
It is generated from node according to common recognition message and prepares verification information;
From node in the quantity for judging preparation verification information for 2f+b, and it is identical with itself preparation check information of storage Prepare the quantity of verification information greater than in the case where f, executes the service request obtained from client.
Optionally, the host node returns to message and generate according to the 2f+a received first prepares message, comprising: uses Multi-signature algorithm returns to message according to the 2f+a received described first and generates the first multi-signature, and, according to 2f+a A number for sending the slave node that described first returns to message generates the first number collection;The preparation message includes more than described first Signature and the first number collection again;
It is described to obtain pre-preparation verification information according to message is prepared from node, comprising: to be concentrated according to first number Node serial number selects the first multi-signature described in the public key decryptions of corresponding node number, generates pre-preparation verification information;And/or
The host node returns to message according to the 2f+b received second and generates common recognition message, comprising: uses multiple label Name algorithm returns to message according to the 2f+b received described second and generates the second multi-signature, and, it is sent according to 2f+b Described second number for returning to the slave node of message generates the second number collection;The common recognition message includes second multi-signature With the second number collection;
Described generated from node according to common recognition message prepares verification information, comprising: the section concentrated according to second number Point number, selects the second multi-signature described in the public key decryptions of corresponding node number, generates and prepares verification information.
Optionally, the multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
Optionally, the system also includes: from node determine prepare verification information quantity be less than 2f+b in the case where, Initiate host node switching.
Optionally, the system also includes: from node determine pre-preparation verification information quantity be less than 2f+a the case where Under, initiate host node switching.
This specification provides a kind of medium, and the storage medium is stored with a plurality of instruction, and described instruction is suitable for by handling Device loads and executes foregoing data processing method.
This specification provides a kind of electronic equipment, including memory and processor;The memory is stored with a plurality of instruction; Described instruction is suitable for being loaded by the processor and executing foregoing data processing method.
This Shen specification provide aforementioned data processing method, from node, host node and data processing system at runtime, Host node to from node send pre-preparation message perhaps prepares after message only to generate from node corresponding first return message or Second returns to message, and the first return message or the second return message are returned to host node;Therefore, the communication of whole network is multiple Miscellaneous degree is maintained at O (n) order of magnitude;When distributed network node quantity increases significantly, communication complexity only linear increase.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of distributed network;
Fig. 2 is the data processing method overall schematic that embodiment one provides;
Fig. 3 is the interaction diagrams for the data processing method that embodiment one provides;
Fig. 4 is the data processing method flow chart that embodiment two provides;
Fig. 5 is the data processing method flow chart that embodiment three provides;
Fig. 6 is the structural schematic diagram for the data processing equipment that example IV provides;
Fig. 7 is the structural schematic diagram for the data processing equipment that embodiment five provides;
Fig. 8 is the structural schematic diagram for the electronic equipment that embodiment seven provides;
Wherein: 11- pre-preparation verification information generation unit, the first judging unit of 12-, the first execution unit of 13-, 14- are quasi- Standby verification information generation unit, 15- second judgment unit, the second execution unit of 16-;The first generation unit of 21-, 22- second are raw At unit;31- central processing unit, 32- memory, 33- communication module, 34- power supply, 35- output block, 36- input part.
Specific embodiment
This specification is described in further detail with reference to the accompanying drawings and examples.It is understood that this place The specific embodiment of description is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that being Convenient for description, part relevant to related invention is illustrated only in attached drawing.
Before the specific embodiment that description this specification provides, simple Jie is done to the structure of distributed network first It continues.Fig. 1 is the structural schematic diagram of distributed network.As shown in Figure 1, distributed network includes multiple nodes and client;In order to Realize that multiple network nodes are capable of forming common recognition, each network node becomes the main section in network by certain competition mechanism Point;Then, it is realized by host node and between node or from node and from the various verifying message of the transmission between node Whole network is reached common understanding.
It is only guaranteed according to the mathematical proof of Byzantium's problem it is found that in the distributed network that a node total number is N In the case where N >=3f+1 (f is the quantity of node of doing evil), whole network is likely to be likely to reach by Byzantine failure tolerance algorithm Common recognition;Therefore, the premise that following embodiment can be realized is: determining the quantity of the node of at most doing evil in whole network
In addition, another premise that each node can reach common understanding in distributed network is: it is non-right that node uses Claim Encryption Algorithm.The node of message is initiated using private key to the information signature of initiation, receive message node can using pair The public key answered authenticates signature, and whether verifying message is to be tampered.
Embodiment one
Fig. 2 is the overall schematic of flow chart of data processing in the distributed network of the offer of embodiment one;Fig. 3 is embodiment one The interaction diagrams of data processing method in the distributed network of offer.Hereinafter, this specification is implemented in conjunction with Fig. 2 and Fig. 3 Specific implementation process is analyzed;Method provided in this embodiment includes step S101-S111.
S101: client generates request message and broadcast request message.
Request stage in step S101 corresponding diagram 2.
After client initiates a service request, client broadcast request message into distributed network, so that distributed Each enabled node (being connected to the network normal node) in network can receive request message.
In practical application, there may be multiple client in distributed network, business, which may occur, for each client is asked It asks, and each client may initiate more service requests within a shorter time, to distinguish different clients not With the request message issued constantly, the content in request message includes: service request, timestamp, client id, signature.
S102: host node generates pre-preparation message according to request message, and broadcasts pre-preparation message.
The left-half in " pre-preparation stage " in step S102 corresponding diagram 2.
Herein, host node is to be selected in distributed network according to the rules of competition, can exercise number in a period of time According to transfer, the node of specific data polymerization systematic function.
In one embodiment, calculation formula p=v mod can be used | N | which node in distributed network determined As host node;Wherein: v is view number, and p is the number of the formation host node obtained, and N is all nodes in distributed network Number.In other embodiments, host node can also be selected using other rules of competition known in the art.It should be noted that In the case where no pass through from node verification, not can confirm that whether host node is non-node of doing evil.
Herein, in order to realize the explanation to this embodiment scheme, it is assumed that host node is a non-node of doing evil, to this programme Whole process do an introduction;In addition, considering further that host node is the processing stream of node of doing evil in certain steps and then discussing Journey.
Host node receives the request message of client transmission, and after the signature of checking request message, according to request message In service request generate pre-preparation message.
In a possible embodiment, such as in the aforementioned embodiment for determining host node using view number, pre- standard The content of standby message includes: view number, current request number, message digest and signature.
Wherein, current request number, which is one that host node is current request distribution, can cooperate with view number, realize The pre-preparation message number that uniqueness identifies in distributed network.
Message digest is the check information that host node is generated according to the service request in request message, so that from node Whether the pre-preparation message that can be initiated host node, which corresponds to correct request message, verifies, and then whether verifies host node For host node of doing evil.
In some practical applications, request abstract can turn the request content in request message using hash algorithm It changes, generating a cryptographic Hash is as request abstract.In some applications, if the field of request message is smaller, can also will before The request message stated is as request abstract.Certainly, in some other embodiment, it also can use the generation of other verification methods and ask Seek eap-message digest.
Other the nodes whether signature in pre-preparation message is removed host node for verifying pre-preparation message are distorted, or Whether be other nodes forge pre-preparation message.
S103: generating first according to the request message and pre-preparation message that receive from node and return to message, and to main section Point sends first and returns to message.
The right half part in " pre-preparation stage " in step S103 corresponding diagram 2.In this specification embodiment, may be from node It is non-to do evil from node, it is also possible to do evil from node.
It is non-do evil receive pre-preparation message from node after, pass through signature verification pre-preparation message and the corresponding public affairs of host node Whether key verifying pre-preparation message is tampered;It is non-to do evil from node according to after verifying pre-preparation message is not tampered with The request message received verifies the message digest in pre-preparation message, determines that the request in pre-preparation message disappears Whether breath abstract generates according to request message;In the case where determining message digest is generated according to request message, non-work It dislikes from node according to pre-preparation message and generates pre-preparation check information, and generate signature, by pre-preparation check information and signature shape Message is returned at first.Namely first return message includes pre-preparation check information and signature, and signature above-mentioned is for verifying Whether the first return message is tampered.
It should be noted that all non-pre-preparation check informations that first generated from node returns in message of doing evil are all the same.
It includes following several possible for doing evil from the operation of node: (1) it does evil from node receive pre-preparation message after, and Pre-preparation message is not handled, does not also generate pre-preparation check information;(2) it does evil from node in verifying pre-preparation message Afterwards, pre-preparation check information is generated not according to pre-preparation message, but generates a wrong pre-preparation check information;With Afterwards, it does evil and also generates signature from node, and form first and return to message;(3) in some cases, it does evil and does not exist from node This step is done evil, but is generated non-first generated from node of doing evil such as and returned to message.
Certainly, in practical application, in the case where largely a large amount of first return message are not compared, and can not be true That fixed first return message is to be generated by doing evil from node.
S104: it is quasi- that host node returns to message generation after receiving 2f+1 first return message, according to 2f+1 first Standby message, and prepare message to from node broadcasts.
" preparation stage " left-half in step S104 corresponding diagram 2.Wherein
Host node is after receiving the first return message that 2f+1 are sent by difference from node, it can by each first It returns to message to be integrated, generates and prepare message.
Host node be it is non-do evil node in the case where, host node will not generate prepare message process to according to first The preparation message that message generates is returned to be distorted.
In the case where host node is to do evil node, host node may return to the preparation message that message generates to according to first It is distorted.
In practical application, host node returns to message according to first and generates the method for preparing message including at least following two.
A. 2f+1 first return message is directly incorporated into a tables of data by host node, is generated and is prepared message;At this point, If host node distorts preparation message, be to be stored in prepare to return in message, originally with first the identical content of message into Row is distorted.
B. the signature that host node returns in message according to 2f+1 first generates the first multi-signature, multiple by generating first The first of signature returns to corresponding the first number of the node serial number write-in collection of message, and multi-signature and the first number collection are written to Prepare in message.Wherein, which the first number collection uses from the corresponding public affairs of node for being informed in a subsequent step from node Multi-signature is decrypted in key.
If host node is node of doing evil, distorting the mode for preparing message has: multi-signature content is distorted, It may be that the number concentrated to the first number is distorted.
In specific embodiment, host node can form more first multi-signatures using EC-Schnorr algorithm, can also adopt The first multi-signature is formed with other algorithms known in the art.In addition, first compiles in order to simplify the data volume of the first number collection Number integrate to be the data set of Bitmap form.
S105: pre-preparation verification information is generated from node according to message is prepared.
The right half part of " preparation stage " in step S105 corresponding diagram 2.
According in abovementioned steps S104 host node formed prepare message method, it is non-do evil from node according to prepare message and There are two ways to obtaining pre-preparation verification information.
C. for a method in S104, each public key from node to form the first return message is directlyed adopt from node, Verifying prepares whether each first return message in message is tampered;In the case where the first return message is not tampered with, Using the pre-preparation check information in corresponding first return message as pre-preparation verification information.
D. for the b method in S104, the slave node serial number concentrated from node according to the first number is selected each from node Corresponding public key verifications multi-signature.In the case where verifying multi-signature passes through, obtains 2f+1 pre-preparation check information and make For pre-preparation verification information;And in the case where that can not be verified, i.e., it can not obtain pre-preparation verification information.
And do evil from node after obtaining preparation message, possible operation has: (1) according to the aforementioned non-side done evil from node Formula is operated;(2) standby message is misaligned to be handled.
It should be noted that in practical application, in order to be sent when guaranteeing the preparation message received from node by host node: S104 Host node can sign after generating preparation message to message is prepared, and prepare message by main section from node by signature verification Point sends and just executes S105 after being not tampered with.
S106: judge whether to generate 2f+1 pre-preparation verification information from node, and verified with the pre-preparation of itself storage Whether the quantity of the identical pre-preparation verification information of information is greater than f;If so, executing step S107.
The right half part of " preparation stage " in step S106 corresponding diagram 2.
Wherein, judge whether obtain 2f+1 pre-preparation verification information, for determine host node whether generate preparation disappear Breath is distorted;If obtaining 2f+1 pre-preparation verification information, it is determined that host node is not aligned with standby message and is distorted, In This step can trust host node;2f+1 pre-preparation verification information is less than if obtained, it is determined that host node is to preparation message It is distorted, host node is node of doing evil.
Judge whether the quantity of pre-preparation verification information identical with itself pre-preparation check information of storage is greater than f, is The principle that the minority is subordinate to the majority whether has been deferred to from node for judging most of, it is determined whether is had and most of is accepted from node The pre-preparation message that host node issues.If the number of pre-preparation verification information identical with itself pre-preparation check information of storage Amount is greater than f, it is determined that most of that the pre-preparation message that host node issues has been accepted from node;If on the contrary, if may verify that out The node of doing evil of the node of distributed network may be excessive, can not reach common understanding.
It should be noted that non-do evil centainly executes step S106 from node;And it is not expectable from the behavior of node to do evil, S106 may be executed on the basis of executing step S105, it is also possible to not execute S106.
S107: the second return message is generated from node according to message is prepared, and sends first to host node and returns to message.
The right half part of " preparation stage " in step S107 corresponding diagram 2.
In step s 107, non-do evil generates preparation check information from node according to message is prepared, and generates signature, will be quasi- Standby check information and signature form second and return to message.Namely second, which returns to message, includes preparation check information and signature, preceding The signature stated is for verifying whether the second return message is tampered.
It should be noted that all non-preparation check informations that second generated from node returns in message of doing evil are all the same.
It includes following several possible for doing evil from the operation of node: (1) doing evil from node after receiving preparation message, not It handles message is prepared, does not also generate preparation check information;(2) it does evil from node after verifying prepares message, not root Preparation check information is generated according to message is prepared, but generates a wrong preparation check information;Then, it does evil and is also given birth to from node At signature, and forms second and return to message;(3) in some cases, it does evil and does not do evil from node in this step, but it is raw Cheng Rufei, which does evil, returns to message from the second of node generation.
Certainly, in practical application, in the case where largely a large amount of second return message are not compared, and can not be true That fixed first return message is to be generated by doing evil from node.
S108: host node generates common recognition message after receiving 2f+1 second return message, and is total to from node broadcasts Know message.
The common recognition stage in step S108 corresponding diagram 2.
Host node is after receiving the second return message that 2f+1 are sent by difference from node, it can by each second It returns to message to be integrated, generates common recognition message.
Host node be it is non-do evil node in the case where, host node will not generate common recognition message process to according to second The preparation message that message generates is returned to be distorted.In the case where host node is to do evil node, host node may be to according to the The common recognition message that two return message generate is distorted.
In practical application, host node returns to the method that message generates common recognition message according to second and includes at least following two.
E. 2f+1 second return message is directly incorporated into a tables of data by host node, generates common recognition message;At this point, If host node distorts common recognition message, be to be stored in common recognition message, return originally with second the identical content of message into Row is distorted.
F. the signature that host node returns in message according to 2f+1 second generates the second multi-signature, multiple by generating second The second of signature returns to corresponding the second number of the node serial number write-in collection of message, and the second multi-signature and the second number collection are write Enter into common recognition message.Wherein, the second number collection is corresponding from node using which from node for informing in a subsequent step Public key the second multi-signature is verified.
If host node is node of doing evil, distorting the mode for preparing message has: usurping to the second multi-signature content Change, it is also possible to which the number concentrated to the second number is distorted.
In specific embodiment, host node can form more second multi-signatures using EC-Schnorr algorithm, can also adopt The second multi-signature is formed with other algorithms known in the art.In addition, second compiles in order to simplify the data volume of the second number collection Number integrate to be the data set of Bitmap form.
S109: it is generated from node according to common recognition message and prepares verification information.
In step S109 corresponding diagram 2 " recovery stage ".
Built consensus the method for message according to host node in abovementioned steps S108, non-do evil from node according to common recognition message and Obtain there are two ways to preparing verification information.
G. for the e method in S108, each public key from node to form the second return message is directlyed adopt from node, Whether each second return message in verifying common recognition message is tampered;In the case where the second return message is not tampered with, Using the preparation check information in corresponding second return message as preparation verification information.
D. for the f method in S108, the slave node serial number concentrated from node according to the second number is selected each from node Corresponding the second multi-signature of public key verifications.In the case where the second multi-signature of verifying passes through, 2f+1 preparation verification is obtained Information is as preparation verification information;And in the case where that can not be verified, i.e., it can not obtain preparation verification information.
And do evil from node after obtaining common recognition message, possible operation has: (1) according to the aforementioned non-side done evil from node Formula is operated;(2) common recognition message is not handled.
It should be noted that in practical application, in order to be sent when guaranteeing the common recognition message received from node by host node: S109 Host node can sign to common recognition message after generating common recognition message, know together message by main section from node by signature verification Point sends and just executes S109 after being not tampered with.
S110: judge whether to generate 2f+1 preparation verification information, and the preparation check information with itself storage from node Whether the identical quantity for preparing verification information is greater than f;If so, executing step S111.
In step S110 corresponding diagram 2 " recovery stage ".
Wherein, judge whether to obtain 2f+1 preparation verification information, for determining whether host node is generating message of knowing together It is distorted;If obtaining 2f+1 preparation verification information, it is determined that host node does not distort common recognition message, walks herein Suddenly it can trust host node;2f+1 preparation verification information is less than if obtained, it is determined that host node usurps common recognition message Change, host node is node of doing evil.
Judge whether the quantity for preparing verification information identical with itself preparation check information of storage is greater than f, is to be used for Judge whether most of to there is known from node: most of message for having accepted the pre-preparation message that host node issues from node.Such as The identical quantity for preparing verification information of what fruit stored with itself prepare check information is greater than f, it is determined that it is most of from node Cicada: most of message that the pre-preparation message that host node issues has been accepted from node;If on the contrary, if may verify that out and be distributed The node of doing evil of the node of formula network may be excessive, can not reach common understanding.
It should be noted that non-do evil centainly executes step S110 from node;And it is not expectable from the behavior of node to do evil, S110 may be executed on the basis of executing step S109, it is also possible to not execute S110.
S111: the service request in request message is executed from node.
In step S111 corresponding diagram 2 " recovery stage ".In concrete application, what the slave node of each processing business request generated Processing result is sent to corresponding client.
Through analysis above-mentioned it is found that in the distributed network that this specification embodiment provides:
(1) in request stage, the communication complexity of client executing step S101 is O (N).
(2) in the pre-preparation stage, the communication complexity that host node executes step S102 is O (N), each to execute step from node The communication complexity of rapid S103 is O (1), and N-1 execute the communication complexity of step S103 from node as O (N);So pre- standard The communication complexity in standby stage is O (2N).
(3) in the preparation stage, the communication complexity that host node executes step 104 is O (N), each to execute step from node The communication complexity of S107 is also (1) O, and N-1 execute the communication complexity of step S107 from node as O (N);So preparing rank The communication complexity of section is O (2N).
(4) it knows together the stage, the communication complexity that host node executes step S108 is O (N).
(5) recovery stage, executing the maximum communication complexity of step S110 from node is O (N)
In conjunction with (1)-(5) it is found that in this specification embodiment, after client initial request messages, distributed network The middle communication complexity for executing a service request is O (6N).
When number of nodes increases, linear increase is only presented in the communication complexity of whole network, without such as PBFT algorithm In communication complexity reach O (N2) the order of magnitude.The method that i.e. this specification embodiment provides is realized compared to BPFT algorithm The power series of communication complexity reduce.In practical applications, distributed network increases significantly number of nodes, whole network immediately Communication complexity also only be realize linear increase;Therefore, with extensive number of nodes, distributed network Communication is still achievable.
In abovementioned steps S106, judge whether to obtain 2f+1 pre-preparation verification information from node, and store with itself The quantity of the identical pre-preparation verification information of pre-preparation check information whether be greater than f, if so, executing S107.And if not having 2f+1 pre-preparation verification information is obtained, then proves that host node is usurped during generating according to the first return message and preparing message Data are changed, it is possible to which it is node of doing evil that verifying, which obtains host node, without regarding as non-node of doing evil again, therefore executes step S112。
S112: from node triggering host node switching.
From node triggering host node switching, a host node is reselected to trigger distributed network.In concrete application, from Node, which initiates host node switching request, can be initiation view switching request, to select new host node by view switching.In In other concrete applications, host node switching can also be realized by initiating other kinds of request.
It should be noted that non-do evil can centainly trigger host node switching from node, and doing evil can from node in practical application Host node switching can not triggered.
It is similar with section above, in step s 110, judge whether to obtain 2f+1 preparation verification information from node, and with Whether the identical quantity for preparing verification information of the preparation check information of itself storage is greater than f, if so, executing S111;If not yet Have and obtain 2f+1 preparation verification information, then proves host node during returning to message generation preparation message according to second Data are distorted, it is possible to which it is node of doing evil that verifying, which obtains host node, without regarding as non-node of doing evil again, therefore executes step Rapid S112.
In abovementioned steps S104, host node generates after receiving 2f+1 first return message and prepares message;In step S106 must obtain 2f+1 pre-preparation verification information from node and be likely to execute S107;In other embodiments, aforementioned first Returning to message may be 2f+a, corresponding, and verifying obtains 2f+a pre-preparation verification information in step S106, wherein 1 < a ≤f。
Similar, in abovementioned steps S108 and S110, the second return message number may be 2f+b, step S110 Middle verifying obtains 2f+b preparation verification information, wherein 1 < b≤f.
Embodiment two
The method of data processing method, applies the slave section in distributed network in the distributed network that embodiment two provides Point in.Fig. 4 is data processing method flow chart in the distributed network of the offer of embodiment two;As shown in figure 4, embodiment two provides Method include step S210-S210.
S201: first is generated according to the request message and pre-preparation message received and returns to message, and is sent to host node First returns to message.
Request message is by client broadcast comprising the content of service request;Request message is for triggering each section Whether point reaches the common recognition for executing service request, and then whether executes service request.
Pre-preparation message is to be generated by host node according to request message, and be broadcast to each from node.Pre-preparation message can To include [view number, current request number, message digest, signature], wherein message digest is used for so that from section Whether the pre-preparation message that point verifying host node is initiated, which corresponds to correct request message, is verified, and then whether verifies host node For node of doing evil;Whether other nodes whether signature is removed host node for verifying pre-preparation message are distorted, or be other The pre-preparation message that node is forged.
The slave node for executing step S201 may be non-malicious from node, it is also possible to maliciously from node;To this this implementation Example does not make special limit.
It is non-do evil receive pre-preparation message from node after, pass through signature verification pre-preparation message and the corresponding public affairs of host node Whether key verifying pre-preparation message is tampered;It is non-to do evil from node according to after verifying pre-preparation message is not tampered with The request message received verifies the message digest in pre-preparation message, determines that the request in pre-preparation message disappears Whether breath abstract generates according to request message;In the case where determining message digest is generated according to request message, non-work It dislikes from node according to pre-preparation message and generates pre-preparation check information, and generate signature, by pre-preparation check information and signature shape Message is returned at first.Namely first return message includes pre-preparation check information and signature, and signature above-mentioned is for verifying Whether the first return message is tampered.
Step S201 is executed if it is the slave node done evil, is done evil from node after verifying pre-preparation message, not according to Pre-preparation message generates pre-preparation check information, but generates a pre-preparation check information distorted;Then, it does evil from node Also signature is generated, and forms first and returns to message.
It should be noted that all non-pre-preparation check informations that first generated from node returns in message of doing evil are all the same. In practical application, in the case where largely a large amount of first returns message are not compared, and it can not determine that first is returned Returning message is to be generated by doing evil from node.
S202: pre-preparation verification information is generated from node according to message is prepared.
Preparing message is generated after receiving 2f+a different the first return message sent from node by host node;Its In1≤a≤f。
In specific implementation, host node returns to message according to first and generates the method for preparing message including two kinds.
A. 2f+1 first return message is directly incorporated into a tables of data by host node, is generated and is prepared message;At this point, If host node distorts preparation message, be to be stored in prepare to return in message, originally with first the identical content of message into Row is distorted.
B. the signature that host node returns in message according to 2f+1 first generates the first multi-signature, multiple by generating first The first of signature returns to corresponding the first number of the node serial number write-in collection of message, and multi-signature and the first number collection are written to Prepare in message.Wherein, which the first number collection uses from the corresponding public affairs of node for being informed in a subsequent step from node Multi-signature is decrypted in key.
In specific embodiment, host node can form more first multi-signatures using EC-Schnorr algorithm, can also adopt The first multi-signature is formed with other algorithms known in the art.In addition, first compiles in order to simplify the data volume of the first number collection Number integrate to be the data set of Bitmap form.
If host node is node of doing evil, distorting the mode for preparing message has: multi-signature content is distorted, It may be that the number concentrated to the first number is distorted.
For aforementioned two methods, have following two according to the method that message obtains pre-preparation verification information is prepared from node Kind.
C. a method being directed to, each public key from node to form the first return message is directlyed adopt from node, and verifying is quasi- Whether each first return message in standby message is tampered;In the case where the first return message is not tampered with, will correspond to First return message in pre-preparation check information as pre-preparation verification information.
D. it is directed to b method, the slave node serial number concentrated from node according to the first number selects each from the corresponding public affairs of node Key verifies multi-signature.In the case where verifying multi-signature passes through, 2f+1 pre-preparation check information is obtained as pre-preparation Verification information;And in the case where that can not be verified, i.e., it can not obtain pre-preparation verification information.
S203: judge whether to generate 2f+a pre-preparation verification information;If so, executing S204;If it is not, executing S210.
Judge whether obtain 2f+a pre-preparation verification information, for determine host node whether generate preparation message when usurp Change data;If obtaining 2f+a pre-preparation verification information, it is determined that host node is not aligned with standby message and is distorted, and walks herein Suddenly it can trust host node;2f+a pre-preparation verification information is less than if obtained, it is determined that host node is generating preparation message When altered data, host node is to do evil node.
S204: judgement and the quantity of the identical pre-preparation verification information of pre-preparation check information itself stored whether be more than f;If so, executing S205;If it is not, terminating to execute.
It is whether big from the quantity of node judgement pre-preparation verification information identical with the pre-preparation check information that itself is stored It is for judging whether major part has deferred to the principle that the minority is subordinate to the majority from node in f, it is determined whether have most of from node The pre-preparation message of host node sending is accepted.If pre-preparation verifying identical with itself pre-preparation check information of storage is believed The quantity of breath is greater than f, it is determined that most of that the pre-preparation message that host node issues has been accepted from node;If on the contrary, if verify The node of doing evil of the node of distributed network may be excessive out, can not reach common understanding.
S205: the second return message is generated according to message is prepared, and sends second to host node and returns to message.
In step S205, preparation check information is generated from node according to message is prepared, and generate signature, verification letter will be prepared Breath and signature form second and return to message.Namely second returns to message including preparing check information and signature, signature above-mentioned For verifying whether the second return message is tampered.
S206: it is generated from node according to common recognition message and prepares verification information.
Common recognition message returns to message according to second that 2f+b difference is sent from node by host node and generates.
In specific implementation, it includes two kinds that host node, which returns to the method that message generates common recognition message according to second,.
E. 2f+1 second return message is directly incorporated into a tables of data by host node, generates common recognition message;At this point, If host node distorts common recognition message, be to be stored in common recognition message, return originally with second the identical content of message into Row is distorted.
F. the signature that host node returns in message according to 2f+1 second generates the second multi-signature, multiple by generating second The second of signature returns to corresponding the second number of the node serial number write-in collection of message, and the second multi-signature and the second number collection are write Enter into common recognition message.Wherein, the second number collection is corresponding from node using which from node for informing in a subsequent step Public key the second multi-signature is verified.
In specific embodiment, host node can form more second multi-signatures using EC-Schnorr algorithm, can also adopt The second multi-signature is formed with other algorithms known in the art.In addition, second compiles in order to simplify the data volume of the second number collection Number integrate to be the data set of Bitmap form.
If host node is node of doing evil, distorting the mode for preparing message has: usurping to the second multi-signature content Change, it is also possible to which the number concentrated to the second number is distorted.
Corresponding, preparing the method for verification information according to common recognition message generation from node includes following two:
For e method, each public key from node to form the second return message is directlyed adopt from node, verifying common recognition disappears Whether each second return message in breath is tampered;In the case where the second return message is not tampered with, by corresponding the The two preparation check informations for returning in message, which are used as, prepares verification information.
For f method, the slave node serial number concentrated from node according to the second number is selected each from the corresponding public key of node Verify the second multi-signature.In the case where the second multi-signature of verifying passes through, 2f+1 preparation check information is obtained as quasi- Standby verification information;And in the case where that can not be verified, i.e., it can not obtain preparation verification information.
S207: judge whether to generate 2f+b preparation verification information;If so, executing S208;If it is not, executing S210.
Judge whether obtain 2f+b preparations verification information, for determine host node whether generation common recognition message when distort Data;If obtain 2f+b preparations verification information, it is determined that host node not generation common recognition message when altered data, herein Step can trust host node;2f+b pre-preparation verification information is less than if obtained, it is determined that host node prepares to disappear in generation Altered data when breath, host node is node of doing evil, therefore executes step S210.It note that 1≤b≤f.
S208: judge the quantity for preparing verification information identical with itself preparation check information of storage whether more than f;If It is to execute S209;If it is not, terminating to execute.
Whether it is greater than f from the node judgement quantity for preparing verification information identical with the preparation check information that itself is stored, It is that there is known for judging whether most of from node: most of that disappearing for pre-preparation message that host node issues has been accepted from node Breath.If the quantity for preparing verification information identical with itself preparation check information of storage is greater than f, it is determined that most of from section Point there is known: most of message that the pre-preparation message that host node issues has been accepted from node;If on the contrary, if may verify that out The node of doing evil of the node of distributed network may be excessive, can not reach common understanding.
S209: the service request in request message is executed.
In concrete application, the processing result that the slave node of each processing business request generates is sent to corresponding client.
S210: triggering host node switching.
From node triggering host node switching, a host node is reselected to trigger distributed network.In concrete application, from Node, which initiates host node switching request, can be initiation view switching request, to select new host node by view switching.In In other concrete applications, host node switching can also be realized by initiating other kinds of request.
It is each to execute step from node by Such analysis it is found that in the distributed network that this specification embodiment provides S202-S208 process is the process for determining network node and reaching common understanding;It is each to be connect from node in step S202-S208 When receiving corresponding message (pre-preparation message prepares message) of host node broadcast, corresponding response only is returned to host node Message (first returns to message, second returns to message), rather than as in PBFT algorithm it is each broadcast from node oneself generate Message, it is possible to which the communication complexity for determining preceding method is O (N) order of magnitude.
In practical applications, distributed network increases significantly number of nodes immediately, and the communication complexity of whole network is also only It is to realize linear increase;Therefore, with extensive number of nodes, the communication of distributed network is still achievable 's.
It may include S2011-S2012 in the present embodiment step S201.
S2011: timing is initiated when from node according to the request message received.
S2012: judging whether timing time is greater than preset time, if so, executing S210;If it is not, being badly in need of waiting.
It should be it is recognised that from node according to pre-preparation message generation the first return message premise is that receiving pre- Prepare message.Preset time above-mentioned can be as the delay of maximum network authorized according to experience, distributed network.And it operates Aforementioned network delay determines that host node disappears there is no pre-preparation is sent if receiving pre-preparation message not yet from node Breath, host node is judged as node of doing evil at this time, therefore can directly initiate host node switching from node.
Embodiment three
The method that the distributed network node that embodiment three provides is reached common understanding, applies the host node in distributed network. Fig. 5 is the data processing method flow chart that embodiment three provides.As shown in figure 3, the method that embodiment three provides includes step S301-S303。
S301: pre-preparation message is generated according to the request message received, and broadcasts pre-preparation message.
Request message is by client broadcast comprising the content of service request;Request message is for triggering each section Whether point reaches the common recognition for executing service request, and then whether executes service request.In a concrete application, request disappears The content of breath may include service request, timestamp, client id and signature.Wherein timestamp and client id are for uniquely Identify request message, whether signature is tampered for checking request message content or request message is the request message forged.
Receiving request message, and after not conveying by signature verification request message, host node is asked according to business Message digest is sought survival into, and message digest is added in pre-preparation message.In a practical application, pre-preparation The content of message includes view number, current request number, message digest and signature, wherein view number and current request Number is signed for uniquely indicating pre-preparation message for verifying whether pre-preparation message is tampered.
S302: returning to message according to the 2f+a received first, generates and prepares message, and disappears to from node broadcasts preparation Breath.
First return message from node according to the pre-preparation message and request message received by generating comprising [pre- standard Standby check information, signature].And it is above-mentioned1≤a≤f。
Specifically, receiving pre-preparation message from node, and verify after pre-preparation message sends by host node, extracts pre- Prepare message in message digest, and by message digest and itself according to service request generate eap-message digest carry out It compares, determines whether the two is identical;If the two is identical, it is determined that host node is non-node of doing evil, and can be disappeared according to pre-preparation Breath generates pre-preparation check information.
After generating pre-preparation check information, corresponding signature is generated from node and forms complete first and returns to message simultaneously It is sent to host node.
Host node returns to message according to 2f+a first and generates the method for preparing message including two kinds.
A. 2f+1 first return message is directly incorporated into a tables of data by host node, is generated and is prepared message;At this point, If host node distorts preparation message, be to be stored in prepare to return in message, originally with first the identical content of message into Row is distorted.
B. the signature that host node returns in message according to 2f+1 first generates the first multi-signature, multiple by generating first The first of signature returns to corresponding the first number of the node serial number write-in collection of message, and multi-signature and the first number collection are written to Prepare in message.Wherein, which the first number collection uses from the corresponding public affairs of node for being informed in a subsequent step from node Multi-signature is decrypted in key.
In specific embodiment, host node can form more first multi-signatures using EC-Schnorr algorithm, can also adopt The first multi-signature is formed with other algorithms known in the art.In addition, first compiles in order to simplify the data volume of the first number collection Number integrate to be the data set of Bitmap form.
After generating preparation message, host node is broadcast to the slave node in network for message is prepared, so that from node energy Enough know most of pre-preparation message for having accepted host node sending from node, then generates second and return to message.
S303: message is returned according to the 2f+b received second and generates common recognition message, and broadcasts common recognition message.
Second return message from node in the case where completing following two judgement by executing: (1) determining that host node is not It is do evil node (i.e. judgement host node is not aligned with standby message data and is distorted);(2) judgement is most of accepts from node It is generated in the case where the pre-preparation message that host node is sent.
Judge whether host node is node of doing evil from node, is the pre-preparation verifying by determining to obtain according to message is prepared Whether the quantity of information is that 2f+a is realized;If the quantity of pre-preparation verification information is 2f+a, it is determined that host node is non-does evil Node;If the quantity of pre-preparation verification information is less than 2f+a, it is determined that host node is node of doing evil, and can be triggered from node Host node switching.
In concrete application, the method for preparing message is generated for host node in S302, is generated from node according to message is prepared The method of pre-preparation verification information has the following two kinds.
C. it is directed to aforementioned a method, each public key from node to form the first return message is directlyed adopt from node, is verified Whether each first return message prepared in message is tampered;It, will be right in the case where the first return message is not tampered with First answered returns to the pre-preparation check information in message as pre-preparation verification information.
D. it is directed to b method, the slave node serial number concentrated from node according to the first number selects each from the corresponding public affairs of node Key verifies multi-signature.In the case where the second multi-signature of verifying passes through, 2f+1 pre-preparation check information is obtained as pre- Prepare verification information;And verify more than second from signature can not by the case where, i.e., can not obtain pre-preparation verification information.
It is to complete host node not from the most of pre-preparation message for whether accepting host node transmission from node of node judgement It is to be carried out in the case where doing evil node.At this point, from node judgement pre-preparation identical with the pre-preparation check information that itself is stored Whether the quantity of verification information is more than f.If it is, the second return message can be generated;If it is not, then determining the work in network Disliking number of nodes is more than f, and network can not reach common understanding.
Generating second to return to message from node includes [preparing check information, signature].Wherein prepare check information according to standard Standby message generates;Also, the non-preparation check information generated from node of doing evil is identical.
Host node returns after receiving 2f+b different second sent from node and returning to message according to 2f+b second Message generates common recognition message;Wherein, 1≤b≤f.
In specific implementation, it includes two kinds that host node, which returns to the method that message generates common recognition message according to second,.
E. 2f+1 second return message is directly incorporated into a tables of data by host node, generates common recognition message;At this point, If host node distorts common recognition message, be to be stored in common recognition message, return originally with second the identical content of message into Row is distorted.
F. the signature that host node returns in message according to 2f+1 second generates the second multi-signature, multiple by generating second The second of signature returns to corresponding the second number of the node serial number write-in collection of message, and the second multi-signature and the second number collection are write Enter into common recognition message.Wherein, the second number collection is corresponding from node using which from node for informing in a subsequent step Public key the second multi-signature is verified.
In specific embodiment, host node can form more second multi-signatures using EC-Schnorr algorithm, can also adopt The second multi-signature is formed with other algorithms known in the art.In addition, second compiles in order to simplify the data volume of the second number collection Number integrate to be the data set of Bitmap form.
It should be noted that host node after generating common recognition message, is being broadcast to after adding signature to common recognition message from node.
From node after receiving common recognition message, is generated according to common recognition message and prepare verification information, and by preparing verifying The quantity and content of information judge whether to execute the service request in request message.
It is executed from node execution service request in the case where completing following two judgement: (1) determining host node not again It is do evil node (i.e. judgement host node is not aligned with standby message data and is distorted);(2) know most of from known to node: big The pre-preparation message that majority is issued from node approval host node.
Determine whether host node is node of doing evil again from node, is by determining that the preparation obtained according to common recognition message is tested Whether the quantity for demonstrate,proving information is that 2f+b is realized;If the quantity for preparing verification information is 2f+b, it is determined that host node is non-does evil Node;If the quantity for preparing verification information is less than 2f+b, it is determined that host node is node of doing evil.
The two methods that common recognition message is generated for host node generate according to formula message from node and prepare verification information Method has the following two kinds.
G. it is directed to aforementioned e method, each public key from node to form the second return message is directlyed adopt from node, is verified Whether each second return message prepared in message is tampered;It, will be right in the case where the second return message is not tampered with Second answered returns to the preparation check information in message as pre-preparation verification information.
H. it is directed to b method, the slave node serial number concentrated from node according to the second number selects each from the corresponding public affairs of node Key verifies the second multi-signature.In the case where the second multi-signature of verifying passes through, 2f+1 preparation check information conduct is obtained Prepare verification information;And verify more than second from signature can not by the case where, i.e., can not obtain preparation verification information.
Most of sides from the pre-preparation message issued from node approval host node most of known to node are determined from node Whether method is to determine the quantity for preparing verification information identical with itself preparation check information of storage more than f.
By Such analysis it is found that in this specification embodiment, step S301-S303 is that host node is true from node to cooperate Determine network node to reach common understanding, the process of service request in request message can be executed.Abovementioned steps host node realize and from In node interactive process, it is each from node in the corresponding message (pre-preparation message, prepare message) for receiving host node and broadcasting When, corresponding response message (first returns to message, the second return message) only is returned to host node, rather than such as PBFT algorithm In it is each broadcasted from node oneself generation message, it is possible to determine preceding method communication complexity be O (N) quantity Grade.
The power series that the method that i.e. this specification embodiment provides realizes communication complexity compared to BPFT algorithm reduce. In practical applications, distributed network increases significantly number of nodes immediately, and the communication complexity of whole network is also only to realize line Property increase;Therefore, with extensive number of nodes, the communication of distributed network is still achievable.
Other than providing data processing method above-mentioned, this specification is also each provided for executing side in embodiment one The data processing system of method, the main section for executing the slave node of method in embodiment two and for executing method in embodiment three Point.
Example IV
Fig. 6 is the structural schematic diagram for the data processing equipment that example IV provides.As shown in fig. 6, the number in example IV Include pre-preparation verification information generation unit 11, the first judging unit 12, the first execution unit 13 according to processing unit, prepares verifying Information generating unit 14, second judgment unit 15 and the second execution unit 16.Data processing equipment in the present embodiment is applied From node.
Pre-preparation verification information generation unit 11 is used to obtain pre-preparation verification information according to preparation message;Wherein, prepare Message returns to message according to 2f+a different first sent from node by host node and generates;First return message includes corresponding The pre-preparation check information and the first signature generated from node according to pre-preparation message;N is distribution The number of nodes of network, 1≤a≤f;
First judging unit 12 is used for judging whether the quantity of pre-preparation verification information is 2f+a, and pre- with itself storage Whether the quantity for preparing the identical pre-preparation verification information of check information is greater than f;
First execution unit 13 is used in the quantity of pre-preparation verification information be 2f+a, and pre- with storing from node itself Prepare the identical pre-preparation verification information of check information quantity be greater than f in the case where, generate second and return to message, and to main section Point sends second and returns to message;Wherein, the second return message includes the preparation check information generated according to message is prepared, Yi Ji Two signatures;1≤b≤f;
Prepare verification information generation unit 14 to be used to generate preparation verification information according to common recognition message;Wherein, common recognition message Message is returned to according to 2f+b second by host node to generate;
Whether the quantity that second judgment unit 15 is used to judge to prepare verification information is 2f+b, and the preparation with itself storage Whether the identical quantity for preparing verification information of check information is greater than f;
Second execution unit 16 is used in the quantity for preparing verification information be 2f+b, and verifies and believe with the preparation of itself storage The identical quantity for preparing verification information is ceased greater than in the case where f, executes the service request obtained from client.
The slave node that this specification embodiment provides: it after the pre-preparation message for receiving host node transmission, does not broadcast Message is returned according to first that pre-preparation message generates;After the preparation message for receiving host node transmission, basis is not broadcasted Prepare message generates second and return to message, but the first return message and the second return message are returned only to host node.Institute With the communication complexity of whole network is O (N) order of magnitude.
In practical applications, distributed network increases significantly number of nodes immediately, and the communication complexity of whole network is also only It is to realize linear increase;Therefore, with extensive number of nodes, the communication of distributed network is still achievable 's.
Aforementioned from node, pre-preparation verification information is obtained according to message is prepared, comprising: concentrate according to the first number Node serial number selects the first multi-signature of public key decryptions of corresponding node number, generates pre-preparation verification information.Prepare message package Include the first multi-signature and the first number collection;First multi-signature is by host node according to 2f+a different first sent from node Message is returned to generate;First number collection is generated by the number that host node sends the slave node that first returns to message according to 2f+a;
Aforementioned from node, preparation verification information is obtained according to message is prepared, comprising: the section concentrated according to the second number Point number, selects the second multi-signature of public key decryptions of corresponding node number, generates pre-preparation verification information.Common recognition message include Second multi-signature and the second number collection;Second multi-signature is returned by host node according to 2f+b different second sent from node Message is returned to generate;Second number collection is generated by the number that host node sends the slave node that second returns to message according to 2f+b.
Aforementioned from node, the first execution unit 13 is used for the case where the quantity of pre-preparation verification information is less than 2f+a Under, initiate host node switching;Second execution unit 16 is used to initiate in the case where the quantity for preparing verification information is less than 2f+b Host node switching.
Embodiment five
Fig. 7 is the structural schematic diagram for the data processing equipment that embodiment five provides.As shown in fig. 7, the master in embodiment five Node includes the first generation unit 21 and the second generation unit 22.Data processing equipment provided in this embodiment is applied to distribution The host node of system.
First generation unit 21, which is used to return to message according to 2f+a first received and generate, prepares message, and Xiang Congjie Point broadcast prepares message, so that generating second from node returns to message;Wherein, first return message include it is corresponding from node according to The pre-preparation check information and the first signature that pre-preparation message generates;N is the node of distributed network Quantity, 1≤a≤f;
Second generation unit 22, which is used to return to message according to 2f+b second received, generates common recognition message, and Xiang Congjie Point broadcast common recognition message, prepares verification information so as to generate from node;Wherein, 1≤b≤f, second return message include it is corresponding from Node is according to the preparation check information for preparing message generation and the second signature.
In aforementioned host node, message is returned according to the 2f+a received first and generates preparation message, comprising: using more Weight signature algorithm returns to message according to the 2f+a received first and generates the first multi-signature, and, it is sent according to 2f+a First number for returning to the slave node of message generates the first number collection;Preparing message includes the first multi-signature and the first number Collection.
In aforementioned host node, message is returned according to the 2f+b received second and generates common recognition message, comprising: using more Weight signature algorithm returns to message according to the 2f+b received second and generates the second multi-signature, and, it is sent according to 2f+b Second number for returning to the slave node of message generates the second number collection;Message of knowing together includes the second multi-signature and the second number Collection.
Multi-signature algorithm above-mentioned is EC-SchNorr algorithm;First number collection and/or the second number collection can be Bitmap data set.
The host node provided using embodiment, the first return message that can be generated according to 2f+a from node, which generates, to be prepared Message, and be broadcast to message is prepared again from node, so that from node without broadcasting the first return message;Similar, it is main The second return message that node can be generated according to 2f+b from node generates common recognition message, and common recognition message is broadcast to from section Point, so that from node without broadcasting the second return message, therefore the communication complexity of whole network is O (N) order of magnitude.
Other than providing data processing method above-mentioned, this specification is also each provided for executing side in embodiment one The data processing system of method, the main section for executing the slave node of method in embodiment two and for executing method in embodiment three Point.
Embodiment six
Embodiment six provides a kind of data processing equipment comprising host node and from node.Wherein:
Host node returns to message and generate according to the 2f+a received first prepares message, and disappears to from node broadcasts preparation Breath;Wherein, the first return message includes the corresponding pre-preparation check information and first generated from node according to pre-preparation message Signature;N is the number of nodes of distributed network, 1≤a≤f;
Pre-preparation verification information is obtained from node according to message is prepared;
From node judge the quantity of pre-preparation verification information for 2f+a, and with itself storage pre-preparation check information phase In the case that the quantity of same pre-preparation verification information is greater than f, generates second and return to message, and send the second return to host node Message;Wherein, the second return message includes according to the preparation check information for preparing message generation and the second signature;
Host node returns to message according to the 2f+b received second and generates common recognition message, and disappears to from node broadcasts common recognition Breath;Wherein, 1≤b≤f;
It is generated from node according to common recognition message and prepares verification information;
From node in the quantity for judging preparation verification information for 2f+b, and it is identical with itself preparation check information of storage Prepare the quantity of verification information greater than in the case where f, executes the service request obtained from client.
When aforementioned data processing system works, pre-preparation message is broadcast to after node by host node, from node by basis The first return message that pre-preparation message generates returns to host node;Similar, host node is broadcast to message is prepared after node, From node host node will be returned to according to the second return message for preparing message generation.It is only unidirectionally to pass in conjunction with other parts data Defeated or broadcast, therefore the network communication complexity of whole system is O (N) order of magnitude.
In aforementioned system, host node returns to message and generate according to the 2f+a received first prepares message, can wrap It includes: using multi-signature algorithm, returning to message according to the 2f+a received first and generate the first multi-signature, and, according to The 2f+a number for sending the slave node that first returns to message generates the first number collection;Prepare message include the first multi-signature and First number collection.
It is corresponding, pre-preparation verification information is obtained from node according to message is prepared, comprising: the section concentrated according to the first number Point number, selects the first multi-signature of public key decryptions of corresponding node number, generates pre-preparation verification information.
Similar, host node returns to message according to the 2f+b received second and generates common recognition message, comprising: using multiple Signature algorithm returns to message according to the 2f+b received second and generates the second multi-signature, and, according to 2f+b transmission the Two numbers for returning to the slave node of message generate the second number collection;Message of knowing together includes the second multi-signature and the second number collection;
It is corresponding, it is generated from node according to common recognition message and prepares verification information, comprising: the node concentrated according to the second number Number selects the second multi-signature of public key decryptions of corresponding node number, generates and prepares verification information.
In preceding method, multi-signature algorithm is EC-Schnorr algorithm;It is with the first number collection and the second number collection Bitmap data set.
In aforementioned system, from node determine prepare verification information quantity be less than 2f+b in the case where and, determining In the case that the quantity of pre-preparation information is less than 2f+a, host node switching is initiated.
Embodiment seven
Fig. 8 is the structural schematic diagram for the electronic equipment that embodiment seven provides.As shown in figure 8, during electronic equipment may include Central processor 31 and memory 32;Central processing unit 31 is coupled with memory 32.
In practical application, memory 32 can be solid-state memory, for example, read-only memory (ROM), random access memory Device (RAM), SIM card etc..The memory that may also is that, saves information when power is off, can selectively be wiped It removes and is equipped with more data, the example of the memory is sometimes referred to as EPROM etc..Memory can also be computer equipment field Other known memories.
It is write in application one, central processing unit can be with load store in memory or other setting of connecting with electronic equipment The program of standby storage, realizes the function from node, executes following data processing methods.
S401: pre-preparation verification information is obtained according to message is prepared.
Wherein, described to prepare message by host node according to 2f+a different the first return message generations sent from node; The first return message includes the corresponding pre-preparation check information and the first label generated from node according to pre-preparation message Name;N is the number of nodes of the distributed network, 1≤a≤f.
S402: whether the quantity for judging pre-preparation verification information is 2f+a, and the pre-preparation check information with itself storage Whether the quantity of identical pre-preparation verification information is greater than f;If so, executing S403.
S403: it generates second and returns to message, and send second to host node and return to message;Wherein, second message package is returned to Include the preparation check information and the second signature generated according to the preparation message;1≤b≤f.
S404: it is generated according to common recognition message and prepares verification information.
The common recognition message returns to message according to 2f+b second by host node and generates;
S405: judging to prepare whether the quantity of verification information is 2f+b, and identical as itself preparation check information of storage The quantity of preparation verification information whether be greater than f;If so, executing S406.
S406: the service request obtained from client is executed.
In conjunction with step S401-S406 it is found that being used as using electronic equipment provided by the embodiments of the present application from node, When receiving corresponding message (pre-preparation message prepares message) of host node broadcast, corresponding sound only is returned to host node Message (first returns to message, the second return message) is answered, so that the communication complexity of whole network is O (N) order of magnitude.
In some other application, the central memory in electronic equipment can realize the function of host node with loading procedure Can, execute following data processing methods.
S501: returning to message and generate and prepare message according to the 2f+a received first, and to from standard described in node broadcasts Standby message, so that generating second from node returns to message.
Wherein, the first return message includes the corresponding pre-preparation verification letter generated from node according to pre-preparation message Breath and the first signature;N is the number of nodes of the distributed network, 1≤a≤f.
S502: returning to message according to the 2f+b received second and generate common recognition message, and to from described in node broadcasts altogether Know message, prepares verification information so as to generate from node.
Wherein, 1≤b≤f, the second return message include the corresponding preparation verification generated from node according to message is prepared Information and the second signature.
In conjunction with step S501 and S502 it is found that electronic equipment executes preceding method as host node, can will integrate each First generated from node returns to message or the second return message, and generates corresponding preparation message and common recognition message and broadcast again To message and the from node, can be returned to avoid generate itself after receiving the message that host node is sent from node first Two return message are broadcast to other from node, and then making the communication complexity of whole network is O (N) order of magnitude.
Fig. 8 is please referred to, in electronic equipment provided in this embodiment, in addition to central processing unit 31 above-mentioned and memory 32 It outside, further include for realizing the communication module 33 contacted with other electronic equipments, and for the power module 34 of power supply;This Outside, electronic equipment can also include output block 35, input part 36.
It should be noted that the dedicated processes core independently of central processing unit also can be set in electronic equipment in other embodiments Piece, with what is described for execution step S401-S408 is described when loading corresponding program method or step S501-S502 Method.
In addition, this specification also provides a kind of storage medium, the program code stored in storage medium is set by electronics After standby load, electronic equipment can be made to execute the method for abovementioned steps S401-S406 or the side of abovementioned steps S501-S502 Method.Storage medium similar with describing above, being provided using this specification, can make the communication complexity of whole network is O (N) order of magnitude.
Above description is only the preferred embodiment of this specification and the explanation to institute's application technology principle.Art technology Personnel should be appreciated that invention scope involved in this specification, however it is not limited to made of the specific combination of above-mentioned technical characteristic Technical solution, while should also cover in the case where not departing from foregoing invention design, by above-mentioned technical characteristic or its equivalent feature The other technical solutions for carrying out any combination and being formed.Such as features described above and disclosed in this specification but be not limited to class Technical characteristic like function is replaced mutually and the technical solution that is formed.

Claims (30)

1. a kind of data processing method, applied to the slave node in distributed network, which is characterized in that the described method includes:
Pre-preparation verification information is obtained according to message is prepared;Wherein, the preparation message by host node according to 2f+a it is different from The first return message that node is sent generates;It is described first return message include it is corresponding from node according to pre-preparation message generate Pre-preparation check information and first signature;N be the distributed network number of nodes, 1≤a≤ f;
Whether the quantity for judging pre-preparation verification information is 2f+a, and pre- standard identical with itself pre-preparation check information of storage Whether the quantity of standby verification information is greater than f;If so, generating second returns to message, and second is sent to host node and returns to message;Its In, the second return message includes the preparation check information and the second signature generated according to the preparation message;1≤b≤f;
It is generated according to common recognition message and prepares verification information;Wherein, the common recognition message is returned by host node according to 2f+b second Message generates;
Judge to prepare whether the quantity of verification information is 2f+b, and preparation identical with itself preparation check information of storage is verified Whether the quantity of information is greater than f;If so, executing the service request obtained from client.
2. the method according to claim 1, wherein
The preparation message includes the first multi-signature and the first number collection;First multi-signature is by host node according to 2f+a A different first sent from node returns to message and generates;The first number collection sends first according to 2f+a by host node and returns The number for returning the slave node of message generates;
It is described that pre-preparation verification information is obtained according to preparation message, comprising:
According to the node serial number that first number is concentrated, the first multiple label described in the public key decryptions of corresponding node number are selected Name generates pre-preparation verification information.
3. method according to claim 1 or 2, which is characterized in that
The common recognition message includes the second multi-signature and the second number collection;Second multi-signature is by host node according to 2f+b A different second sent from node returns to message and generates;The second number collection sends second according to 2f+b by host node and returns The number for returning the slave node of message generates;
Described obtained according to preparation message prepares verification information, comprising:
According to the node serial number that second number is concentrated, the second multiple label described in the public key decryptions of corresponding node number are selected Name generates pre-preparation verification information.
4. the method according to any one of claims 1 and 2, which is characterized in that further include:
If the quantity that judgement prepares verification information is less than 2f+b, host node switching is initiated.
5. according to the method described in claim 4, it is characterized by further comprising:
If judging, the quantity of pre-preparation verification information is less than 2f+a, initiates host node switching.
6. a kind of data processing method, the host node applied to distributed network, which is characterized in that the described method includes:
It returns to message according to the 2f+a received first and generates and prepare message, and to from preparing message described in node broadcasts, with Make to generate the second return message from node;Wherein, described first message is returned to including corresponding raw according to pre-preparation message from node At pre-preparation check information and first signature;N is the number of nodes of the distributed network, 1≤a ≤f;
Message is returned according to the 2f+b received second and generates common recognition message, and to from message of knowing together described in node broadcasts, with Make to generate from node and prepares verification information;Wherein, 1≤b≤f, described second returns to message including corresponding to from node according to preparation The preparation check information and the second signature that message generates.
7. according to the method described in claim 6, it is characterized in that, the 2f+a first return message life that the basis receives At preparation message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+a received described first and generates the first multi-signature, and, The number for sending the slave node that described first returns to message according to 2f+a generates the first number collection;The preparation message includes institute State the first multi-signature and the first number collection.
8. according to the method described in claim 6, it is characterized in that, the 2f+b second return message life that the basis receives At common recognition message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+b received described second and generates the second multi-signature, and, The number for sending the slave node that described second returns to message according to 2f+b generates the second number collection;The common recognition message includes institute State the second multi-signature and the second number collection.
9. according to the method described in claim 8, it is characterized in that,
The multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
10. a kind of data processing method, it is applied to distributed network, the distributed network includes host node and from node;Its It is characterized in that, which comprises
Host node returns to message and generate according to the 2f+a received first prepares message, and disappears to from preparation described in node broadcasts Breath;Wherein, the first return message includes the corresponding pre-preparation check information generated from node according to pre-preparation message, and First signature;N is the number of nodes of the distributed network, 1≤a≤f;
Pre-preparation verification information is obtained from node according to message is prepared;
Whether the quantity that pre-preparation verification information is judged from node is 2f+a, and identical as itself pre-preparation check information of storage The quantity of pre-preparation verification information whether be greater than f;If so, generating second returns to message, and second is sent to host node and is returned Message;Wherein, the second return message includes the preparation check information and the second signature generated according to the preparation message;
Host node returns to message according to the 2f+b received second and generates common recognition message, and disappears to from common recognition described in node broadcasts Breath;Wherein, 1≤b≤f;
It is generated from node according to common recognition message and prepares verification information;
Judge to prepare whether the quantity of verification information is 2f+b from node, and standard identical with itself preparation check information of storage Whether the quantity of standby verification information is greater than f;If so, executing the service request obtained from client.
11. according to the method described in claim 10, it is characterized in that,
The host node returns to message and generate according to the 2f+a received first prepares message, comprising: is calculated using multi-signature Method returns to message according to the 2f+a received described first and generates the first multi-signature, and, according to 2f+a transmission First number for returning to the slave node of message generates the first number collection;The preparation message includes first multi-signature and institute State the first number collection;
It is described to obtain pre-preparation verification information according to message is prepared from node, comprising: the node concentrated according to first number Number selects the first multi-signature described in the public key decryptions of corresponding node number, generates pre-preparation verification information;And/or
The host node returns to message according to the 2f+b received second and generates common recognition message, comprising: is calculated using multi-signature Method returns to message according to the 2f+b received described second and generates the second multi-signature, and, according to 2f+b transmission Second number for returning to the slave node of message generates the second number collection;The common recognition message includes second multi-signature and institute State the second number collection;
Described generated from node according to common recognition message prepares verification information, comprising: is compiled according to the node that second number is concentrated Number, the second multi-signature described in the public key decryptions of corresponding node number is selected, generates and prepares verification information.
12. according to the method for claim 11, it is characterised in that:
The multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
13. the described in any item methods of 0-12 according to claim 1, which is characterized in that further include:
If judging that the quantity for preparing verification information is less than 2f+b from node, host node switching is initiated.
14. according to the method for claim 13, which is characterized in that further include:
If judging, the quantity of pre-preparation verification information is less than 2f+a, initiates host node switching.
15. a kind of data processing equipment, which is characterized in that described device includes:
Pre-preparation verification information generation unit, for obtaining pre-preparation verification information according to preparation message;Wherein, the preparation disappears Breath returns to message according to 2f+a different first sent from node by host node and generates;Described first returns to message including corresponding to Slave node the pre-preparation check information and the first signature that are generated according to pre-preparation message;N is distribution The number of nodes of formula network, 1≤a≤f;
First judging unit, for judging whether the quantity of pre-preparation verification information is 2f+a, and the pre-preparation with itself storage Whether the quantity of the identical pre-preparation verification information of check information is greater than f;
First execution unit is 2f+a for the quantity in pre-preparation verification information, and with the pre-preparation that is stored from node itself In the case that the quantity of the identical pre-preparation verification information of check information is greater than f, generates second and return to message, and sent out to host node Send the second return message;Wherein, the second return message includes the preparation check information generated according to the preparation message, Yi Ji Two signatures;1≤b≤f;
Prepare verification information generation unit, prepares verification information for generating according to common recognition message;Wherein, the common recognition message by Host node returns to message according to 2f+b second and generates;
Second judgment unit prepares whether the quantity of verification information is 2f+b for judging, and verifies with the preparation of itself storage Whether the identical quantity for preparing verification information of information is greater than f;
Second execution unit, for being 2f+b in the quantity for preparing verification information, and the preparation check information phase with itself storage In the case that the quantity of same preparation verification information is greater than f, the service request obtained from client is executed.
16. device according to claim 15, which is characterized in that
The preparation message includes the first multi-signature and the first number collection;First multi-signature is by host node according to 2f+a A different first sent from node returns to message and generates;The first number collection sends first according to 2f+a by host node and returns The number for returning the slave node of message generates;
It is described that pre-preparation verification information is obtained according to preparation message, comprising:
According to the node serial number that first number is concentrated, the first multiple label described in the public key decryptions of corresponding node number are selected Name generates pre-preparation verification information.
17. device according to claim 15 or 16, which is characterized in that
The common recognition message includes the second multi-signature and the second number collection;Second multi-signature is by host node according to 2f+b A different second sent from node returns to message and generates;The second number collection sends second according to 2f+b by host node and returns The number for returning the slave node of message generates;
Described obtained according to preparation message prepares verification information, comprising:
According to the node serial number that second number is concentrated, the second multiple label described in the public key decryptions of corresponding node number are selected Name generates pre-preparation verification information.
18. device according to claim 15 or 16, it is characterised in that:
First execution unit is used to initiate host node in the case where the quantity of pre-preparation verification information is less than 2f+a and cut It changes.
19. device according to claim 18, it is characterised in that:
Second execution unit is used to initiate host node switching in the case where the quantity for preparing verification information is less than 2f+b.
20. a kind of data processing equipment, which is characterized in that described device includes:
First generation unit prepares message for returning to message according to the 2f+a that receives first and generating, and to wide from node The preparation message is broadcast, so that generating second from node returns to message;Wherein, described first message is returned to including corresponding from node The pre-preparation check information generated according to pre-preparation message and the first signature;N is the distributed network The number of nodes of network, 1≤a≤f;
Second generation unit generates common recognition message for returning to message according to the 2f+b that receives second, and to wide from node The common recognition message is broadcast, prepares verification information so as to generate from node;Wherein, 1≤b≤f, the second return message includes pair It should be from node according to the preparation check information for preparing message generation and the second signature.
21. device according to claim 20, which is characterized in that
2f+a first that the basis receives, which returns to message and generate, prepares message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+a received described first and generates the first multi-signature, and, The number for sending the slave node that described first returns to message according to 2f+a generates the first number collection;The preparation message includes institute State the first multi-signature and the first number collection.
22. device according to claim 20, which is characterized in that
2f+b second that the basis receives returns to message and generates common recognition message, comprising:
Using multi-signature algorithm, message is returned according to the 2f+b received described second and generates the second multi-signature, and, The number for sending the slave node that described second returns to message according to 2f+b generates the second number collection;The common recognition message includes institute State the second multi-signature and the second number collection.
23. device according to claim 22, which is characterized in that
The multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
24. a kind of data processing equipment, the data processing equipment includes host node and from node, it is characterised in that:
Host node returns to message and generate according to the 2f+a received first prepares message, and disappears to from preparation described in node broadcasts Breath;Wherein, the first return message includes the corresponding pre-preparation check information generated from node according to pre-preparation message, and First signature;N is the number of nodes of the distributed network, 1≤a≤f;
Pre-preparation verification information is obtained from node according to message is prepared;
From node judge the quantity of pre-preparation verification information for 2f+a, and with itself storage pre-preparation check information it is identical In the case that the quantity of pre-preparation verification information is greater than f, generates second and return to message, and send second to host node and return and disappear Breath;Wherein, the second return message includes the preparation check information and the second signature generated according to the preparation message;
Host node returns to message according to the 2f+b received second and generates common recognition message, and disappears to from common recognition described in node broadcasts Breath;Wherein, 1≤b≤f;
It is generated from node according to common recognition message and prepares verification information;
From node in the quantity for judging preparation verification information for 2f+b, and preparation identical with itself preparation check information of storage In the case that the quantity of verification information is greater than f, the service request obtained from client is executed.
25. data processing equipment according to claim 24, which is characterized in that
The host node returns to message and generate according to the 2f+a received first prepares message, comprising: is calculated using multi-signature Method returns to message according to the 2f+a received described first and generates the first multi-signature, and, according to 2f+a transmission First number for returning to the slave node of message generates the first number collection;The preparation message includes first multi-signature and institute State the first number collection;
It is described to obtain pre-preparation verification information according to message is prepared from node, comprising: the node concentrated according to first number Number selects the first multi-signature described in the public key decryptions of corresponding node number, generates pre-preparation verification information;And/or
The host node returns to message according to the 2f+b received second and generates common recognition message, comprising: is calculated using multi-signature Method returns to message according to the 2f+b received described second and generates the second multi-signature, and, according to 2f+b transmission Second number for returning to the slave node of message generates the second number collection;The common recognition message includes second multi-signature and institute State the second number collection;
Described generated from node according to common recognition message prepares verification information, comprising: is compiled according to the node that second number is concentrated Number, the second multi-signature described in the public key decryptions of corresponding node number is selected, generates and prepares verification information.
26. device according to claim 25, which is characterized in that
The multi-signature algorithm is EC-Schnorr algorithm;And/or
The first number collection and/or second number integrate as Bitmap data set.
27. according to the described in any item devices of claim 24 to 26 characterized by comprising
From node in the case where determining that the quantity for preparing verification information is less than 2f+b, host node switching is initiated.
28. device according to claim 27 characterized by comprising
From node in the case where the quantity for determining pre-preparation verification information is less than 2f+a, host node switching is initiated.
29. a kind of medium, which is characterized in that the media storage has a plurality of instruction, and described instruction is suitable for being loaded by processor And execute such as the described in any item data processing methods of claim 1-9.
30. a kind of electronic equipment, it is characterised in that: including memory and processor;
The memory is stored with a plurality of instruction;Described instruction is suitable for being loaded by the processor and being executed such as claim 1- 9 described in any item data processing methods.
CN201910789386.1A 2019-08-26 2019-08-26 Data processing method and apparatus for block chain, medium, and electronic device Active CN110460536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910789386.1A CN110460536B (en) 2019-08-26 2019-08-26 Data processing method and apparatus for block chain, medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910789386.1A CN110460536B (en) 2019-08-26 2019-08-26 Data processing method and apparatus for block chain, medium, and electronic device

Publications (2)

Publication Number Publication Date
CN110460536A true CN110460536A (en) 2019-11-15
CN110460536B CN110460536B (en) 2022-11-29

Family

ID=68489032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910789386.1A Active CN110460536B (en) 2019-08-26 2019-08-26 Data processing method and apparatus for block chain, medium, and electronic device

Country Status (1)

Country Link
CN (1) CN110460536B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404928A (en) * 2020-03-13 2020-07-10 电子科技大学 Block chain link point consensus method suitable for real-time transaction scene
CN111901293A (en) * 2020-06-08 2020-11-06 北京邮电大学 Resource malicious competition avoiding method for alliance chain
CN113301002A (en) * 2020-04-24 2021-08-24 阿里巴巴集团控股有限公司 Information processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107038578A (en) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 Multi-signature exchange information processing method in data trade platform based on block chain
CN107819749A (en) * 2017-10-26 2018-03-20 平安科技(深圳)有限公司 Block catenary system and transaction data processing method based on ether mill
US20180308091A1 (en) * 2017-04-21 2018-10-25 Vmware, Inc. Fairness preserving byzantine agreements
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
CN110012100A (en) * 2019-04-09 2019-07-12 杭州秘猿科技有限公司 A kind of the block chain common recognition method, apparatus and electronic equipment of bandwidth optimization

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107038578A (en) * 2017-04-19 2017-08-11 浙江数秦科技有限公司 Multi-signature exchange information processing method in data trade platform based on block chain
US20180308091A1 (en) * 2017-04-21 2018-10-25 Vmware, Inc. Fairness preserving byzantine agreements
CN107819749A (en) * 2017-10-26 2018-03-20 平安科技(深圳)有限公司 Block catenary system and transaction data processing method based on ether mill
CN108848056A (en) * 2018-05-03 2018-11-20 南京理工大学 Block chain common recognition method based on verifying
CN110012100A (en) * 2019-04-09 2019-07-12 杭州秘猿科技有限公司 A kind of the block chain common recognition method, apparatus and electronic equipment of bandwidth optimization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
苑超 等: ""基于聚合签名的共识算法优化方案"", 《计算机科学》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404928A (en) * 2020-03-13 2020-07-10 电子科技大学 Block chain link point consensus method suitable for real-time transaction scene
CN111404928B (en) * 2020-03-13 2021-07-06 电子科技大学 Block chain link point consensus method suitable for real-time transaction scene
CN113301002A (en) * 2020-04-24 2021-08-24 阿里巴巴集团控股有限公司 Information processing method and device, electronic equipment and storage medium
CN113301002B (en) * 2020-04-24 2023-05-09 阿里巴巴集团控股有限公司 Information processing method, device, electronic equipment and storage medium
CN111901293A (en) * 2020-06-08 2020-11-06 北京邮电大学 Resource malicious competition avoiding method for alliance chain

Also Published As

Publication number Publication date
CN110460536B (en) 2022-11-29

Similar Documents

Publication Publication Date Title
CN109936457B (en) Block chain multi-party witness method, device, equipment and computer readable storage medium
CN110391911B (en) System and method for anonymously voting block chain
CN110460536A (en) For the data processing method and device of block chain, medium and electronic equipment
CN113194469B (en) 5G unmanned aerial vehicle cross-domain identity authentication method, system and terminal based on block chain
US9154503B2 (en) Authorization method and terminal device
KR20200144466A (en) Apparatus and method for processing distributed consensus on decentralized byzantene fault tolerance
CN1717895A (en) System and method for establishing trust without revealing identity
US20210351941A1 (en) Sybil-resistant identity generation
Huang et al. Identity-based strong designated verifier signature revisited
CN109327467A (en) The management method of RSSP-II secure communication protocols key management mechanism
CN105681258B (en) Session method and conversational device based on third-party server
CN100452712C (en) Method for automatic adding member and its system
CN107483415A (en) A kind of mutual authentication method of shared electricity consumption interactive system
CN110191467A (en) A kind of method for authenticating of internet of things equipment, unit and storage medium
CN112437068B (en) Authentication and key agreement method, device and system
Fiore et al. Multi‐key homomorphic authenticators
Luo et al. An efficient chaos‐based 2‐party key agreement protocol with provable security
US20050117751A1 (en) Cryptographic communication system
Yan et al. Identity‐based signcryption from lattices
Zeng et al. Concurrently deniable group key agreement and its application to privacy-preserving VANETs
Wu et al. An efficient identification protocol and the knowledge-of-exponent assumption
CN101930575B (en) Electronic ticket splitting method and system
Gilbert et al. Who are you? secure identities in ad hoc networks
CN114362930A (en) Block chain consensus method and computer-readable storage medium
Srivatsa et al. Exchangeguard: A distributed protocol for electronic fair-exchange

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