Hash chain evidence storage method and system based on parallel chain consensus
By processing the proof storage task in parallel on multiple consensus nodes, generating hash blocks and calculating block hashings, the shortcomings in performance, scalability and applicability of the existing hash chain ledger system are solved, and efficient, scalable and secure hash chain proof storage are achieved.
Patent Information
- Application Number
- CN202510137266.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-06-24
AI Technical Summary
The existing hash chain ledger system based on distributed consensus has shortcomings in performance, scalability and applicability, especially in scenarios of high concurrency and massive data storage.
The hash chain proof-keeping method based on parachain consensus is adopted. By processing independent proof-keeping tasks in parallel on multiple consensus nodes, a hash block is generated and block hash is calculated to realize the distributed parachain ledger structure.
It significantly improves the system's processing performance and expansion capabilities, reduces communication overhead, enhances the applicability of evidence-keeping applications, and realizes strong anti-tamper protection of data.
Smart Images

Figure CN120197187A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data security, and in particular, to a hash chain evidence storage method and system based on parallel chain consensus. Background Art
[0002] With the rapid development of blockchain technology, the hash chain evidence storage technology has shown great application potential in the fields of data protection, electronic evidence preservation, etc. due to its unique "uniqueness and non-reversibility" characteristics. Hash chain evidence storage calculates the hash value of the data content and stores it on the hash chain to ensure the integrity and immutability of the data, providing strong support for data authenticity verification. The consensus mechanism is the core mechanism to achieve global consistency of data status, and has a great impact on the security, service ability and processing performance of the hash chain evidence storage system. Designing the integration of hash chain evidence storage technology and parallel chain consensus mechanism has important research significance.
[0003] In the existing research on hash chain ledgers based on distributed consensus, there are still many problems:
[0004] (1) Low performance: For consensus protocols such as PBFT and RAFT, the election process of the primary node has a high complexity, and both the preparation stage and the confirmation stage in the consensus process require all nodes in the network to communicate with each other, resulting in huge communication overhead. When the number of nodes is large, it is easy to cause network congestion and then affect the system performance.
[0005] (2) Non-scalable: Expanding the evidence storage capacity for the application scale is one of the key issues in the design of the evidence storage system. However, for consensus protocols such as PBFT and RAFT, which maintain the same ledger, it is impossible to expand the evidence storage capacity by increasing the number of nodes.
[0006] (3) Low scenario applicability: Consensus protocols such as PBFT and RAFT have restrictions on the number of nodes. Generally, at least four nodes are required to work properly, which is difficult to meet the economic requirements in actual applications. Summary of the Invention
[0007] The embodiments of this application provide a hash chain evidence storage method and system based on parallel chain consensus to solve the above challenges and promote the deep integration and application of hash chain evidence storage technology and parallel chain technology.
[0008] The embodiments of this application provide a hash chain evidence storage method based on parallel chain consensus, including:
[0009] Obtain an evidence storage task;
[0010] Parallelly process independent evidence storage tasks at each consensus node, package evidence storage transactions, generate hash blocks, and calculate block hashes, where the parallel chain includes multiple consensus nodes;
[0011] After each consensus node in the parallel chain receives a transaction request, it packs the transaction, encapsulates it into a block, calculates the block hash, and sends a synchronization request message to all other devices, so that after each consensus node receives the message, it performs verification and feeds back to the source consensus node after the verification passes;
[0012] After the source consensus node receives the message feedback from other nodes, it performs signature verification, and after receiving more than the set number of feedback signature messages, it submits and confirms the current hash block.
[0013] Optionally, the generated hash block has a specified hash chain evidence storage block data structure, where the hash chain evidence storage block data structure includes a transaction identifier, a data anti-tampering label, a consensus node identifier, a consensus node signature, a block identifier, a previous block hash, and a current block hash.
[0014] Optionally, each consensus node in the parallel chain has the same role and permissions. Each consensus node processes transactions in parallel, generates a hash chain ledger, and synchronizes the block hash to other nodes for signature confirmation to form a distributed parallel chain ledger structure.
[0015] Optionally, after each consensus node in the parallel chain receives a transaction request, the synchronization request message sent to all other devices is a synchronization request message in a fixed format, and the fixed format includes a device identifier, the current block height, the digest of the Block, and the signature of the message.
[0016] Optionally, after each consensus node receives the message and the verification passes, it further includes: packing the received message together with the evidence storage transaction of this node to generate a block, and sending a signature feedback to the source consensus node.
[0017] Optionally, after submitting and confirming the current hash block, it further includes:
[0018] Associating all hash blocks based on the hash of each block, and each hash block stores the previous block hash, and forming an extended data chain based on the time sequence.
[0019] An embodiment of the present application also proposes a hash chain evidence storage system based on parallel chain consensus, including a processor and a memory. A computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the hash chain evidence storage method based on parallel chain consensus as described above are implemented.
[0020] Through the hash chain evidence storage method based on parallel chain consensus in the embodiment of the present application, the deep integration and application of hash chain evidence storage technology and parallel chain technology are promoted.
[0021] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented in accordance with the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the following specifically illustrates the specific implementation manners of the present application. Brief Description of the Drawings
[0022] By reading the following detailed description of the preferred embodiments, 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. In the drawings:
[0023] Figure 1 It is a schematic diagram of the basic process of the hash chain evidence storage method based on parallel chain consensus in the embodiment of the present application;
[0024] Figure 2 It is a schematic diagram of the principle of the hash chain evidence storage method based on parallel chain consensus in the embodiment of the present application;
[0025] Figure 3 It is a schematic diagram of the hash chain ledger structure of the hash chain evidence storage method based on parallel chain consensus in the embodiment of the present application;
[0026] Figure 4 It is a schematic diagram of the parallel chain consensus evidence fixation of the hash chain evidence storage method based on parallel chain consensus in the embodiment of the present application. Detailed Description of the Preferred Embodiments
[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0028] The main technical problems to be solved in the embodiments of the present application include:
[0029] (1) Optimize the processing performance of the consensus protocol under high-concurrency evidence storage services;
[0030] (2) Improve the horizontal scalability of consensus nodes under massive data evidence storage;
[0031] (3) Enhance the applicability of the consensus protocol in the evidence storage scenario.
[0032] Specifically, the embodiments of the present application provide a hash chain evidence storage method based on parallel chain consensus, as Figure 1 、 Figure 2 shown, including the following steps:
[0033] In step S101, a certification task is obtained. In a specific example, the certification task includes, but is not limited to, the operation behavior log certification for the tamper-proof protection of the entire data life cycle initiated by various certification application systems. In step S102, independent certification tasks are processed in parallel at each consensus node, and certification transactions (certification tasks) are packaged to generate a hash block (Block), and the block hash (BlockHash) is calculated, where the parallel chain includes multiple consensus nodes.
[0034] In step S103, after each consensus node in the parallel chain receives a transaction request, the transaction is packaged, encapsulated into a block, the block hash is calculated, and a synchronization request message is sent to all other devices, so that each consensus node verifies and solidifies the evidence after receiving the message, and feeds back to the source consensus node after the solidification is completed.
[0035] In step S104, after the source consensus node receives the message feedback from other consensus nodes, signature verification is performed, and after receiving the feedback signature messages exceeding the set number, the current hash block is submitted for confirmation.
[0036] The hash chain certification method through parallel chain consensus in the embodiments of the present application promotes the deep integration and application of hash chain certification technology and parallel chain technology.
[0037] In some embodiments, as Figure 3 shown, the generated hash block has a specified hash chain certification block data structure. The specific data block is the basic component unit of the hash chain ledger, where the hash chain certification block data structure includes a transaction identifier (TXID), a data tamper-proof label (Hash), a consensus node identifier (PeerID), a consensus node signature (Signature), a block identifier (BlockID), a previous block hash (PreBlockHash), and a current block hash (BlockHash).
[0038] In some embodiments, each consensus node in the parallel chain has the same role and permissions. Each consensus node processes transactions in parallel, generates a hash chain ledger, and synchronizes the block hash to other consensus nodes for signature solidification, forming a distributed parallel chain ledger structure.
[0039] The embodiments of the present application also propose a multi-party consensus solidification method. Combining with step S103 of the present application, as Figure 4 shown, the core of the parallel chain consensus solidification mechanism of the present application is that all consensus nodes in the consensus cluster have the same role and permissions. Each node processes transactions in parallel, generates a hash chain ledger, and synchronizes the block hash to other nodes for signature solidification, forming a distributed parallel chain ledger structure.
[0040] In some embodiments, after each consensus node of the parallel chain receives a transaction request, the synchronization request message sent to all other devices is a synchronization request message in a fixed format, and the fixed format includes a device identifier, the current block height, the digest of the Block, and the signature of the message. Specifically, after each consensus node receives a transaction request, it performs batch packaging of the transactions, encapsulates them into a block (Block), and calculates the block hash (BlockHash). It sends a synchronization request message to all other devices, and the format is <<PeerID, BlockID, BlockHash, Signature>, where PeerID is the device identifier, BlockID is the current block height, BlockHash is the digest of the Block, and Signature is the signature of the message.
[0041] In some embodiments, after each consensus node receives a message and the verification passes, it further includes: packaging the received message together with the transaction evidence stored at this node to generate a block, and sending a signature feedback to the source consensus node, and the format is <<PeerID, TxID, Signature>, where Signature is the signature of the message by the current consensus node.
[0042] In some embodiments, after submitting and confirming the current hash block, it further includes: associating all hash blocks based on the block hashes of each block, and each hash block stores the previous block hash, and based on the time sequence, an extended data chain is formed, that is, a continuously extended data chain is formed, namely a hash chain evidence ledger. If any one of the data blocks wants to be modified, it is necessary to modify the entire data block chain from beginning to end, and at the same time modify the data of all distributed evidence nodes containing this data block, which is difficult, thereby realizing the anti-tampering protection of the stored data.
[0043] In the consensus process of the method of the embodiment of the present application, there is no need to conduct a primary node election, and only one communication needs to be performed at the fixed evidence node, and the communication overhead is relatively low; at the same time, it allows multiple hash chains to process transactions in parallel, and the parallel processing ability is relatively strong, which can significantly improve the throughput of the system and effectively alleviate the problem of transaction congestion.
[0044] The method of the embodiment of the present application shares ledger verification information between parallel chains, and combines a multi-party signature mechanism to realize "one-point evidence storage and multi-party fixed evidence" of data, effectively ensuring the consistency of the global state of data. Unless most nodes in the whole network are controlled or all ledgers are tampered with, the data will not be modifiable, thereby realizing strong anti-tampering protection of the data.
[0045] The method of the embodiment of the present application maximally exerts the anti-tampering ability of the hash chain, optimizes the problem of the node number limit of the traditional consensus protocol, and is more economical and practical for the users of the evidence storage application.
[0046] An embodiment of the present application also provides a hash chain evidence storage system based on parallel chain consensus, including a processor and a memory. A computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the hash chain evidence storage method based on parallel chain consensus as described above are implemented.
[0047] It should be noted that in each embodiment of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0048] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0049] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0050] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims. All of these are within the protection scope of the present application.
Claims
1. A hash chain evidence storage method based on parallel chain consensus, characterized in that: include: Get the evidence task; Each consensus node processes independent evidence storage tasks in parallel, packages evidence storage transactions, generates hash blocks, and calculates block hashes, wherein the parallel chain includes multiple consensus nodes; After receiving the transaction request, each consensus node of the parallel chain packages the transaction and encapsulates it into a block, calculates the block hash, and sends a synchronization verification request message to all other consensus nodes, so that each consensus node verifies the verification after receiving the message, and feedbacks to the source consensus node after the verification is completed; After the source consensus node receives message feedback from other consensus nodes, it performs signature verification, and after receiving more than the set number of feedback signature messages, it submits and confirms the current hash block.
2. The hash chain evidence storage method based on parallel chain consensus as claimed in claim 1 is characterized in that: The generated hash block has a specified hash chain evidence block data structure, where the hash chain evidence block data structure includes a transaction identifier, a data tamper-proof label, a consensus node identifier, a consensus node signature, a block identifier, a previous block hash, and a current block hash.
3. The hash chain evidence storage method based on parallel chain consensus as claimed in claim 1 is characterized in that: Each consensus node in the parallel chain has consistent roles and permissions. Each consensus node processes evidence storage tasks in parallel, generates a hash chain ledger, and synchronizes the block hash to other nodes for signature and certification, forming a distributed parallel chain ledger structure.
4. The hash chain evidence storage method based on parallel chain consensus as claimed in claim 3 is characterized in that: After each consensus node of the parallel chain receives the transaction request, the synchronization request message sent to all other devices is a synchronization request message in a fixed format, and the fixed format includes the device identification, the current block height, the summary of the Block, and the signature of the message.
5. The hash chain evidence storage method based on parallel chain consensus as claimed in claim 3 is characterized in that: After each consensus node receives the message, if the verification is passed, it also includes: packaging the received message together with the node's evidence transaction to generate a block, and sending a signature feedback to the source consensus node.
6. The hash chain evidence storage method based on parallel chain consensus as claimed in claim 5 is characterized in that: After the current hash block is submitted and confirmed, it also includes: All hash blocks are associated based on the hash of each block, and each hash block saves the hash of the previous block, forming an extended data chain based on the time series.
7. A hash chain evidence storage system based on parallel chain consensus, characterized in that: It includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the hash chain evidence storage method based on parallel chain consensus as described in any one of claims 1 to 6 are implemented.