Method, system, device and storage medium for determining participation degree of blockchain nodes
By allocating transaction fees to each node participating in forwarding in the blockchain system, the problem of only block nodes in the existing technology being rewarded is solved, and the enthusiasm of nodes to participate and blockchain ecological health is improved.
Patent Information
- Application Number
- CN202110442603.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-04-23
AI Technical Summary
In the existing blockchain system, only block-making nodes can receive system rewards and transaction fee rewards, while other nodes participating in transactions cannot receive rewards, resulting in their enthusiasm for participation and affecting the health of the blockchain ecosystem.
By adding node information for each forwarding node in the transaction information and fairly allocating transaction fees between the blocking node and the forwarding node, each node participating in the forwarding can be rewarded.
It has increased the enthusiasm of ordinary nodes to participate in transaction processing, enhanced the ecological health of the blockchain system, and ensured the interests of all participating nodes.
Smart Images

Figure CN113961945B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of blockchain technology, and specifically relates to a method, system, device and storage medium for determining the participation of blockchain nodes. Background Art
[0002] In the prior art, transactions are forwarded to each node in the blockchain. After receiving the transaction, each node competes to process the transaction first and strives to be the first node to block the transaction. In the end, only one node blocks the transaction first, and this node is called the block node. In order to improve the enthusiasm of nodes to block, the blockchain system will reward block nodes. Block rewards include system rewards and transaction fee rewards. In the prior art, system rewards and transaction fee rewards are given to block nodes, and other nodes participating in the transaction cannot receive any rewards. The enthusiasm of other nodes participating in the transaction is eroded, resulting in the withdrawal of a large number of ordinary nodes, which seriously affects the ecological health of the blockchain system. Summary of the invention
[0003] The present application proposes a method, system, device and storage medium for determining the degree of participation of blockchain nodes, so as to distribute transaction fees between block nodes and all nodes participating in forwarding, so that each node participating in forwarding can get rewards, thereby increasing the enthusiasm of ordinary nodes to participate in transaction processing.
[0004] The first aspect of the present application provides a method for determining the participation of a blockchain node, including:
[0005] The forwarding node device receives the transaction information sent by the user and forwards the transaction information to other node devices other than itself;
[0006] The blockchain system includes multiple forwarding node devices, each of which adds its own node information to the transaction information;
[0007] The block node device executes the transaction processing of the transaction information and packages the transaction information into a new block. The block node device is the node device that first successfully packages the transaction information in the blockchain system.
[0008] The block node device forwards the new block to a synchronous accounting node device, where the synchronous accounting node device is each node device other than the block node device in the blockchain;
[0009] The synchronous accounting node device receives the new block, and determines the participation degree of the block node device and each of the forwarding node devices in the transaction according to the transaction information included in the new block;
[0010] The synchronization accounting node device distributes transaction fees among the block-making node device and each of the forwarding node devices according to the participation degrees of the block-making node device and each of the forwarding node devices in this transaction.
[0011] In some embodiments of the present application, each of the forwarding node devices adds its own node information to the transaction information, including:
[0012] The forwarding node device adds its own device identifier to the transaction information, and the forwarding node device is any node device in the blockchain system that needs to forward the transaction information;
[0013] The forwarding node device uses its own private key to sign and encrypt the transaction information to obtain signature information;
[0014] The forwarding node device adds the signature information and its own public key to the transaction information.
[0015] In some embodiments of the present application, the block-making node device packs the transaction information into a new block, including:
[0016] The block-making node device performs a hash operation on the transaction information and related processing information to obtain a first hash value, and the related processing information includes a transaction processing result and the device identifier of the block-making node device;
[0017] The block-making node device adds the related processing information and the first hash value to the transaction information;
[0018] The block-making node device packs the transaction information into a new block.
[0019] In some embodiments of the present application, the synchronization accounting node device determines the participation degrees of the block-making node device and each of the forwarding node devices in this transaction according to the transaction information included in the new block, including:
[0020] The synchronization accounting node device obtains the transaction information from the new block;
[0021] The synchronization accounting node device obtains the first hash value and the node information corresponding to each forwarding node device from the transaction information;
[0022] The synchronization accounting node device determines the participation degree of the block-making node device in this transaction according to the transaction information and the first hash value;
[0023] The synchronization accounting node device determines the participation degree of each forwarding node device in this transaction according to the node information of each forwarding node device.
[0024] In some embodiments of the present application, the synchronization accounting node device determines the participation of the block-making node device in this transaction according to the transaction information and the first hash value, including:
[0025] The synchronization accounting node device performs a hash operation on the information in the transaction information other than the first hash value to obtain a second hash value;
[0026] The synchronization accounting node device compares whether the first hash value is the same as the second hash value;
[0027] If they are the same, the synchronization accounting node device determines that the participation of the block-making node device in this transaction is a first preset ratio.
[0028] In some embodiments of the present application, the synchronization accounting node device determines the participation of each forwarding node device in this transaction according to the node information of each forwarding node device, including:
[0029] The synchronization accounting node device determines the number of forwarding node devices according to the number of node information obtained from the transaction information;
[0030] The synchronization accounting node device calculates the ratio between a second preset ratio and the number of forwarding node devices, the second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1;
[0031] The synchronization accounting node device determines the ratio as the participation of each forwarding node device in this transaction.
[0032] In some embodiments of the present application, the synchronization accounting node device distributes transaction fees among the block-making node device and each forwarding node device according to the participation of the block-making node device and each forwarding node device in this transaction, including:
[0033] The synchronization accounting node device distributes the first preset proportion of the transaction fees included in the transaction information to the block-making node device;
[0034] The synchronization accounting node device obtains the signature information and public key corresponding to the first forwarding node device from the node information of the first forwarding node device, and the first forwarding node device is any one of each forwarding node device;
[0035] The synchronization accounting node device decrypts the signature information by using the public key to obtain the device identifier of the first forwarding node device;
[0036] The synchronous bookkeeping node device distributes the handling fee of the ratio in the transaction handling fee to the first forwarding node device according to the device identifier of the first forwarding node device.
[0037] An embodiment of the second aspect of the present application provides a system for determining the participation degree of blockchain nodes, including:
[0038] A forwarding node device, configured to receive transaction information sent by a user and transfer the transaction information to other node devices other than itself;
[0039] There are multiple forwarding node devices in the blockchain system, and each forwarding node device adds its own node information to the transaction information;
[0040] A block-making node device, configured to execute the transaction processing of the transaction information, pack the transaction information into a new block, and forward the new block to the synchronous bookkeeping node device. The block-making node device is the node device in the blockchain system that first successfully packs the transaction information, and the synchronous bookkeeping node device is each other node device in the blockchain except the block-making node device;
[0041] A synchronous bookkeeping node device, configured to receive the new block, and respectively determine the participation degrees of the block-making node device and each forwarding node device in the current transaction according to the transaction information included in the new block; and distribute the transaction handling fee among the block-making node device and each forwarding node device according to the participation degrees of the block-making node device and each forwarding node device in the current transaction.
[0042] An embodiment of the third aspect of the present application provides a computer device, including a memory and a processor. When the computer-readable instructions stored in the memory are executed by the processor, the processor executes the steps of the method described in the first aspect above.
[0043] An embodiment of the fourth aspect of the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, one or more processors execute the steps of the method described in the first aspect above.
[0044] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages:
[0045] In the embodiments of the present application, the structure of the transaction information is modified. Each forwarding node device adds its own node information to the transaction information, and the participant identity of the forwarding node device is characterized based on the added node information. The block-making node device that successfully blocks the transaction information sends the new block to the synchronous accounting node device. The synchronous accounting node device confirms the participation degree of the forwarding node device based on the node information included in the transaction information, and then confirms the amount of transaction fees that each forwarding node device can obtain. Finally, the transaction fees of this amount are distributed to each forwarding node device. It realizes the fair and just distribution of transaction fees between the block-making node device and the forwarding node device, enables each forwarding node device to receive corresponding rewards, and improves the enthusiasm of the node device to participate in transaction processing.
[0046] Additional aspects and advantages of the present application will be given in part in the following description, will become apparent in part from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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 be a limitation of the present application. Moreover, throughout the drawings, the same reference numerals are used to represent the same components.
[0048] In the drawings:
[0049] Figure 1 The flowchart of a method for determining the participation degree of blockchain nodes provided by an embodiment of the present application is shown;
[0050] Figure 2 The schematic structural diagram of a system for determining the participation degree of blockchain nodes provided by an embodiment of the present application is shown;
[0051] Figure 3 The schematic structural diagram of a computer device provided by an embodiment of the present application is shown;
[0052] Figure 4 The schematic diagram of a storage medium provided by an embodiment of the present application is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the 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.
[0054] It can be understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element.
[0055] Some embodiments of the present application provide a method for determining the participation degree of blockchain nodes. In this method, each forwarding node device that forwards transaction information adds its own node information to the transaction information. The block-making node device that successfully makes a block with the transaction information packs the transaction information in a new block and sends the new block to the synchronous accounting node device. The synchronous accounting node device confirms the participation degree of the forwarding node device based on the node information included in the transaction information, and then confirms the amount of transaction fees that each participating forwarding node device can receive. Finally, the amount of transaction fees is distributed to each participating forwarding node device, realizing a fair and just distribution of transaction fees between the block-making node and all nodes participating in forwarding.
[0056] See Figure 1 , the method specifically includes the following steps:
[0057] Step 101: The forwarding node device receives the transaction information sent by the user and forwards the transaction information to other node devices other than itself.
[0058] When the user initiates a transaction, the user sends the transaction information to a node device in the blockchain system through a device such as their mobile phone or computer. This node device can be the node device closest to the user. The transaction information includes the transaction amount, the accounts of both parties to the transaction, and the transaction fees, etc. This node device then forwards the transaction information to multiple adjacent node devices, and each of the adjacent node devices then forwards the transaction information to the node devices adjacent to them. When the node device forwards the transaction information to its adjacent node devices, these adjacent node devices do not include the node device that forwarded the transaction information to this node device. In the embodiments of the present application, a preset forwarding number can be set. When the number of times the transaction information is forwarded reaches the preset forwarding number, it is considered that the transaction information has been forwarded to each node device in the blockchain system, and at this time, the forwarding of the transaction information is stopped. In the embodiments of the present application, each node device that forwards the transaction information is called a forwarding node device.
[0059] For example, assume that node 1 has 15 adjacent nodes, and each adjacent node has 15 adjacent nodes respectively. After node 1 receives the transaction information, it first signs the transaction information, then puts the signature and its own public key into the transaction information, and then forwards the transaction information to its 15 adjacent nodes. After the adjacent nodes receive the transaction information, they also sign the transaction information, put the signature and the public key into the transaction information, and then forward it to their adjacent nodes. Assume that after 10 forwards, the transaction information is packed into a new block. At this time, the transaction information has been forwarded 15×149 times, which is sufficient to spread the transaction information throughout the blockchain. Since each forward adds node information to the transaction information, the data volume of the transaction information will increase each time it is forwarded. However, the number of forwards is limited. For example, after a limited number of forwards such as 10 or 12, the transaction information can be forwarded to each node in the blockchain system. Therefore, there is no need to worry about the data volume of the transaction information becoming too large.
[0060] Step 102: Each forwarding node device adds its own node information to the transaction information.
[0061] The blockchain system includes multiple forwarding node devices. For each forwarding node device, after receiving the transaction information sent by the user, it adds its own node information to the transaction information. The node information may include the device identifier and public key of the forwarding node device, etc. Specifically, the forwarding node device adds its own device identifier to the transaction information and uses its own private key to sign and encrypt the transaction information to obtain signature information. Then, the signature information and its own public key are added to the transaction information.
[0062] By modifying the structure of the transaction information in the above manner, each forwarding node device adds its own node information to the transaction information, and the participant identity of the forwarding node device is characterized based on the added node information.
[0063] Step 103: The block-making node device executes the transaction processing of the transaction information and packs the transaction information into a new block.
[0064] In the blockchain system, each node device that receives the transaction information processes the transaction information. Some node devices process it quickly, and some node devices process it slowly. However, only one node device will first complete the transaction operation of the transaction information and pack the transaction information into a new block. In the embodiment of the present application, the node device that first successfully makes a block for the transaction information is called the block-making node device. The block-making node device and the forwarding node device may be the same node device or different node devices.
[0065] After the block-making node device finishes the transaction processing of the transaction information, it performs a hash operation on the transaction information and related processing information to obtain a first hash value. The related processing information includes information such as the transaction processing result and its own device identifier. Information such as the related processing information and the first hash value obtained by the hash operation is added to the transaction information. Then, the transaction information and several other transaction information completed by the block-making node device are packaged into a new block.
[0066] Step 104: The block-making node device forwards the new block to the synchronized bookkeeping node devices, where the synchronized bookkeeping node devices are each node device in the blockchain other than the block-making node device.
[0067] Similar to the forwarding node device forwarding transaction information, the block-making node device sends the new block to adjacent node devices, and the adjacent node devices are then forwarded through multiple adjacent node devices to ensure that the new block is forwarded to each node device in the blockchain except the block-making node device. All node devices that receive the new block are synchronized bookkeeping node devices.
[0068] The block-making node device also stores the new block on the local blockchain.
[0069] Step 105: The synchronized bookkeeping node device receives the new block and determines the participation of the block-making node device and each forwarding node device in this transaction according to the transaction information included in the new block.
[0070] Each synchronized bookkeeping node device needs to execute and record each transaction information in the new block. Specifically, for the above transaction information, the synchronized bookkeeping node device obtains the transaction information from the new block, and obtains the first hash value and the node information corresponding to each forwarding node device from the transaction information; the synchronized bookkeeping node device determines the participation of the block-making node device in this transaction according to the transaction information and the first hash value; the synchronized bookkeeping node device determines the participation of each forwarding node device in this transaction according to the node information of each forwarding node device.
[0071] Specifically, the synchronized bookkeeping node device extracts the above first hash value from the transaction information, performs a hash operation on the information included in the transaction information except the first hash value to obtain a second hash value. Compare the first hash value and the second hash value. If the two are the same, confirm the workload of the block-making node device for packaging the transaction information, allocate the system reward of this transaction to the block-making node device, and determine that the participation of the block-making node device in this transaction is a first preset ratio. The first preset ratio is a value between 0 and 1. For example, the first preset ratio can be 50% or 55%, etc.
[0072] The synchronized bookkeeping node device obtains the node information corresponding to each forwarding node device from the transaction information. Determine the number of forwarding node devices according to the number of the obtained node information. Calculate the ratio between the second preset ratio and the number of forwarding node devices, and determine this ratio as the participation degree of each forwarding node device in this transaction.
[0073] The second preset ratio is also a value between 0 and 1. The second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1. The second preset ratio can be 50% or 45%, etc.
[0074] Step 106: The synchronized bookkeeping node device distributes the transaction handling fees among the block-making node device and each forwarding node device according to the participation degrees of the block-making node device and each forwarding node device in this transaction.
[0075] After determining the participation degree of the block-making node device and the participation degree of each forwarding node device in the above manner, the synchronized bookkeeping node device distributes the handling fees of the first preset ratio in the transaction handling fees included in the transaction information to the block-making node device.
[0076] For the first forwarding node device, the first forwarding node device is any one of the forwarding node devices. Obtain the signature information and public key corresponding to the first forwarding node device from the node information of the first forwarding node device of the synchronized bookkeeping node device, decrypt the signature information using this public key to obtain the device identifier of the first forwarding node device. According to the device identifier of the first forwarding node device, distribute the handling fees of the ratio calculated above in the transaction handling fees to the first forwarding node device.
[0077] For each of the other forwarding node devices, it is the same as the above first forwarding node device, and distribute the amount of handling fees of the ratio calculated above to each of the other forwarding node devices respectively in the above manner.
[0078] Each synchronized bookkeeping node device that receives the new block distributes the transaction handling fees among the block-making node device and each forwarding node device in the above manner. So that each forwarding node device participating in forwarding the transaction information can get a reward, improving the enthusiasm of the nodes to participate.
[0079] After the synchronized bookkeeping node device completes the above reward distribution operation, it stores the new block on the blockchain stored locally by itself.
[0080] In the embodiments of the present application, the structure of the transaction information is modified. Each forwarding node device adds its own node information to the transaction information, and the participant identity of the forwarding node device is characterized based on the added node information. The block-making node device that successfully blocks the transaction information sends the new block to the synchronous accounting node device. The synchronous accounting node device confirms the participation degree of the forwarding node device based on the node information included in the transaction information, and then confirms the amount of transaction fees that each forwarding node device can receive. Finally, the amount of transaction fees is distributed to each forwarding node device. It realizes the fair and just distribution of transaction fees between the block-making node device and the forwarding node device, enables each forwarding node device to receive corresponding rewards, and improves the enthusiasm of the node device to participate in transaction processing.
[0081] The embodiments of the present application provide a system for determining the participation degree of blockchain nodes. This system is used to execute the method for determining the participation degree of blockchain nodes described in any of the above embodiments, as Figure 2 shown, this system includes:
[0082] A forwarding node device 201, which is used to receive the transaction information sent by the user and transfer the transaction information to other node devices other than itself; there are multiple forwarding node devices 201 in the blockchain system, and each forwarding node device 201 adds its own node information to the transaction information;
[0083] A block-making node device 202, which is used to execute the transaction processing of the transaction information, package the transaction information into a new block, and forward the new block to the synchronous accounting node device 203. The block-making node device 202 is the node device in the blockchain system that first successfully packages the transaction information, and the synchronous accounting node device 203 is each other node device in the blockchain other than the block-making node device 202;
[0084] A synchronous accounting node device 203, which is used to receive the new block, and respectively determine the participation degree of the block-making node device 202 and each forwarding node device 201 in this transaction according to the transaction information included in the new block; according to the participation degree of the block-making node device 202 and each forwarding node device 201 in this transaction, distribute the transaction fees between the block-making node device 202 and each forwarding node device.
[0085] A forwarding node device 201, which is used to add its own device identifier to the transaction information. The forwarding node device 201 is any node device in the blockchain system that needs to forward the transaction information; use its own private key to sign and encrypt the transaction information to obtain signature information; add the signature information and its own public key to the transaction information.
[0086] The block-making node device 202 is used to perform a hashing operation on the transaction information and related processing information to obtain a first hash value. The related processing information includes the transaction processing result and the device identifier of the block-making node device 202; add the related processing information and the first hash value to the transaction information; and pack the transaction information into a new block.
[0087] The synchronized accounting node device 203 is used to obtain the transaction information from the new block; obtain the first hash value and the node information corresponding to each forwarding node device 201 from the transaction information; determine the participation degree of the block-making node device 202 in this transaction according to the transaction information and the first hash value; and determine the participation degree of each forwarding node device 201 in this transaction according to the node information of each forwarding node device 201.
[0088] The synchronized accounting node device 203 is used to perform a hashing operation on the information in the transaction information other than the first hash value to obtain a second hash value; compare whether the first hash value is the same as the second hash value; if the two are the same, determine that the participation degree of the block-making node device 202 in this transaction is the first preset ratio.
[0089] The synchronized accounting node device 203 is used to determine the number of forwarding node devices 201 according to the number of node information obtained from the transaction information; calculate the ratio between the second preset ratio and the number of forwarding node devices 201. The second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1; and determine the ratio as the participation degree of each forwarding node device 201 in this transaction.
[0090] The synchronized accounting node device 203 is used to allocate the first preset ratio of the transaction fees included in the transaction information to the block-making node device 202; obtain the signature information and public key corresponding to the first forwarding node device 201 from the node information of the first forwarding node device 201. The first forwarding node device 201 is any one of the forwarding node devices 201; decrypt the signature information using the public key to obtain the device identifier of the first forwarding node device 201; and allocate the ratio of the transaction fees to the first forwarding node device 201 according to the device identifier of the first forwarding node device 201.
[0091] In the embodiment of the present application, the structure of the transaction information is modified. Each forwarding node device adds its own node information to the transaction information, and the participant identity of the forwarding node device is characterized based on the added node information. The block-making node device that successfully blocks the transaction information sends the new block to the synchronous accounting node device. The synchronous accounting node device confirms the participation degree of the forwarding node device based on the node information included in the transaction information, and then confirms the amount of transaction fees that each forwarding node device can obtain. Finally, the amount of transaction fees is distributed to each forwarding node device. It realizes the fair and just distribution of transaction fees between the block-making node device and the forwarding node device, enables each forwarding node device to receive the corresponding remuneration, and improves the enthusiasm of the node device to participate in transaction processing.
[0092] The embodiment of the present application provides a computer device. As Figure 3 shown, the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The control information sequence can be stored in the database. When the computer-readable instructions are executed by the processor, the processor can implement a method for determining the participation degree of blockchain nodes. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The computer-readable instructions can be stored in the memory of the computer device. When the computer-readable instructions are executed by the processor, the processor can execute a method for determining the participation degree of blockchain nodes. The network interface of the computer device is used to connect and communicate with the terminal. Those skilled in the art can understand that Figure 3 the structure shown in
[0093] The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: The forwarding node device receives the transaction information sent by the user and forwards the transaction information to other node devices other than itself; The blockchain system includes multiple forwarding node devices, and each forwarding node device adds its own node information to the transaction information; The block-making node device performs transaction processing on the transaction information and packages the transaction information into a new block. The block-making node device is the node device in the blockchain system that first successfully packages the transaction information; The block-making node device forwards the new block to the synchronous accounting node device, and the synchronous accounting node device is each node device in the blockchain other than the block-making node device; The synchronous accounting node device receives the new block and determines the participation of the block-making node device and each forwarding node device in this transaction according to the transaction information included in the new block; The synchronous accounting node device distributes the transaction handling fee between the block-making node device and each forwarding node device according to the participation of the block-making node device and each forwarding node device in this transaction.
[0094] When the processor executes the computer program, the following steps can also be implemented: The forwarding node device adds its own device identifier to the transaction information. The forwarding node device is any node device in the blockchain system that needs to forward the transaction information; The forwarding node device uses its own private key to sign and encrypt the transaction information to obtain signature information; The forwarding node device adds the signature information and its own public key to the transaction information.
[0095] When the processor executes the computer program, the following steps can also be implemented: The block-making node device performs a hash operation on the transaction information and related processing information to obtain a first hash value. The related processing information includes the transaction processing result and the device identifier of the block-making node device; The block-making node device adds the related processing information and the first hash value to the transaction information; The block-making node device packages the transaction information into a new block.
[0096] When the processor executes the computer program, the following steps can also be implemented: The synchronous accounting node device obtains the transaction information from the new block; The synchronous accounting node device obtains the first hash value and the node information corresponding to each forwarding node device from the transaction information; The synchronous accounting node device determines the participation of the block-making node device in this transaction according to the transaction information and the first hash value; The synchronous accounting node device determines the participation of each forwarding node device in this transaction according to the node information of each forwarding node device.
[0097] When the processor executes the computer program, the following steps may also be implemented: The synchronization accounting node device performs a hashing operation on the information in the transaction information except for the first hash value to obtain a second hash value; the synchronization accounting node device compares whether the first hash value is the same as the second hash value; if the two are the same, the synchronization accounting node device determines that the participation degree of the block-making node device in this transaction is the first preset ratio.
[0098] When the processor executes the computer program, the following steps may also be implemented: The synchronization accounting node device determines the number of forwarding node devices according to the number of node information obtained from the transaction information; the synchronization accounting node device calculates the ratio between the second preset ratio and the number of forwarding node devices, the second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1; the synchronization accounting node device determines the ratio as the participation degree of each forwarding node device in this transaction.
[0099] When the processor executes the computer program, the following steps may also be implemented: The synchronization accounting node device allocates the first preset ratio of the transaction fees included in the transaction information to the block-making node device; the synchronization accounting node device obtains the signature information and public key corresponding to the first forwarding node device from the node information of the first forwarding node device, and the first forwarding node device is any one of each forwarding node device; the synchronization accounting node device decrypts the signature information using the public key to obtain the device identifier of the first forwarding node device; the synchronization accounting node device allocates the fees of the ratio in the transaction fees to the first forwarding node device according to the device identifier of the first forwarding node device.
[0100] In the embodiment of the present application, it is realized that the transaction fees are fairly and justly distributed among the block-making node device and all the node devices participating in the forwarding, so that each forwarding node device can obtain the corresponding remuneration, and the enthusiasm of the node devices to participate in transaction processing is improved.
[0101] The embodiment of the present application also proposes a storage medium storing computer-readable instructions, such as Figure 4As shown, when the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the following steps: The forwarding node device receives transaction information sent by a user and forwards the transaction information to other node devices other than itself; The blockchain system includes multiple forwarding node devices, and each forwarding node device adds its own node information to the transaction information; The block-making node device performs transaction processing on the transaction information and packages the transaction information into a new block. The block-making node device is the node device in the blockchain system that first successfully packages the transaction information; The block-making node device forwards the new block to the synchronized accounting node devices, and the synchronized accounting node devices are each node device in the blockchain other than the block-making node device; The synchronized accounting node devices receive the new block and respectively determine the participation degrees of the block-making node device and each forwarding node device in this transaction according to the transaction information included in the new block; The synchronized accounting node devices allocate transaction fees among the block-making node device and each forwarding node device according to the participation degrees of the block-making node device and each forwarding node device in this transaction.
[0102] The processor may further perform the following steps: The forwarding node device adds its own device identifier to the transaction information. The forwarding node device is any node device in the blockchain system that needs to forward the transaction information; The forwarding node device uses its own private key to sign and encrypt the transaction information to obtain signature information; The forwarding node device adds the signature information and its own public key to the transaction information.
[0103] The processor may further perform the following steps: The block-making node device performs a hash operation on the transaction information and related processing information to obtain a first hash value. The related processing information includes the transaction processing result and the device identifier of the block-making node device; The block-making node device adds the related processing information and the first hash value to the transaction information; The block-making node device packages the transaction information into a new block.
[0104] The processor may further perform the following steps: The synchronized accounting node device obtains the transaction information from the new block; The synchronized accounting node device obtains the first hash value and the node information corresponding to each forwarding node device from the transaction information; The synchronized accounting node device determines the participation degree of the block-making node device in this transaction according to the transaction information and the first hash value; The synchronized accounting node device determines the participation degree of each forwarding node device in this transaction according to the node information of each forwarding node device.
[0105] The processor may further perform the following steps: The synchronized accounting node device performs a hash operation on the information in the transaction information other than the first hash value to obtain a second hash value; The synchronized accounting node device compares whether the first hash value is the same as the second hash value; If the two are the same, the synchronized accounting node device determines that the participation degree of the block-making node device in this transaction is a first preset ratio.
[0106] The processor may also execute the following steps: The synchronization accounting node device determines the number of forwarding node devices according to the number of node information obtained from the transaction information; The synchronization accounting node device calculates the ratio between the second preset ratio and the number of forwarding node devices, the second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1; The synchronization accounting node device determines the ratio as the participation degree of each forwarding node device in this transaction.
[0107] The processor may also execute the following steps: The synchronization accounting node device allocates the handling fee of the first preset ratio in the transaction handling fee included in the transaction information to the block-making node device; The synchronization accounting node device obtains the signature information and public key corresponding to the first forwarding node device from the node information of the first forwarding node device, and the first forwarding node device is any one of each forwarding node device; The synchronization accounting node device decrypts the signature information using the public key to obtain the device identifier of the first forwarding node device; The synchronization accounting node device allocates the handling fee of the ratio in the transaction handling fee to the first forwarding node device according to the device identifier of the first forwarding node device.
[0108] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the foregoing storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM), etc.
[0109] In the embodiments of the present application, it is realized that the transaction handling fee is fairly and justly distributed between the block-making node device and all node devices participating in forwarding, so that each forwarding node device can obtain the corresponding remuneration, and the enthusiasm of the node device to participate in transaction processing is improved.
[0110] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0111] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to 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, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for determining the participation degree of a blockchain node, characterized in that, Including: The forwarding node device receives the transaction information sent by the user and forwards the transaction information to other node devices other than itself. There are multiple forwarding node devices in the blockchain system, and each of the forwarding node devices adds its own node information to the transaction information. The block-making node device executes the transaction processing of the transaction information and packages the transaction information into a new block. The block-making node device is the node device in the blockchain system that first successfully packages the transaction information. The block-making node device forwards the new block to the synchronized accounting node devices, and the synchronized accounting node devices are each node device in the blockchain other than the block-making node device. The synchronized accounting node device receives the new block and determines the participation degrees of the block-making node device and each of the forwarding node devices in this transaction respectively according to the transaction information included in the new block. The synchronized accounting node device distributes the transaction fees among the block-making node device and each of the forwarding node devices according to the participation degrees of the block-making node device and each of the forwarding node devices in this transaction. Among them, the block-making node device packages the transaction information into a new block, including: performing a hash operation on the transaction information and related processing information to obtain a first hash value, where the related processing information includes the transaction processing result and the device identifier of the block-making node device; the block-making node device adds the related processing information and the first hash value to the transaction information; the block-making node device packages the transaction information into a new block. The synchronized accounting node device receives the new block and determines the participation degrees of the block-making node device and each of the forwarding node devices in this transaction respectively according to the transaction information included in the new block, including: The synchronized accounting node device obtains the transaction information from the new block. The synchronized accounting node device obtains the first hash value and the node information corresponding to each of the forwarding node devices from the transaction information. The synchronized accounting node device determines the participation degree of the block-making node device in this transaction according to the transaction information and the first hash value. The synchronized accounting node device determines the participation degree of each of the forwarding node devices in this transaction according to the node information of each of the forwarding node devices.
2. The method according to claim 1, characterized in that, Each of the forwarding node devices adds its own node information to the transaction information, including: The forwarding node device adds its own device identifier to the transaction information, and the forwarding node device is any node device in the blockchain system that needs to forward the transaction information. The forwarding node device performs signature encryption on the transaction information using its own private key to obtain signature information. The forwarding node device adds the signature information and its own public key to the transaction information.
3. The method according to claim 1, characterized in that, The synchronized accounting node device determines the participation degree of the block-making node device in this transaction according to the transaction information and the first hash value, including: The synchronization accounting node device performs a hashing operation on the information in the transaction information except for the first hash value to obtain a second hash value; The synchronization accounting node device compares whether the first hash value is the same as the second hash value; If the two are the same, the synchronization accounting node device determines that the participation of the block-making node device in this transaction is the first preset ratio.
4. The method according to claim 3, characterized in that, The synchronization accounting node device determines the participation of each forwarding node device in this transaction according to the node information of each forwarding node device, including: The synchronization accounting node device determines the number of forwarding node devices according to the number of node information obtained from the transaction information; The synchronization accounting node device calculates the ratio between the second preset ratio and the number of forwarding node devices. The second preset ratio is less than the first preset ratio, and the sum of the second preset ratio and the first preset ratio is 1; The synchronization accounting node device determines the ratio as the participation of each forwarding node device in this transaction.
5. The method according to claim 4, characterized in that, The synchronization accounting node device distributes the transaction fees among the block-making node device and each forwarding node device according to the participation of the block-making node device and each forwarding node device in this transaction, including: The synchronization accounting node device distributes the first preset ratio of the transaction fees included in the transaction information to the block-making node device; The synchronization accounting node device obtains the signature information and public key corresponding to the first forwarding node device from the node information of the first forwarding node device. The first forwarding node device is any one of each forwarding node device; The synchronization accounting node device decrypts the signature information using the public key to obtain the device identifier of the first forwarding node device; The synchronization accounting node device distributes the ratio of the transaction fees to the first forwarding node device according to the device identifier of the first forwarding node device.
6. A system for determining the participation degree of a blockchain node, characterized in that, Including: A forwarding node device, configured to receive transaction information sent by a user and transfer the transaction information to other node devices other than itself; There are multiple forwarding node devices in the blockchain system, and each forwarding node device adds its own node information to the transaction information; A block-making node device, configured to execute the transaction processing of the transaction information, package the transaction information into a new block, and forward the new block to the synchronization accounting node device. The block-making node device is the node device in the blockchain system that first successfully packages the transaction information, and the synchronization accounting node device is each other node device in the blockchain except the block-making node device; A synchronization accounting node device, configured to receive the new block, and respectively determine the participation of the block-making node device and each forwarding node device in this transaction according to the transaction information included in the new block; distribute the transaction fees among the block-making node device and each forwarding node device according to the participation of the block-making node device and each forwarding node device in this transaction; Among them, the block-making node device packs the transaction information into a new block, including: performing a hash operation on the transaction information and related processing information to obtain a first hash value, where the related processing information includes the transaction processing result and the device identifier of the block-making node device; the block-making node device adds the related processing information and the first hash value to the transaction information; the block-making node device packs the transaction information into a new block; The synchronized bookkeeping node device receives the new block and determines the participation degrees of the block-making node device and each of the forwarding node devices in this transaction according to the transaction information included in the new block, including: The synchronized bookkeeping node device obtains the transaction information from the new block; The synchronized bookkeeping node device obtains the first hash value and the node information corresponding to each of the forwarding node devices from the transaction information; The synchronized bookkeeping node device determines the participation degree of the block-making node device in this transaction according to the transaction information and the first hash value; The synchronized bookkeeping node device determines the participation degree of each of the forwarding node devices in this transaction according to the node information of each of the forwarding node devices.
7. A computer device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the processor is caused to execute the steps of the method according to any one of claims 1 to 5.
8. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Trust block chain consensus method based on role classification
CN110535836A