WO2020143183A1 - Blockchain consensus method based on delegated proof of stake, and related device - Google Patents

Blockchain consensus method based on delegated proof of stake, and related device Download PDF

Info

Publication number
WO2020143183A1
WO2020143183A1 PCT/CN2019/092588 CN2019092588W WO2020143183A1 WO 2020143183 A1 WO2020143183 A1 WO 2020143183A1 CN 2019092588 W CN2019092588 W CN 2019092588W WO 2020143183 A1 WO2020143183 A1 WO 2020143183A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
nodes
block
blockchain network
broadcast
Prior art date
Application number
PCT/CN2019/092588
Other languages
French (fr)
Chinese (zh)
Inventor
金龙
汤琦
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020143183A1 publication Critical patent/WO2020143183A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • This application relates to the field of blockchain technology, in particular to a blockchain consensus method and related equipment based on a share authorization certification mechanism.
  • Blockchain network is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and consensus algorithm is one of the core mechanisms of blockchain.
  • algorithms such as POW (Proof of Work), POS (Proof of Rights), DPOS (Proof of Stock Authorization) and other algorithms.
  • the DPOS mechanism is that each shareholder has influence according to its shareholding ratio, and the result of 51% shareholder voting will be irreversible and binding.
  • This consensus mechanism achieves 51% approval through a timely and efficient method.
  • each shareholder can grant his or her voting rights to a representative.
  • the top 101 delegates who received the most votes generated blocks in turn according to the established schedule.
  • Each delegate is assigned a time period to generate blocks. All representatives will receive 10% of the transaction fees contained in an average block as compensation.
  • the DPOS mechanism does not take into account the actual efficiency and contribution of the consensus nodes, it causes great inequity and waste of resources.
  • a block chain consensus method based on the share authorization certification mechanism including:
  • the node information After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
  • the turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
  • a block chain consensus device based on share authorization certification mechanism including:
  • Collecting node information module set to collect node information of the node, broadcast the node information to other nodes in the blockchain network connected with its own node, the node information contains a node identifier;
  • the voting module is set to obtain the node information broadcast by multiple nodes in the blockchain network, and after voting with a share authorization certification mechanism, continue to broadcast the node information to the blockchain network and itself Nodes connected to other nodes;
  • Generate a representative node module set to rank the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node ID corresponding to the representative node to A rotation accounting table, broadcasting the rotation accounting table to all nodes in the blockchain network.
  • a computer device includes a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor causes the processor to perform the following steps:
  • the node information After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
  • the turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
  • a storage medium storing computer-readable instructions, which when executed by one or more processors, causes the one or more processors to perform the following steps:
  • the node information After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
  • the turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
  • the blockchain consensus method, device, computer equipment and storage medium based on the share authorization certification mechanism include collecting node information of nodes and broadcasting the node information to other nodes in the blockchain network that communicate with their own nodes,
  • the node information includes a node identifier; after obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to the block Other nodes in the chain network that communicate with their own nodes; rank the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and correspond the representative nodes to
  • the node identification is updated to the rotation accounting table, and the rotation accounting table is broadcast to all nodes in the blockchain network.
  • This application collects the actual node information of the node in the DPOS consensus mechanism election of the node, and synchronizes it to the blockchain network in real time as voting data for other nodes to refer to and then vote to ensure that the representative nodes voted are in The state of maximum efficiency guarantees fairness.
  • FIG. 1 is a flowchart of a block chain consensus method based on a share authorization certification mechanism in an embodiment of the application
  • FIG. 2 is a flowchart of collecting node information in step S1 in an embodiment
  • FIG. 3 is a flowchart of step S2 in an embodiment
  • FIG. 4 is a structural diagram of a blockchain consensus device based on a share authorization certification mechanism in an embodiment of the application.
  • FIG. 1 is a flowchart of a block chain consensus method based on a share authorization certification mechanism in an embodiment of this application. As shown in FIG. 1, it includes the following steps:
  • Step S1 Collect node information: Collect the node information of the node, and broadcast the node information to other nodes in the blockchain network that communicate with its own node.
  • the node information contains the node identifier.
  • Blockchain network is a system based on blockchain technology, also known as distributed ledger technology, is an Internet database technology. It is characterized by decentralization, openness and transparency, allowing each user to participate in maintaining database records.
  • Blockchain network is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and so on.
  • the blockchain network mainly includes a data layer, a smart contract layer, a consensus layer, etc.
  • the data layer encapsulates basic data and basic algorithms such as low-level data blocks and related data encryption and time stamps, while the low-level data blocks are chained
  • a blockchain is a chained data structure that combines data blocks in a sequential manner in chronological order, and is a tamper-proof and unforgeable distributed ledger guaranteed by cryptography. Smart contracts are based on these credible, non-tamperable data and can automatically execute some pre-defined rules, terms or algorithms.
  • the consensus layer encapsulates a consensus mechanism. The goal of the consensus mechanism is to enable all nodes to save consistent and effective blockchain data. Different consensus mechanisms are used on the blockchain, which will have different effects on the overall performance of the system while meeting consistency and effectiveness.
  • This step uses a blockchain network based on the share authorization certification mechanism (DPOS consensus mechanism). Any node in the blockchain network must abide by the rules of the share authorization certification mechanism. In this blockchain network, all nodes vote for a certain number of representative nodes, and the representative nodes act on behalf of all nodes to generate blocks and Confirm blocks and maintain orderly operation of the system.
  • DPOS consensus mechanism the share authorization certification mechanism
  • step S1 collecting node information of the node, as shown in FIG. 2, includes:
  • Step S101 Calculate the node resource value: collect the node resource information, which includes the network connection speed, CPU idle rate, and memory idle rate, and add the network connection speed, CPU idle rate, and memory idle rate to obtain the node resource value.
  • step S102 the node contribution degree is calculated: the number of historical block generations of the node and the total number of block generations of the blockchain network are collected, and the historical block generation number is divided by the total number of block generations to obtain the node contribution degree.
  • the node contribution degree in this step refers to the proportion of the node in the previous generation of transaction blocks, and the more blocks generated by itself, the greater the node contribution.
  • All nodes in the blockchain network are preset with a block generation record table.
  • the block generation record table records the node ID, block speed, block pass ID or block failure corresponding to each generated transaction block Logo. Find out the transaction blocks generated by the node identifier of this node from the block generation record table. After removing the transaction blocks of the block failure identification, calculate the number of other transaction blocks to obtain the historical number of block generation of the node. After removing the transaction blocks identified by the block failure identification, the total number of transaction blocks in the block record table is calculated to obtain the total number of blocks generated.
  • Step S103 Calculate the historical service index: collect the historical block generation speed of the node, calculate the historical average block generation speed, and the historical average block generation speed is the historical service index.
  • the historical service index in this step refers to the average speed of the blocks in the historical block of the node. Find out the transaction blocks generated by the node identifier of this node from the block generation record table, and after removing the block of the block failure identification, obtain the block generation speed corresponding to the deleted transaction block, and find all the block speeds After the sum, divided by the node's historical number of blocks, the result is the historical service indicator.
  • step S104 node information is obtained: the node information includes a preset node identifier, a node resource value, a node contribution degree, and a historical service index.
  • node information in this step includes not only the collected and processed indexes, but also the node identifier, which is used to distinguish the identity of each node in the subsequent voting.
  • This embodiment collects node resource values, node contributions, and historical service indicators before voting on all nodes using the share authorization certification mechanism to provide reference data for subsequent voting elections to ensure that the representative nodes that are subsequently voted can be in effect Maximized state.
  • step S1 the node information is broadcast to other nodes in the blockchain network that communicate with their own nodes, including:
  • Step S111 establishing a connection: establishing a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol.
  • TCP Transmission Control Control Protocol
  • TCP Transmission Control Control Protocol
  • the node first sends a request for a syn message with a flag bit. After receiving the request, the other node sends a syn and flag ack to confirm the connection request; after receiving the request, the node sends ack again to confirm the completion of the TCP connection between the node and other nodes.
  • Step S112 Broadcasting: Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
  • HTTP HyperTextTransferProtocol, Hypertext Transfer Protocol
  • the HTTP request message includes 4 parts, which are the request line, request header, blank line and request body.
  • the request line includes the request method, request URL, and http protocol version, where the request method is GET, POST, HEAD, or PUT, etc., and the request header includes node information, character set, and so on.
  • the node information can also be encrypted by the private key preset by the node and broadcast to other nodes.
  • a TCP connection is established, and the node information of the node is broadcast to other nodes in the format of an HTTP request message.
  • This broadcast method is safe, stable, and fast, and is suitable for the broadcast of the blockchain network.
  • Step S2 Voting: After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with the share authorization certification mechanism, the node information will continue to be broadcast to other nodes in the blockchain network that communicate with their own nodes.
  • Any node in the blockchain network not only broadcasts the node information of its own node to other nodes, but also receives the node information broadcast by other nodes.
  • step S2 as shown in FIG. 3, includes:
  • Step S201 screening nodes: after obtaining the node information broadcast by multiple nodes in the blockchain network, performing weighted calculation on each node information to obtain weighting coefficient values, sorting the weighting coefficient values of multiple nodes from high to low, screening M nodes with the highest weighting coefficient values are generated.
  • the weighting calculation formula of the weighting coefficient value Z i is as follows:
  • a i is the node resource value of the i-th node
  • B i is the node contribution of the i-th node
  • C i is the historical service index of the i-th node
  • a, b, and c are coefficients.
  • the selected nodes o, p, and q are the M-1, M, and M+1, respectively If the nodes have the same weighting coefficient value, then the node that has received the broadcast among the multiple nodes is selected.
  • Step S202 automatic voting: automatically vote for M nodes through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes is continuously broadcast to other nodes in the blockchain network that communicate with their own nodes.
  • the share authorization certification mechanism is encapsulated in the consensus layer of the blockchain network. Any node in the blockchain network follows the consensus mechanism of the consensus layer. In this step, any node follows the share authorization certification mechanism. Any node All use the same consensus algorithm to automatically vote on the M nodes selected at the consensus layer.
  • the weighting coefficient values are calculated for the node information of multiple nodes, and the weighting coefficient values are sorted from high to low, and M nodes with maximum efficiency are selected.
  • voting nodes automatic voting is completed through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes will continue to be broadcast. This point-to-point, one-by-one broadcast method to neighboring points, the propagation speed between nodes is fast, and the security of data transmission is higher. You can also share some hardware and software resources and services without going through intermediate entities, achieving the purpose of decentralization.
  • step S201 after obtaining node information broadcast by multiple nodes in the blockchain network, weighting calculation is performed on each node information to obtain weighting coefficient values, including:
  • Step S20101 Remove the nodes that have failed in the history of block generation: after obtaining the node information broadcast by multiple nodes in the blockchain network, find out whether there are multiple records of historical block failure records in multiple nodes in the preset block record table. If the node has a history of block failure records, the node is deleted.
  • any node fails to generate blocks due to problems such as the failure of the network or consistency verification within a specified time, the representative node election will be directly eliminated.
  • the preset block generation record table is searched to find the corresponding node identifiers of the obtained multiple nodes. Is there a block failure identification in the block generation record table? If it exists, it is considered that the node corresponding to the block failure identification exists History record of block failure.
  • Step S20102 Calculate the weighting coefficient value: perform weighted calculation on the node information of multiple nodes after excluding the historical block failure records to obtain the weighting coefficient value.
  • the nodes of the historical block failure records do not need to calculate the weighting coefficient values, before calculating the weighting coefficient values, the nodes of the historical block failure records are removed to reduce the calculation power.
  • Step S3 generate representative nodes: arrange the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table , Broadcast the billing table in turns to all nodes in the blockchain network.
  • a consensus algorithm for screening representative nodes is preset in the consensus layer of the blockchain network. This consensus algorithm is the same as the rules for screening representative nodes defined by the share authorization certification mechanism in the prior art, for example:
  • the above code is to automatically obtain the voting results of all nodes in the blockchain network, and automatically define the top N nodes with the highest number of votes as representative nodes.
  • the node identifiers corresponding to the N representative nodes are also written into a preset rotation accounting table. In order to facilitate subsequent consistency verification through the rotation accounting table. In order to ensure the safety and reliability of the consistency verification, after all the node IDs of the N representative nodes are written into the rotation accounting table, the N node IDs in the rotation accounting table are also randomly sorted:
  • the final rotation accounting table is obtained, and the rotation accounting table is broadcast to all nodes in the blockchain network, so that the nodes can be used for subsequent consistency verification of the transaction block.
  • Step S4 block generation and verification: obtain transaction information, generate transaction blocks for the transaction information, broadcast the transaction blocks to other nodes in the blockchain network; receive transaction blocks broadcast by other nodes, and agree on the transaction blocks Verification, when the verification is passed, the transaction block will be signed and broadcast to other nodes in the blockchain network, the transaction block will be stored, and the node identification, block generation speed and block passing identification corresponding to the transaction block will be stored It is recorded in the block generation record table, otherwise the node identification and block failure identification corresponding to the transaction block are recorded in the block generation record table.
  • the transaction information is generated into a transaction block, and the transaction block is also broadcast.
  • the representative node not only completes the transaction block work, but also performs the consistency verification work. Among them, the consistency verification of the transaction block includes:
  • the received transaction block has been signed by N nodes, it is automatically defined as verified; otherwise, the block header information in the transaction block is obtained, and the block header information contains the node identifier, and the node identifier and the rotation accounting table
  • the order of the representative nodes is compared to determine whether it is the turn of the representative node corresponding to the current node ID to generate a block. If it is, it is determined that the verification is passed; otherwise, it is determined that the verification fails.
  • the consistency verification in this step is that the node checks whether the block header information of each block produced is consistent with the order of the rotation accounting table to ensure consistency. When the two are consistent, the private key preset area of the own node is used. The block header is signed to prove that the transaction block is verified. If the block verification is inconsistent, the node does not sign the transaction block. When the transaction block cannot satisfy the verification of M nodes, the next representative node automatically obtains the transaction information and regenerates the block.
  • This embodiment is based on the blockchain consensus method of the share authorization certification mechanism.
  • the node information is used as important voting data, combined with the DPOS consensus mechanism, the election A certain number of representative nodes are used as subsequent block generation and verification nodes.
  • the elected representative nodes can all be in a state of maximum efficiency, ensuring the fairness of each node. Combined with the DPOS consensus mechanism, it guarantees node security and prevents the blockchain network from being maliciously attacked.
  • a blockchain consensus device based on a share authorization certification mechanism includes the following modules: a node information collection module, which is set to collect node information of the node and broadcast the node information to Other nodes in the blockchain network that communicate with their own nodes, the node information contains the node identifier; the voting module is set to obtain the node information broadcast by multiple nodes in the blockchain network, and after voting with the share authorization certification mechanism, Continue to broadcast the node information to other nodes in the blockchain network that are connected to their own nodes; generate a representative node module, set to rank the votes of all nodes from high to low, get the top N nodes with the highest number of votes, and convert N A node is defined as a representative node, and the node identification corresponding to the representative node is updated to the rotation accounting table, and the rotation accounting table is broadcast to all nodes in the blockchain network.
  • a node information collection module which is set to collect node information of the node and broadcast the node information to Other nodes in the blockchain network that communicate with their own
  • the node information includes preset node identifiers, node resource values, node contributions, and historical service indicators.
  • the node information collection module includes: a node resource collection unit configured to collect node resource information, and the node resource information includes a network Connection speed, CPU idle rate and memory idle rate, add the network connection speed, CPU idle rate and memory idle rate to get the node resource value; calculate the node contribution unit, set to collect the historical number of blocks and the blockchain of the node The total number of block generations on the network, divide the number of historical block generations by the total number of block generations to obtain the node contribution; calculate the historical service indicator unit, set to collect the historical block generation speed of the node, calculate the historical average block generation speed, and the historical average block generation speed For historical service indicators.
  • the collection node information module is also set to establish a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol; broadcast the node information to other nodes in the format of a hypertext transmission protocol HTTP request message.
  • the voting module includes: selecting the highest node unit, set to obtain the node information broadcast by multiple nodes in the blockchain network, and performing weighted calculation on each node information to obtain a weighting coefficient value, which is The weighting coefficient values of the nodes are sorted from high to low, and the M nodes with the highest weighting coefficient value are selected.
  • the weighting calculation formula of the weighting coefficient value Z i is as follows:
  • a i is the node resource value of the i-th node
  • B i is the node contribution of the i-th node
  • C i is the historical service index of the i-th node
  • a, b and c are coefficients
  • the automatic voting unit is set to automatically vote for M nodes through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes will continue to be broadcast to other nodes in the blockchain network that communicate with their own nodes. Filter the highest node unit, and also set to obtain the node information broadcast by multiple nodes in the blockchain network, in the preset block record table to find whether multiple nodes have historical block failure records, if any node exists In the case of historical block failure records, the nodes are eliminated; the node information of multiple nodes after the historical block failure records are eliminated is weighted to obtain the weighted coefficient value.
  • generating a representative node module includes: generating a block unit, configured to obtain transaction information, generating a transaction block for the transaction information, and broadcasting the transaction block to other nodes in the blockchain network; a verification unit, Set to receive transaction blocks broadcast by other nodes, and verify the consistency of the transaction blocks. When the verification is passed, the transaction blocks will be signed and broadcast to other nodes in the blockchain network to store the transaction blocks, and Record the node identification, block-out speed and block-out corresponding to the transaction block in the block-out record table, otherwise record the node identification and block-out failure corresponding to the transaction block in the block-out record table.
  • the verification unit is also set to be automatically defined as verified when the received transaction block has been signed by N nodes; otherwise, the block header information in the transaction block is obtained, and the block header information contains the node identifier, and the node The identifier is compared with the order of the representative nodes in the turn bookkeeping table, and it is judged whether it is the turn of the representative node corresponding to the current node identifier to produce a block.
  • a computer device which includes a memory and a processor.
  • the memory stores computer readable instructions.
  • the processor executes the computer readable instructions to implement the above The steps in the block chain consensus method based on the share authorization certification mechanism of the embodiment.
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute the share-based authorization of the foregoing embodiments Steps in the blockchain consensus method of the proof mechanism.
  • the storage medium may be a non-volatile storage medium.
  • the program may be stored in a computer-readable storage medium, and the storage medium may include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present application relates to the technical field of blockchain consensus mechanisms, and in particular to a blockchain consensus method based on delegated proof of stake, and a related device. The method comprises: collecting node information of a node, and broadcasting the node information to other nodes, wherein the node information contains a node identifier; after node information broadcast by a plurality of nodes is obtained, casting a vote by means of delegated proof of stake, and then continuously broadcasting the node information to the other nodes; and arranging the votes cast for all the nodes from high to low to obtain first N nodes with the highest number of votes, defining the N nodes as representative nodes, updating node identifiers corresponding to the representative nodes to an alternate accounting table, and broadcasting the alternate accounting table to all the nodes. In the present application, node information and a line DPOS consensus mechanism are combined, and votes are cast to select representative nodes, so as to ensure that the voted for representative nodes are all in an efficiency maximization state and ensure fairness among all nodes.

Description

基于股份授权证明机制的区块链共识方法及相关设备Blockchain consensus method and related equipment based on share authorization certification mechanism
本申请要求于2019年01月11提交中国专利局、申请号为201910026430.3、发明名称为“基于股份授权证明机制的区块链共识方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on January 11, 2019, with the application number 201910026430.3 and the invention titled "Blockchain Consensus Method and Related Equipment Based on the Proof-of-Share Authorization Mechanism", all of which are approved by The reference is incorporated in this application.
技术领域Technical field
本申请涉及区块链技术领域,尤其涉及一种基于股份授权证明机制的区块链共识方法及相关设备。This application relates to the field of blockchain technology, in particular to a blockchain consensus method and related equipment based on a share authorization certification mechanism.
背景技术Background technique
区块链网络是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式,而共识算法是区块链的核心机制之一。随着区块链技术的发展和演变包含了:POW(工作量证明)、POS(权益证明)、DPOS(股份授权证明机制)等算法。其中,DPOS机制是每个股东按其持股比例拥有影响力,51%股东投票的结果将是不可逆且有约束力的。这种共识机制是通过及时而高效的方法达到51%批准。为达到这个目标,每个股东可以将其投票权授予一名代表。获票数最多的前101位代表按既定时间表轮流产生区块。每名代表分配到一个时间段来产生区块。所有的代表将收到等同于一个平均水平的区块所含交易费的10%作为报酬。但是由于DPOS机制没有考虑到共识节点实际在用效率及贡献,造成极大不公平和资源浪费。Blockchain network is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and consensus algorithm is one of the core mechanisms of blockchain. With the development and evolution of blockchain technology, it includes algorithms such as POW (Proof of Work), POS (Proof of Rights), DPOS (Proof of Stock Authorization) and other algorithms. Among them, the DPOS mechanism is that each shareholder has influence according to its shareholding ratio, and the result of 51% shareholder voting will be irreversible and binding. This consensus mechanism achieves 51% approval through a timely and efficient method. To achieve this goal, each shareholder can grant his or her voting rights to a representative. The top 101 delegates who received the most votes generated blocks in turn according to the established schedule. Each delegate is assigned a time period to generate blocks. All representatives will receive 10% of the transaction fees contained in an average block as compensation. However, because the DPOS mechanism does not take into account the actual efficiency and contribution of the consensus nodes, it causes great inequity and waste of resources.
发明内容Summary of the invention
有鉴于此,有必要针对DPOS共识机制中,未考虑共识节点实际效率及贡献,造成不公平和资源浪费的问题,提供一种基于股份授权证明机制的区块链共识方法及相关设备。In view of this, it is necessary to provide a blockchain consensus method and related equipment based on the share authorization certification mechanism for the DPOS consensus mechanism, which does not consider the actual efficiency and contribution of the consensus nodes, causing unfairness and waste of resources.
一种基于股份授权证明机制的区块链共识方法,包括:A block chain consensus method based on the share authorization certification mechanism, including:
采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
一种基于股份授权证明机制的区块链共识装置,包括:A block chain consensus device based on share authorization certification mechanism, including:
采集节点信息模块,设置为采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collecting node information module, set to collect node information of the node, broadcast the node information to other nodes in the blockchain network connected with its own node, the node information contains a node identifier;
投票模块,设置为获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;The voting module is set to obtain the node information broadcast by multiple nodes in the blockchain network, and after voting with a share authorization certification mechanism, continue to broadcast the node information to the blockchain network and itself Nodes connected to other nodes;
产生代表节点模块,设置为对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Generate a representative node module, set to rank the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node ID corresponding to the representative node to A rotation accounting table, broadcasting the rotation accounting table to all nodes in the blockchain network.
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor causes the processor to perform the following steps:
采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A storage medium storing computer-readable instructions, which when executed by one or more processors, causes the one or more processors to perform the following steps:
采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
上述基于股份授权证明机制的区块链共识方法、装置、计算机设备和存储介质,包括采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。本申请在对节点进行DPOS共识机制选举时,采集节点实际的节点信息,实时同步至区块链网络中,作为投票数据,供其他节点参考后,进行投票,保证了投票出的代表节点均处于效能最大化状态,保证了公平性。The blockchain consensus method, device, computer equipment and storage medium based on the share authorization certification mechanism include collecting node information of nodes and broadcasting the node information to other nodes in the blockchain network that communicate with their own nodes, The node information includes a node identifier; after obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to the block Other nodes in the chain network that communicate with their own nodes; rank the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and correspond the representative nodes to The node identification is updated to the rotation accounting table, and the rotation accounting table is broadcast to all nodes in the blockchain network. This application collects the actual node information of the node in the DPOS consensus mechanism election of the node, and synchronizes it to the blockchain network in real time as voting data for other nodes to refer to and then vote to ensure that the representative nodes voted are in The state of maximum efficiency guarantees fairness.
附图说明BRIEF DESCRIPTION
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并 不认为是对本申请的限制。By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments, and are not considered to limit the present application.
图1为本申请一个实施例中的基于股份授权证明机制的区块链共识方法的流程图;FIG. 1 is a flowchart of a block chain consensus method based on a share authorization certification mechanism in an embodiment of the application;
图2为一个实施例中步骤S1采集节点信息的一种流程图;FIG. 2 is a flowchart of collecting node information in step S1 in an embodiment;
图3为一个实施例中步骤S2的一种流程图;FIG. 3 is a flowchart of step S2 in an embodiment;
图4为本申请一个实施例中基于股份授权证明机制的区块链共识装置的结构图。FIG. 4 is a structural diagram of a blockchain consensus device based on a share authorization certification mechanism in an embodiment of the application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clear, the following describes the present application in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。Those skilled in the art can understand that unless specifically stated, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the word "comprising" used in the description of this application refers to the presence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or their groups.
图1为本申请一个实施例中的基于股份授权证明机制的区块链共识方法的流程图,如图1所示,包括以下步骤:FIG. 1 is a flowchart of a block chain consensus method based on a share authorization certification mechanism in an embodiment of this application. As shown in FIG. 1, it includes the following steps:
步骤S1,采集节点信息:采集节点的节点信息,将节点信息广播给区块链网络中与自身节点联通的其他节点,节点信息中包含有节点标识。Step S1: Collect node information: Collect the node information of the node, and broadcast the node information to other nodes in the blockchain network that communicate with its own node. The node information contains the node identifier.
区块链网络是一种基于区块链技术的系统,也被称为分布式账本技术,是一种互联网数据库技术。其特点是去中心化、公开透明,让每个用户均可参与维护数据库记录。区块链网络是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链网络主要包括数据层、智能合约层、共识层等,其中,数据层封装了低层数据区块以及相关的数据加密和时间戳等基础数据和基本算法,而低层数据区块以链式结构呈现,即区块链是一种 按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的分布式账本。智能合约是基于这些可信的不可篡改的数据,可以自动化的执行一些预先定义好的规则、条款或算法。共识层封装有共识机制,共识机制的目标是使所有节点保存一致的、有效的区块链数据。区块链上采用不同的共识机制,在满足一致性和有效性的同时会对系统整体性能产生不同影响。本步骤采用基于股份授权证明机制(DPOS共识机制)的区块链网络。在区块链网络中的任一节点都需遵守股份授权证明机制的规则,在此区块链网络中,全体节点投票选举出一定数量的代表节点,由代表节点来代理全体节点生成区块及确认区块、维持系统有序运行。Blockchain network is a system based on blockchain technology, also known as distributed ledger technology, is an Internet database technology. It is characterized by decentralization, openness and transparency, allowing each user to participate in maintaining database records. Blockchain network is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and so on. The blockchain network mainly includes a data layer, a smart contract layer, a consensus layer, etc. Among them, the data layer encapsulates basic data and basic algorithms such as low-level data blocks and related data encryption and time stamps, while the low-level data blocks are chained The structure is presented, that is, a blockchain is a chained data structure that combines data blocks in a sequential manner in chronological order, and is a tamper-proof and unforgeable distributed ledger guaranteed by cryptography. Smart contracts are based on these credible, non-tamperable data and can automatically execute some pre-defined rules, terms or algorithms. The consensus layer encapsulates a consensus mechanism. The goal of the consensus mechanism is to enable all nodes to save consistent and effective blockchain data. Different consensus mechanisms are used on the blockchain, which will have different effects on the overall performance of the system while meeting consistency and effectiveness. This step uses a blockchain network based on the share authorization certification mechanism (DPOS consensus mechanism). Any node in the blockchain network must abide by the rules of the share authorization certification mechanism. In this blockchain network, all nodes vote for a certain number of representative nodes, and the representative nodes act on behalf of all nodes to generate blocks and Confirm blocks and maintain orderly operation of the system.
在一个实施例中,步骤S1中,采集节点的节点信息,如图2所示,包括:In one embodiment, in step S1, collecting node information of the node, as shown in FIG. 2, includes:
步骤S101,计算节点资源值:采集节点资源信息,节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将网络连接速度、CPU空闲率和内存空闲率相加,得到节点资源值。Step S101: Calculate the node resource value: collect the node resource information, which includes the network connection speed, CPU idle rate, and memory idle rate, and add the network connection speed, CPU idle rate, and memory idle rate to obtain the node resource value.
在采集节点资源信息时,可以通过hook机制监听节点的网络连接速度、CPU空闲率和内存空闲率,得到节点资源信息。When collecting node resource information, you can monitor the node's network connection speed, CPU idle rate, and memory idle rate through the hook mechanism to obtain node resource information.
步骤S102,计算节点贡献度:采集节点的历史出块数量和区块链网络的出块总数,将历史出块数量除以出块总数,得到节点贡献度。In step S102, the node contribution degree is calculated: the number of historical block generations of the node and the total number of block generations of the blockchain network are collected, and the historical block generation number is divided by the total number of block generations to obtain the node contribution degree.
本步骤的节点贡献度指该节点在以往的生成交易区块中出块所占的比例,由自己参与的出块越多,节点贡献度越大。The node contribution degree in this step refers to the proportion of the node in the previous generation of transaction blocks, and the more blocks generated by itself, the greater the node contribution.
在区块链网络中的所有节点均预设有一份出块记录表,出块记录表中记录有每个生成的交易区块对应的节点标识、出块速度、出块通过标识或出块失败标识。从出块记录表中查找哪些属于此节点的节点标识生成的交易区块,去除出块失败标识的交易区块后,计算其他交易区块的数量,得到节点的历史出块数量。去除出块失败标识的交易区块后,计算出块记录表中交易区块的总数,得到出块总数。All nodes in the blockchain network are preset with a block generation record table. The block generation record table records the node ID, block speed, block pass ID or block failure corresponding to each generated transaction block Logo. Find out the transaction blocks generated by the node identifier of this node from the block generation record table. After removing the transaction blocks of the block failure identification, calculate the number of other transaction blocks to obtain the historical number of block generation of the node. After removing the transaction blocks identified by the block failure identification, the total number of transaction blocks in the block record table is calculated to obtain the total number of blocks generated.
步骤S103,计算历史服务指标:采集节点的历史出块速度,计算历史出块平均速度,历史出块平均速度为历史服务指标。Step S103: Calculate the historical service index: collect the historical block generation speed of the node, calculate the historical average block generation speed, and the historical average block generation speed is the historical service index.
本步骤的历史服务指标是指该节点历史的区块中出块的平均速度。从出块记录表中查找哪些属于此节点的节点标识生成的交易区块,去除出块失败标识的交易区块后,获取剔除后的交易区块对应的出块速度,将所有出块速度求和后,除以节点的历史出块数量,得到的结果即为历史服务指标。The historical service index in this step refers to the average speed of the blocks in the historical block of the node. Find out the transaction blocks generated by the node identifier of this node from the block generation record table, and after removing the block of the block failure identification, obtain the block generation speed corresponding to the deleted transaction block, and find all the block speeds After the sum, divided by the node's historical number of blocks, the result is the historical service indicator.
步骤S104,得到节点信息:节点信息包括预设的节点标识、节点资源值、节点贡献度和历史服务指标。In step S104, node information is obtained: the node information includes a preset node identifier, a node resource value, a node contribution degree, and a historical service index.
为了区分区块链网络中的节点身份,任一节点在区块链网络中进行注册后,均会被分配唯一的节点标识,用以身份证明。本步骤的节点信息不仅包括采集和处理后的多项指标,还包括此节点标识,用于后续在投票是区别各节点身份。In order to distinguish the identity of nodes in the blockchain network, after any node is registered in the blockchain network, it will be assigned a unique node identifier for proof of identity. The node information in this step includes not only the collected and processed indexes, but also the node identifier, which is used to distinguish the identity of each node in the subsequent voting.
本实施例通过在采用股份授权证明机制对全体节点进行投票选举前,采集节点资源值、节点贡献度和历史服务指标,为后续投票选举提供参考数据,保证后续投票出的代表节点均能处于效能最大化状态。This embodiment collects node resource values, node contributions, and historical service indicators before voting on all nodes using the share authorization certification mechanism to provide reference data for subsequent voting elections to ensure that the representative nodes that are subsequently voted can be in effect Maximized state.
在一个实施例中,步骤S1中,将节点信息广播给区块链网络中与自身节点联通的其他节点,包括:In one embodiment, in step S1, the node information is broadcast to other nodes in the blockchain network that communicate with their own nodes, including:
步骤S111,建立连接:通过传输控制协议TCP协议与区块链网络中的其他节点建立连接。Step S111, establishing a connection: establishing a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol.
TCP(Transmission Control Protocol传输控制协议)是一种面向连接的、可靠的、基于字节流的传输层通信协议。节点在广播时,采用TCP协议,进行三次握手,与其他节点建立连接后,将自身的节点信息发送给其他节点,建立连接过程如下:TCP (Transmission Control Control Protocol) is a connection-oriented, reliable, and transport layer communication protocol based on byte stream. When the node broadcasts, it uses the TCP protocol to perform three handshake. After establishing a connection with other nodes, it sends its own node information to other nodes. The connection establishment process is as follows:
节点首先发送标志位syn报文请求,其他节点收到请求后,发送syn和标志位ack确认连接请求;节点收到请求后,再次发送ack进行确认,完成节点与其他节点TCP连接。The node first sends a request for a syn message with a flag bit. After receiving the request, the other node sends a syn and flag ack to confirm the connection request; after receiving the request, the node sends ack again to confirm the completion of the TCP connection between the node and other nodes.
步骤S112,广播:将节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。Step S112: Broadcasting: Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
HTTP(Hyper Text Transfer Protocol,超文本传输协议),是一种建立在TCP上的无状态连接。建立TCP连接后,其他节点接收节点发送的节点信息, 此节点信息以HTTP请求报文的格式发送。HTTP请求报文包括4个部分,分别为请求行、请求头部、空白行和请求主体。其中请求行包括请求方法、请求URL、http协议版本,其中请求方法为GET、POST、HEAD或PUT等,请求头部包括节点信息、字符集等。HTTP (HyperTextTransferProtocol, Hypertext Transfer Protocol) is a stateless connection established on TCP. After establishing a TCP connection, other nodes receive the node information sent by the node, and the node information is sent in the format of an HTTP request message. The HTTP request message includes 4 parts, which are the request line, request header, blank line and request body. The request line includes the request method, request URL, and http protocol version, where the request method is GET, POST, HEAD, or PUT, etc., and the request header includes node information, character set, and so on.
为了保证节点信息的安全稳定传输,在广播前,还可以通过节点预设的私钥对节点信息加密后,广播到其他节点。In order to ensure the safe and stable transmission of the node information, before the broadcast, the node information can also be encrypted by the private key preset by the node and broadcast to other nodes.
本步骤通过建立TCP连接,以HTTP请求报文的格式将节点的节点信息广播给其他节点,此广播方式即安全稳定,又快速,适用于区块链网络的广播。In this step, a TCP connection is established, and the node information of the node is broadcast to other nodes in the format of an HTTP request message. This broadcast method is safe, stable, and fast, and is suitable for the broadcast of the blockchain network.
步骤S2,投票:获得区块链网络中多个节点广播的节点信息后,以股份授权证明机制进行投票后,将节点信息继续广播给区块链网络中与自身节点联通的其他节点。Step S2: Voting: After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with the share authorization certification mechanism, the node information will continue to be broadcast to other nodes in the blockchain network that communicate with their own nodes.
区块链网络中的任一节点不仅将自身节点的节点信息广播至其他节点,还接收其他节点广播的节点信息,本步骤在对节点进行投票前,无需接收全部节点广播的节点信息,而是接收到一定数量节点的节点资源信息后,例如,当接收到区块链网络中90%的节点广播的节点资源信息后,根据节点信息,通过股份授权证明机制限定的投票规则进行投票。Any node in the blockchain network not only broadcasts the node information of its own node to other nodes, but also receives the node information broadcast by other nodes. In this step, before voting on the node, it is not necessary to receive the node information broadcast by all nodes, but After receiving the node resource information of a certain number of nodes, for example, after receiving the node resource information broadcast by 90% of the nodes in the blockchain network, according to the node information, voting is conducted through the voting rules defined by the share authorization certification mechanism.
在一个实施例中,步骤S2,如图3所示,包括:In one embodiment, step S2, as shown in FIG. 3, includes:
步骤S201,筛选节点:获得区块链网络中多个节点广播的节点信息后,对每个节点信息进行加权计算,得到加权系数值,对多个节点的加权系数值从高到低排序,筛选出加权系数值最高的M个节点。Step S201, screening nodes: after obtaining the node information broadcast by multiple nodes in the blockchain network, performing weighted calculation on each node information to obtain weighting coefficient values, sorting the weighting coefficient values of multiple nodes from high to low, screening M nodes with the highest weighting coefficient values are generated.
加权系数值Z i的加权计算公式如下: The weighting calculation formula of the weighting coefficient value Z i is as follows:
Z i=A i*a+B i*b+C i*c Z i = A i *a+B i *b+C i *c
其中,A i为第i个节点的节点资源值,B i为第i个节点的节点贡献度,C i为第i个节点的历史服务指标,a、b和c为系数。 Among them, A i is the node resource value of the i-th node, B i is the node contribution of the i-th node, C i is the historical service index of the i-th node, and a, b, and c are coefficients.
在加权系数值Z i的加权计算公式中,系数a、b和c是取值范围在0-1之间的常数,且a+b+c=1,可以分别取值为0.2、0.5和0.3。 In the weighted calculation formula of the weighting coefficient value Z i , the coefficients a, b, and c are constants with a value range of 0-1, and a+b+c=1, which can take values of 0.2, 0.5, and 0.3, respectively. .
在筛选出加权系数值最高的M个节点时,若存在多个节点具有相同加权系数值时,例如,筛选出的节点o、节点p和节点q分别为第M-1、M和M+1个节点,具有相同加权系数值时,则筛选出接收到多个节点中广播在前的节点。When filtering out the M nodes with the highest weighting coefficient value, if there are multiple nodes with the same weighting coefficient value, for example, the selected nodes o, p, and q are the M-1, M, and M+1, respectively If the nodes have the same weighting coefficient value, then the node that has received the broadcast among the multiple nodes is selected.
步骤S202,自动投票:通过股份授权证明机制,自动投票给M个节点,投票完成后,将多个节点的节点信息继续广播给区块链网络中与自身节点联通的其他节点。Step S202, automatic voting: automatically vote for M nodes through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes is continuously broadcast to other nodes in the blockchain network that communicate with their own nodes.
股份授权证明机制封装在区块链网络的共识层中,区块链网络中的任一节点都遵循共识层的共识机制,在本步骤中,任一节点都遵循股份授权证明机制,任一节点都采用同一个共识算法,在共识层自动对筛选出的M个节点进行投票。The share authorization certification mechanism is encapsulated in the consensus layer of the blockchain network. Any node in the blockchain network follows the consensus mechanism of the consensus layer. In this step, any node follows the share authorization certification mechanism. Any node All use the same consensus algorithm to automatically vote on the M nodes selected at the consensus layer.
本实施例通过对多个节点的节点信息计算加权系数值,对加权系数值从高到低排序,筛选出效能最大化状态的M个节点,作为投票节点,通过股份授权证明机制完成自动投票,在投票完成后,还将多个节点的节点信息继续进行广播,这种点对点,逐个向临近点广播的方式,节点和节点之间的传播速度快,传播数据的安全性更高,节点之间还可以共享部分软硬件资源和服务,无需经过中间实体,实现了去中心化的目的。In this embodiment, the weighting coefficient values are calculated for the node information of multiple nodes, and the weighting coefficient values are sorted from high to low, and M nodes with maximum efficiency are selected. As voting nodes, automatic voting is completed through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes will continue to be broadcast. This point-to-point, one-by-one broadcast method to neighboring points, the propagation speed between nodes is fast, and the security of data transmission is higher. You can also share some hardware and software resources and services without going through intermediate entities, achieving the purpose of decentralization.
在一个实施例中,步骤S201中,获得区块链网络中多个节点广播的节点信息后,对每个节点信息进行加权计算,得到加权系数值,包括:In one embodiment, in step S201, after obtaining node information broadcast by multiple nodes in the blockchain network, weighting calculation is performed on each node information to obtain weighting coefficient values, including:
步骤S20101,剔除历史出块失败的节点:获得区块链网络中多个节点广播的节点信息后,在预设的出块记录表中查找多个节点是否存在历史出块失败记录,若任一节点存在历史出块失败记录,则将节点剔除。Step S20101: Remove the nodes that have failed in the history of block generation: after obtaining the node information broadcast by multiple nodes in the blockchain network, find out whether there are multiple records of historical block failure records in multiple nodes in the preset block record table. If the node has a history of block failure records, the node is deleted.
若任一节点因规定时间内或者网络、一致性验证失败等问题,导致出块失败,会被直接剔除代表节点选举。If any node fails to generate blocks due to problems such as the failure of the network or consistency verification within a specified time, the representative node election will be directly eliminated.
本步骤在预设的出块记录表中查找,查找获得的多个节点对应的节点标识,在出块记录表中是否存在出块失败标识,若存在,则认为出块失败标识对应的节点存在历史出块失败记录。In this step, the preset block generation record table is searched to find the corresponding node identifiers of the obtained multiple nodes. Is there a block failure identification in the block generation record table? If it exists, it is considered that the node corresponding to the block failure identification exists History record of block failure.
步骤S20102,计算加权系数值:将剔除历史出块失败记录后的多个节点的节点信息进行加权计算,得到加权系数值。Step S20102: Calculate the weighting coefficient value: perform weighted calculation on the node information of multiple nodes after excluding the historical block failure records to obtain the weighting coefficient value.
由于历史出块失败记录的节点没有必要计算加权系数值,因此在在计算加权系数值前,先将历史出块失败记录的节点剔除掉,减少计算算力。Because the nodes of the historical block failure records do not need to calculate the weighting coefficient values, before calculating the weighting coefficient values, the nodes of the historical block failure records are removed to reduce the calculation power.
本实施例对历史出块失败的节点,直接剔除代表节点的选举,保证了投票选举的公平性,提高了后续代表节点的出块质量。In this embodiment, for the nodes that have failed to generate blocks in history, the election of representative nodes is directly eliminated, which ensures the fairness of the voting election and improves the quality of subsequent representative nodes.
步骤S3,产生代表节点:对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将N个节点定义为代表节点,将代表节点对应的节点标识更新至轮流记账表,将轮流记账表广播至区块链网络中的所有节点。Step S3, generate representative nodes: arrange the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table , Broadcast the billing table in turns to all nodes in the blockchain network.
在区块链网络的共识层中预设有筛选代表节点的共识算法,此共识算法与现有技术中股份授权证明机制限定的筛选代表节点的规则相同,例如:A consensus algorithm for screening representative nodes is preset in the consensus layer of the blockchain network. This consensus algorithm is the same as the rules for screening representative nodes defined by the share authorization certification mechanism in the prior art, for example:
dlist_i=get N delegates sort by votesdlist_i = get N delegates sort by votes
上述代码即为自动获取区块链网络中所有节点的投票结果,将票数最高的前N个节点自动定义为代表节点。共识算法中的N的取值可预设,可按比例设置,如10%,例如,当区块链网络中含有1000个节点时,筛选出100个代表节点。也可以按系数设置,如N=101,通过本步骤筛选出101个代表节点。筛选出N个节点即为代表节点,代表节点具有按照轮流记账表获得轮流记账权利,记账过程即为生成交易区块的过程。The above code is to automatically obtain the voting results of all nodes in the blockchain network, and automatically define the top N nodes with the highest number of votes as representative nodes. The value of N in the consensus algorithm can be preset and can be set proportionally, such as 10%. For example, when there are 1000 nodes in the blockchain network, 100 representative nodes are selected. It can also be set according to the coefficient, such as N=101, and 101 representative nodes are selected through this step. N nodes are selected as representative nodes, and the representative nodes have the right to take turns accounting according to the turn-by-turn accounting table, and the accounting process is the process of generating transaction blocks.
筛选出N个代表节点后,还将N个代表节点对应的节点标识写入预设的轮流记账表中。以便于后续通过轮流记账表进行一致性验证。为了保证一致性验证的安全可靠,在对N个代表节点均完成节点标识写入轮流记账表后,还对轮流记账表中的N个节点标识进行随机排序:After filtering out N representative nodes, the node identifiers corresponding to the N representative nodes are also written into a preset rotation accounting table. In order to facilitate subsequent consistency verification through the rotation accounting table. In order to ensure the safety and reliability of the consistency verification, after all the node IDs of the N representative nodes are written into the rotation accounting table, the N node IDs in the rotation accounting table are also randomly sorted:
dlist_i=shuffle(dlist_i)dlist_i=shuffle(dlist_i)
通过上述随机排序后,得到最终的轮流记账表,将轮流记账表广播至区块链网络中的所有节点,以便于节点用于后续对交易区块的一致性验证。After the above random ordering, the final rotation accounting table is obtained, and the rotation accounting table is broadcast to all nodes in the blockchain network, so that the nodes can be used for subsequent consistency verification of the transaction block.
步骤S4,出块及验证:获取交易信息,对交易信息生成交易区块,将交易区块广播至区块链网络中的其他节点;接收其他节点广播的交易区块,对交易区块进行一致性验证,当验证通过时,将交易区块签名后广播给区块链网络中的其他节点,将交易区块进行存储,并将交易区块对应的节点标识、出块速度 和出块通过标识记录在出块记录表中,否则将交易区块对应的节点标识和出块失败标识记录在出块记录表中。Step S4, block generation and verification: obtain transaction information, generate transaction blocks for the transaction information, broadcast the transaction blocks to other nodes in the blockchain network; receive transaction blocks broadcast by other nodes, and agree on the transaction blocks Verification, when the verification is passed, the transaction block will be signed and broadcast to other nodes in the blockchain network, the transaction block will be stored, and the node identification, block generation speed and block passing identification corresponding to the transaction block will be stored It is recorded in the block generation record table, otherwise the node identification and block failure identification corresponding to the transaction block are recorded in the block generation record table.
当任一获得获得轮流记账权利的代表节点自动接收到交易信息后,将交易信息生成交易区块,还将交易区块进行广播。代表节点不仅完成交易区块工作,还进行一致性验证工作。其中,在对交易区块进行一致性验证时,包括:When any representative node that obtains the right to take turns accounting automatically receives the transaction information, the transaction information is generated into a transaction block, and the transaction block is also broadcast. The representative node not only completes the transaction block work, but also performs the consistency verification work. Among them, the consistency verification of the transaction block includes:
当接收到的交易区块已被N个节点签名,则自动定义为验证通过;否则,获取交易区块中的区块头信息,区块头信息中包含有节点标识,将节点标识与轮流记账表的代表节点排列顺序进行比较,判断是否轮到当前节点标识对应的代表节点出块,如果是,则判断为验证通过,否则,判断为验证失败。When the received transaction block has been signed by N nodes, it is automatically defined as verified; otherwise, the block header information in the transaction block is obtained, and the block header information contains the node identifier, and the node identifier and the rotation accounting table The order of the representative nodes is compared to determine whether it is the turn of the representative node corresponding to the current node ID to generate a block. If it is, it is determined that the verification is passed; otherwise, it is determined that the verification fails.
本步骤的一致性验证是节点检验每次出块的区块头信息与轮流记账表的排列顺序是否一致,从而保证一致性,当两者是一致时,通过自身节点预设的私钥对区块头进行签名,以证明对此交易区块验证通过。若区块验证不一致,则节点不对此交易区块进行签名,此交易区块无法满足M个节点验证通过时,自动由下一个代表节点获取此交易信息,重新生成区块。The consistency verification in this step is that the node checks whether the block header information of each block produced is consistent with the order of the rotation accounting table to ensure consistency. When the two are consistent, the private key preset area of the own node is used. The block header is signed to prove that the transaction block is verified. If the block verification is inconsistent, the node does not sign the transaction block. When the transaction block cannot satisfy the verification of M nodes, the next representative node automatically obtains the transaction information and regenerates the block.
本实施例基于股份授权证明机制的区块链共识方法,通过采集区块链网络中所有节点的节点信息,在对节点进行投票选举时,以节点信息作为投票重要数据,结合DPOS共识机制,选举出一定个数的代表节点作为后续出块和验证节点。以节点信息作为投票重要数据,选举出的代表节点均能处于效能最大化状态,保证了各节点的公平性。结合DPOS共识机制,保证了节点安全性,防止区块链网络被恶意攻击。This embodiment is based on the blockchain consensus method of the share authorization certification mechanism. By collecting the node information of all nodes in the blockchain network, when voting for the nodes, the node information is used as important voting data, combined with the DPOS consensus mechanism, the election A certain number of representative nodes are used as subsequent block generation and verification nodes. Using node information as important voting data, the elected representative nodes can all be in a state of maximum efficiency, ensuring the fairness of each node. Combined with the DPOS consensus mechanism, it guarantees node security and prevents the blockchain network from being maliciously attacked.
在一个实施例中,提出了一种基于股份授权证明机制的区块链共识装置,如图4所示,包括如下模块:采集节点信息模块,设置为采集节点的节点信息,将节点信息广播给区块链网络中与自身节点联通的其他节点,节点信息中包含有节点标识;投票模块,设置为获得区块链网络中多个节点广播的节点信息后,以股份授权证明机制进行投票后,将节点信息继续广播给区块链网络中与自身节点联通的其他节点;产生代表节点模块,设置为对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将N个节点定义为代表节点,将代表节点对应的节点标识更新至轮流记账表,将轮流记账表广播至区块链网络中的 所有节点。In one embodiment, a blockchain consensus device based on a share authorization certification mechanism is proposed. As shown in FIG. 4, it includes the following modules: a node information collection module, which is set to collect node information of the node and broadcast the node information to Other nodes in the blockchain network that communicate with their own nodes, the node information contains the node identifier; the voting module is set to obtain the node information broadcast by multiple nodes in the blockchain network, and after voting with the share authorization certification mechanism, Continue to broadcast the node information to other nodes in the blockchain network that are connected to their own nodes; generate a representative node module, set to rank the votes of all nodes from high to low, get the top N nodes with the highest number of votes, and convert N A node is defined as a representative node, and the node identification corresponding to the representative node is updated to the rotation accounting table, and the rotation accounting table is broadcast to all nodes in the blockchain network.
在一个实施例中,节点信息包括预设的节点标识、节点资源值、节点贡献度和历史服务指标,采集节点信息模块包括:采集节点资源单元,设置为采集节点资源信息,节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将网络连接速度、CPU空闲率和内存空闲率相加,得到节点资源值;计算节点贡献度单元,设置为采集节点的历史出块数量和区块链网络的出块总数,将历史出块数量除以出块总数,得到节点贡献度;计算历史服务指标单元,设置为采集节点的历史出块速度,计算历史出块平均速度,历史出块平均速度为历史服务指标。采集节点信息模块,还设置为通过传输控制协议TCP协议与区块链网络中的其他节点建立连接;将节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。In one embodiment, the node information includes preset node identifiers, node resource values, node contributions, and historical service indicators. The node information collection module includes: a node resource collection unit configured to collect node resource information, and the node resource information includes a network Connection speed, CPU idle rate and memory idle rate, add the network connection speed, CPU idle rate and memory idle rate to get the node resource value; calculate the node contribution unit, set to collect the historical number of blocks and the blockchain of the node The total number of block generations on the network, divide the number of historical block generations by the total number of block generations to obtain the node contribution; calculate the historical service indicator unit, set to collect the historical block generation speed of the node, calculate the historical average block generation speed, and the historical average block generation speed For historical service indicators. The collection node information module is also set to establish a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol; broadcast the node information to other nodes in the format of a hypertext transmission protocol HTTP request message.
在一个实施例中,投票模块,包括:筛选最高的节点单元,设置为获得区块链网络中多个节点广播的节点信息后,对每个节点信息进行加权计算,得到加权系数值,对多个节点的加权系数值从高到低排序,筛选出加权系数值最高的M个节点,加权系数值Z i的加权计算公式如下: In one embodiment, the voting module includes: selecting the highest node unit, set to obtain the node information broadcast by multiple nodes in the blockchain network, and performing weighted calculation on each node information to obtain a weighting coefficient value, which is The weighting coefficient values of the nodes are sorted from high to low, and the M nodes with the highest weighting coefficient value are selected. The weighting calculation formula of the weighting coefficient value Z i is as follows:
Z i=A i*a+B i*b+C i*c Z i = A i *a+B i *b+C i *c
其中,A i为第i个节点的节点资源值,B i为第i个节点的节点贡献度,C i为第i个节点的历史服务指标,a、b和c为系数; Among them, A i is the node resource value of the i-th node, B i is the node contribution of the i-th node, C i is the historical service index of the i-th node, and a, b and c are coefficients;
自动投票单元,设置为通过股份授权证明机制,自动投票给M个节点,投票完成后,将多个节点的节点信息继续广播给区块链网络中与自身节点联通的其他节点。筛选最高的节点单元,还设置为获得区块链网络中多个节点广播的节点信息后,在预设的出块记录表中查找多个节点是否存在历史出块失败记录,若任一节点存在历史出块失败记录,则将节点剔除;将剔除历史出块失败记录后的多个节点的节点信息进行加权计算,得到加权系数值。The automatic voting unit is set to automatically vote for M nodes through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes will continue to be broadcast to other nodes in the blockchain network that communicate with their own nodes. Filter the highest node unit, and also set to obtain the node information broadcast by multiple nodes in the blockchain network, in the preset block record table to find whether multiple nodes have historical block failure records, if any node exists In the case of historical block failure records, the nodes are eliminated; the node information of multiple nodes after the historical block failure records are eliminated is weighted to obtain the weighted coefficient value.
在一个实施例中,产生代表节点模块,包括:生成区块单元,设置为获取交易信息,对交易信息生成交易区块,将交易区块广播至区块链网络中的其他节点;验证单元,设置为接收其他节点广播的交易区块,对交易区块进行一致性验证,当验证通过时,将交易区块签名后广播给区块链网络中的其他节点, 将交易区块进行存储,并将交易区块对应的节点标识、出块速度和出块通过标识记录在出块记录表中,否则将交易区块对应的节点标识和出块失败标识记录在出块记录表中。验证单元,还设置为当接收到的交易区块已被N个节点签名,则自动定义为验证通过;否则,获取交易区块中的区块头信息,区块头信息中包含有节点标识,将节点标识与轮流记账表的代表节点排列顺序进行比较,判断是否轮到当前节点标识对应的代表节点出块,如果是,则判断为验证通过,否则,判断为验证失败。In one embodiment, generating a representative node module includes: generating a block unit, configured to obtain transaction information, generating a transaction block for the transaction information, and broadcasting the transaction block to other nodes in the blockchain network; a verification unit, Set to receive transaction blocks broadcast by other nodes, and verify the consistency of the transaction blocks. When the verification is passed, the transaction blocks will be signed and broadcast to other nodes in the blockchain network to store the transaction blocks, and Record the node identification, block-out speed and block-out corresponding to the transaction block in the block-out record table, otherwise record the node identification and block-out failure corresponding to the transaction block in the block-out record table. The verification unit is also set to be automatically defined as verified when the received transaction block has been signed by N nodes; otherwise, the block header information in the transaction block is obtained, and the block header information contains the node identifier, and the node The identifier is compared with the order of the representative nodes in the turn bookkeeping table, and it is judged whether it is the turn of the representative node corresponding to the current node identifier to produce a block.
在一个实施例中,提出了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行计算机可读指令时实现上述各实施例的基于股份授权证明机制的区块链共识方法中的步骤。In one embodiment, a computer device is proposed, which includes a memory and a processor. The memory stores computer readable instructions. When the computer readable instructions are executed by the processor, the processor executes the computer readable instructions to implement the above The steps in the block chain consensus method based on the share authorization certification mechanism of the embodiment.
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例的基于股份授权证明机制的区块链共识方法中的步骤。其中,存储介质可以为非易失性存储介质。In one embodiment, a storage medium storing computer-readable instructions is proposed. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the share-based authorization of the foregoing embodiments Steps in the blockchain consensus method of the proof mechanism. The storage medium may be a non-volatile storage medium.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps in the various methods of the foregoing embodiments may be completed by instructing relevant hardware through a program. The program may be stored in a computer-readable storage medium, and the storage medium may include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be arbitrarily combined. To simplify the description, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered within the scope of this description.
以上所述实施例仅表达了本申请一些示例性实施例,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express some exemplary embodiments of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can also be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种基于股份授权证明机制的区块链共识方法,包括:A block chain consensus method based on the share authorization certification mechanism, including:
    采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
    获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
    对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The rotation accounting table is broadcast to all nodes in the blockchain network.
  2. 根据权利要求1所述的基于股份授权证明机制的区块链共识方法,其中,所述采集节点的节点信息,包括:The blockchain consensus method based on the share authorization certification mechanism according to claim 1, wherein the node information of the collecting node includes:
    采集节点资源信息,所述节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将所述网络连接速度、所述CPU空闲率和所述内存空闲率相加,得到节点资源值;Collect node resource information, which includes network connection speed, CPU idle rate, and memory idle rate, add the network connection speed, the CPU idle rate, and the memory idle rate to obtain the node resource value;
    采集节点的历史出块数量和所述区块链网络的出块总数,将所述历史出块数量除以所述出块总数,得到节点贡献度;Collect the number of historical block generations of the node and the total number of block generations of the blockchain network, and divide the number of historical block generations by the total number of block generations to obtain the node contribution;
    采集节点的历史出块速度,计算历史出块平均速度,所述历史出块平均速度为历史服务指标;Collect the historical block generation speed of the node and calculate the historical average block generation speed, which is the historical service indicator;
    所述节点信息包括预设的节点标识、所述节点资源值、所述节点贡献度和所述历史服务指标。The node information includes a preset node identifier, the node resource value, the node contribution degree, and the historical service index.
  3. 根据权利要求1所述的基于股份授权证明机制的区块链共识方法,其中,所述将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,包括:The blockchain consensus method based on the share authorization certification mechanism according to claim 1, wherein the broadcasting of the node information to other nodes in the blockchain network connected with its own node includes:
    通过传输控制协议TCP协议与所述区块链网络中的其他节点建立连接;Establish a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol;
    将所述节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
  4. 根据权利要求2所述的基于股份授权证明机制的区块链共识方法,其中, 所述获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点,包括:The blockchain consensus method based on the share authorization certification mechanism according to claim 2, wherein, after obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism , Continue to broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, including:
    获得所述区块链网络中多个节点广播的所述节点信息后,对每个所述节点信息进行加权计算,得到加权系数值,对多个所述节点的所述加权系数值从高到低排序,筛选出所述加权系数值最高的M个节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, weighting calculation is performed on each of the node information to obtain a weighting coefficient value, and the weighting coefficient value for multiple of the nodes is from high to Low sort, select the M nodes with the highest weighting coefficient value;
    所述加权系数值Z i的加权计算公式如下: The weighting calculation formula of the weighting coefficient value Z i is as follows:
    Z i=A i*a+B i*b+C i*c Z i = A i *a+B i *b+C i *c
    其中,A i为第i个节点的节点资源值,B i为第i个节点的节点贡献度,C i为第i个节点的历史服务指标,a、b和c为系数; Among them, A i is the node resource value of the i-th node, B i is the node contribution of the i-th node, C i is the historical service index of the i-th node, and a, b and c are coefficients;
    通过所述股份授权证明机制,自动投票给所述M个节点,投票完成后,将多个节点的节点信息继续广播给所述区块链网络中与自身节点联通的其他节点。Through the share authorization certification mechanism, the M nodes are automatically voted. After the voting is completed, the node information of multiple nodes is continuously broadcast to other nodes in the blockchain network that communicate with their own nodes.
  5. 根据权利要求4所述的基于股份授权证明机制的区块链共识方法,其中,获得所述区块链网络中多个节点广播的所述节点信息后,对每个所述节点信息进行加权计算,得到加权系数值,包括:The blockchain consensus method based on the share authorization certification mechanism according to claim 4, wherein after obtaining the node information broadcast by multiple nodes in the blockchain network, weighting calculation is performed on each of the node information To get the weighting coefficient value, including:
    获得所述区块链网络中多个节点广播的所述节点信息后,在预设的出块记录表中查找多个所述节点是否存在历史出块失败记录,若任一所述节点存在历史出块失败记录,则将所述节点剔除;After obtaining the node information broadcast by multiple nodes in the blockchain network, search for a plurality of the nodes in the preset block generation record table to see if there are historical block failure records, if any of the nodes have a history Block failure record, the node is removed;
    将剔除历史出块失败记录后的多个节点的节点信息进行加权计算,得到加权系数值。The node information of multiple nodes after excluding the block failure records in history is weighted to obtain the weighted coefficient value.
  6. 根据权利要求1所述的基于股份授权证明机制的区块链共识方法,其中,所述对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点后,还包括:The block chain consensus method based on the share authorization certification mechanism according to claim 1, wherein the votes of all nodes are ranked from high to low to obtain the top N nodes with the highest number of votes, and the N nodes Defined as a representative node, after updating the node identifier corresponding to the representative node to the rotation accounting table, and broadcasting the rotation accounting table to all nodes in the blockchain network, it also includes:
    获取交易信息,对所述交易信息生成交易区块,将所述交易区块广播至所述区块链网络中的其他节点;Obtain transaction information, generate transaction blocks for the transaction information, and broadcast the transaction blocks to other nodes in the blockchain network;
    接收其他节点广播的交易区块,对所述交易区块进行一致性验证,当验证通过时,将所述交易区块签名后广播给所述区块链网络中的其他节点,将所述交易区块进行存储,并将所述交易区块对应的节点标识、出块速度和出块通过标识记录在所述出块记录表中,否则将所述交易区块对应的节点标识和出块失败标识记录在所述出块记录表中。Receive the transaction block broadcast by other nodes, verify the consistency of the transaction block, and when the verification is passed, sign the transaction block and broadcast it to other nodes in the blockchain network to transfer the transaction Store the block, and record the node identification, block generation speed and block generation corresponding to the transaction block in the block generation record table, otherwise the node identification and block generation corresponding to the transaction block will fail The identifier is recorded in the block creation record table.
  7. 根据权利要求6所述的基于股份授权证明机制的区块链共识方法,其中,所述接收其他节点广播的交易区块,对所述交易区块进行一致性验证,包括:The blockchain consensus method based on the share authorization certification mechanism according to claim 6, wherein the receiving the transaction blocks broadcast by other nodes and performing consistency verification on the transaction blocks includes:
    当接收到的所述交易区块已被N个节点签名,则自动定义为验证通过;When the received transaction block has been signed by N nodes, it is automatically defined as verified;
    否则,获取所述交易区块中的区块头信息,所述区块头信息中包含有节点标识,将所述节点标识与轮流记账表的代表节点排列顺序进行比较,判断是否轮到当前节点标识对应的代表节点出块,如果是,则判断为验证通过,否则,判断为验证失败。Otherwise, the block header information in the transaction block is obtained, and the block header information includes a node identifier, and the node identifier is compared with the order of representative nodes in the turn-by-turn accounting table to determine whether it is the turn of the current node identifier The corresponding representative node produces a block. If it is, it is judged that the verification is passed; otherwise, it is judged that the verification fails.
  8. 一种基于股份授权证明机制的区块链共识装置,包括:A block chain consensus device based on share authorization certification mechanism, including:
    采集节点信息模块,设置为采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collecting node information module, set to collect node information of the node, broadcast the node information to other nodes in the blockchain network connected with its own node, the node information contains a node identifier;
    投票模块,设置为获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;The voting module is set to obtain the node information broadcast by multiple nodes in the blockchain network, and after voting with a share authorization certification mechanism, continue to broadcast the node information to the blockchain network and itself Nodes connected to other nodes;
    产生代表节点模块,设置为对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账表,将所述轮流记账表广播至所述区块链网络中的所有节点。Generate a representative node module, set to rank the votes of all nodes from high to low, obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node ID corresponding to the representative node to A rotation accounting table, broadcasting the rotation accounting table to all nodes in the blockchain network.
  9. 根据权利要求8所述的基于股份授权证明机制的区块链共识装置,其中,所述节点信息包括预设的节点标识、所述节点资源值、所述节点贡献度和所述历史服务指标;The blockchain consensus device based on the share authorization certification mechanism according to claim 8, wherein the node information includes a preset node identifier, the node resource value, the node contribution degree, and the historical service index;
    所述采集节点信息模块包括:The collection node information module includes:
    采集节点资源单元,设置为采集节点资源信息,所述节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将所述网络连接速度、所述CPU空闲率和所述内存空闲率相加,得到节点资源值;Collect node resource unit, set to collect node resource information, the node resource information includes network connection speed, CPU idle rate and memory idle rate, add the network connection speed, the CPU idle rate and the memory idle rate , Get the node resource value;
    计算节点贡献度单元,设置为采集节点的历史出块数量和所述区块链网络的出块总数,将所述历史出块数量除以所述出块总数,得到节点贡献度;The calculation node contribution degree unit is set to collect the number of historical block generations of the node and the total number of block generations of the blockchain network, and divide the historical number of block generations by the total number of block generations to obtain the node contribution degree;
    计算历史服务指标单元,设置为采集节点的历史出块速度,计算历史出块平均速度,所述历史出块平均速度为历史服务指标。Calculate the historical service index unit, set to collect the historical block generation speed of the node, calculate the historical average block generation speed, and the historical average block generation speed is the historical service index.
  10. 根据权利要求8所述的基于股份授权证明机制的区块链共识装置,其中,所述采集节点信息模块,还设置为通过传输控制协议TCP协议与所述区块链网络中的其他节点建立连接;将所述节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。The blockchain consensus device based on the share authorization certification mechanism according to claim 8, wherein the collection node information module is further configured to establish a connection with other nodes in the blockchain network through a transmission control protocol TCP protocol ; Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
  11. 根据权利要求9所述的基于股份授权证明机制的区块链共识装置,其中,所述投票模块,包括:The blockchain consensus device based on the share authorization certification mechanism according to claim 9, wherein the voting module includes:
    筛选最高的节点单元,设置为获得所述区块链网络中多个节点广播的所述节点信息后,对每个所述节点信息进行加权计算,得到加权系数值,对多个所述节点的所述加权系数值从高到低排序,筛选出所述加权系数值最高的M个节点,所述加权系数值Z i的加权计算公式如下: The node unit with the highest screening is set to obtain the node information broadcast by multiple nodes in the blockchain network, and then perform weighted calculation on each of the node information to obtain a weighting coefficient value. The weighting coefficient values are sorted from high to low to select the M nodes with the highest weighting coefficient values. The weighting calculation formula of the weighting coefficient values Z i is as follows:
    Z i=A i*a+B i*b+C i*c Z i = A i *a+B i *b+C i *c
    其中,A i为第i个节点的节点资源值,B i为第i个节点的节点贡献度,C i为第i个节点的历史服务指标,a、b和c为系数; Among them, A i is the node resource value of the i-th node, B i is the node contribution of the i-th node, C i is the historical service index of the i-th node, and a, b and c are coefficients;
    自动投票单元,设置为通过所述股份授权证明机制,自动投票给所述M个节点,投票完成后,将多个节点的节点信息继续广播给所述区块链网络中与自身节点联通的其他节点。The automatic voting unit is set to automatically vote for the M nodes through the share authorization certification mechanism. After the voting is completed, the node information of multiple nodes is continuously broadcast to other nodes in the blockchain network that communicate with their own nodes node.
  12. 根据权利要求11所述的基于股份授权证明机制的区块链共识装置,其中,所述筛选最高的节点单元,还设置为获得所述区块链网络中多个节点广播的所述节点信息后,在预设的出块记录表中查找多个所述节点是否存在历史出块失败记录,若任一所述节点存在历史出块失败记录,则将所述节点剔除;将 剔除历史出块失败记录后的多个节点的节点信息进行加权计算,得到加权系数值。The blockchain consensus device based on the share authorization certification mechanism according to claim 11, wherein the node unit with the highest screening is further set to obtain the node information broadcast by multiple nodes in the blockchain network , Find out whether there are historical block failure records for multiple of the nodes in the preset block generation record table, if any of the nodes have historical block failure records, then delete the node; the historical block failure will be deleted The recorded node information of multiple nodes is weighted to obtain a weighted coefficient value.
  13. 根据权利要求8所述的基于股份授权证明机制的区块链共识装置,其中,所述产生代表节点模块,包括:The block chain consensus device based on the share authorization certification mechanism according to claim 8, wherein the generating representative node module includes:
    生成区块单元,设置为获取交易信息,对所述交易信息生成交易区块,将所述交易区块广播至所述区块链网络中的其他节点;A block generation unit, configured to obtain transaction information, generate a transaction block for the transaction information, and broadcast the transaction block to other nodes in the blockchain network;
    验证单元,设置为接收其他节点广播的交易区块,对所述交易区块进行一致性验证,当验证通过时,将所述交易区块签名后广播给所述区块链网络中的其他节点,将所述交易区块进行存储,并将所述交易区块对应的节点标识、出块速度和出块通过标识记录在所述出块记录表中,否则将所述交易区块对应的节点标识和出块失败标识记录在所述出块记录表中。The verification unit is set to receive the transaction block broadcast by other nodes, and verify the consistency of the transaction block. When the verification is passed, the transaction block is signed and broadcast to other nodes in the blockchain network. , Store the transaction block, and record the node identification, block generation speed and block generation corresponding to the transaction block in the block generation record table, otherwise, the node corresponding to the transaction block The identification and the block failure identification are recorded in the block creation record table.
  14. 根据权利要求13所述的基于股份授权证明机制的区块链共识装置,其中,所述验证单元,还设置为当接收到的所述交易区块已被N个节点签名,则自动定义为验证通过;否则,获取所述交易区块中的区块头信息,所述区块头信息中包含有节点标识,将所述节点标识与轮流记账表的代表节点排列顺序进行比较,判断是否轮到当前节点标识对应的代表节点出块,如果是,则判断为验证通过,否则,判断为验证失败。The blockchain consensus device based on the share authorization certification mechanism according to claim 13, wherein the verification unit is further configured to automatically define verification as the received transaction block has been signed by N nodes Pass; otherwise, get the block header information in the transaction block, the block header information contains the node identifier, compare the node identifier with the order of the representative nodes in the turn bookkeeping table, and determine whether it is the current turn The representative node corresponding to the node identifier produces a block. If it is, it is determined that the verification is passed; otherwise, it is determined that the verification fails.
  15. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor causes the processor to perform the following steps:
    采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
    获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
    对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账 表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
  16. 根据权利要求15所述的计算机设备,其中,所述采集节点的节点信息时,使得所述处理器执行以下步骤:The computer device according to claim 15, wherein when the node information of the node is collected, the processor is caused to perform the following steps:
    采集节点资源信息,所述节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将所述网络连接速度、所述CPU空闲率和所述内存空闲率相加,得到节点资源值;Collect node resource information, which includes network connection speed, CPU idle rate, and memory idle rate, add the network connection speed, the CPU idle rate, and the memory idle rate to obtain the node resource value;
    采集节点的历史出块数量和所述区块链网络的出块总数,将所述历史出块数量除以所述出块总数,得到节点贡献度;Collect the number of historical block generations of the node and the total number of block generations of the blockchain network, and divide the number of historical block generations by the total number of block generations to obtain the node contribution;
    采集节点的历史出块速度,计算历史出块平均速度,所述历史出块平均速度为历史服务指标;Collect the historical block generation speed of the node and calculate the historical average block generation speed, which is the historical service indicator;
    所述节点信息包括预设的节点标识、所述节点资源值、所述节点贡献度和所述历史服务指标。The node information includes a preset node identifier, the node resource value, the node contribution degree, and the historical service index.
  17. 根据权利要求15所述的计算机设备,其中,所述将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点时,使得所述处理器执行以下步骤:The computer device according to claim 15, wherein, when broadcasting the node information to other nodes in the blockchain network that communicate with its own node, the processor is caused to perform the following steps:
    通过传输控制协议TCP协议与所述区块链网络中的其他节点建立连接;Establish a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol;
    将所述节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
  18. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:A storage medium storing computer-readable instructions, which when executed by one or more processors, causes the one or more processors to perform the following steps:
    采集节点的节点信息,将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点,所述节点信息中包含有节点标识;Collect the node information of the node and broadcast the node information to other nodes in the blockchain network that communicate with their own nodes, and the node information includes a node identifier;
    获得所述区块链网络中多个节点广播的所述节点信息后,以股份授权证明机制进行投票后,将所述节点信息继续广播给所述区块链网络中与自身节点联通的其他节点;After obtaining the node information broadcast by multiple nodes in the blockchain network, after voting with a share authorization certification mechanism, the node information continues to be broadcast to other nodes in the blockchain network that communicate with their own nodes ;
    对所有节点的投票从高到低进行排列,获得票数最高的前N个节点,将所述N个节点定义为代表节点,将所述代表节点对应的节点标识更新至轮流记账 表,将所述轮流记账表广播至所述区块链网络中的所有节点。Rank the votes of all nodes from high to low to obtain the top N nodes with the highest number of votes, define the N nodes as representative nodes, and update the node IDs corresponding to the representative nodes to the rotation accounting table The turn-by-turn accounting table is broadcast to all nodes in the blockchain network.
  19. 根据权利要求18所述的存储介质,其中,所述采集节点的节点信息时,使得一个或多个所述处理器执行以下步骤:The storage medium according to claim 18, wherein when collecting node information of a node, one or more of the processors are caused to perform the following steps:
    采集节点资源信息,所述节点资源信息包括网络连接速度、CPU空闲率和内存空闲率,将所述网络连接速度、所述CPU空闲率和所述内存空闲率相加,得到节点资源值;Collect node resource information, which includes network connection speed, CPU idle rate, and memory idle rate, add the network connection speed, the CPU idle rate, and the memory idle rate to obtain the node resource value;
    采集节点的历史出块数量和所述区块链网络的出块总数,将所述历史出块数量除以所述出块总数,得到节点贡献度;Collect the number of historical block generations of the node and the total number of block generations of the blockchain network, and divide the number of historical block generations by the total number of block generations to obtain the node contribution;
    采集节点的历史出块速度,计算历史出块平均速度,所述历史出块平均速度为历史服务指标;Collect the historical block generation speed of the node and calculate the historical average block generation speed, which is the historical service indicator;
    所述节点信息包括预设的节点标识、所述节点资源值、所述节点贡献度和所述历史服务指标。The node information includes a preset node identifier, the node resource value, the node contribution degree, and the historical service index.
  20. 根据权利要求18所述的存储介质,其中,所述将所述节点信息广播给所述区块链网络中与自身节点联通的其他节点时,使得一个或多个所述处理器执行以下步骤:The storage medium according to claim 18, wherein, when broadcasting the node information to other nodes in the blockchain network that communicate with its own node, one or more of the processors perform the following steps:
    通过传输控制协议TCP协议与所述区块链网络中的其他节点建立连接;Establish a connection with other nodes in the blockchain network through the transmission control protocol TCP protocol;
    将所述节点信息以超文本传输协议HTTP请求报文的格式广播给其他节点。Broadcast the node information to other nodes in the format of a hypertext transfer protocol HTTP request message.
PCT/CN2019/092588 2019-01-11 2019-06-24 Blockchain consensus method based on delegated proof of stake, and related device WO2020143183A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910026430.3A CN109872152B (en) 2019-01-11 2019-01-11 Block chain consensus method based on share authorization certification mechanism and related equipment
CN201910026430.3 2019-01-11

Publications (1)

Publication Number Publication Date
WO2020143183A1 true WO2020143183A1 (en) 2020-07-16

Family

ID=66917607

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092588 WO2020143183A1 (en) 2019-01-11 2019-06-24 Blockchain consensus method based on delegated proof of stake, and related device

Country Status (2)

Country Link
CN (1) CN109872152B (en)
WO (1) WO2020143183A1 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100271A (en) * 2020-09-08 2020-12-18 四川大学 EOS consensus mechanism utility visualization method based on workload ranking difference
CN112187476A (en) * 2020-09-28 2021-01-05 北京八分量信息科技有限公司 Method and device for synchronizing block chain state based on trusted computing and related product
CN112187475A (en) * 2020-09-28 2021-01-05 北京八分量信息科技有限公司 Method and device for performing multi-center accounting based on trusted computing and related products
CN112202875A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Method and device for safety detection based on block link point weight and related product
CN112702174A (en) * 2020-12-25 2021-04-23 深圳市星际大陆科技有限公司 Block chain based transaction block output method, system, equipment and storage medium
CN112822239A (en) * 2020-12-30 2021-05-18 深圳市宝能投资集团有限公司 Block chain consensus method, block chain consensus device, electronic equipment and storage medium
CN113076315A (en) * 2021-04-01 2021-07-06 洪璐 Intelligent home data chaining method and system of Internet of things on block chain
CN113162971A (en) * 2020-12-03 2021-07-23 腾讯科技(深圳)有限公司 Block link point management method, device, computer and readable storage medium
CN113590282A (en) * 2021-07-19 2021-11-02 海宁奕斯伟集成电路设计有限公司 Calculation force scheduling method, system, electronic equipment and computer readable storage medium
CN113746923A (en) * 2021-09-03 2021-12-03 杭州复杂美科技有限公司 Proxy packaging method, computer device, and storage medium
CN114154994A (en) * 2021-10-29 2022-03-08 海南火链科技有限公司 Super node determination method and device based on block chain and storage medium
CN114650289A (en) * 2020-12-02 2022-06-21 王志诚 Method and device for block chain consensus
CN114900535A (en) * 2022-05-09 2022-08-12 深圳嘉业产业发展有限公司 Data transmission method and system based on block chain
CN115086320A (en) * 2022-06-13 2022-09-20 杭州复杂美科技有限公司 Layered block chain network, and consensus method, device and storage medium thereof
CN115941209A (en) * 2023-02-07 2023-04-07 湖南湘江树图信息科技创新中心有限公司 Block chain decentralized trusted data acquisition method and system
CN117035802A (en) * 2023-04-19 2023-11-10 吉林农业科技学院 Consensus method for predicting animal health based on capacity demonstration double test

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872152B (en) * 2019-01-11 2022-07-15 平安科技(深圳)有限公司 Block chain consensus method based on share authorization certification mechanism and related equipment
CN112491935A (en) * 2019-08-20 2021-03-12 厦门本能管家科技有限公司 Water wave type broadcasting method and system for block chain
CN111131184B (en) * 2019-12-06 2022-07-29 长沙理工大学 Autonomous adjustment method for block chain consensus mechanism
CN111131209B (en) * 2019-12-16 2022-06-28 国网重庆市电力公司客户服务中心 Improved efficient consensus method, system, computer device and storage medium
CN111291628B (en) * 2020-01-17 2024-02-06 黄芸芸 Face data distributed identification and storage architecture based on block chain technology
CN111371557B (en) * 2020-02-26 2024-01-23 百度在线网络技术(北京)有限公司 Block chain data processing method and device, electronic equipment and medium
CN111930845A (en) * 2020-08-12 2020-11-13 湖南宸瀚信息科技有限责任公司 Block chain consensus method, system, terminal and storage medium
CN112184439A (en) * 2020-09-28 2021-01-05 北京八分量信息科技有限公司 Decentralized transaction method and device based on node sequencing and related products
CN114666327B (en) * 2020-12-23 2023-12-19 富泰华工业(深圳)有限公司 Block packing method and device based on block chain transaction and electronic equipment
CN112801791B (en) * 2021-01-29 2023-06-16 武汉大学 Block chain consensus method and system based on authorization
CN112991068B (en) * 2021-05-20 2021-08-20 卓尔智联(武汉)研究院有限公司 Method and device for sharing DPoS (certificate of authority) common identification, electronic equipment and storage medium
CN113518005B (en) * 2021-06-22 2021-11-16 腾讯科技(深圳)有限公司 Block consensus method, device, equipment and storage medium
CN114189522B (en) * 2021-10-15 2024-04-16 敏博科技(武汉)有限公司 Priority-based blockchain consensus method and system in Internet of vehicles

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
WO2017109140A1 (en) * 2015-12-22 2017-06-29 Bigchaindb Gmbh Decentralized, tamper-resistant, asset-oriented database system and method of recording a transaction
CN109165092A (en) * 2018-07-10 2019-01-08 矩阵元技术(深圳)有限公司 A kind of common recognition method, apparatus and system based on effective calculation power contribution
CN109872152A (en) * 2019-01-11 2019-06-11 平安科技(深圳)有限公司 Block chain common recognition method and relevant device based on share authorisation verification mechanism

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10572872B2 (en) * 2017-01-06 2020-02-25 FirstBlood Technologies, Inc. Decentralized competitive arbitration using digital ledgering
CN109088954B (en) * 2018-07-13 2021-09-28 中国电子科技集团公司第十五研究所 Distributed object identification information registration and analysis method
CN109936486B (en) * 2019-01-02 2021-11-26 平安科技(深圳)有限公司 Automatic dial testing method, device, equipment and storage medium based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017109140A1 (en) * 2015-12-22 2017-06-29 Bigchaindb Gmbh Decentralized, tamper-resistant, asset-oriented database system and method of recording a transaction
CN106603698A (en) * 2016-12-28 2017-04-26 北京果仁宝科技有限公司 Block chain consensus method based on DPOS and nodes
CN109165092A (en) * 2018-07-10 2019-01-08 矩阵元技术(深圳)有限公司 A kind of common recognition method, apparatus and system based on effective calculation power contribution
CN109872152A (en) * 2019-01-11 2019-06-11 平安科技(深圳)有限公司 Block chain common recognition method and relevant device based on share authorisation verification mechanism

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112100271A (en) * 2020-09-08 2020-12-18 四川大学 EOS consensus mechanism utility visualization method based on workload ranking difference
CN112100271B (en) * 2020-09-08 2022-07-15 四川大学 EOS consensus mechanism utility visualization method based on workload ranking difference
CN112187476A (en) * 2020-09-28 2021-01-05 北京八分量信息科技有限公司 Method and device for synchronizing block chain state based on trusted computing and related product
CN112187475A (en) * 2020-09-28 2021-01-05 北京八分量信息科技有限公司 Method and device for performing multi-center accounting based on trusted computing and related products
CN112202875A (en) * 2020-09-28 2021-01-08 北京八分量信息科技有限公司 Method and device for safety detection based on block link point weight and related product
CN114650289A (en) * 2020-12-02 2022-06-21 王志诚 Method and device for block chain consensus
CN113162971A (en) * 2020-12-03 2021-07-23 腾讯科技(深圳)有限公司 Block link point management method, device, computer and readable storage medium
CN112702174A (en) * 2020-12-25 2021-04-23 深圳市星际大陆科技有限公司 Block chain based transaction block output method, system, equipment and storage medium
CN112702174B (en) * 2020-12-25 2022-11-04 深圳市星际大陆科技有限公司 Block chain based transaction block output method, system, equipment and storage medium
CN112822239A (en) * 2020-12-30 2021-05-18 深圳市宝能投资集团有限公司 Block chain consensus method, block chain consensus device, electronic equipment and storage medium
CN113076315A (en) * 2021-04-01 2021-07-06 洪璐 Intelligent home data chaining method and system of Internet of things on block chain
CN113590282A (en) * 2021-07-19 2021-11-02 海宁奕斯伟集成电路设计有限公司 Calculation force scheduling method, system, electronic equipment and computer readable storage medium
CN113746923A (en) * 2021-09-03 2021-12-03 杭州复杂美科技有限公司 Proxy packaging method, computer device, and storage medium
CN113746923B (en) * 2021-09-03 2024-03-22 杭州复杂美科技有限公司 Proxy packaging method, computer device, and storage medium
CN114154994A (en) * 2021-10-29 2022-03-08 海南火链科技有限公司 Super node determination method and device based on block chain and storage medium
CN114900535A (en) * 2022-05-09 2022-08-12 深圳嘉业产业发展有限公司 Data transmission method and system based on block chain
CN115086320A (en) * 2022-06-13 2022-09-20 杭州复杂美科技有限公司 Layered block chain network, and consensus method, device and storage medium thereof
CN115941209A (en) * 2023-02-07 2023-04-07 湖南湘江树图信息科技创新中心有限公司 Block chain decentralized trusted data acquisition method and system
CN115941209B (en) * 2023-02-07 2023-05-05 湖南湘江树图信息科技创新中心有限公司 Block chain decentralization trusted data acquisition method and system
CN117035802A (en) * 2023-04-19 2023-11-10 吉林农业科技学院 Consensus method for predicting animal health based on capacity demonstration double test

Also Published As

Publication number Publication date
CN109872152A (en) 2019-06-11
CN109872152B (en) 2022-07-15

Similar Documents

Publication Publication Date Title
WO2020143183A1 (en) Blockchain consensus method based on delegated proof of stake, and related device
JP7053677B2 (en) Computer implementation systems and methods for managing transactions in blockchain networks
CN110599147B (en) Ciphertext retrieval fair payment method and system based on block chain
Sun et al. Voting-based decentralized consensus design for improving the efficiency and security of consortium blockchain
CN112104482B (en) Consensus method based on parallel voting
CN113395363B (en) Data processing method, device and equipment based on block chain and storage medium
CN107688944A (en) A kind of power system method of commerce based on block chain
US20220327503A1 (en) Distributed consensus algorithm and apparatus for rapidly generating block
CN107507091A (en) Enhanced data Right protection method based on block chain and intelligent contract
CN113467927A (en) Block chain based trusted participant federated learning method and device
CN113407632A (en) PBFT (proxy-based policy and authorization-based ft) trust certification block chain consensus algorithm
Sun et al. Rtchain: A reputation system with transaction and consensus incentives for e-commerce blockchain
CN110298641B (en) Rule updating method and device for block chain, block chain node and network
CN113256424B (en) Transaction data processing method, device, equipment and storage medium
Orda et al. Enforcing fairness in blockchain transaction ordering
CN112597240A (en) Federal learning data processing method and system based on alliance chain
Wang et al. Efficient data interaction of blockchain smart contract with oracle mechanism
Jain et al. Blockchain for the common good: A digital currency for citizen philanthropy and social entrepreneurship
US20220239668A1 (en) Blockchain-based message processing method and apparatus, device, and storage medium
GB2572340A (en) Data processing system using directed acyclic graph and method of use thereof
CN110930158A (en) Block chain DPoS common recognition method based on reward and punishment mechanism
Chaumont et al. DPoPS: Delegated Proof-of-Private-Stake, a DPoS implementation under X-Cash, a Monero based hybrid-privacy coin
CN112995167B (en) Kafka mechanism-based electricity consumption information acquisition method, blockchain network and user terminal
Qushtom et al. A two-stage PBFT architecture with trust and reward incentive mechanism
CN116433373A (en) Block chain-based CCER and green certificate authentication matching method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19909074

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19909074

Country of ref document: EP

Kind code of ref document: A1