A DAG-based Parallel Blockchain Evidence Storage and Traceability Method

Through the DAG-based blockchain parallel proof-release traceability method, the problem of low data access efficiency in traditional alliance chains is solved, efficient and flexible data access and traceability is achieved, and system performance and scalability are improved.

CN119831746BActive Publication Date: 2025-08-05HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES +1

Patent Information

Application Number
CN202510303293.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-08-05
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

The data access efficiency in traditional alliance chains is low, with large redundancy, and it is impossible to flexibly connect and associate different types of data, resulting in insufficient performance and poor scalability on the chain.

Method used

The DAG-based blockchain parallel evidence-keeping and traceability method is adopted to achieve a consensus on transaction sequence by generating unique transaction identifiers and asynchronous communication, verify transactions in parallel, and regularly package them into blocks to realize parallel processing and flexible association of transactions.

Benefits of technology

It improves transaction throughput, reduces data redundancy, ensures data consistency and flexible correlation, supports high-frequency data access and traceability, and improves system efficiency and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831746B_ABST
    Figure CN119831746B_ABST
Patent Text Reader

Abstract

The present invention discloses a parallel blockchain evidence storage and traceability method based on DAG, including: S1, the user signs the data to be stored as evidence and sends it to the system as a transaction, the system generates a unique transaction identifier, namely the transaction key field, the transaction verification node checks the data integrity and signature validity, and obtains the evidence transaction; S2, the transactions are sequenced according to the timestamp and transaction hash of the evidence transaction, and a consensus on the transaction order is reached through asynchronous communication between nodes; S3, the validity and conflict of the parent node of the transaction are verified in parallel. If the verification is passed, the transaction is written to the corresponding account chain; S4, the transactions within a period of time are regularly packaged into new blocks, and the blocks are chained as a stable reference point for synchronization of the entire network to help nodes quickly recover or join. According to the DAG-based blockchain of the present invention, there is no need for block packaging and sorting steps, and the speed exceeds the speed of ordinary transfer transactions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of evidence storage and traceability, and in particular to a DAG-based blockchain parallel evidence storage and traceability method. Background Art

[0002] In consortium blockchains, data access is a common function, with evidence storage and traceability being particularly critical. Typically, unique identifiers are used to map evidence / traceability fields. These unique values may represent certificates, licenses, or product codes.

[0003] Traditional blockchains rely on the sequential execution of a single chain, resulting in insufficient on-chain performance and a very limited amount of data stored per second. Furthermore, only linear sequential uploading guarantees correctness. The single-chain structure of traditional consortium chains cannot flexibly connect and link different types of data. Separate creation and storage is required for each business type or product within the same business. This approach leads to on-chain data redundancy and a rapid increase in data volume, impacting chain efficiency and scalability.

[0004] Based on the above problems, it is necessary to provide an efficient and effective evidence storage and traceability method. Summary of the Invention

[0005] The purpose of this invention is to solve the deficiencies in the data access function of the alliance chain and propose a DAG-based blockchain parallel evidence storage and traceability method, thereby providing a more efficient and effective evidence storage and traceability solution.

[0006] To this end, the present invention provides a DAG-based blockchain parallel evidence storage and traceability method, which includes the following steps: S1. The user signs the data to be stored as a transaction and sends it to the system. The system generates a unique transaction identifier, namely the transaction Key field. The transaction verification node checks the data integrity and signature validity to obtain the evidence transaction. The evidence transaction also includes the following fields: timestamp TimeStamp, evidence information Value, evidence traceability business address NotionAddr, sender address From, and Hash value; S2. The transactions are sequenced according to the TimeStamp and transaction Hash of the evidence transaction. If transaction A references transaction B, the timing of transaction B must be before A, and a consensus on the transaction order is reached through asynchronous communication between nodes; S3. The validity and conflict status of the parent node of the transaction are verified in parallel. If the verification is passed, the transaction is written to the corresponding account chain; S4. The transactions within a period of time are regularly packaged into new blocks, and the blocks are chained as a stable reference point for synchronization of the entire network to help nodes recover or join quickly.

[0007] Compared with the prior art, the present invention has the following technical effects:

[0008] 1. Based on the DAG-type transaction structure, there is no need for block packaging and sorting steps, and the speed exceeds the speed of ordinary transfer transactions.

[0009] 2. Evidence traceability transactions can be written into the transaction upon receipt without going through the contract. The order is determined by the transaction hash and transaction timestamp, and the transaction is executed immediately after it is sent.

[0010] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:

[0012] Figure 1 It is the transaction sending graph in the parallel evidence storage and traceability method of the present invention;

[0013] Figure 2 This is a schematic diagram of four transactions to be sequenced listed in the parallel evidence storage and traceability method of the present invention;

[0014] Figure 3 This is a schematic diagram of the transaction sequencing structure of four transactions in the parallel evidence storage and traceability method of the present invention;

[0015] Figure 4 This is a schematic diagram of the writing of evidence transactions in the parallel evidence storage and traceability method of the present invention;

[0016] Figure 5 It is a flow chart of the parallel evidence storage and traceability method of the present invention;

[0017] Figure 6 The execution steps of the parallel evidence storage and traceability method of the present invention are shown. DETAILED DESCRIPTION

[0018] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0019] DAG (Directed Acyclic Graph) is a directed acyclic graph. This system, a blockchain based on DAG, is mainly composed of consensus nodes and witness nodes.

[0020] Each account completes transactions as a chain (one account per chain), keeping separate records and forming a chain structure in chronological order. Each account's sending and receiving transactions are independent and do not interfere with each other. Furthermore, within an account chain, sending a transaction block can also point to multiple existing transactions, forming a DAG structure.

[0021] Consensus nodes, the core hub of block flow, are composed of authoritative and trusted nodes. They perform functions such as block verification, block witnessing, block on-chaining, block broadcasting, and block storage. Witness nodes are responsible for monitoring and disseminating the ledger. By pulling on-chain data, performing on-chain data comparison and verification, and storing a copy of the ledger, they ensure the ledger is open, transparent, secure, and reliable.

[0022] Depending on the pre-consensus of the chain, witness nodes can also participate in the consensus and perform block packaging operations. In addition, all key data generated during the chain operation will be recorded, and the chain state changes will be fully recorded and available for external query, ensuring that the chain's historical operation process is traceable.

[0023] The present invention provides a new transaction type, namely, a deposit transaction, which does not need to pay attention to the continuity or the specific order.

[0024] The DAG-based provenance transaction structure allows for parallel processing of transactions or data blocks, allowing different types of data or transactions to be uploaded to the chain simultaneously without affecting each other, significantly increasing transaction throughput. Furthermore, the DAG structure connects multiple nodes in the form of a directed acyclic graph, allowing different types of data to be flexibly linked through the edges of the graph, reducing data redundancy and preventing excessive data expansion.

[0025] In order to meet the demand for more efficient and effective evidence storage and traceability, the present invention provides a DAG-based blockchain parallel evidence storage and traceability method.

[0026] First, the user signs the data to be documented and sends it to the network as a transaction. Next, the system uses the transaction timestamp and hash to sequence transactions. The node then checks whether its timestamp is within the valid range of the current block timestamp. If the timestamp is within the valid range, the node proceeds to process and verify the transaction. Once verified, the DAG-based parallel structure writes the transaction to the corresponding account chain in parallel. Finally, the network periodically packages transactions within a certain period into "checkpoint" blocks, which serve as stable reference points for network-wide synchronization and help nodes quickly recover or join.

[0027] Specifically, with reference to Figure 5 and Figure 6 ,This parallel evidence storage and traceability method includes the following steps S1-S4:

[0028] S1. Transaction sending: The user submits the evidence data, the system generates a unique transaction identifier (i.e., the transaction key field), and the transaction verification node (i.e., the witness node) checks the data integrity and signature validity. After verification, the transaction is broadcast to the network and waits for sequencing and writing.

[0029] S2. Transaction Sequencing: Transactions in the network are sequenced based on transaction timestamps and transaction hashes. If transaction A references transaction B, then transaction B must be sequenced before transaction A. Consensus on the transaction order is reached through asynchronous communication between nodes.

[0030] S3. Parallel transaction writing: Verify the validity and conflict of the parent node of the transaction in parallel. If the verification passes, write the transaction to the corresponding location and update the local ledger.

[0031] S4. Regular Synchronization: After the consensus node triggers the synchronization condition, it collects all evidence and traceable transactions that have occurred in the current network, generates a Merkle tree for the collected transactions, calculates the Merkle root hash, combines the Merkle root hash with other key information about the current network state (timestamp, node signature, etc.), generates a block header, packages the block header and transaction list into a new block, and signs the block to form a new block. The new block is broadcast to the entire network for verification by other nodes. When more than a certain proportion (e.g., 2 / 3) of nodes reach consensus on the block, the block is confirmed as a valid checkpoint and added to the blockchain, becoming a stable point in the network state. After consensus is confirmed, all nodes in the network synchronize their state based on the new block.

[0032] Transaction timeliness check: The system sets a time limit for each transaction (such as half an hour). When a transaction is submitted, the node will check whether its timestamp is within the valid range of the current block timestamp. If the transaction timestamp is within the validity period, the node will continue to process and verify the transaction. If the transaction timestamp exceeds the validity period, the node will directly reject the transaction, ensuring that only transactions that meet the timeliness requirements are written to the blockchain.

[0033] In step S1, a new transaction type is provided - evidence transaction, which does not need to pay attention to continuity or specific order.

[0034] Reference Figure 1 The client sends the evidence transaction to the blockchain node's transaction pool. The fields in the evidence transaction are as follows: Hash, TimeStamp, Key, From, NotionAddr, and Value. The meanings of these fields are shown in Table 1.

[0035] Table 1. Description of transaction fields

[0036]

[0037] The fields in a DAG-based blockchain block are named as follows: ParentHash, Number, Timestamp, and Txlist. The meanings of these fields are shown in Table 2.

[0038] Table 2. Description of each field in the block

[0039]

[0040] The transaction contains a unique value Key, a timestamp TimeStamp, and a Hash value generated by performing a hash operation on Key, Value, and TimeStamp. During the transaction execution process, the DAG structure can ensure the parallel processing of transactions, thereby achieving efficient performance.

[0041] In step S2, the DAG ensures that each transaction can only be executed after its pre-dependent transactions are completed by maintaining the dependency relationships, timestamps, and Hash values between transactions. Therefore, the order of uploading to the chain can always accurately reflect the causal relationship and execution logic of the data.

[0042] Specifically, by recording the pointing links between each transaction and its dependency relationships, the DAG ensures that even if the running order of transactions is inconsistent, the data finally uploaded to the chain is still dependent and merged in the correct order, thereby ensuring the consistency and orderliness of the data, that is, finding the order of uploading to the chain according to the TimeStamp of each transaction, the earlier the time, the more forward the order, and when the TimeStamp is the same, sorting according to the Hash value, the smaller the Hash value, the more forward the order.

[0043] Take Figure 2 as an example. There are the following four transactions: A, B, C, D, where x, y, z, and w are the Hash values of A, B, C, and D respectively, and x < z. Regardless of the transaction running order, the obtained order of uploading to the chain is certain. First, sorting according to the TimeStamp from small to large gives A = C > D > B. Secondly, based on this, sorting according to the Hash value from small to large gives A > C > D > B. In summary, the order of uploading the transactions can be obtained, that is, A -> C -> D -> B, as Figure 3 shown.

[0044] In step S3, when multiple accounts initiate deposit transactions simultaneously and do not operate on the same unique value Key, all deposit transactions are written into the corresponding account chain in parallel. However, when multiple accounts operate on the same unique value Key, they are written into the chain after transaction sequencing.

[0045] Figure 4 In [reference], the deposit transaction B points to the deposit transaction A, indicating that the writing of transaction B depends on transaction A (transaction A has been completed before transaction B). Similarly, the writing of transaction C depends on both transaction D and transaction E (transaction D and transaction E have been completed before transaction C), and transaction B and transaction C can be written in parallel.

[0046] In step S4, the consensus node generates a new block at a predetermined time interval. This block contains all the evidence and traceability transactions that have occurred in the current network. These blocks can be regarded as checkpoints of the blockchain, that is, a known and consensus-confirmed stable point of the current state of the network.

[0047] By packaging these transactions into blocks, the state synchronization process of nodes across the entire network can be effectively simplified. Nodes do not have to synchronize all historical transactions every time. They only need to start from the most recent block, trace back and synchronize the status.

[0048] Moreover, when a node loses data or fails, the block can help the node quickly recover to a consistent state without having to synchronize all transactions from scratch. In addition, when a new node joins, it can also start synchronizing from the most recent block, avoiding long-term historical transaction verification and improving the speed of node joining and synchronization.

[0049] This process effectively maintains the integrity and consistency of data in the system. Although provenance-based transactions are packaged into blocks, this process does not involve immediate business logic execution and is primarily used for data storage and synchronization. This reduces the processing pressure on each node for real-time transactions and ensures that provenance-based transactions can serve as a complete reference for subsequent verification or tracing.

[0050] Set a time limit, assuming it is set to half an hour. Transactions within half an hour are valid. When the timestamp of the transaction exceeds the set valid time limit compared with the timestamp of the current block, the transaction will be regarded as an invalid transaction and the node will refuse to process the transaction.

[0051] The present invention also provides a DAG-based blockchain parallel evidence storage and traceability device, including a transaction sending module, a transaction sequencing module, a transaction parallel writing module, a periodic synchronization module, and a transaction timeliness checking module.

[0052] The transaction sending module is used by users to sign the data that needs to be stored as evidence and send it to the system as a transaction. The system generates a unique transaction identifier, namely the transaction Key field. The transaction verification node checks the data integrity and signature validity to obtain the evidence transaction. The evidence transaction also includes the following fields: Timestamp and evidence information Value.

[0053] The transaction sequencing module is used to sequence transactions based on the timestamp and transaction hash of the evidence transaction. If transaction A references transaction B, the timing of transaction B must be before A. Consensus on the transaction order is reached through asynchronous communication between nodes.

[0054] The transaction parallel writing module is used to verify the validity and conflict of the parent node of the transaction in parallel. If the verification is passed, the transaction will be written into the corresponding account chain.

[0055] The periodic synchronization module is used to regularly package transactions within a period of time into new blocks and put the blocks on the chain as a stable reference point for synchronization of the entire network to help nodes quickly recover or join.

[0056] The transaction timeliness check module is used to set a time limit and stipulate that transactions within this time limit are valid. It checks whether the timestamp of the transaction is within the valid range of the current block timestamp. If the transaction timestamp exceeds the validity period, the node will directly reject the transaction.

[0057] The present invention has the following technical features / advantages:

[0058] Parallel processing and efficient throughput. The DAG structure eliminates the bottleneck of sequential execution by processing transactions and data blocks in parallel. Multiple transactions can be uploaded to the chain simultaneously, significantly increasing transaction processing speed and system throughput, and supporting more frequent data access and traceability needs. This parallel processing makes the traceability process more efficient and enables rapid response to traceability requests for different businesses or products.

[0059] Flexible data association and cross-business traceability. The DAG structure, through the form of a directed acyclic graph, can flexibly connect and associate different types of data. For example, transactions, certificate information, logistics information, and other information from different business areas can be effectively associated in the same graph, enabling cross-business traceability and data sharing.

[0060] A new transaction type, Evidence Transaction, eliminates the need for continuity or specific order. By using explicit dependencies and timestamps, this ensures that even if transactions are processed in a different order, the order in which they are ultimately uploaded to the blockchain still reflects the true causal relationship between the data. This avoids data inconsistencies or traceability errors caused by parallel processing, ensures the accuracy of transactions uploaded to the blockchain, and effectively reduces the probability of transaction failure.

[0061] The foregoing description is merely an embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A DAG-based blockchain parallel evidence storage and traceability method, characterized by: The following steps are involved: S1. The user signs the data to be recorded as a transaction and sends it to the system. The system generates a unique transaction identifier, namely the transaction Key field. The transaction verification node checks the data integrity and signature validity to obtain a recorded transaction. The recorded transaction also includes the following fields: Timestamp, recorded information Value, recorded traceability business address NotionAddr, sender address From, and Hash value. S2. Sequence transactions based on the timestamp and transaction hash of the stored transactions. If transaction A references transaction B, then transaction B must be before transaction A. A consensus on the transaction order is reached through asynchronous communication between nodes. S3. Verify the validity and conflict of the parent node of the transaction in parallel. If the verification is successful, write the transaction to the corresponding account chain and then update the local ledger. S4. Regularly package transactions within a period of time into new blocks and put the blocks on the chain as a stable reference point for network-wide synchronization to help nodes quickly recover or join. After consensus is confirmed, all network nodes synchronize their status based on the new blocks. The DAG-based blockchain consists of consensus nodes and witness nodes. Each account completes transactions in an account chain, records them separately, and forms a chain structure in sequence. In an account chain, while sending transaction blocks, it supports pointing to multiple existing transactions, forming a DAG structure. Transactions are sequenced based on the timestamp and transaction hash of the evidence transaction, including: finding the order of on-chain transactions based on the timestamp of each transaction, with the earlier the time, the higher the order; when the timestamp is the same, they are sorted based on the hash value, with the smaller the hash value, the higher the order.

2. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: The hash value of the evidence transaction is generated by hashing the transaction key, value and timestamp.

3. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: After transaction sequencing, the node checks whether the timestamp of the transaction is within the valid range of the current block timestamp. If the transaction timestamp exceeds the validity period, the node directly rejects the transaction.

4. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: Consensus nodes regularly package transactions within a period of time into new blocks, including: after the consensus node triggers the synchronization condition, it collects all evidence and traceability transactions that have occurred in the current network, generates a Merkle tree for the collected transactions, calculates the Merkle root hash, combines the Merkle root hash with other key information of the current network status, generates a block header, packages the block header and transaction list into a new block, and signs the block to form a new block.

5. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: Block chaining includes: broadcasting the new block to the entire network for other nodes to verify. When more than a certain proportion of nodes reach a consensus on the block, the block is confirmed as a valid checkpoint, and the new block is added to the blockchain, becoming a stable point in the network status.

6. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: The block includes the following fields: parent block hash value ParentHash, block number Number, timestamp TimeStamp, and transaction list Tx list.

7. A DAG-based blockchain parallel evidence storage and traceability device, characterized by: include: The transaction sending module is used by users to sign the data to be recorded as a transaction and send it to the system. The system generates a unique transaction identifier, namely the transaction Key field. The transaction verification node checks the data integrity and signature validity to obtain the recorded transaction. The recorded transaction also includes the following fields: Timestamp, recorded information Value, recorded traceability business address NotionAddr, sender address From, and Hash value; The transaction sequencing module is used to sequence transactions based on the timestamp and transaction hash of the evidence transaction. If transaction A references transaction B, then transaction B must be sequenced before transaction A. Consensus on the transaction order is reached through asynchronous communication between nodes. The transaction parallel writing module is used to verify the validity and conflict of the parent node of the transaction in parallel. If the verification is passed, the transaction is written to the corresponding account chain and then the local ledger is updated; The regular synchronization module is used to regularly package transactions within a period of time into new blocks and upload the blocks to the chain as a stable reference point for network-wide synchronization to help nodes quickly recover or join. After consensus is confirmed, all nodes in the network synchronize their status based on the new blocks. The transaction timeliness check module is used to set a time limit and stipulate that transactions within the time limit are valid. It checks whether the timestamp of the transaction is within the valid range of the current block timestamp. If the transaction timestamp exceeds the validity period, the node will directly reject the transaction. The DAG-based blockchain consists of consensus nodes and witness nodes. Each account completes transactions in an account chain, records them separately, and forms a chain structure in sequence. In an account chain, while sending transaction blocks, it supports pointing to multiple existing transactions, forming a DAG structure. Transactions are sequenced based on the timestamp and transaction hash of the evidence transaction, including: finding the order of on-chain transactions based on the timestamp of each transaction, with the earlier the time, the higher the order; when the timestamp is the same, they are sorted based on the hash value, with the smaller the hash value, the higher the order.

Citation Information

Patent Citations

  • Transaction data processing method and device and computer equipment

    CN112508573A

  • Method for improving blockchain throughput based on transaction DAG

    CN113674095A

Cited By

  • Blockchain-based electronic evidence archiving and tracing system and method

    CN122633776A