CN114448980B - Improvement method of PBFT algorithm for Internet of things - Google Patents

Improvement method of PBFT algorithm for Internet of things Download PDF

Info

Publication number
CN114448980B
CN114448980B CN202210011610.6A CN202210011610A CN114448980B CN 114448980 B CN114448980 B CN 114448980B CN 202210011610 A CN202210011610 A CN 202210011610A CN 114448980 B CN114448980 B CN 114448980B
Authority
CN
China
Prior art keywords
node
nodes
master node
candidate
consensus
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.)
Active
Application number
CN202210011610.6A
Other languages
Chinese (zh)
Other versions
CN114448980A (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.)
Shanghai Institute of Technology
Original Assignee
Shanghai Institute of Technology
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 Shanghai Institute of Technology filed Critical Shanghai Institute of Technology
Priority to CN202210011610.6A priority Critical patent/CN114448980B/en
Publication of CN114448980A publication Critical patent/CN114448980A/en
Application granted granted Critical
Publication of CN114448980B publication Critical patent/CN114448980B/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
    • 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
    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to an improved method of a PBFT algorithm for the Internet of things, nodes are randomly ordered according to the weight of integral, the nodes are selected layer by layer, and the integral basically ensures that the nodes with the earlier ordering are more reliable. In the consensus process, the nodes are guaranteed to receive message consistency and the state of the nodes is guaranteed to be synchronously handed to the master node after the replacement is attempted. And the master node candidate nodes monitor the behavior of the master node, so that double guarantee is realized, and the possibility of dislike of the master node is effectively reduced. When the Bayesian error occurs, challenges are initiated to the three nodes behind the candidate node of the main node in the integral ranking table, the behaviors of the main node and the candidate node of the main node are judged according to the challenge result, the Bayesian node is punished, and the cost of node aversion is increased. And the communication complexity is reduced in the consensus process, so that the consensus time delay is reduced, and the overall efficiency of the system is improved.

Description

Improvement method of PBFT algorithm for Internet of things
Technical Field
The invention relates to a block chain and Internet of things technology, in particular to an improvement method of a PBFT algorithm for the Internet of things.
Background
With the rapid development of the blockchain technology and the Internet of things technology in recent years, a new solution is brought to the current existing difficult problem. The IoT device is used as a node, the internet of things technology is utilized to transmit data, the blockchain is utilized to store the data, and the authenticity of the data is ensured based on the characteristics of blockchain tamper resistance, disclosure transparency and the like. Has great influence on the tracing of the object and the charity. But for the exchange of the Internet of things, a plurality of nodes are added, and the added nodes are more conveniently checked by using the license chain, so that the alliance blockchain is more suitable for the Internet of things. But IoT devices have limited computing power, and conventional PBFT algorithms have long consensus time delay, which makes it difficult to meet the demand of transaction amount in the internet of things environment.
Disclosure of Invention
Aiming at the problems of limited computing capacity of the IoT device and overlong consensus time delay of the PBFT algorithm, an improved method of the PBFT algorithm for the internet of things is provided, the consensus time delay is reduced, and the overall efficiency is improved.
The technical scheme of the invention is as follows: the method comprises the steps of integrating nodes in a consensus process by taking Internet of things equipment as block chain nodes, and selecting a master node and a master node post-selection node according to integral sequencing; in the communication process between the nodes, the master node and the master node candidate nodes verify the consistency of the information, and the master node candidate nodes monitor the behaviors of the master node.
Further, the improvement method of the PBFT algorithm facing the Internet of things specifically comprises the following steps:
1) The method comprises the steps of using Internet of things equipment as a block chain consensus node, sequencing the nodes, distributing weights by integral by the consensus node, sequencing by using a sequencing algorithm according to weight magnitude, and establishing a node sequencing table; selecting a master node and a master node post-selection node according to the ranking;
2) The client only sends a message to the host node, and enters a node consensus process;
3) After receiving the message, the master node numbers the master node post-selection node and other consensus nodes in the node sorting table, and broadcasts the message;
4) The common node verifies after the message, and sends a preparation message to the master node and the master node candidate node through verification; the master node candidate node verifies after the message, and the verification is carried out by sending a preparation message to the master node;
5) After receiving the preparation information, the master node and the master node candidate nodes judge whether the information received by the consensus nodes is consistent with the preparation information, and when the number of the nodes which are consistent with the preparation information and are received by the master node and sent by different consensus nodes reaches a set value, the master node and the master node candidate nodes feed back confirmation results to confirm the consensus nodes and the master node candidate nodes, and the master node candidate nodes feed back the consensus nodes according to the self judgment results;
6) When the consensus node receives that the feedback result of the main node is consistent with the feedback result of the candidate node of the main node, the method enters a confirmation stage;
7) In the confirmation stage, the consensus node sends a confirmation message to the main node and the main node candidate nodes, when the main node receives that the confirmation messages sent by 2f+1 different nodes are consistent, the confirmation result is fed back to the confirmation consensus node and the main node candidate nodes, and the main node candidate nodes also feed back the consensus node according to the self judgment result;
8) When the feedback result of the master node is received by the consensus node and the feedback confirmation result of the candidate node of the master node are consistent, the honest consensus node receives the result;
9) When the master node receives the confirmation result sent by the master node candidate node and is consistent with the master node candidate node, packaging the confirmation result sent by the master node candidate node and sending a reply message to the client together;
10 If the results of the main node and the candidate nodes of the main node are inconsistent, the Bayesian error is judged to occur, challenges are initiated to three nodes arranged behind the candidate nodes of the main node in the ranking table, the Bayesian node is judged according to the challenge result, the Bayesian node is replaced, and the replacement information is sent to the consensus node.
Further, the specific method for integrating and distributing weights in the step 1) is as follows: the dishonest voting obtains the integral in the consensus process, the dishonest voting deducts the integral, the probability that the consensus node is selected to be in front is distributed through the integral, the higher the integral is, the higher the probability is, and the higher the node trust degree is the higher the ranking is; selecting a master node and a master node candidate node according to the ranking initially, and replacing the master node candidate node when the master node is in error; and (5) reordering after the replacement is completed or the integral transformation, and selecting the candidate nodes of the first primary node.
The invention has the beneficial effects that: according to the improvement method of the PBFT algorithm for the Internet of things, the Internet of things equipment is used as a blockchain node, the node roles are divided into five levels, the highest level is a master node, and the next level is a master node candidate node. The nodes are randomly ordered according to the weight of the integral, the integral is selected layer by layer, and the reliability of the nodes with the earlier ordering is basically guaranteed. In the consensus process, the nodes are ensured to receive the message consistency and the state synchronization of the nodes after the view replacement is ensured to be handed to the master node. And the master node candidate nodes monitor the behavior of the master node, so that double guarantee is realized, and the possibility of dislike of the master node is effectively reduced. When the Bayesian error occurs, challenges are initiated to the three nodes behind the candidate node of the main node in the integral ranking table, the behaviors of the main node and the candidate node of the main node are judged according to the challenge result, the Bayesian node is punished, and the cost of node aversion is increased. And common-knowledge time delay is reduced, and the overall efficiency of the system is improved.
Drawings
FIG. 1 is a schematic diagram of node ordering according to the present invention;
FIG. 2 is a node consensus process of the present invention;
fig. 3 is a schematic diagram of the challenge process of the present invention.
Detailed Description
The invention will now be described in detail with reference to the drawings and specific examples. The present embodiment is implemented on the premise of the technical scheme of the present invention, and a detailed implementation manner and a specific operation process are given, but the protection scope of the present invention is not limited to the following examples.
The invention discloses an improvement method of a PBFT algorithm for the Internet of things, which comprises the following steps:
step 1, using the Internet of things equipment as a block chain consensus node, sequencing the consensus node, as shown in fig. 1, distributing weights by points, sequencing by using a sequencing algorithm calculation according to weights, wherein the probability that the higher the weights are, the higher the front ranking is, the higher the reliability is, and a node sequencing table is established; selecting a master node and a master node post-selection node according to the ranking, and reducing the probability that the Bayesian node is selected as the master node, thereby reducing the probability of trying to switch;
the node and the candidate master node are selected according to the integral of each consensus voting behavior, the node sorting table is updated, and the master node and the candidate master node selected to the greatest extent by default are defaulted and reliable in the consensus nodes.
The consensus node obtains the integral of the honest votes in the consensus process, and the dishonest votes deduct the integral. The higher the integral, the more reliable the node. The probability that the node is selected to be forward is assigned by integration. The higher the integral, the greater the probability. And according to a random ordering algorithm, ordering the consensus nodes, wherein the higher the ranking is, the higher the node trust degree is. And initially selecting the master node and the master node candidate node according to the ranking, and replacing the master node candidate node when the master node is in error. And (5) reordering after the replacement is completed or the integral transformation, and selecting the candidate nodes of the first primary node.
Step 2, the client only sends the message to the host node, and enters a node consensus process, as shown in a process schematic diagram of fig. 2.
And 3, numbering the selected node of the main node and other consensus nodes in the node sorting table after the main node receives the message, and broadcasting the message.
Step 4, the consensus node verifies after the message, and sends a preparation message to the master node and the master node candidate node through verification; the master node candidate node verifies after the message by sending a prepare message to the master node.
And 5, after the master node and the master node candidate nodes receive the preparation information, the master node and the master node candidate nodes judge whether the information received by the consensus nodes is consistent with the preparation information, and when the master node receives 2f+1 (the number of the total nodes is assumed to be n, n is not less than 3f+1, in order to ensure that the consensus can be correctly achieved, the agreement is ensured to be achieved by the 2f+1 nodes, and the number of the error nodes is less than f.) the preparation information sent by different consensus nodes is consistent, a confirmation result is fed back to the confirmation consensus node and the master node candidate nodes. And the master node candidate node also feeds back the consensus node according to the self judgment result.
And 6, entering a confirmation stage when the consensus node receives that the feedback result of the main node is consistent with the feedback result of the candidate node of the main node.
And 7, transmitting acknowledgement messages to the master node and the master node candidate nodes by the consensus node in the acknowledgement stage, and feeding back acknowledgement results to the acknowledgement consensus node and the master node candidate nodes when the master node receives that the acknowledgement messages transmitted by 2f+1 different nodes are consistent. And the master node candidate node also feeds back the consensus node according to the self judgment result.
And 8, when the consensus node receives that the feedback result of the main node is consistent with the feedback confirmation result of the candidate node of the main node, the honest consensus node receives the result.
And 9, when the master node receives the confirmation result sent by the master node candidate node and is consistent with the master node candidate node, packaging the confirmation result sent by the master node candidate node and sending a reply message to the client together.
And 10, judging that the Bayesian error occurs when the results of the main node and the main node candidate nodes are inconsistent, initiating challenges to three nodes arranged behind the main node candidate nodes in the ranking table, judging the Bayesian node according to the challenge result, replacing the Bayesian node, and transmitting replacement information to the consensus node. As shown in fig. 3.
In the consensus process, the consistency of the messages received by the nodes and the synchronism of the node states after the replacement are ensured, the mutual confirmation between the consensus nodes is not performed, but is performed by the master node, and the communication times between the nodes are effectively reduced. And the master node candidate nodes monitor the behavior of the master node, so that double guarantee is realized, and the possibility of dislike of the master node is effectively reduced.
And the master node candidate nodes selected by the integral weight random sorting are used for supervising the behavior of the master node, so that the possibility of dislikeness of the master node candidate nodes is effectively reduced.
When the post-selection node of the main node judges that the main node has the Bayesian error, challenges are initiated to three nodes which are arranged at the forefront in the ranking table except the candidate node of the main node, and the Bayesian node is judged to punish according to the judging results of the three nodes. The cost of node aversion is increased.
And the process of a consistency protocol in the consensus algorithm is optimized, the communication times in the consensus process are reduced, and the consensus time delay is reduced.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (1)

1. The improvement method of the PBFT algorithm for the Internet of things is characterized in that Internet of things equipment is used as a block chain node, nodes are integrated in the process of consensus, and a master node candidate node are selected according to integral sequencing; in the communication process between nodes, the master node and the master node candidate nodes verify the consistency of information, and the master node candidate nodes monitor the behavior of the master node; the method specifically comprises the following steps:
1) The method comprises the steps of using Internet of things equipment as a block chain consensus node, sequencing the nodes, distributing weights by integral by the consensus node, sequencing by using sequencing algorithm calculation according to weight magnitude, and establishing a node sequencing table; selecting a master node and master node candidate nodes according to the ranking;
2) The client only sends a message to the host node, and enters a node consensus process;
3) After receiving the message, the master node numbers the candidate nodes of the master node and other consensus nodes in the node sorting table, and broadcasts the message;
4) The consensus node verifies after receiving the broadcast message, and sends a preparation message to the master node and the master node candidate node through verification; the master node candidate node verifies after the message, and the verification is carried out by sending a preparation message to the master node;
5) After receiving the preparation information, the master node and the master node candidate nodes judge whether the information received by the common node is consistent with the preparation information, when the number of the nodes which are consistent with the preparation information and are received by the master node and sent by different common nodes reaches a set value, the master node and the master node candidate nodes feed back confirmation results, and the master node candidate nodes feed back the common node according to the self judgment results;
6) When the consensus node receives that the feedback result of the main node is consistent with the feedback result of the candidate node of the main node, the method enters a confirmation stage;
7) In the confirmation stage, the consensus node sends confirmation information to the main node and the main node candidate nodes, when the main node receives that the confirmation information sent by 2f+1 different nodes is consistent, the confirmation result is fed back to the consensus node and the main node candidate nodes, and the main node candidate nodes also feed back the consensus node according to the self judgment result;
8) When the feedback result of the master node is received by the consensus node and the feedback confirmation result of the candidate node of the master node are consistent, the honest consensus node receives the result;
9) When the master node receives the confirmation result sent by the master node candidate node and is consistent with the master node candidate node, packaging the confirmation result sent by the master node candidate node and sending a reply message to the client together;
10 When the results of the main node and the main node candidate nodes are inconsistent, the main node candidate nodes judge that the Bayesian error occurs, challenges are initiated to three nodes arranged behind the main node candidate nodes in the ranking table, the Bayesian node is judged according to the challenge result, the Bayesian node is replaced, and the replacement information is sent to the consensus node.
CN202210011610.6A 2022-01-06 2022-01-06 Improvement method of PBFT algorithm for Internet of things Active CN114448980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210011610.6A CN114448980B (en) 2022-01-06 2022-01-06 Improvement method of PBFT algorithm for Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210011610.6A CN114448980B (en) 2022-01-06 2022-01-06 Improvement method of PBFT algorithm for Internet of things

Publications (2)

Publication Number Publication Date
CN114448980A CN114448980A (en) 2022-05-06
CN114448980B true CN114448980B (en) 2023-09-01

Family

ID=81367454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210011610.6A Active CN114448980B (en) 2022-01-06 2022-01-06 Improvement method of PBFT algorithm for Internet of things

Country Status (1)

Country Link
CN (1) CN114448980B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019170169A2 (en) * 2019-06-05 2019-09-12 Alibaba Group Holding Limited Consensus system and method
CN110677485A (en) * 2019-09-30 2020-01-10 大连理工大学 Dynamic layered Byzantine fault-tolerant consensus method based on credit
CN110796547A (en) * 2019-10-30 2020-02-14 桂林电子科技大学 Improved practical Byzantine fault-tolerant system based on alliance block chain
CN112330238A (en) * 2020-08-06 2021-02-05 北京工业大学 Improved practical Byzantine consensus method based on food supply chain subject credit
CN112883114A (en) * 2021-02-24 2021-06-01 中国工商银行股份有限公司 Transaction processing method and device applied to block chain
CN113269630A (en) * 2021-07-06 2021-08-17 贵州大学 Practical Byzantine fault-tolerant algorithm improvement scheme for alliance block chain
CN113676541A (en) * 2021-08-23 2021-11-19 南昌航空大学 Improved PBFT consensus method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019170169A2 (en) * 2019-06-05 2019-09-12 Alibaba Group Holding Limited Consensus system and method
CN110677485A (en) * 2019-09-30 2020-01-10 大连理工大学 Dynamic layered Byzantine fault-tolerant consensus method based on credit
CN110796547A (en) * 2019-10-30 2020-02-14 桂林电子科技大学 Improved practical Byzantine fault-tolerant system based on alliance block chain
CN112330238A (en) * 2020-08-06 2021-02-05 北京工业大学 Improved practical Byzantine consensus method based on food supply chain subject credit
CN112883114A (en) * 2021-02-24 2021-06-01 中国工商银行股份有限公司 Transaction processing method and device applied to block chain
CN113269630A (en) * 2021-07-06 2021-08-17 贵州大学 Practical Byzantine fault-tolerant algorithm improvement scheme for alliance block chain
CN113676541A (en) * 2021-08-23 2021-11-19 南昌航空大学 Improved PBFT consensus method

Also Published As

Publication number Publication date
CN114448980A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN111625593B (en) Block chain-based data processing method and device and computer equipment
CN101743716B (en) Establishment of reliable multicast/broadcast in a wireless network
CN110796547A (en) Improved practical Byzantine fault-tolerant system based on alliance block chain
CN113347164B (en) Block chain-based distributed consensus system, method, device and storage medium
CN104639298B (en) A kind of data transmission method, apparatus and system
CN101686145A (en) Equipment capable of upgrading, upgrading method and system
US20090165018A1 (en) Leader election
CN111179087B (en) Alliance chain consensus method based on grid arbitration
CN110913501A (en) Consensus method suitable for wireless block chain network
CN112788137A (en) Alliance chain consensus method based on RAFT algorithm
CN111431802B (en) Block chain node communication optimization system and method
CN114218612A (en) Consensus method suitable for high-frequency trading scene of alliance chain
CN112217683A (en) Cross-heterogeneous-chain data reachability processing method, system, medium, device and terminal
CN114338040A (en) Grouping multi-chain three-time consensus method for block link points
CN113660272A (en) Asynchronous consensus method and device for anti-Byzantine sequencing
CN109889312A (en) Multilink data transmission method, device and computer readable storage medium
EP3503495A1 (en) Method for accumulating and co-assembling uniform data
CN114448980B (en) Improvement method of PBFT algorithm for Internet of things
CN113645278B (en) Cross-chain message transmission method, device and storage medium of block chain
CN114760135A (en) Optimization method of block chain fault-tolerant consensus scheme
CN101466071B (en) Method and apparatus for distributing time frequency resource
CN116260826A (en) Bayesian-busy fault tolerance consensus method and system in supply chain tracing
CN104205941A (en) A method of concerted data synchronisation
CN112187408B (en) Data processing method, system, device, storage medium and processor
CN115099421A (en) Group-oriented federal learning system

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