CN114448980A - 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
CN114448980A
CN114448980A CN202210011610.6A CN202210011610A CN114448980A CN 114448980 A CN114448980 A CN 114448980A CN 202210011610 A CN202210011610 A CN 202210011610A CN 114448980 A CN114448980 A CN 114448980A
Authority
CN
China
Prior art keywords
node
nodes
consensus
main
candidate
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
CN202210011610.6A
Other languages
Chinese (zh)
Other versions
CN114448980B (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

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to an improvement method of a PBFT algorithm facing to the Internet of things. In the process of consensus, the master node is handed over to ensure consistency of messages received by the nodes and ensure state synchronization of the nodes after attempted replacement. And the candidate node of the main node supervises the behavior of the main node, thereby realizing double guarantee and effectively reducing the possibility of the main node doing harm. When a Byzantine error occurs, challenges are initiated to three nodes behind the main node candidate node in the integral sorting table, behaviors of the main node and the main node candidate node are judged according to the challenge result, the Byzantine node is punished, and the cost of the node for malignancy is increased. And the complexity of communication is reduced in the consensus process, 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 block chain technology and the internet of things technology in recent years, a new solution is brought to the existing problem. The IoT equipment is used as a node, data are transmitted by using the Internet of things technology, the data are stored by using the block chain, and authenticity of the data is guaranteed based on the characteristics of tamper resistance, openness and transparency of the block chain and the like. Has great influence on the source tracing and charitability of the articles. However, for the future change of the internet of things, a plurality of nodes are added, and the added nodes are more conveniently checked by using the permission chain, so that the block chain of the alliance selected for the internet of things is more suitable. However, the IoT device has limited computing capability, and the conventional PBFT algorithm has a long consensus time delay, which makes it difficult to meet the demand of the transaction amount in the environment of the internet of things.
Disclosure of Invention
Aiming at the problems of limited computing capability of IoT equipment and overlong consensus time delay of a PBFT algorithm, the improvement method of the PBFT algorithm facing to 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: an improvement method of a PBFT algorithm facing to the Internet of things is characterized in that the equipment of the Internet of things is used as a block chain node, the node is integrated in the consensus process of the node, and a main node and a post-selection node of the main node are selected according to integral sorting; in the communication process between the nodes, the master node and the master node candidate node verify the information consistency, and the master node candidate node supervises the behavior 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 that the Internet of things equipment is used as a block chain consensus node, the nodes are sorted, the consensus node distributes weights through integral, sorting is carried out through a sorting algorithm according to the weights, and a node sorting table is established; selecting a main node and a post-selection node of the main 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 main node numbers the main node post-selected node and other common identification nodes in the node sequencing table and broadcasts the message;
4) the consensus node verifies after the message, and the verification sends a preparation message to the main node and the main node candidate node; the candidate node of the main node is verified after the message, and the verification is carried out by sending a preparation message to the main node;
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 node is consistent with the information, when the master node receives that the number of the nodes of which the preparation information sent by different consensus nodes is consistent reaches a set value, the master node candidate nodes feed back confirmation results to the confirmation consensus node and the master node candidate nodes, and the master node candidate nodes also feed back the consensus nodes according to self judgment results;
6) entering a confirmation stage when the consensus node receives that the feedback result of the master node is consistent with the feedback result of the master node candidate node;
7) the consensus node sends confirmation messages to the main node and the main node candidate nodes in a confirmation stage, when the main node receives that the confirmation messages sent by 2f +1 different nodes are consistent, confirmation results are fed back to the consensus node and the main node candidate nodes, and the main node candidate nodes also feed back the consensus nodes according to self judgment results;
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;
9) when the main node receives the confirmation result sent by the main node candidate node and is consistent with the main node, the main node candidate node is packaged to send the confirmation result, and a reply message is sent to the client together;
10) and when the results of the main node and the main node candidate nodes are not consistent, judging that a Byzantine error occurs, initiating a challenge to three nodes arranged behind the main node candidate nodes in the ranking list, judging the Byzantine nodes according to the challenge results, replacing the Byzantine nodes, and sending replacement information to the consensus nodes.
Further, the specific method for assigning weights by integration in step 1) is as follows: the consensus node obtains a score through honest voting in the consensus process, the score can be deducted through dishonest voting, the probability of the consensus node before being selected is distributed through the score, the higher the score is, the higher the probability is, and the higher the trust degree of the node before being ranked is; initially selecting a main node and a main node candidate node according to the ranking, and replacing the main node candidate node when the main node has an error; and after the replacement is finished or the integral is transformed, reordering, and selecting the first ranked candidate node as the master node.
The invention has the beneficial effects that: the invention relates to an improvement method of a PBFT algorithm facing to the Internet of things, which utilizes equipment of the Internet of things as a block chain node and divides the node role into five levels, wherein the highest level is a main node and the second level is a main node candidate node. The nodes are randomly ordered according to the weights of the integrals, and the integrals are selected layer by layer, so that the integral basically ensures that the more front nodes are ordered, the more reliable the integral is. In the process of consensus, the node is ensured to receive the message consistency, and the node state is ensured to be synchronously handed to the main node after the view is changed. And the candidate node of the main node supervises the behavior of the main node, thereby realizing double guarantee and effectively reducing the possibility of the main node doing harm. When a Byzantine error occurs, challenges are initiated to three nodes behind the main node candidate node in the integral sorting table, behaviors of the main node and the main node candidate node are judged according to the challenge result, the Byzantine node is punished, and the cost of the node for malignancy is increased. The consensus time delay is reduced, and the overall efficiency of the system is improved.
Drawings
FIG. 1 is a schematic diagram of node sequencing 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 is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
The invention relates to an improvement method of a PBFT algorithm for the Internet of things, which comprises the following steps:
step 1, sequencing consensus nodes by taking Internet of things equipment as a block chain consensus node, wherein the consensus nodes distribute weights by integral as shown in figure 1, and are sequenced by utilizing a sequencing algorithm according to the weight, the higher the weight is, the higher the probability that the ranking is earlier is, the higher the ranking is, the higher the reliability is, and a node sequencing table is established; selecting a main node and a post-selection node of the main node according to the ranking, and reducing the probability that the Byzantine node is selected as the main node, thereby reducing the probability of trying to switch;
and the node and the main node candidate node are selected according to the integral of the consensus voting behavior each time, the node sorting table is updated, and the main node candidate node selected to the greatest extent are defaulted and reliable in the consensus node.
The consensus node obtains the integral in the honest voting process, and the integral is deducted in the dishonest voting process. A higher integral indicates a more reliable node. The probability that a node is selected ahead is assigned by an integral. The higher the integral, the greater the probability. And sequencing the consensus nodes according to a random sequencing algorithm, wherein the higher the ranking is, the higher the trust degree of the nodes is. And initially selecting the main node and the main node candidate nodes according to the ranking, and replacing the main node candidate nodes when the main node has errors. And after the replacement is finished or the integral is transformed, reordering, and selecting the first ranked candidate node as the master node.
And 2, the client only sends a message to the host node and enters a node consensus process, which is shown as a process schematic diagram in figure 2.
And 3, after receiving the message, the main node numbers the main node post-selected node and other common identification nodes in the node sequencing table and broadcasts the message.
Step 4, the consensus node verifies after the message, and the verification sends a preparation message to the main node and the main node candidate node; and the candidate node of the main node is verified after the message, and the verification is carried out by sending a preparation message to the main node.
And 5, after the master node and the master node candidate nodes receive the preparation message, the master node and the master node candidate nodes judge whether the message received by the consensus node is consistent with the message, and when the master node receives 2f +1 (assuming that the total node number is n, n is not less than 3f +1, in order to ensure that the consensus can be correctly achieved, the 2f +1 node is ensured to be consistent, and the number of error nodes is less than f.) the preparation messages sent by different consensus nodes are consistent, the confirmation results are fed back to the confirmation consensus node and the master node candidate nodes. And the candidate node of the main 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 master node is consistent with the feedback result of the master node candidate node.
And 7, sending confirmation messages to the main node and the main node candidate nodes by the consensus node in a confirmation stage, and feeding back confirmation results to the consensus node and the main node candidate nodes when the main node receives the consistency of the confirmation messages sent by the 2f +1 different nodes. And the candidate node of the main 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, packing the confirmation result sent by the master node candidate node, and sending a reply message to the client together.
And step 10, when the results of the main node and the main node candidate node are not consistent, judging that a Byzantine error occurs, initiating a challenge to three nodes arranged behind the main node candidate node in the ranking list, judging the Byzantine node according to the challenge result, replacing the Byzantine node, and sending replacement information to the common identification node. As shown in fig. 3.
In the consensus process, the consistency of the messages received by the nodes and the synchronization of the node states after the nodes are tried to be replaced are ensured, the consensus nodes do not perform pairwise interaction confirmation any more, but are handed to the main node for confirmation, and the communication frequency between the nodes is effectively reduced. And the candidate node of the main node supervises the behavior of the main node, thereby realizing double guarantee and effectively reducing the possibility of the main node doing harm.
The selected master node candidate nodes are randomly sorted by utilizing the integral weight, the behavior of the master node is supervised, and the possibility of the master node candidate nodes doing harm is effectively reduced.
When the back-selected node of the main node judges that the main node has a Byzantine error, challenges are initiated to three nodes with the top rank except the candidate node of the main node in the ranking list, and the Byzantine node is judged to punish according to the judgment results of the three nodes. Increasing the cost of the node doing malicious work.
The process of the 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-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (3)

1. The improvement method of the PBFT algorithm facing the Internet of things is characterized in that the equipment of the Internet of things is used as a block chain node, the nodes are integrated in the consensus process of the nodes, and a main node and a post-selection node of the main node are selected according to integral sorting; in the communication process between the nodes, the master node and the master node candidate node verify the information consistency, and the master node candidate node supervises the behavior of the master node.
2. The improvement method of the PBFT algorithm oriented to the Internet of things as claimed in claim 1, is characterized by comprising the following steps:
1) the method comprises the steps that the Internet of things equipment is used as a block chain consensus node, the nodes are sorted, the consensus node distributes weights through integral, sorting is carried out through a sorting algorithm according to the weights, and a node sorting table is established; selecting a main node and a post-selection node of the main 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 main node numbers the main node post-selected node and other common identification nodes in the node sequencing table and broadcasts the message;
4) the consensus node verifies after the message, and the verification sends a preparation message to the main node and the main node candidate node; the candidate node of the main node is verified after the message, and the verification is carried out by sending a preparation message to the main node;
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 node is consistent with the information, when the master node receives that the number of the nodes of which the preparation information sent by different consensus nodes is consistent reaches a set value, the master node candidate nodes feed back confirmation results to the confirmation consensus node and the master node candidate nodes, and the master node candidate nodes also feed back the consensus nodes according to self judgment results;
6) entering a confirmation stage when the consensus node receives that the feedback result of the master node is consistent with the feedback result of the master node candidate node;
7) the consensus node sends confirmation messages to the main node and the main node candidate nodes in a confirmation stage, when the main node receives that the confirmation messages sent by 2f +1 different nodes are consistent, confirmation results are fed back to the consensus node and the main node candidate nodes, and the main node candidate nodes also feed back the consensus nodes according to self judgment results;
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;
9) when the master node receives the confirmation result sent by the master node candidate node and is consistent with the master node, the master node candidate node is packaged to send the confirmation result, and the confirmation result and the reply message are sent to the client together;
10) and when the results of the main node and the main node candidate nodes are not consistent, judging that a Byzantine error occurs, initiating a challenge to three nodes arranged behind the main node candidate nodes in the ranking list, judging the Byzantine nodes according to the challenge results, replacing the Byzantine nodes, and sending replacement information to the consensus nodes.
3. The improvement method of the internet of things-oriented PBFT algorithm according to claim 1, wherein the specific method of integrating and distributing the weight in the step 1) is as follows: the consensus node obtains a score through honest voting in the consensus process, the score can be deducted through dishonest voting, the probability of the consensus node before being selected is distributed through the score, the higher the score is, the higher the probability is, and the higher the trust degree of the node before being ranked is; initially selecting a main node and a main node candidate node according to the ranking, and replacing the main node candidate node when the main node has an error; and after the replacement is finished or the integral is transformed, reordering, and selecting the first ranked candidate node as the master 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 true CN114448980A (en) 2022-05-06
CN114448980B 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
CN114448980B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN111625593B (en) Block chain-based data processing method and device and computer equipment
US11375010B2 (en) Sharding block chain generation method based on tree structure
CN110289966B (en) Byzantine fault tolerance-based anti-adaptive attack union chain consensus method
CN110875893B (en) Consensus verification method, check node and block chain system
CN109544334B (en) Method for realizing network extensible block chain
CN110796547A (en) Improved practical Byzantine fault-tolerant system based on alliance block chain
CN110300172A (en) A kind of the common recognition method and relevant device of block chain data
CN109995536A (en) A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN112003942B (en) Method, system, node device and storage medium for responding to link-down data request
CN110247774A (en) A kind of the common recognition method and relevant device of block chain data
CN110288479A (en) A kind of the common recognition method and relevant device of block chain data
CN113676541B (en) Improved PBFT consensus method
CN111131209A (en) Improved efficient consensus method, system, computer device and storage medium
WO2021135934A1 (en) Blockchain accounting method and apparatus, node and storage medium
CN111242784B (en) Block pre-packing method, block node, device and storage medium
CN114218612B (en) Consensus method suitable for alliance chain high-frequency transaction scene
CN113132401B (en) Block chain-based data processing method and device
EP3675416A1 (en) Consensus process recovery method and related nodes
CN111555858B (en) Practical Byzantine fault-tolerant consensus method based on block chain type storage
CN114862397B (en) Double-decoupling block chain distributed method based on double-chain structure
CN112395113A (en) Practical Byzantine fault-tolerant consensus method and device and readable storage medium
CN113259326B (en) Consensus optimization method and device based on alliance chain network and computer equipment
CN114448980A (en) Improvement method of PBFT algorithm for Internet of things
CN113179166B (en) High-robustness Byzantine fault-tolerant-based alliance chain data safe real-time uplink method
CN111526165B (en) Consensus method and system in alliance chain

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