CN110855475B - Block chain-based consensus resource slicing method - Google Patents
Block chain-based consensus resource slicing method Download PDFInfo
- Publication number
- CN110855475B CN110855475B CN201911021605.8A CN201911021605A CN110855475B CN 110855475 B CN110855475 B CN 110855475B CN 201911021605 A CN201911021605 A CN 201911021605A CN 110855475 B CN110855475 B CN 110855475B
- Authority
- CN
- China
- Prior art keywords
- consensus
- nodes
- node
- voting
- block
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/30—Decision processes by autonomous network management units using voting and bidding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Abstract
The invention provides a block chain-based consensus resource slicing method, and relates to the technical field of block chains. The improved block chain consensus resource slicing method is based on a traditional practical Byzantine fault-tolerant algorithm (PBFT) consensus mechanism, and specifically comprises the steps of carrying out slicing management on consensus resources in a block chain system, dividing consensus nodes into a plurality of different consensus sets, and carrying out consensus on the plurality of consensus sets concurrently. Meanwhile, in order to ensure the stability of the consensus process, the main node with a high stable value is dynamically selected through the stable value, the main node generates a plurality of preparation blocks from the collected data needing consensus, each consensus identifies the corresponding preparation block, and finally the main node generates a formal block from the data passing the consensus. Compared with the prior art, the method and the device mainly solve the problems of low throughput of the consensus process and resource waste of the consensus process, and can improve the throughput of the block chain system and reduce the resource waste of the consensus.
Description
Technical Field
The invention relates to a consensus resource slicing method based on a block chain, and belongs to the technical field of block chains.
Background
The common consensus mechanism of the existing alliance chain is PBFT (provider edge software) which is a practical Byzantine fault-tolerant algorithm, the PBFT is a state machine copy replication algorithm, namely, a service is used as a state machine for modeling, and the state machine performs copy replication on different nodes of a distributed system. In the common PBFT algorithm, all nodes participate in the consensus process, so that the communication resource consumption is high, and the destructive performance of malicious nodes is strong. In the patent "a consensus method based on PBFT improvement", a node with a high stable value is selected to participate in consensus, and the stable value is dynamically adjusted. Although the communication consumption in the formulation process is reduced, the consensus speed is still not satisfactory for data processing in large-scale trading systems.
In summary, it is urgently needed to provide a technical scheme, which reduces the waste of consensus resources and improves the consensus efficiency on the basis of ensuring and eliminating malicious nodes and safety.
Disclosure of Invention
The invention aims to provide a block chain-based consensus resource slicing method, which mainly solves the problems of low throughput of a consensus process and resource waste of the consensus process. The method can improve the throughput of the block chain system and reduce the waste of the consensus resources.
The technical scheme of the invention is as follows: a block chain-based consensus resource slicing method is disclosed, wherein participants of the method comprise a consensus set, a consensus node and a main node; the consensus nodes are divided into different consensus sets, corresponding preparation blocks are voted and sent to the main node, and then formal blocks generated by the main node are stored; the consensus set refers to dividing a plurality of consensus nodes into groups, and voting different preparation blocks by different consensus sets; the main node is responsible for counting the voting content and putting the voting content into different preparation blocks, then broadcasting the voting content to different consensus sets respectively, counting the voting results of all the consensus sets, writing the contents passing the voting into a formal block and broadcasting the contents to the nodes in the consensus sets.
The method comprises the following specific steps:
step1, selecting the master node: randomly selecting a stable value from the nodes 20% before all the nodes, and selecting a master node as random { the nodes 20% before the stable value };
step2, dividing a consensus set: dividing every four consensus nodes into a consensus set;
step3, the master node generates a prepare block: the main node collects the contents needing to be identified to generate a plurality of preparation blocks;
step4, the master node broadcasts the prepare block to each consensus set: the main node broadcasts the packed preparation blocks to corresponding consensus sets respectively to unify voting contents;
step5, consensus set vote: voting the contents to be voted in the received preparation blocks by each consensus set;
step6, counting voting results by the master node: the main node counts the voting results of all the consensus sets, and if a consensus node exceeding 2/3 passes through, the content is written into a formal block;
step7, the master node generates a formal tile: the main node generates a formal block from the data which passes the voting of all the consensus sets and broadcasts the formal block to other nodes;
step8, generating a formal block by the consensus node: the consensus node stores the formal blocks received from the main node broadcast;
step9, and the stable value reward and punishment: if the node is disconnected, a passage ticket is cast for malicious content, and a normal block or an abnormal block is not recorded in the process of the current round of consensus, the node is regarded as an abnormal node; and if the nodes normally carry out consensus in the current consensus process, the nodes are regarded as normal nodes. The normal nodes reward a stable value of 1 and the abnormal nodes decrease a stable value of 3.
Further, according to the fault tolerance of the PBFT algorithm, the number of the consensus nodes is larger than 3f +1, and the fault tolerance rate of the consensus process can be guaranteed. In order to improve consensus efficiency, each consensus set comprises 4 consensus nodes. The fault tolerance is ensured, and the consensus efficiency is improved to the maximum extent.
Further, if there are M consensus sets, the master node packages and generates M preparation blocks, the M consensus sets perform consensus respectively, theta transaction data needing consensus are total, and each consensus set only needs to be matched withVoting on the data, wherein the ith consensus set needs to be pairedThe strip data is voted.
Further, the master node is selected from the nodes with high stable values, and the safety of the consensus process is further improved.
If the total number of theta transaction data needing consensus, M consensus sets vote for M preparation blocks concurrently, and finally a formal block is generated, so that the consensus speed is increased by M times.
The invention has the beneficial effects that: the invention solves the problems of low throughput of the consensus process and resource waste of the consensus process, and can improve the throughput of the block chain system and reduce the resource waste of the consensus.
Drawings
FIG. 1 is a diagram of a model of the present invention;
FIG. 2 is a general flow chart of the present invention;
fig. 3 is a stable value reward and punishment flow chart of the present invention.
Detailed Description
The invention is further described with reference to the following drawings and detailed description.
Example 1: as shown in fig. 1, a block chain-based consensus resource slicing method includes the following specific steps:
participants of the consensus resource slicing method include: a consensus set, consensus nodes and a main node;
the consensus nodes are divided into different consensus sets, corresponding preparation blocks are voted and sent to the main node, and then formal blocks generated by the main node are stored. The consensus set refers to dividing a plurality of consensus nodes into groups, and voting is carried out on different preparation blocks by different consensus sets. The main node is mainly responsible for counting voting contents and placing the voting contents into different preparation blocks, then broadcasting the voting contents to different consensus sets respectively, counting the voting results of all the consensus sets, writing the contents passing the voting into a formal block and broadcasting the contents to nodes in the consensus sets. Specifically, there are 4M consensus nodes, and each consensus set has 4 consensus nodes, so there should be M consensus sets. The master node should generate M preparation blocks, and the ith consensus set is responsible for voting on the data in the ith preparation block. Theta pieces of transaction data needing consensus, each consensus set only needs to be matchedVoting on the data, wherein the ith consensus set needs to be pairedThe strip data is voted.
Example 2: as shown in fig. 2, a block chain-based consensus resource slicing method includes the following specific steps:
the method for generating the formal block by the consensus resource slicing method comprises the following steps:
step1, selecting the master node: the stable value is randomly selected from all nodes 20% of the nodes, and the master node is random (nodes 20% of the stable value). Let the master node be P.
Step2, dividing a consensus set: every four consensus nodes are divided into a consensus set. 4M consensus nodes are provided, each consensus set comprises 4 consensus nodes, and then M consensus sets { C should be provided1,C2,...CM}。
Step3, the master node generates a prepare block: the main node P collects the content needing to be identified to generate M preparation blocks B1,B2,...BM}。
Step4, the master node broadcasts the prepare block to each consensus set: the master node P respectively packs the prepared blocks { B }1,B2,...BMBroadcast to the corresponding consensus set C1,C2,...CMAnd unifying voting content.
Step5, consensus set vote: consensus set { C1,C2,...CMThe received preparation block B is processed1,B2,...BMVoting the contents to be voted in the Chinese character.
Step6, counting voting results by the master node: master node P statistics consensus set { C1,C2,...CMThe result of voting, if there is a node passing through which is more than 2/3, the piece of content is written into the regular block.
Step7, the master node generates a formal tile: the master node sets all consensus C1,C2,...CMAnd generating a formal block B by data passing the vote and broadcasting the formal block B to other nodes.
Step8, generating a formal block by the consensus node: and the consensus node stores the formal block B which receives the broadcast of the main node.
Example 3: as shown in fig. 3, a block chain-based consensus resource slicing method includes the following specific steps:
and (4) stable value reward and punishment: all the nodes have initial stable values of 5, 10 at the highest and 0 at the lowest, and in order to prevent centralization, when the stable value of a certain node is accumulated to 10, all the nodes with stable values larger than 5 recover to the initial value of 5 in the next round. If the node is disconnected, a passage ticket is cast for malicious content, and a normal block or an abnormal block is not recorded in a certain round of consensus process, the node is regarded as an abnormal node; and if the nodes normally carry out consensus in the current consensus process, the nodes are regarded as normal nodes. The normal node awards the stable value 1 and the abnormal node reduces its stable value 3.
While the present invention has been described in detail with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, and various changes can be made without departing from the spirit and scope of the present invention.
Claims (1)
1. A block chain-based consensus resource slicing method is characterized in that: the participants of the method comprise a consensus set, consensus nodes and a main node; the consensus nodes are divided into different consensus sets, corresponding preparation blocks are voted and sent to the main node, and then formal blocks generated by the main node are stored; the consensus set refers to dividing a plurality of consensus nodes into groups, and voting different preparation blocks by different consensus sets; the main node is responsible for counting voting contents and placing the voting contents into different preparation blocks, then broadcasting the voting contents to different consensus sets respectively, counting the voting results of all the consensus sets and writing the contents passing the voting into a formal block to be broadcast to the nodes in the consensus sets, specifically, 4M consensus nodes are arranged, 4 consensus nodes in each consensus set are provided, then M consensus sets are provided, the main node is required to generate M preparation blocks, the ith consensus set is responsible for voting the data in the ith preparation block, theta transaction data which need to be commonly identified are provided, and each consensus set only needs to be matched with the data in the ith preparation blockVoting on the data, wherein the ith consensus set needs to be pairedVoting is carried out on the bar data;
the method comprises the following specific steps:
step1, selecting the master node: randomly selecting a stable value from the nodes 20% before all the nodes, and selecting a master node as random { the nodes 20% before the stable value };
step2, dividing a consensus set: dividing every four consensus nodes into a consensus set;
step3, the master node generates a prepare block: the main node collects the contents needing to be identified to generate a plurality of preparation blocks;
step4, the master node broadcasts the prepare block to each consensus set: the main node broadcasts the packed preparation blocks to corresponding consensus sets respectively to unify voting contents;
step5, consensus set vote: voting the contents to be voted in the received preparation blocks by each consensus set;
step6, counting voting results by the master node: the main node counts the voting results of all the consensus sets, and if a consensus node exceeding 2/3 passes through, the content is written into a formal block;
step7, the master node generates a formal tile: the main node generates a formal block from the data which passes the voting of all the consensus sets and broadcasts the formal block to other nodes;
step8, generating a formal block by the consensus node: the consensus node stores the formal blocks received from the main node broadcast;
step9, and the stable value reward and punishment: all the nodes have initial stable values of 5, the highest value is 10, the lowest value is 0, in order to prevent centralization, when the stable value of a certain node is accumulated to 10, all the nodes with the stable values larger than 5 recover the initial value of 5 in the next round, if the nodes are disconnected, pass through tickets for malicious contents, and normal blocks or abnormal blocks are not recorded in the process of a certain round of consensus, the nodes are regarded as abnormal nodes; if the nodes are normally identified in the current round of identification process, the nodes are regarded as normal nodes; the normal node awards the stable value 1 and the abnormal node reduces its stable value 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911021605.8A CN110855475B (en) | 2019-10-25 | 2019-10-25 | Block chain-based consensus resource slicing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911021605.8A CN110855475B (en) | 2019-10-25 | 2019-10-25 | Block chain-based consensus resource slicing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110855475A CN110855475A (en) | 2020-02-28 |
CN110855475B true CN110855475B (en) | 2022-03-11 |
Family
ID=69597254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911021605.8A Active CN110855475B (en) | 2019-10-25 | 2019-10-25 | Block chain-based consensus resource slicing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110855475B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112953733B (en) * | 2021-03-16 | 2022-08-26 | 昆明理工大学 | Data management block chain communication resource integration consensus method |
CN113922996B (en) * | 2021-09-29 | 2022-12-30 | 昆明信息港传媒有限责任公司 | Electronic school roll file privacy protection method based on block chain crossing technology |
CN114979167A (en) * | 2022-01-10 | 2022-08-30 | 昆明理工大学 | Consensus system, method and device considering storage optimization |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107360206A (en) * | 2017-03-29 | 2017-11-17 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method, equipment and system |
CN107395353A (en) * | 2017-04-24 | 2017-11-24 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and device |
CN107402824A (en) * | 2017-05-31 | 2017-11-28 | 阿里巴巴集团控股有限公司 | A kind of method and device of data processing |
CN107450981A (en) * | 2017-05-31 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and apparatus |
CN108122165A (en) * | 2017-12-15 | 2018-06-05 | 北京中电普华信息技术有限公司 | A kind of block chain common recognition method and system |
CN109559120A (en) * | 2018-12-03 | 2019-04-02 | 国网电子商务有限公司 | Block chain common recognition method, system, storage medium and electronic equipment based on weight |
CN109785131A (en) * | 2018-12-21 | 2019-05-21 | 昆明理工大学 | A kind of electricity transaction method based on block chain |
CN109952740A (en) * | 2016-08-25 | 2019-06-28 | 张建钢 | The decentralization common recognition algorithm of extensive expansible, low latency, high concurrent and high-throughput |
CN110113388A (en) * | 2019-04-17 | 2019-08-09 | 四川大学 | A kind of method and apparatus of the block catenary system common recognition based on improved clustering algorithm |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106530072A (en) * | 2016-11-22 | 2017-03-22 | 天津米游科技有限公司 | Block chain consensus mechanism |
CN110959281B (en) * | 2017-08-05 | 2022-03-22 | 普罗克鲁斯科技有限公司 | Method and system for securing blockchains using transaction attestation |
CN109921909B (en) * | 2019-02-15 | 2021-12-21 | 北京工业大学 | Block chain consensus method and device based on contribution certification |
SG11201909757RA (en) * | 2019-04-12 | 2019-11-28 | Alibaba Group Holding Ltd | Performing parallel execution of transactions in a distributed ledger system |
-
2019
- 2019-10-25 CN CN201911021605.8A patent/CN110855475B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109952740A (en) * | 2016-08-25 | 2019-06-28 | 张建钢 | The decentralization common recognition algorithm of extensive expansible, low latency, high concurrent and high-throughput |
CN107360206A (en) * | 2017-03-29 | 2017-11-17 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method, equipment and system |
CN107395353A (en) * | 2017-04-24 | 2017-11-24 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and device |
CN107402824A (en) * | 2017-05-31 | 2017-11-28 | 阿里巴巴集团控股有限公司 | A kind of method and device of data processing |
CN107450981A (en) * | 2017-05-31 | 2017-12-08 | 阿里巴巴集团控股有限公司 | A kind of block chain common recognition method and apparatus |
CN108122165A (en) * | 2017-12-15 | 2018-06-05 | 北京中电普华信息技术有限公司 | A kind of block chain common recognition method and system |
CN109559120A (en) * | 2018-12-03 | 2019-04-02 | 国网电子商务有限公司 | Block chain common recognition method, system, storage medium and electronic equipment based on weight |
CN109785131A (en) * | 2018-12-21 | 2019-05-21 | 昆明理工大学 | A kind of electricity transaction method based on block chain |
CN110113388A (en) * | 2019-04-17 | 2019-08-09 | 四川大学 | A kind of method and apparatus of the block catenary system common recognition based on improved clustering algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN110855475A (en) | 2020-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110855475B (en) | Block chain-based consensus resource slicing method | |
CN110505091B (en) | Improved consensus method based on PBFT | |
CN108122165B (en) | Block chain consensus method and system | |
CN110796547A (en) | Improved practical Byzantine fault-tolerant system based on alliance block chain | |
CN109872152B (en) | Block chain consensus method based on share authorization certification mechanism and related equipment | |
CN107688945B (en) | Design method of efficient permission chain based on delay state consensus | |
CN109951474B (en) | Method for realizing block chain common identification block | |
CN111355810A (en) | Improved PBFT consensus method based on credit and voting mechanism | |
CN111106942A (en) | Block chain credit mechanism based on AP-PBFT algorithm | |
CN110851537A (en) | Consensus method based on block chain fragmentation technology | |
CN113347164B (en) | Block chain-based distributed consensus system, method, device and storage medium | |
CN111935207A (en) | Block chain system consensus method based on improved C4.5 algorithm | |
CN111131209A (en) | Improved efficient consensus method, system, computer device and storage medium | |
CN103763343A (en) | Method and device for processing service access | |
CN113407632A (en) | PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm | |
CN111698094B (en) | Common identification method based on block chain system and block chain system | |
CN111478795B (en) | Alliance block chain network consensus method based on mixed Byzantine fault tolerance | |
CN101179392A (en) | Method and system for uploading document | |
CN114338040A (en) | Grouping multi-chain three-time consensus method for block link points | |
CN106162365B (en) | Any active ues collection maintaining method and system based on time wheel disc and barrage behavior | |
US20220239668A1 (en) | Blockchain-based message processing method and apparatus, device, and storage medium | |
CN114584577A (en) | Asynchronous consensus method and system for processing block chain fragments of data | |
CN113781218A (en) | Grouping PBFT consensus algorithm based on feature trust | |
CN107818106B (en) | Big data offline calculation data quality verification method and device | |
CN109872159B (en) | Block chain consensus method and architecture |
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 |