Consensus methods, storage nodes, and miner nodes based on blockchain networks

By introducing storage nodes into the blockchain network, the problem of miner nodes being unable to compete for the right to record transactions due to insufficient storage is solved, thereby improving the computing power utilization rate of miner nodes and effectively incentivizing storage resources, thus avoiding the waste of computing power.

CN115344879BActive Publication Date: 2026-04-03CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In a blockchain network, miner nodes cannot store all the content associated with all blocks, which prevents them from competing for the right to record the next block, resulting in idle computing power.

Method used

By introducing storage nodes, information broadcast by participating nodes is verified and stored, and information on how to obtain target information is provided. This incentivizes storage nodes to store more content, and miner nodes can obtain the required content from storage nodes when needed to compete for the right to record transactions.

Benefits of technology

This improves the utilization rate of mining nodes' computing power, avoids idle computing power, incentivizes storage nodes to actively store resources, and ensures that mining nodes do not lose their eligibility to record transactions due to a lack of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344879B_ABST
    Figure CN115344879B_ABST
Patent Text Reader

Abstract

This invention discloses a consensus method, storage node, and miner node based on a blockchain network, relating to the field of communication technology. The method includes: acquiring first information broadcast by at least one participating node in the blockchain network; storing storage resources corresponding to the first information if the first information is verified; and, if the storage resources include target information corresponding to a target block number, sending acquisition method information corresponding to the target information to the blockchain network, so that any node in the blockchain network can acquire the target information based on the acquisition method information to gain the qualification to compete for the right to record the next block in the blockchain network. This invention can incentivize storage nodes to actively store storage resources, ensure that miner nodes can compete for the right to record the next block, and improve the computing power utilization rate of miner nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and specifically to a consensus method, storage node, and miner node based on a blockchain network. Background Technology

[0002] In some consensus mechanism designs, only the miner node that stores the hash value corresponding to a certain block record in the blockchain is eligible to obtain the right to record transactions. However, if the amount of data involved is huge, a single miner node will not be able to store all the block-related content. In this case, if the block-related content required for recording transactions happens to be outside the miner node's own storage, the miner node can only wait idly, resulting in idle computing power. Summary of the Invention

[0003] To address this, the present invention provides a consensus method, storage node, and miner node based on a blockchain network, in order to prevent miner nodes from losing their eligibility to compete for the right to record the next block in the blockchain network due to a lack of storage resources required for recording transactions, thereby improving the computing power utilization rate of miner nodes and avoiding idle computing power.

[0004] To achieve the above objectives, a first aspect of the present invention provides a consensus method based on a blockchain network, applied to a storage node, the method comprising:

[0005] Obtain the first message broadcast by at least one participating node in the blockchain network;

[0006] If the first information is verified, the storage resources corresponding to the first information are stored.

[0007] If the storage resources include target information corresponding to the target block number, the acquisition method information corresponding to the target information is sent to the blockchain network so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network.

[0008] Optionally, when the storage resource includes target information corresponding to the target block number, before sending the acquisition method information corresponding to the target information to the blockchain network, the method further includes:

[0009] Obtain a query request from the blockchain network, the query request including the target block number.

[0010] Optionally, when the storage resource includes target information corresponding to the target block number, before sending the acquisition method information corresponding to the target information to the blockchain network, the method further includes:

[0011] The first hash value is determined based on all hash values ​​in the candidate blocks corresponding to the next block.

[0012] The target block number is obtained based on the first hash value and the block number of the next block.

[0013] Optionally, the acquisition method information includes resource consumption compensation information and resource acquisition link; the method further includes:

[0014] In response to any node sending compensation resources corresponding to the resource consumption compensation information, an access authorization code corresponding to the resource acquisition link is sent to that node, so that the node can obtain the target information based on the access authorization code and the resource acquisition link.

[0015] Optionally, the method further includes:

[0016] Get the target hash value corresponding to the target block number;

[0017] Determine whether there exists a hash value in the hash values ​​corresponding to the storage resource that matches the target hash value;

[0018] If there is a hash value in the hash value corresponding to the storage resource that is consistent with the target hash value, it is determined that the storage resource includes the target information corresponding to the target block number.

[0019] Optionally, the first information includes a second hash value calculated by the participating nodes for the storage resources corresponding to the first information; before storing the storage resources corresponding to the first information if the first information is verified, the method further includes:

[0020] Based on the first information, obtain the storage resources corresponding to the first information;

[0021] Calculate the third hash value of the storage resource;

[0022] If the second hash value and the third hash value are consistent, the first information is determined to have been verified.

[0023] Optionally, the step of obtaining the storage resource corresponding to the first information based on the first information includes:

[0024] Extract the storage resource from the first information; or...

[0025] Extract the extraction link corresponding to the storage resource from the first information, and obtain the storage resource based on the extraction link.

[0026] A second aspect of this invention provides a consensus method based on a blockchain network, applied to miner nodes, the method comprising:

[0027] Determine the first hash value based on all hash values ​​in the candidate blocks corresponding to the next block;

[0028] Obtain the target block number based on the first hash value and the block number of the next block;

[0029] In the absence of storing the target information corresponding to the target block number, a query request is sent to the blockchain network, the query request including the target block number;

[0030] The information obtained from the blockchain network corresponds to the query request. The information obtained is the information sent by the storage node to the blockchain network to obtain the target information when it determines that the storage resources include the target information corresponding to the target block number. The storage resources are the storage resources corresponding to the first information that the storage node stores when it obtains the first information broadcast by at least one participating node in the blockchain network and the first information is verified.

[0031] The target information is obtained based on the acquisition method, in order to qualify for the right to record the next block in the blockchain network.

[0032] A third aspect of the present invention provides a storage node comprising:

[0033] The first acquisition module is used to acquire the first information broadcast by at least one participating node in the blockchain network;

[0034] The first storage module is used to store the storage resources corresponding to the first information when the first information is verified.

[0035] The first sending module is used to send acquisition method information corresponding to the target information to the blockchain network when the storage resources include target information corresponding to the target block number, so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network.

[0036] A fourth aspect of the present invention provides a miner node, the miner node comprising:

[0037] The processing module is used to determine a first hash value based on all hash values ​​in the candidate blocks corresponding to the next block, and to obtain the target block number according to the first hash value and the block number of the next block;

[0038] The second sending module is used to send a query request to the blockchain network when the target information corresponding to the target block number is not stored, and the query request includes the target block number;

[0039] The second acquisition module is further configured to acquire acquisition method information corresponding to the query request from the blockchain network; the acquisition method information is information sent by the storage node to the blockchain network to acquire the target information when it determines that the storage resources include the target information corresponding to the target block number; the storage resources are the storage resources corresponding to the first information stored by the storage node when it acquires the first information broadcast by at least one participating node in the blockchain network and the first information is verified.

[0040] The third acquisition module is used to acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network.

[0041] The present invention has the following advantages:

[0042] This invention provides a consensus method based on a blockchain network. The method involves obtaining first information broadcast by at least one participating node within the blockchain network; storing storage resources corresponding to the first information if the first information is verified; and, if the storage resources include target information corresponding to a target block number, sending acquisition method information corresponding to the target information to the blockchain network. This allows any node in the blockchain network to acquire the target information based on the acquisition method information, thereby gaining the qualification to compete for the right to record the next block in the blockchain network. This incentivizes storage nodes to actively store storage resources, preventing miner nodes from losing their qualification to compete for the right to record the next block due to a lack of storage resources required for recording, thus improving the utilization rate of miner nodes' computing power and preventing idle computing power. Attached Figure Description

[0043] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof.

[0044] Figure 1 A flowchart illustrating a consensus method based on a blockchain network, provided as an embodiment of the present invention;

[0045] Figure 2 A flowchart illustrating a consensus method based on a blockchain network, provided as an embodiment of the present invention;

[0046] Figure 3 This invention provides a schematic diagram of the structure of a storage node according to an embodiment of the invention;

[0047] Figure 4 This is a schematic diagram of a miner node provided in an embodiment of the present invention. Detailed Implementation

[0048] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0049] As used in this invention, the term "and / or" includes any and all combinations of one or more of the associated enumerated entries.

[0050] The terminology used in this invention is for describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0051] When the terms “comprising” and / or “made of” are used in this invention, the presence of the said feature, integral, step, operation, element and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or groups thereof is not excluded.

[0052] The embodiments described herein can be illustrated with reference to plan views and / or cross-sectional views, using the ideal schematic diagrams of the invention. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.

[0053] Unless otherwise specified, all terms used in this invention (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined by the invention.

[0054] The "consensus" process in a blockchain network is the process of determining which miner node should record the next block. The next block refers to the next new block that can be written into the blockchain. In some consensus mechanisms, only the miner node that stores the hash value corresponding to a particular block in the blockchain is eligible to compete for the right to record the transaction. However, if the amount of data involved is enormous, a single miner node may not be able to store all the associated block information. In this case, if the associated block information required for recording the transaction is not in the miner node's own storage, that miner node will not be able to compete for the right to record the next block and will have to wait idly, resulting in idle computing power.

[0055] To address the aforementioned challenges, this invention provides a consensus method based on a blockchain network. This method introduces dedicated storage nodes into the blockchain network. These storage nodes are used to store the content associated with blocks within the blockchain. Furthermore, these storage nodes can obtain resources based on the amount of content they store, thereby incentivizing them to store more content. In this consensus mechanism, when the block-related content required for a miner node's accounting is not in the miner node's own storage, the miner node can retrieve the necessary content from the storage node. This prevents miners from losing their eligibility to generate the next block in the blockchain network due to a lack of stored content, thus avoiding idle computing power.

[0056] Figure 1 This is a flowchart illustrating a consensus method based on a blockchain network, provided in an embodiment of the present invention. The blockchain network includes participating nodes, miner nodes, and storage nodes. Participating nodes are nodes in the blockchain network used to broadcast information that needs to be stored; miner nodes are nodes used to generate blocks; and storage nodes are nodes used to provide storage, query, and other services. This consensus method is applied to storage nodes in the blockchain network. Figure 1 As shown, the consensus method based on the blockchain network includes steps S101-S103.

[0057] Step S101: Obtain the first information broadcast by at least one participating node in the blockchain network.

[0058] In this context, participating nodes are nodes in the blockchain network that have a need to store information. The first piece of information is the information used to request storage of corresponding storage resources. The storage resources corresponding to this first piece of information are the information that the participating node broadcasting this first piece of information needs to store in the blockchain network.

[0059] In one implementation scenario, where the blockchain network is the blockchain network corresponding to the metaverse, the participating nodes in the blockchain network include nodes that provide metaverse services, and the storage resources corresponding to the first information can be metaverse service information, metaverse technology configuration information, and other information.

[0060] In one implementation, participating nodes generate first information based on the storage resources they need to store, and broadcast the first information in the blockchain network via a broadcast message signed with their private keys. This first information includes a second hash value of the storage resources calculated by the participating nodes.

[0061] In some embodiments, in order to speed up the process of storing storage resources into the blockchain network, the first information broadcast by participating nodes may directly include storage resources, so that storage nodes and / or miner nodes can directly extract the storage resources from the first information.

[0062] In other embodiments, when the amount of storage resources is large, in order to reduce the burden on the blockchain network, the first information broadcast by participating nodes may include the extraction link corresponding to the storage resources, so that storage nodes and / or miner nodes can obtain storage resources through the extraction link.

[0063] In one implementation, when a participating node broadcasts first information in the blockchain network, it needs to pay an information processing fee corresponding to that first information. This information processing fee is used to provide resource compensation to nodes such as storage nodes and mining nodes used to build the blockchain network, thereby promoting the development of the blockchain network. The value of this information processing fee is directly proportional to the amount of storage resources corresponding to the first information; that is, the larger the amount of storage resources corresponding to the first information, the larger the value of the information processing fee.

[0064] In one implementation, to ensure the security of the nodes processing the first information (e.g., storage nodes and / or miner nodes), after obtaining the first information from the blockchain network, the storage nodes and miner nodes need to verify the private key signature carried by the first information based on the public key of the participating nodes. If the private key signature carried by the first information is verified, it is determined that the first information comes from the participating node, that is, the source of the first information is legitimate.

[0065] In one implementation, when storing the storage resource corresponding to the first information, it is necessary to ensure that the storage resource corresponding to the first information is the information that the participating node wants to store, to prevent the storage resource from being tampered with after the participating node broadcasts the first information and before the storage resource corresponding to the first information is stored. In this implementation, after obtaining the first information broadcast by the participating node in the blockchain network, the storage node and / or miner node need to verify the first information. The steps for verifying the first information include:

[0066] Step 1: Obtain the storage resources corresponding to the first information based on the first information.

[0067] The first piece of information is used to request storage of the corresponding storage resources. The storage resources corresponding to this first piece of information are the information that the participating node broadcasting the first piece of information needs to store in the blockchain network.

[0068] In one implementation, the first information includes corresponding storage resources. The step of obtaining the storage resources corresponding to the first information includes: extracting the storage resources from the first information.

[0069] In another embodiment, the first information includes an extraction link corresponding to the storage resource. The step of obtaining the storage resource corresponding to the first information then includes: extracting the extraction link corresponding to the storage resource from the first information, and obtaining the storage resource based on the extraction link.

[0070] The retrieval link corresponding to the storage resource is a link used to indicate the location of the storage resource. The storage resource can be stored in the local memory of the participating node or in a server specified by the participating node. The storage node and / or miner node can retrieve the storage resource from the corresponding storage space (such as the aforementioned local memory or specified server) using the retrieval link.

[0071] Step 2: Calculate the third hash value of the storage resource.

[0072] The third hash value is the hash value calculated by the node receiving the first information (such as a storage node or a miner node) based on the storage resources corresponding to the first information.

[0073] In this embodiment, the first information also includes a second hash value, which is a hash value calculated by the participating nodes themselves based on the storage resource. It should be noted that for the same storage resource, the hash value determined by any node using the same algorithm for that same storage resource will be consistent. In other words, if the storage resource corresponding to the first information has not been tampered with, the second hash value calculated by the participating nodes based on that storage resource should be consistent with the third hash value calculated by the node receiving the first information based on that storage resource. Therefore, after calculating the third hash value of the storage resource, the consistency between the second hash value and the third hash value is compared.

[0074] If the second hash value and the third hash value are inconsistent, the verification of the first information is determined to have failed. Specifically, if the second hash value and the third hash value are inconsistent, it indicates that the storage resources corresponding to the first information obtained by the node receiving the first information (e.g., storage node, miner node) differ from the information the participating node intended to store. The storage resources may have been tampered with; therefore, the verification of the first information is determined to have failed.

[0075] Step 3: If the second hash value and the third hash value are consistent, the first information verification is confirmed to be successful.

[0076] If the second hash value and the third hash value are the same, it means that the storage resource corresponding to the first information obtained by the node receiving the first information (such as a storage node or a miner node) is the information that the participating node wants to store, and it has not been tampered with. Therefore, the first information is verified.

[0077] In this embodiment, by verifying the first information, it can be ensured that the storage resources obtained by the storage node and / or miner node are the information that the participating node wants to store, thereby improving the security of the storage resources before they are stored.

[0078] Step S102: If the first information is verified, store the storage resources corresponding to the first information.

[0079] If the first information is verified, it means that the storage resource corresponding to the first information is the information that the participating node wants to store, and the storage node can store the storage resource corresponding to the first information.

[0080] It should be noted that, for storage nodes, through steps S101-S102 described above, storage nodes can store storage resources corresponding to at least one first message sent by at least one participating node. The more storage resources a storage node stores, the more information processing fees it receives, and the more queryable content it provides to other nodes. For miner nodes, they can store these storage resources through steps similar to S101-S102 described above. However, a single miner node may not be able to store storage resources corresponding to the first messages sent by all participating nodes. Therefore, in the consensus method provided by this invention, when a miner node needs certain storage resources during the accounting process, it can obtain the required storage resources from the storage node.

[0081] In one implementation, the process by which a miner node competes for the right to record the next block in the blockchain network includes the following steps one through three.

[0082] Step 1: Determine the first hash value based on all hash values ​​in the candidate blocks corresponding to the next block.

[0083] Here, "next block" refers to the next new block that can be written into the blockchain. "Candidate blocks" are blocks that have a certain probability of becoming the next block; there are multiple candidate blocks, generated by nodes vying for the right to record transactions in the blockchain. The total hash value in the candidate block refers to the hash value corresponding to all storage resources that will be included in the candidate block.

[0084] In some embodiments, a first hash value can be determined by calculating all hash values ​​in the candidate blocks based on a preset algorithm. This first hash value is associated with the hash values ​​in each candidate block.

[0085] Step 2: Obtain the target block number based on the first hash value and the block number of the next block.

[0086] In some embodiments, the step of a miner node obtaining a target block number based on a first hash value and the block number of the next block includes: obtaining the remainder of the first hash value divided by the block number of the next block, and using the remainder as the target block number. The block number indicates which block in the blockchain it is. The target block number corresponds to the block number of a previously created block (a historical block) in the blockchain.

[0087] Step 3: If the target information corresponding to the target block number is not stored, send a query request to the blockchain network, wherein the query request includes the target block number.

[0088] The target information corresponding to the target block number refers to the information recorded in the block corresponding to that target block number.

[0089] It's important to note that in some consensus mechanism designs, a miner node is only qualified to generate the next block if it stores the target information corresponding to the target block number; that is, the miner node can compete for the right to record the next block. Therefore, in order to gain the qualification to generate the next block, a miner node sends a query request to the blockchain network to obtain the target information corresponding to the target block number, even if it has not yet stored it.

[0090] In one implementation, the storage node obtains a query request from the blockchain network, wherein the query request includes the target block number.

[0091] In this context, the query request is a request sent by any node in the blockchain network (such as a miner node, participating node, etc.) to query the information recorded in the block corresponding to the target block number. In this embodiment, after receiving the query request, the storage node can check whether its own storage resources include the target information corresponding to the target block number.

[0092] In another implementation, the storage node can also determine the target block number itself in order to predetermine the target information corresponding to the target block number in its own storage resources.

[0093] In this embodiment, the storage node also determines the target block number by: determining a first hash value based on all hash values ​​in the candidate blocks, and obtaining the target block number based on the first hash value and the block sequence number of the next block. The detailed steps for the storage node to determine the target block number are similar to those for the miner node described above, and will not be repeated here.

[0094] In one implementation, the step of a storage node querying whether its own storage resources include target information corresponding to the target block number includes the following steps one to three.

[0095] Step 1: Obtain the target hash value corresponding to the target block number.

[0096] The target hash value corresponding to the target block number refers to the hash value of the target content recorded in the block corresponding to the target block number.

[0097] Step 2: Determine if there exists a hash value in the hash value corresponding to the storage resource that matches the target hash value.

[0098] If there is no hash value in the hash value corresponding to the target hash value, it means that the storage resource does not include the target information corresponding to the target block number.

[0099] Step 3: If there is a hash value in the hash value corresponding to the target hash value that is consistent with the target hash value, it is determined that the storage resource includes the target information corresponding to the target block number.

[0100] Step S103: If the storage resources include target information corresponding to the target block number, send the acquisition method information corresponding to the target information to the blockchain network so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network.

[0101] The acquisition method information corresponding to the target information is the method used to enable nodes that need the target information to obtain it. Any node in the blockchain network includes miner nodes, participating nodes, and other nodes.

[0102] In one implementation, the acquisition method information broadcast by the storage node includes resource consumption compensation information and a resource acquisition link. The resource consumption compensation information indicates the compensation resources required to acquire the target information from the storage node. The resource acquisition link is a connection used to acquire the target information, and this connection requires an access authorization code.

[0103] In this implementation, in response to the compensation resources sent by any node corresponding to the resource consumption compensation information, the storage node sends an access authorization code corresponding to the resource acquisition link to that node, so that the node can obtain the target information based on the access authorization code and the resource acquisition link.

[0104] In some embodiments, if there are multiple storage nodes providing the target information, these multiple storage nodes may share the query fees sent by the miner nodes.

[0105] In some implementation scenarios, storage nodes are introduced into the blockchain network corresponding to the metaverse. These storage nodes can earn rewards based on the amount of content they store. This incentivizes nodes in the metaverse to store content on the blockchain, ensuring that the content does not disappear from the metaverse's blockchain network, thereby promoting the development of the metaverse's blockchain network.

[0106] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.

[0107] The consensus method based on a blockchain network provided in this invention first obtains first information broadcast by at least one participating node in the blockchain network; then, if the first information is verified, the storage resources corresponding to the first information are stored; finally, if the storage resources include target information corresponding to the target block number, the acquisition method information corresponding to the target information is sent to the blockchain network, so that any node in the blockchain network can acquire the target information based on the acquisition method information to obtain the qualification to compete for the right to record the next block in the blockchain network. This can incentivize storage nodes to actively store storage resources, prevent miner nodes from losing the qualification to compete for the right to record the next block in the blockchain network due to a lack of storage resources required for recording, improve the computing power utilization rate of miner nodes, and avoid idle computing power.

[0108] Figure 2 This is a flowchart illustrating a consensus method based on a blockchain network, provided as an embodiment of the present invention. This consensus method is applied to miner nodes, such as... Figure 2 As shown, the method includes steps S201-S205.

[0109] Step S201: Determine the first hash value based on all hash values ​​in the candidate blocks corresponding to the next block.

[0110] Here, "next block" refers to the next new block that can be written into the blockchain. "Candidate blocks" are blocks that have a certain probability of becoming the next block, and there are multiple candidate blocks. "All hash values ​​in the candidate blocks" refers to the hash values ​​of all storage resources that will be included in the candidate blocks.

[0111] In some embodiments, a first hash value can be determined by calculating all hash values ​​in the candidate blocks based on a preset algorithm. This first hash value is related to all hash values ​​corresponding to the next block.

[0112] Step S202: Obtain the target block number based on the first hash value and the block number of the next block.

[0113] In some embodiments, the step of a miner node obtaining a target block number based on a first hash value and the block number of the next block includes: obtaining the remainder of the first hash value divided by the block number of the next block, and using the remainder as the target block number. The block number indicates which block in the blockchain it is. The target block number corresponds to the block number of a previously created block (a historical block) in the blockchain.

[0114] Step S203: If the target information corresponding to the target block number is not stored, send a query request to the blockchain network.

[0115] The query request includes the target block number. The target information corresponding to the target block number refers to the information recorded in the block corresponding to that target block number.

[0116] It's important to note that in some consensus mechanism designs, a miner node is only qualified to generate the next block if it stores the target information corresponding to the target block number; that is, the miner node can compete for the right to record the next block. Therefore, in order to gain the qualification to generate the next block, a miner node sends a query request to the blockchain network to obtain the target information corresponding to the target block number, even if it has not yet stored it.

[0117] Step S204: Obtain the acquisition method information corresponding to the query request from the blockchain network.

[0118] The acquisition method information refers to the information sent by the storage node to the blockchain network to acquire the target information, provided that the storage resources include the target information corresponding to the target block number. The storage resources are the storage resources corresponding to the first information that the storage node stores after acquiring the first information broadcast by at least one participating node in the blockchain network and verifying that the first information is successful.

[0119] In some embodiments, if multiple storage nodes provide information on how to obtain the information, the miner node can simultaneously pay the query fee to all storage nodes that provided the information on how to obtain the information, meaning that all storage nodes that provided the information on how to obtain the information share this query fee.

[0120] Step S205: Obtain target information based on the acquisition method information in order to qualify for the right to record the next block in the blockchain network.

[0121] In one implementation, the acquisition method information broadcast by the storage node includes resource consumption compensation information and a resource acquisition link. The step of a miner node acquiring target information based on the acquisition method information includes: sending compensation resources corresponding to the resource consumption compensation information to the storage node that provided the acquisition method information, obtaining an access authorization code corresponding to the resource acquisition link returned by the storage node, and acquiring the target information based on the access authorization code and the resource acquisition link.

[0122] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.

[0123] This invention provides a consensus method based on a blockchain network. First, a first hash value is determined based on all hash values ​​in the candidate blocks corresponding to the next block. Then, a target block number is obtained based on the first hash value and the block number of the next block. If the target information corresponding to the target block number is not stored, a query request, including the target block number, is sent to the blockchain network. Next, acquisition method information corresponding to the query request is obtained from the blockchain network. This acquisition method information is provided by the storage node when it determines that the storage resources include the target information corresponding to the target block number, and sends the request to the blockchain network. The information used to acquire target information; storage resources are the storage resources corresponding to the first information that a storage node acquires after acquiring the first information broadcast by at least one participating node in the blockchain network, and after the first information is verified; finally, the target information is acquired based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network. This can incentivize storage nodes to actively store storage resources, prevent miner nodes from losing the qualification to compete for the right to record the next block in the blockchain network due to the lack of storage resources required for recording, improve the computing power utilization rate of miner nodes, and avoid idle computing power.

[0124] Figure 3 This is a schematic diagram of a storage node provided in an embodiment of the present invention. For example... Figure 3 As shown, the storage node includes: a first acquisition module 31, a first storage module 32, and a first transmission module 33.

[0125] The first acquisition module 31 is used to acquire first information broadcast by at least one participating node in the blockchain network.

[0126] The first storage module 32 is used to store the storage resources corresponding to the first information when the first information is verified.

[0127] The first sending module 33 is used to send acquisition method information corresponding to the target information to the blockchain network when the storage resources include target information corresponding to the target block number, so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network.

[0128] In one embodiment, the first acquisition module 31 is further configured to acquire a query request from the blockchain network, wherein the query request includes a target block number.

[0129] In one implementation, the storage node further includes a computing module for determining a first hash value based on all hash values ​​in the candidate blocks corresponding to the next block, and obtaining the target block number based on the first hash value and the block number of the next block.

[0130] In one implementation, the first sending module 33 is further configured to, in response to any node sending compensation resources corresponding to the resource consumption compensation information, send an access authorization code corresponding to the resource acquisition link to that node, so that the node can acquire the target information based on the access authorization code and the resource acquisition link.

[0131] In one implementation, the storage node further includes a first verification module.

[0132] The first acquisition module mentioned above is also used to acquire the target hash value corresponding to the target block number;

[0133] The first verification module is used to determine whether there is a hash value in the hash value corresponding to the storage resource that is consistent with the target hash value. If there is a hash value in the hash value corresponding to the storage resource that is consistent with the target hash value, it is determined that the storage resource includes the target information corresponding to the target block number.

[0134] In one implementation, the storage node further includes a second verification module.

[0135] The aforementioned first acquisition module is further configured to acquire the storage resources corresponding to the first information based on the first information.

[0136] The second verification module is used to calculate the third hash value of the storage resource, and if the second hash value and the third hash value are consistent, it determines that the first information verification is successful.

[0137] The storage node provided in this embodiment of the invention includes: a first acquisition module, configured to acquire first information broadcast by at least one participating node in the blockchain network; a first storage module, configured to store storage resources corresponding to the first information if the first information is verified; and a first sending module, configured to send acquisition method information corresponding to the target information to the blockchain network if the storage resources include target information corresponding to the target block number. This allows any node in the blockchain network to acquire the target information based on the acquisition method information, thereby gaining the qualification to compete for the right to record the next block in the blockchain network. This incentivizes storage nodes to actively store storage resources, preventing miner nodes from losing their qualification to compete for the right to record the next block due to a lack of storage resources, improving the computing power utilization rate of miner nodes, and avoiding idle computing power.

[0138] Figure 4 This is a schematic diagram of a miner node provided in an embodiment of the present invention. Figure 4 As shown, the miner node includes: a processing module 41, a second sending module 42, a second acquisition module 43, and a third acquisition module 44.

[0139] The processing module 41 is used to determine the first hash value based on all the hash values ​​in the candidate blocks corresponding to the next block, and to obtain the target block number according to the first hash value and the block number of the next block.

[0140] The second sending module 42 is used to send a query request to the blockchain network when the target information corresponding to the target block number is not stored, wherein the query request includes the target block number.

[0141] The second acquisition module 43 is also used to acquire acquisition method information corresponding to the query request from the blockchain network.

[0142] Among them, the acquisition method information is the information sent by the storage node to the blockchain network to acquire the target information when it determines that the storage resources include the target information corresponding to the target block number.

[0143] Storage resources are the storage resources corresponding to the first information that a storage node stores after it receives the first information broadcast by at least one participating node in the blockchain network and the first information is verified.

[0144] The third acquisition module 44 is used to acquire target information based on the acquisition method information in order to qualify for the right to record the next block in the blockchain network.

[0145] This invention provides a consensus method based on a blockchain network. First, a first hash value is determined based on all hash values ​​in the candidate blocks corresponding to the next block. Then, a target block number is obtained based on the first hash value and the block number of the next block. If the target information corresponding to the target block number is not stored, a query request, including the target block number, is sent to the blockchain network. Next, acquisition method information corresponding to the query request is obtained from the blockchain network. This acquisition method information is provided by the storage node when it determines that the storage resources include the target information corresponding to the target block number. The information sent is used to obtain target information; storage resources are the storage resources corresponding to the first information that the storage node stores after obtaining the first information broadcast by at least one participating node in the blockchain network and after the first information is verified; finally, the target information is obtained based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network. This can incentivize storage nodes to actively store storage resources, prevent miner nodes from losing the qualification to compete for the right to record the next block in the blockchain network due to the lack of storage resources required for recording, improve the computing power utilization of miner nodes, and avoid idle computing power.

[0146] It should be clarified that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the sake of convenience and brevity, detailed descriptions of known methods are omitted here, and the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0147] Those skilled in the art will understand that all or some of the steps, systems, or apparatuses in the methods, systems, and apparatuses described above can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, Compact Disc Read-Only Memory (CD-ROM), Digital Video Disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0148] It should be noted that, in this document, 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. Unless otherwise specified, 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 that element.

[0149] Those skilled in the art will understand that although some embodiments described herein include certain features that are included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this embodiment and form different embodiments.

[0150] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of the present invention, and the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A consensus method based on a blockchain network, characterized in that, Applied to storage nodes, the method includes: Obtain first information broadcast by at least one participating node in the blockchain network; the first information is information used to request storage on the corresponding storage resources; If the first information is verified, the storage resources corresponding to the first information are stored. If the storage resources include target information corresponding to the target block number, the acquisition method information corresponding to the target information is sent to the blockchain network so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network. The target block number refers to the block number of a block that has already been created in the blockchain, and the target information corresponding to the target block number refers to the information recorded in the block corresponding to the target block number. When the storage resource includes target information corresponding to the target block number, before sending the acquisition method information corresponding to the target information to the blockchain network, the method further includes: determining a first hash value based on all hash values ​​in the candidate blocks corresponding to the next block; and obtaining the target block number based on the remainder of the first hash value divided by the block sequence number of the next block. The acquisition method information corresponding to the target information refers to the method information used to enable nodes that need the target information to acquire the target information; the acquisition method information includes resource consumption compensation information and resource acquisition link; the method further includes: In response to any node sending compensation resources corresponding to the resource consumption compensation information, an access authorization code corresponding to the resource acquisition link is sent to that node, so that the node can obtain the target information based on the access authorization code and the resource acquisition link.

2. The consensus method according to claim 1, characterized in that, When the storage resource includes target information corresponding to the target block number, before sending the acquisition method information corresponding to the target information to the blockchain network, the method further includes: Obtain a query request from the blockchain network, the query request including the target block number.

3. The consensus method according to claim 1, characterized in that, The method further includes: Get the target hash value corresponding to the target block number; Determine whether there exists a hash value in the hash values ​​corresponding to the storage resource that matches the target hash value; If there is a hash value in the hash value corresponding to the storage resource that is consistent with the target hash value, it is determined that the storage resource includes the target information corresponding to the target block number.

4. The consensus method according to claim 1, characterized in that, The first information includes a second hash value calculated by the participating nodes for the storage resources corresponding to the first information; Before storing the storage resources corresponding to the first information after the first information has been verified, the method further includes: Based on the first information, obtain the storage resources corresponding to the first information; Calculate the third hash value of the storage resource; If the second hash value and the third hash value are consistent, the first information is determined to have been verified.

5. The consensus method according to claim 4, characterized in that, The steps for obtaining the storage resources corresponding to the first information based on the first information include: Extract the storage resource from the first information; or... Extract the extraction link corresponding to the storage resource from the first information, and obtain the storage resource based on the extraction link.

6. A consensus method based on a blockchain network, characterized in that, Applied to miner nodes, the method includes: Determine the first hash value based on all hash values ​​in the candidate blocks corresponding to the next block; Obtain the target block number based on the first hash value and the block number of the next block; In the absence of storing the target information corresponding to the target block number, a query request is sent to the blockchain network, the query request including the target block number; The information obtained is the acquisition method information corresponding to the query request, which is sent by the storage node to the blockchain network to acquire the target information when it determines that the storage resource includes the target information corresponding to the target block number. The storage resource is the storage resource corresponding to the first information that the storage node stores when it acquires first information broadcast by at least one participating node in the blockchain network and the first information is verified. The first information is information used to request the storage of the corresponding storage resource. The target information is obtained based on the acquisition method information in order to qualify for the right to record the next block in the blockchain network; The target block number refers to the block number of a block that has already been created in the blockchain, and the target information corresponding to the target block number refers to the information recorded in the block corresponding to the target block number. The step of obtaining the target block number based on the first hash value and the block number of the next block includes: obtaining the target block number based on the remainder of the first hash value divided by the block number of the next block; The acquisition method information refers to the method information used to enable nodes that need target information to acquire the target information; the acquisition method information includes resource consumption compensation information and resource acquisition link; the acquisition of the target information based on the acquisition method information includes: sending compensation resources corresponding to the resource consumption compensation information to the storage node that fed back the acquisition method information, so as to obtain the access authorization code corresponding to the resource acquisition link returned by the storage node, and acquiring the target information based on the access authorization code and the resource acquisition link.

7. A storage node, characterized in that, The storage node includes: The first acquisition module is used to acquire first information broadcast by at least one participating node in the blockchain network; the first information is information used to request storage of the corresponding storage resources; The first storage module is used to store the storage resources corresponding to the first information when the first information is verified. The first sending module is used to send acquisition method information corresponding to the target information to the blockchain network when the storage resource includes target information corresponding to the target block number, so that any node in the blockchain network can acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network. The target block number refers to the block number of a block that has already been created in the blockchain, and the target information corresponding to the target block number refers to the information recorded in the block corresponding to the target block number. In the case where the storage resource includes target information corresponding to the target block number, before sending the acquisition method information corresponding to the target information to the blockchain network, the storage node is further configured to: determine a first hash value based on all hash values ​​in the candidate blocks corresponding to the next block; and obtain the target block number based on the remainder of the first hash value divided by the block sequence number of the next block. The acquisition method information corresponding to the target information refers to the method information used to enable nodes that need the target information to acquire the target information; the acquisition method information includes resource consumption compensation information and resource acquisition link; the storage node is also used for: In response to any node sending compensation resources corresponding to the resource consumption compensation information, an access authorization code corresponding to the resource acquisition link is sent to that node, so that the node can obtain the target information based on the access authorization code and the resource acquisition link.

8. A miner node, characterized in that, The miner nodes include: The processing module is used to determine a first hash value based on all hash values ​​in the candidate blocks corresponding to the next block, and to obtain the target block number according to the first hash value and the block number of the next block; The second sending module is used to send a query request to the blockchain network when the target information corresponding to the target block number is not stored, and the query request includes the target block number; The second acquisition module is further configured to acquire acquisition method information corresponding to the query request from the blockchain network; the acquisition method information is information sent by the storage node to the blockchain network to acquire the target information when it determines that the storage resource includes the target information corresponding to the target block number; the storage resource is the storage resource corresponding to the first information stored by the storage node when it acquires first information broadcast by at least one participating node in the blockchain network, and the first information is verified; the first information is information used to request the storage of the corresponding storage resource. The third acquisition module is used to acquire the target information based on the acquisition method information in order to obtain the qualification to compete for the right to record the next block in the blockchain network; The target block number refers to the block number of a block that has already been created in the blockchain, and the target information corresponding to the target block number refers to the information recorded in the block corresponding to the target block number. The step of obtaining the target block number based on the first hash value and the block number of the next block includes: obtaining the target block number based on the remainder of the first hash value divided by the block number of the next block; The acquisition method information refers to the method information used to enable nodes that need target information to acquire the target information; the acquisition method information includes resource consumption compensation information and resource acquisition link; the acquisition of the target information based on the acquisition method information includes: sending compensation resources corresponding to the resource consumption compensation information to the storage node that fed back the acquisition method information, so as to obtain the access authorization code corresponding to the resource acquisition link returned by the storage node, and acquiring the target information based on the access authorization code and the resource acquisition link.

Citation Information

Patent Citations

  • Block-chain account method, device, equipment and storage medium

    CN109102287A

  • Bookkeeping method, mining pool server, terminal apparatus, mining node, and mining pool

    WO2020143431A1