Blockchain node incentive method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202211191726.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-09-28
AI Technical Summary
[0007]本申请提供了一种区块链节点激励方法、装置、电子设备及存储介质,以解决联盟链中难以为区块链节点合理分配激励的问题
[0042]本申请实施例提供的该区块链节点激励方法,任一区块链节点获取预设时间段内联盟链上的新增区块,并基于该新增区块中记载的参与者信息,即新增区块生成时对新增区块进行打包或投票的多个区块链节点的信息,对联盟链上的各个区块链节点进行评分等级的划分,并基于划分得到的各个区块链节点的评分等级,将激励物质分配给各个区块链节点。其中,基于本联盟链的新增区块中存储的生成新增区块时对该新增区块进行打包或投票的多个区块链节点的信息,来对区块链节点进行评分等级的划分时,由于评分等级划分的依据即联盟链上的新增区块中的信息,联盟链上的区块中所存储的信息被篡改的可能性较低且可追溯,且联盟链中各个区块链节点对各个区块生成的参与情况,可以较好的反应各个区块链节点对联盟链的贡献。因此,基于联盟链中存储的参与者信息来进行评分等级划分,进而基于该评分等级进行激励分配,具有较高的可靠性和合理性。
Smart Images

Figure CN115689629B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain node incentive method, device, electronic device, and storage medium. Background Technology
[0002] In public blockchain scenarios, "mining" is used to reward each blockchain node to ensure that each blockchain node can provide services normally. However, the situation is different in consortium blockchain scenarios.
[0003] When conducting business using consortium blockchains, multiple institutions jointly form a consortium blockchain to solve the trust issues caused by a single centralized server. Each institution can combine its own business with the consortium blockchain, and they can also cooperate to provide application services. Moreover, the members of the consortium blockchain jointly endorse the business on the consortium blockchain, which will greatly increase the reliability of the data on the blockchain for users of consortium blockchain services.
[0004] However, it is currently difficult for the members of a consortium blockchain to distribute revenue. In order to maintain the operation of the consortium blockchain, continuous investment is required. The most basic requirement is to maintain the operating and maintenance costs of the blockchain node servers. A consortium blockchain that cannot make ends meet will eventually be difficult to sustain and unable to provide services to users.
[0005] To distribute profits, the most common practice in public blockchains is to incentivize nodes with tokens, commonly known as "mining," to reward those who contribute to the chain and ensure their continued, spontaneous maintenance. Consortium blockchains also employ incentive schemes, such as binding transactions on a consortium blockchain to a public blockchain, deploying an incentive contract on the public blockchain, and issuing tokens within that contract. This maps actions on the consortium blockchain to the token-minting method in the public blockchain's incentive contract, transforming the incentive for the consortium blockchain into tokens distributed on the linked public blockchain. However, in this approach, the value of the incentive depends on the value of the tokens distributed on the public blockchain, and is unrelated to the consortium blockchain itself. The process of converting mechanisms generated on the consortium blockchain into tokens on the public blockchain lacks credibility guarantees.
[0006] A better approach is to link data value with incentives, that is, to assess the value of the data uploaded by the current consortium blockchain nodes and distribute rights based on the revenue generated by this data. However, in this approach, assessing the revenue generated by all data is difficult, and assessing the revenue generated by the data uploaded by each node is also difficult. Therefore, it is difficult to reasonably allocate incentives to blockchain nodes in a consortium blockchain. Summary of the Invention
[0007] This application provides a blockchain node incentive method, device, electronic device, and storage medium to solve the problem of difficulty in reasonably allocating incentives to blockchain nodes in consortium blockchains.
[0008] Firstly, this application provides a blockchain node incentive method, applicable to any blockchain node in a consortium blockchain, the blockchain node incentive method comprising:
[0009] Retrieve newly added blocks on the consortium blockchain within a preset time period;
[0010] Based on the participant information recorded in the new block, the rating levels of each blockchain node on the consortium blockchain are divided to obtain the rating level of each blockchain node; the participant information includes the information of multiple blockchain nodes that packaged or voted on the new block when it was generated.
[0011] Incentives are distributed to each blockchain node based on their rating.
[0012] Optionally, based on the participant information recorded in the newly added block, the various blockchain nodes on the consortium blockchain are classified into rating levels to obtain the rating level of each blockchain node, including:
[0013] For any node in the blockchain, perform the following operations:
[0014] Based on the participant information recorded in the newly added blocks, the number of blocks in which any node participated in packaging or voting is counted and determined.
[0015] The ratio of the number of blocks in which any node participates in packaging or voting to the number of newly added blocks is determined as the effective participation degree of any node.
[0016] Based on the effective participation of any node, a rating level is assigned to each node. The effective participation of a blockchain node with a higher rating level is greater than that of a blockchain node with a lower rating level.
[0017] Optionally, incentive materials are distributed to each blockchain node based on their rating level, including:
[0018] Blockchain nodes with a rating level higher than or equal to the first rating level are identified as the first target blockchain nodes, and incentive materials are allocated to the first target blockchain nodes.
[0019] Blockchain nodes with a rating level lower than or equal to the second rating level are identified as the second target blockchain nodes, and the second target blockchain nodes are deleted and new blockchain nodes are added; the first rating level is higher than the second rating level.
[0020] Optionally, incentive materials are distributed to each blockchain node, including:
[0021] Obtain transaction information for all transactions recorded in the newly added block; the transaction information includes at least the amount of energy consumed by the transaction and the energy unit price corresponding to the transaction initiator; the amount of energy consumed by the transaction is determined based on the complexity of the transaction, and the energy unit price is the amount of incentive material corresponding to a single unit of energy;
[0022] For any transaction among all transactions, the quantity of incentive material corresponding to the quantity of energy consumed in any transaction is determined based on the amount of energy consumed in any transaction and the energy unit price corresponding to the transaction initiator of any transaction.
[0023] The sum of the number of incentive materials corresponding to the energy consumed by all transactions is determined as the target number of incentive materials to be allocated, and the target number of incentive materials is allocated to each blockchain node.
[0024] Optionally, retrieve newly added blocks on the consortium blockchain within a preset time period, including:
[0025] The transaction executed by any blockchain node in the local transaction pool is identified as the first target transaction.
[0026] Based on the signature of any blockchain node on the first target transaction, the address of any blockchain node, the signatures of more than a preset number of other blockchain nodes on the first target transaction, and the addresses of more than a preset number of other blockchain nodes, a new block for the first target is generated and stored.
[0027] Among them, other blockchain nodes are blockchain nodes on the consortium blockchain other than any other blockchain node; the first target new block is one of the new blocks.
[0028] Optionally, retrieve newly added blocks on the consortium blockchain within a preset time period, including:
[0029] Based on whether the transaction information of the second target transaction stored in the local transaction pool is consistent with the transaction information of the second target transaction packaged and sent by other blockchain nodes, it is determined whether to sign the second target transaction; the second target transaction is a transaction executed by the other blockchain node itself in the local transaction pool of the other blockchain node.
[0030] After the second target transaction is signed, the signature of the second target transaction and the address of any blockchain node are sent to other blockchain nodes so that the other blockchain nodes can generate a new block for the second target; the new block for the second target is one of the new blocks and is different from the new block for the second target.
[0031] It receives signatures of the second target transaction from other blockchain nodes and addresses of other blockchain nodes, and generates a new block for the second target.
[0032] Optionally, the method further includes: determining a second quantity of energy corresponding to the first quantity based on a first quantity of value material provided by a blockchain user and the correspondence between the quantity of value material and the quantity of energy, and distributing the second quantity of energy to the blockchain user; the value material is the source of the incentive material.
[0033] Secondly, this application provides a blockchain node incentive device, the blockchain node incentive device comprising:
[0034] The acquisition module is used to acquire newly added blocks on the consortium blockchain within a preset time period.
[0035] The partitioning module is used to classify the various blockchain nodes on the consortium blockchain into rating levels based on the participant information recorded in the newly added block, and obtain the rating level of each blockchain node; the participant information includes the information of multiple blockchain nodes that packaged or voted on the newly added block when it was generated.
[0036] The allocation module is used to distribute incentive materials to each blockchain node based on their rating level.
[0037] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0038] Memory, used to store computer programs;
[0039] When a processor executes a program stored in memory, it implements the steps of the blockchain node incentive method described in any embodiment of the first aspect.
[0040] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the blockchain node incentive method as described in any embodiment of the first aspect.
[0041] The technical solutions provided in this application have the following advantages compared with the prior art:
[0042] The blockchain node incentive method provided in this application involves any blockchain node acquiring newly added blocks on the consortium blockchain within a preset time period. Based on the participant information recorded in these newly added blocks—specifically, the information of multiple blockchain nodes that packaged or voted on the newly generated block—the method assigns a rating to each blockchain node on the consortium blockchain. Incentives are then distributed to each blockchain node based on their rating. Specifically, when rating nodes based on the information of multiple blockchain nodes that packaged or voted on the newly generated block stored in the consortium blockchain, the information stored in the blocks is less likely to be tampered with and is traceable. Furthermore, the participation of each blockchain node in the generation of each block effectively reflects their contribution to the consortium blockchain. Therefore, rating nodes based on participant information stored in the consortium blockchain, and then allocating incentives based on these ratings, possesses high reliability and rationality. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating a blockchain node incentive method provided in this application embodiment;
[0046] Figure 2 A schematic diagram illustrating a consensus process in which blockchain nodes take turns in sequence, as provided in an embodiment of this application;
[0047] Figure 3 A schematic diagram illustrating a transaction execution process provided in an embodiment of this application;
[0048] Figure 4 A schematic diagram of a consensus process provided for an embodiment of this application;
[0049] Figure 5 A schematic diagram of a blockchain node incentive device provided in an embodiment of this application;
[0050] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0052] To address the challenge of allocating incentives reasonably to blockchain nodes in consortium blockchains, this application provides a blockchain node incentive method applicable to any blockchain node (or any blockchain node server), where "any blockchain node" refers to any one of the blockchain nodes constituting the consortium blockchain. For example... Figure 1 As shown, the blockchain node incentive method includes steps 101-103:
[0053] Step 101: Obtain newly added blocks on the consortium blockchain within the preset time period.
[0054] It is understandable that any node on a consortium blockchain stores all the blocks on that consortium blockchain.
[0055] For any blockchain node on a consortium blockchain (any consortium blockchain node within a consortium blockchain), that blockchain node stores the blocks generated by that blockchain node itself, as well as the blocks synchronized to that blockchain node by other blockchain nodes on the same consortium blockchain.
[0056] Retrieve newly added blocks on the consortium blockchain within a preset time period, that is, retrieve all blocks generated by each node on the consortium blockchain within the preset time period.
[0057] The newly added block can be generated by any of the aforementioned blockchain nodes, or it can be generated by other blockchain nodes in the consortium blockchain besides the aforementioned blockchain nodes.
[0058] Optionally, within a preset time period, when any blockchain node generates a block, it first determines the transaction executed by itself in its local transaction pool as the first target transaction. Then, based on the blockchain node's own signature on the first target transaction, the blockchain node's address, the signatures of more than a preset number of other blockchain nodes on the first target transaction, and the addresses of these other blockchain nodes, it generates and stores a new first target block. Here, the other blockchain nodes are all blockchain nodes on the consortium blockchain other than the blockchain node in question, and the new first target block is one of the aforementioned new blocks.
[0059] The preset quantity can be determined based on actual needs or it can be a fixed value.
[0060] Optionally, within a preset time period, when other blockchain nodes generate blocks, each blockchain node determines whether to sign the second target transaction based on whether the transaction information of the second target transaction stored in its local transaction pool matches the transaction information of the second target transaction packaged and sent by other blockchain nodes. After determining to sign the second target transaction, the sign of the second target transaction and the address of the blockchain node itself are sent to the other blockchain node (which packaged and sent the transaction information of the second target transaction) so that the other blockchain node can generate a new block for the second target. Finally, the blockchain node receives the signatures of the second target transaction and the addresses of other blockchain nodes and generates a new block for the second target.
[0061] The above process involves packaging or voting (signing) blocks to endorse them, thereby generating new blocks—in other words, the consensus process. For details on the consensus process, please refer to the following content.
[0062] Step 102: Based on the participant information recorded in the newly added block, classify the rating levels of each blockchain node on the consortium blockchain to obtain the rating level of each blockchain node.
[0063] The participant information includes information about multiple blockchain nodes that package or vote on the new block, or the transactions in the new block, when it is generated.
[0064] Optionally, for any node among the blockchain nodes on the consortium blockchain, perform the following operations:
[0065] First, based on the participant information recorded in the newly added blocks, the number of blocks in which any given node participated in packaging or voting is determined. Then, the ratio of the number of blocks in which any given node participated in packaging or voting to the number of newly added blocks is determined as the effective participation degree of that given node. Finally, based on the effective participation degree of any given node, a rating level is assigned to that node. Nodes with higher rating levels have a higher effective participation degree than nodes with lower rating levels.
[0066] For example, the newly added blocks within a preset time period include blocks 01, 02, 03, and 04. Based on the participant information recorded in blocks 01-04, it can be determined that: when block 01 was generated, node a was responsible for packaging, and nodes bd were responsible for voting; when block 02 was generated, node b was responsible for packaging, and nodes a and cd were responsible for voting; when block 03 was generated, node c was responsible for packaging, and nodes ab and d were responsible for voting; when block 04 was generated, node d was responsible for packaging, and node ac was responsible for voting. Therefore, based on the participant information recorded in the newly added blocks, it can be determined that node ad participated in packaging or voting in 4 blocks. Since the number of newly added blocks is 4, the effective participation rate of node ad is 1 (or 100%).
[0067] Understandably, based on the method for determining effective participation, the higher the effective participation of any node, the more blocks that node has participated in generating, or in other words, the more blocks it has endorsed. That is to say, the more contributions that node has made to the consortium blockchain.
[0068] In one possible implementation, the effective participation of any node can range from 0 to 1, or from 0% to 100%.
[0069] Optionally, after determining the rating level of each blockchain node, in the process of distributing incentive materials to each blockchain node based on its rating level, different nodes are rewarded or punished based on their rating levels, i.e., incentive materials are allocated to nodes or nodes are replaced with other alternative nodes.
[0070] In one possible implementation, blockchain nodes with a rating level higher than or equal to the first rating level are identified as first target blockchain nodes, and incentives are allocated to the first target blockchain nodes; blockchain nodes with a rating level lower than or equal to the second rating level are identified as second target blockchain nodes, and the second target blockchain nodes are deleted and new blockchain nodes are added.
[0071] The first rating level is higher than the second rating level. Understandably, the effective participation of blockchain nodes with a first rating level is greater than that of blockchain nodes with a second rating level.
[0072] Furthermore, the second target blockchain node is deleted and a new blockchain node is added, essentially replacing the second target blockchain node with a candidate blockchain node. The candidate blockchain node is one that meets the entry requirements for a consortium blockchain.
[0073] Specifically, the scoring levels only include the first scoring level and the second scoring level. In this case, the incentive materials can be evenly distributed to the first target blockchain node with a scoring level of first grade, and the second target blockchain node with a scoring level of second grade can be replaced with a candidate blockchain node, or a newly added blockchain node. The newly added blockchain node is the candidate blockchain node.
[0074] Specifically, the scoring levels also include a third scoring level. The first scoring level is higher than the third scoring level, and the third scoring level is higher than the second scoring level. In this case, incentive materials can be allocated to the first target blockchain node with a scoring level of the first level; for blockchain nodes with a scoring level of the third level, neither incentive materials are allocated nor deleted; incentive materials for blockchain nodes with a scoring level of the second level are deleted and replaced with alternative blockchain nodes.
[0075] Specifically, when the rating levels include a first rating level and a second rating level, for any node, if the effective participation of any node is greater than the first preset participation level, then the rating level of any node is classified as the first rating level; if the effective participation of any node is not greater than (i.e. less than or equal to) the first preset participation level, then the rating level of any node is classified as the second rating level.
[0076] Specifically, when the rating levels include a first rating level, a third preset rating level, and a second rating level, for any node, if the effective participation of that node is greater than the first preset participation level, then the rating level of that node is classified as the first rating level; if the effective participation of that node is not greater than (i.e., less than or equal to) the first preset participation level, but greater than the second preset participation level, then the rating level of that node is classified as the third rating level; if the effective participation of that node is not greater than the second preset participation level, then the rating level of that node is classified as the second rating level. Here, the first preset participation level is greater than the second preset participation level.
[0077] For example, four existing institutions (AD) jointly form a consortium blockchain, and each institution can provide blockchain services independently through its own blockchain node (AD). Assume that node consensus participation (i.e., the effective participation of the aforementioned nodes) is used as the evaluation criterion for node rating. Within a certain period (i.e., the aforementioned preset time period), the effective participation of a node in the generated blocks (i.e., the aforementioned new blocks) is calculated as: the number of blocks in which the node participated in packaging or voting within the range of generated blocks / the total number of blocks within that range. Here, assuming an effective participation rate of 90%–100% is a Level 1 rating (i.e., the aforementioned first rating level), 80%–90% is a Level 2 rating (i.e., the aforementioned third rating level), and below 80% is a Level 3 rating (i.e., the aforementioned second rating level), and the total amount of incentive material generated within the statistical effective time period is X, it is stipulated that Level 1 rated (blockchain nodes) can participate in incentive sharing, Level 2 rated (blockchain nodes) do not participate in incentive sharing, and Level 3 rated (blockchain nodes) will be eliminated and replaced by alternative nodes. If both A and D are at Level 1, then A and D will ultimately share all the incentives equally, with each node receiving X / 4 of the incentive material. If AC is at Level 1 and D is at Level 2, then AC will share all the incentives equally, with each node in AC receiving X / 3 of the incentive material, while D will receive no incentive material. If AB is at Level 1, C is at Level 2, and D is at Level 3, then AB will share all the incentives equally, with each node in AB receiving X / 2 of the incentive material, while C will receive no incentive material. Since D cannot provide good blockchain services, it will not receive any incentives and will be replaced by the alternative node E to participate in the next round of incentives.
[0078] In another possible implementation, the effective service score of a blockchain node can be determined based on its effective participation, and then incentive materials can be allocated according to the effective service score.
[0079] For example, if the effective participation of blockchain node a is 1, then the effective service score of blockchain node a is determined to be 100; if the effective participation of blockchain node a is 0.5, then the effective service score of blockchain node a is determined to be 50.
[0080] It should be noted that through the above process, each blockchain node can be scored based on objective facts. The relevant data source of these objective facts is the data recording whether each node participates in consensus (i.e., the process of packaging or voting to generate blocks mentioned above), which is recorded on the blockchain. This data has high credibility and is traceable. Furthermore, there is a reasonable reward and punishment system, which incentivizes or replaces each blockchain node based on its score. Therefore, it can promote the members of the consortium blockchain to provide better services.
[0081] Alternatively, in the above process, a more objective evaluation system can be used, which is based on the block packers and voters recorded during the consensus process, and the consensus record is stored on the blockchain. Then, based on this stored evaluation data that cannot be tampered with and is traceable, the scoring level can be divided and further incentives can be allocated, which can improve the reliability and rationality of incentive allocation.
[0082] Step 103: Distribute incentive materials to each blockchain node based on their rating level.
[0083] Optionally, first obtain the transaction information of all transactions recorded in the new block. Then, for any transaction among all transactions (recorded in the new block), determine the amount of incentive material corresponding to the energy consumed by that transaction based on the energy consumed and the energy unit price corresponding to the transaction initiator (until the amount of incentive material corresponding to the energy consumed by each transaction in the new block is determined). Finally, the sum of the amounts of incentive material corresponding to the energy consumed by all transactions is determined as the target amount of incentive material to be allocated, and the target amount of incentive material is allocated to each blockchain node.
[0084] The transaction information includes at least the amount of energy consumed in the transaction and the energy unit price corresponding to the transaction initiator. The amount of energy consumed in the transaction is determined based on the complexity of the transaction, and the energy unit price is the amount of incentive material corresponding to one unit of energy.
[0085] For example, the newly added block contains transaction information for transaction a and transaction b. For transaction a, based on the energy consumption *a1* recorded in the transaction information of transaction a, and the energy unit price corresponding to the initiator of transaction a (e.g., 2), the quantity of incentive material corresponding to a single unit of energy is 2. Therefore, the quantity of incentive material corresponding to the energy consumed by transaction a is determined to be 2*a1. For transaction b, based on the energy consumption *b1* recorded in the transaction information of transaction b, and the energy unit price corresponding to the initiator of transaction b (e.g., 1), the quantity of incentive material corresponding to a single unit of energy is 1. Therefore, the quantity of incentive material corresponding to the energy consumed by transaction b is determined to be 1*b1. Finally, the sum of the quantities of incentive material corresponding to the energy consumed by all transactions (i.e., transaction a and transaction b) is 2*a1 + 1*b1, and this sum of 2*a1 + 1*b1 incentive material is distributed to each blockchain node.
[0086] The energy consumed by an exchange is determined based on the complexity of the transaction. The process for determining transaction complexity is detailed below.
[0087] In addition, the steps for allocating the target number of incentive values to each blockchain node can be found in step 102 above, and will not be repeated here.
[0088] It should be noted that, through the above process, any blockchain node obtains newly added blocks on the consortium blockchain within a preset time period. Based on the participant information recorded in these new blocks—that is, the information of multiple blockchain nodes that packaged or voted on the new block during its generation—it assigns a rating to each blockchain node on the consortium blockchain. Incentives are then distributed to each blockchain node based on their rating. Specifically, using the information of multiple blockchain nodes that packaged or voted on the new block stored in the consortium blockchain to assign ratings is highly reliable and reasonable. Since the rating is based on the information in the new blocks on the consortium blockchain, the information stored in the blocks is less likely to be tampered with and is traceable. Furthermore, the participation of each blockchain node in the generation of each block effectively reflects their contribution to the consortium blockchain. Therefore, assigning ratings based on participant information stored in the consortium blockchain and then distributing incentives accordingly is highly reliable and reasonable.
[0089] Optionally, before distributing incentive materials to each blockchain node, based on the first quantity of value materials provided by blockchain users and the correspondence between the quantity of value materials and the quantity of energy, a second quantity of energy corresponding to the first quantity is determined, and this second quantity of energy is distributed to the blockchain users. Here, the value materials are the source of the incentive materials.
[0090] In one possible implementation, the incentive substance and the value substance are the same substance. In this case, the second quantity of energy can be determined based on the energy unit price corresponding to the blockchain user who initiated the transaction (i.e., the blockchain user who provided the first quantity of value substance) and the first quantity of value substance.
[0091] Generally, the incentive material allocated to blockchain nodes is part or all of the value material provided by blockchain users.
[0092] To incentivize the various blockchain nodes in a consortium blockchain, the source of the incentive material must first be determined. It's understandable that the blockchain nodes corresponding to the constituent organizations of the consortium blockchain provide services to users; therefore, service fees can be charged to users (or users can provide value to the blockchain nodes in the consortium blockchain) as a source of rewards for incentivizing the blockchain nodes, i.e., the source of the incentive material. Correspondingly, each blockchain user has an account address on the blockchain. Each account address can purchase energy from the consortium blockchain operator (any blockchain node on the consortium blockchain) to maintain an energy balance in its blockchain account address.
[0093] Each data change on the corresponding blockchain is called a transaction. When a user with a blockchain account wants to modify data on the chain, they need to initiate a transaction through their blockchain account and pay a transaction fee. The settlement method for transaction fees is energy. The transaction fee is measured by calculating the complexity of the transaction during the transaction execution process. The complexity of a transaction is mainly calculated by calculating the transaction's consumption of blockchain resources.
[0094] The resource consumption of a transaction on the blockchain primarily includes CPU, memory, and disk usage. CPU and memory usage are calculated based on computation instructions and memory allocation instructions within the virtual machine environment executing the transaction, respectively. Disk usage is calculated based on the size of the data written to the blockchain ledger. This process yields the complexity of a transaction, thereby determining the energy consumption required for that transaction.
[0095] It is known that the initiator of a transaction must be a blockchain account address. The transaction initiating account can specify the maximum amount of energy consumed in the current transaction and the unit price of each unit of energy. After the transaction is finally executed, the blockchain node (account) that executed the transaction will deduct the energy balance under the initiator's account. If the energy balance is insufficient, the transaction will fail.
[0096] Generally, blockchain nodes prioritize and execute transactions with higher energy unit prices. The blockchain operator can adjust the minimum energy unit price in transactions based on actual business operations to ensure the consortium blockchain's profitability. The energy consumed in transactions serves as the incentive source for blockchain nodes within the consortium blockchain. The value system represented by energy can be either the revenue generated by blockchain services or the revenue generated by blockchain data; the specific value system is determined by the blockchain operator. In short, the revenue generated by the amount of energy consumed is jointly endorsed by the consortium blockchain's constituent institutions, resulting in profit sharing.
[0097] For example, taking a consortium blockchain that includes a blockchain node AD as an example, such as Figure 3As shown, the transaction initiator initiates a transaction, which is executed by any one of the blockchain nodes A and D, such as node C. The transaction execution engine in node C deducts the energy consumed by the transaction from the account of the transaction initiator stored in the incentive sharing pool. Finally, node C synchronizes the transaction information with other nodes A, B, and D. Of course, the incentive sharing pool also stores the energy amounts of other blockchain users' accounts.
[0098] Having established the source of rewards (i.e., the source of incentive materials) for consortium blockchains, the next step is to confirm the distribution ratio of benefits (i.e., incentive materials) among all parties (i.e., the individual blockchain nodes in the consortium blockchain). Nodes that fail to provide better blockchain services will be penalized, while nodes that consistently provide good service will be rewarded, thereby incentivizing the operators of each consortium blockchain node (i.e., the institutions corresponding to each blockchain node in the consortium blockchain). Therefore, an objective and reliable evaluation system for the workload of consortium blockchain nodes is needed.
[0099] Therefore, a system for evaluating the workload of consortium blockchain participants' nodes is introduced: the Blockchain Node Service Evaluation System. As described above, this evaluation system determines the rating level of a blockchain node based on its effective participation in block generation. Effective participation represents the blockchain node's contribution to the consortium blockchain; the higher the effective participation, the greater the blockchain node's contribution.
[0100] For blockchain, the most important thing is to achieve consensus, which involves packaging or voting on blocks to endorse them. Therefore, based on effective participation, the contribution of each blockchain node to the consortium blockchain can be accurately determined.
[0101] In one possible implementation, the consensus algorithm used in this application is NoxBFT, a Byzantine fault-tolerant distributed consensus algorithm, which will also be used in the following description. However, other consensus algorithms can also be applied.
[0102] The consensus master nodes switch sequentially. The master node is responsible for packaging blocks (containing transactions) and broadcasting them to other nodes. Other nodes then sign the packaged blocks (containing transactions) to indicate their agreement with the block's creation. Finally, the consensus master node generates a block containing the address and signature of the packager, and the addresses and signatures of the voters. The packager is the blockchain node that packages the blocks, and the voters are the blockchain nodes that sign the packaged blocks to indicate their agreement with their creation.
[0103] Because master nodes switch sequentially, in the long run, each node is responsible for an equal number of blocks to package or vote on. However, if a node is a problem node, meaning it cannot provide normal service due to downtime or high network latency, it will miss the right to package blocks when it is its turn to do so, and the right will be passed on to the next node. Similarly, when voting is required from that node, its voting information will be missing. As a result, the generated blocks will lack the node's participation record, affecting its effective participation and thus its rating.
[0104] The NoxBFT consensus algorithm satisfies the requirement of 3f+1 nodes. Consensus can be achieved when there are 2f votes, or 2f+1 nodes agreeing. f represents the number of Byzantine nodes (i.e., problem nodes).
[0105] For example, taking a consortium blockchain including blockchain node AD as an example, the process of consensus-building by each blockchain node taking turns in sequence can be as follows: Figure 2 As shown, when generating block 01, node A acts as the primary consensus node, producing the block, and all modules of node A function normally. When generating block 02, node B acts as the primary consensus node, producing the block, and all modules of node B function normally. When generating block 03, node C acts as the primary consensus node, but due to network or system resource issues, node C fails to package the block. Node D then switches to primary consensus node, producing the block, and all modules of node D function normally. Finally, when generating block 04, node A acts as the primary consensus node, producing the block, and all modules of node A function normally. The terms "node abnormal" and "node normal" indicate whether the primary consensus node is working properly when generating each block, and the arrows indicate that the generated blocks are interconnected.
[0106] Specifically, to record the information of participants in the block packaging process on the blockchain, the recording of participants during the consensus process has been expanded. The block packager and signer are recorded in the block.
[0107] For example, such as Figure 4As shown, from the perspective of the entire consensus process, firstly, the master node (taking node A as an example) selects transactions from its own transaction pool, packages them, and broadcasts its ID and signature for the packaged transaction along with the entire transaction packet. Then, after receiving the broadcast information from the master node, the other nodes compare the packaged transaction with the transactions in their own transaction pools. Once they confirm the accuracy, they add their agreement information, i.e., voting information, to the packaged block. The voting information includes the voting node's ID and signature. These voting information are then aggregated into a block and broadcast to all nodes. All nodes can verify the validity of each node's signature through the node ID in the block information, ensuring that the block has been endorsed by all nodes. If a node crashes or other services become unavailable, the packaged block will lack the participation information of the failed node, thus allowing for determination of whether the node participated normally in the consensus. Finally, each node independently executes and verifies the block, generates a block after verification, and stores it in the database.
[0108] like Figure 4 As shown, the block includes block header information and participant information. The participant information includes the address of the packager, the packager's signature, the address of the signer (i.e., the address of the voter mentioned above), and the signer's signature. For information on the packager and signer, please refer to the above content; it will not be repeated here.
[0109] It should be noted that because the block content contains participant information, which is included in the block hash and cannot be tampered with, and all historical blocks can be traced and viewed, it is possible to statistically evaluate whether each node has provided normal service from historical blocks, thus providing a reasonable and objective data basis for the allocation of incentives in the consortium blockchain.
[0110] In addition, whether a blockchain node can participate in incentive distribution can be evaluated through participation information in the block. The evaluation system can be flexibly customized by the consortium blockchain operator based on trusted data on the blockchain, allocating incentives to nodes with better evaluations and deducting rewards and penalizing nodes with poor evaluations.
[0111] For example, consider a consortium blockchain comprised of four existing institutions (AD). Each institution can independently provide blockchain services through its own blockchain node (AD). Each institution has its own registered account. AD, as a member of the consortium blockchain, has the authority to distribute energy to blockchain accounts. Energy distribution requires collateral of real-world value, which serves as the source of incentives for the consortium. Each time an institution's authorized account distributes energy, a blockchain transaction is initiated for a blockchain address. This transaction records the collateralized value for future traceability. When blockchain users conduct transactions, the energy required is deducted based on the transaction execution engine of the blockchain nodes. The corresponding value is used as incentives. After a period of time, an effective service score for each blockchain node is calculated using the above method. These scores are then categorized to allocate incentives.
[0112] like Figure 5 As shown in the figure, this application embodiment provides a blockchain node recording device, which includes an acquisition module 501, a partitioning module 502, and an allocation module 503.
[0113] The acquisition module 501 is used to acquire newly added blocks on the consortium blockchain within a preset time period.
[0114] The partitioning module 502 is used to partition the rating levels of each blockchain node on the consortium blockchain based on the participant information recorded in the newly added block, and obtain the rating level of each blockchain node; the participant information includes the information of multiple blockchain nodes that packaged or voted on the newly added block when it was generated.
[0115] The allocation module 503 is used to allocate incentive materials to each blockchain node based on the rating level of each blockchain node.
[0116] like Figure 6 As shown in the figure, this application provides an electronic device, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0117] Memory 603 is used to store computer programs;
[0118] In one embodiment of this application, when the processor 601 executes the program stored in the memory 603, it implements the steps of the blockchain node incentive method provided in any of the foregoing method embodiments.
[0119] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the blockchain node incentive method provided in any of the foregoing method embodiments.
[0120] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A blockchain node incentive method, characterized in that, The method, applied to any blockchain node in a consortium blockchain, includes: Retrieve newly added blocks on the consortium blockchain within a preset time period; Based on the participant information recorded in the newly added block, the rating levels of each blockchain node on the consortium blockchain are divided to obtain the rating level of each blockchain node. include: For any node in the blockchain, perform the following operations: Based on the participant information recorded in the newly added blocks, the number of blocks in which any node participated in packaging or voting is determined. The ratio of the number of blocks in which any node participates in packaging or voting to the number of newly added blocks is determined as the effective participation degree of any node. Based on the effective participation of any node, a rating level is assigned to any node to obtain the rating level of any node; the effective participation of a blockchain node with a higher rating level is greater than that of a blockchain node with a lower rating level. Obtain transaction information for all transactions recorded in the newly added block; the transaction information includes at least the amount of energy consumed by the transaction and the energy unit price corresponding to the transaction initiator; the amount of energy consumed by the transaction is determined based on the complexity of the transaction, and the energy unit price is the amount of incentive material corresponding to a single unit of energy; The sum of the number of incentive materials corresponding to the energy consumed by all the transactions is determined as the target number of incentive materials to be allocated. The participant information includes information about multiple blockchain nodes that packaged or voted on the new block when it was generated. Based on the rating level of each blockchain node, the target amount of incentive material is allocated to each blockchain node.
2. The blockchain node incentive method according to claim 1, characterized in that, The allocation of incentive materials to each blockchain node based on their rating level includes: Blockchain nodes with a rating level higher than or equal to the first rating level are identified as the first target blockchain nodes, and the incentive material is allocated to the first target blockchain nodes. Blockchain nodes with a rating level lower than or equal to the second rating level are identified as the second target blockchain nodes, and the second target blockchain nodes are deleted and new blockchain nodes are added; the first rating level is higher than the second rating level.
3. The blockchain node incentive method according to claim 2, characterized in that, The distribution of incentive materials to each blockchain node includes: For any one of the transactions, the quantity of incentive material corresponding to the energy consumed by that transaction is determined based on the energy consumed by that transaction and the energy unit price corresponding to the transaction initiator.
4. The blockchain node incentive method according to claim 3, characterized in that, The process of obtaining newly added blocks on the consortium blockchain within a preset time period includes: The transaction executed by any blockchain node in the local transaction pool is identified as the first target transaction. Based on the signature of any blockchain node on the first target transaction, the address of any blockchain node, the signatures of more than a preset number of other blockchain nodes on the first target transaction, and the addresses of more than a preset number of other blockchain nodes, a new first target block is generated and stored. Wherein, the other blockchain nodes are blockchain nodes on the consortium blockchain other than any of the blockchain nodes; the first target new block is one of the new blocks.
5. The blockchain node incentive method according to claim 3 or 4, characterized in that, The process of obtaining newly added blocks on the consortium blockchain within a preset time period includes: Based on whether the transaction information of the second target transaction stored in the local transaction pool is consistent with the transaction information of the second target transaction packaged and sent by other blockchain nodes, it is determined whether to sign the second target transaction; the second target transaction is a transaction executed by the other blockchain node itself in the local transaction pool of the other blockchain node. After confirming that the second target transaction has been signed, the signature of the second target transaction and the address of any of the blockchain nodes are sent to the other blockchain nodes so that the other blockchain nodes can generate a new block for the second target; the new block for the second target is one of the new blocks and is different from the new block for the second target. Receive the signatures of the other blockchain nodes on the second target transaction and the addresses of the other blockchain nodes, and generate a new block for the second target.
6. The blockchain node incentive method according to claim 1, characterized in that, The method further includes: Based on the first quantity of value material provided by the blockchain user, and the correspondence between the quantity of value material and the quantity of energy, the quantity of energy corresponding to the first quantity is determined as the second quantity, and the second quantity of energy is distributed to the blockchain user; the value material is the source of the incentive material.
7. A blockchain node incentive device, characterized in that, The blockchain node incentive device includes: The acquisition module is used to acquire newly added blocks on the consortium blockchain within a preset time period. The segmentation module is used to classify the rating levels of each blockchain node on the consortium blockchain based on the participant information recorded in the newly added block, and obtain the rating level of each blockchain node. The partitioning module is specifically used to perform the following operations on any node in the blockchain: Based on the participant information recorded in the newly added blocks, the number of blocks in which any node participated in packaging or voting is determined. The ratio of the number of blocks in which any node participates in packaging or voting to the number of newly added blocks is determined as the effective participation degree of any node. Based on the effective participation of any node, a rating level is assigned to any node to obtain the rating level of any node; the effective participation of a blockchain node with a higher rating level is greater than that of a blockchain node with a lower rating level. Obtain transaction information for all transactions recorded in the newly added block; the transaction information includes at least the amount of energy consumed by the transaction and the energy unit price corresponding to the transaction initiator; the amount of energy consumed by the transaction is determined based on the complexity of the transaction, and the energy unit price is the amount of incentive material corresponding to a single unit of energy; The sum of the number of incentive materials corresponding to the energy consumed by all the transactions is determined as the target number of incentive materials to be allocated. The participant information includes information about multiple blockchain nodes that packaged or voted on the new block when it was generated. The allocation module is used to allocate the target amount of incentive material to each blockchain node based on the rating level of each blockchain node.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the steps of the blockchain node incentive method according to any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the blockchain node incentive method as described in any one of claims 1-6.
Citation Information
Patent Citations
Alliance chain security excitation method based on crowd sensing technology
CN110599337A
Information processing method and device based on block chain
CN112328610A