Block chain parallel evidence storage traceability method based on DAG

Through the DAG-based blockchain parallel proof-keeping and traceability method, the problems of traditional blockchain insufficient performance and data redundancy are solved, and efficient transaction processing and cross-business data correlation are achieved.

CN119831746AActive Publication Date: 2025-04-15HEFEI INSTITUTE OF PHYSICAL SCIENCE CHINESE ACADEMY OF SCIENCES +1

Patent Information

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

AI Technical Summary

Technical Problem

Traditional blockchains lack performance in data access and cannot flexibly connect and associate different types of data, resulting in reduced data redundancy and efficiency.

Method used

The DAG-based blockchain parallel evidence-keeping and traceability method is adopted, and parallel verification and writing of transactions are realized through parallel processing and asynchronous communication of the DAG structure, and transactions are regularly packaged into block chains.

Benefits of technology

It improves transaction throughput and system efficiency, reduces data redundancy, and realizes flexible data correlation across services and efficient evidence tracing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831746A_ABST
    Figure CN119831746A_ABST
Patent Text Reader

Abstract

The invention discloses a DAG-based block chain parallel evidence storage traceability method, which comprises the following steps: S1, a user signs data needing to be stored and sends the signed data as a transaction to a system, the system generates a unique transaction identifier, namely a transaction Key field, and a transaction verification node checks data integrity and signature validity to obtain an evidence storage transaction; s2, sequencing the transaction according to the TimeStamp of the evidence storage transaction and the transaction Hash, and achieving the consensus of the transaction sequence through asynchronous communication between nodes; s3, verifying the validity and conflict condition of the father node of the transaction in parallel, and writing the transaction into the corresponding account chain if the verification is passed; and S4, regularly packaging transactions within a period of time into new blocks, and chaining the blocks as stable reference points of whole network synchronization to help the nodes to quickly recover or join. According to the DAG-based block chain provided by the invention, a block packaging and sorting step is not needed, and the speed exceeds the ordinary transfer transaction speed.
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 the consortium chain, data access is a common function, among which evidence storage and traceability are particularly critical. Usually, the evidence storage / traceability fields are mapped through unique identifiers. These unique values ​​may represent certificates, licenses, or product codes.

[0003] Traditional blockchain relies on the sequential execution of a single chain, resulting in insufficient on-chain performance, a very limited amount of data stored per second, and only linear sequential on-chain can guarantee the correctness of on-chain. The single chain structure of the traditional alliance chain cannot flexibly connect and associate different types of data, and needs to be created and stored separately according to business type or commodities under the same business. This practice leads to redundancy of on-chain data and a rapid increase in data volume, thus affecting the efficiency and scalability of the chain.

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

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

[0006] To this end, the present invention provides a DAG-based blockchain parallel evidence tracing method, comprising the following steps: S1, the user signs the data to be evidenced 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 the validity of the signature, and obtains the evidence transaction, which also includes the fields: timestamp TimeStamp, evidence information Value, evidence tracing 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, wherein, 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 of the parent node of the transaction are verified in parallel, and if the verification is passed, the transaction is written into 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: 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.

[0008] 2. Evidence tracing transactions do not need to go through the contract. They can be written when the transaction is received. The order is determined according to the transaction hash and transaction timestamp, and they can be run immediately after being sent.

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

[0010] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 It is a transaction sending diagram in the parallel evidence storage and traceability method of the present invention; Figure 2 It is a schematic diagram of four transactions to be sequenced listed in the parallel evidence storage and traceability method of the present invention; Figure 3 It is a schematic diagram of the transaction sequencing structure of four transactions in the parallel evidence storage and traceability method of the present invention; Figure 4 It is a schematic diagram of writing a storage transaction in the parallel storage and traceability method of the present invention; Figure 5 It is a flow chart of the parallel evidence storage and traceability method of the present invention; Figure 6 The execution steps of the parallel evidence tracing method of the present invention are shown. DETAILED DESCRIPTION

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

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

[0013] Each account completes transactions in an account chain (one account, one chain) and records them separately, forming a chain structure in order. Each account's sending and receiving transactions are independent of each other and do not interfere with each other. In addition, in an account chain, when sending a transaction block, it supports pointing to multiple existing transactions, forming a DAG structure.

[0014] Consensus nodes are the core hub of block circulation, which are composed of authoritative and trusted nodes, and complete functions such as block verification, block witnessing, block chaining, block broadcasting, and block storage. Witness nodes are responsible for supervising and disseminating ledgers. By pulling on-chain data, comparing and verifying on-chain data, and storing copies of ledgers, the ledgers are guaranteed to be open, transparent, secure, and reliable.

[0015] According to the different pre-consensus of the chain, the witness node can also participate in the consensus and perform block packaging operations. In addition, it will record all key data generated during the operation of the chain, fully record the state change process of the chain, and provide external inquiries to ensure that the historical operation process of the chain can be checked and traced.

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

[0017] The evidence-based traceability transaction based on the DAG structure allows transactions or data blocks to be processed in parallel, so that different types of data or transactions can be uploaded to the chain at the same time without affecting each other, thereby greatly improving transaction throughput. At the same time, the DAG structure connects multiple nodes in the form of a directed acyclic graph, and different types of data can be flexibly associated through the edges of the graph, reducing data redundancy and avoiding excessive expansion of data volume.

[0018] In order to meet the demand for more efficient and effective evidence tracing, the present invention provides a blockchain parallel evidence tracing method based on DAG.

[0019] First, the user signs the data to be stored as a transaction and sends it to the network; then, the system relies on the transaction time stamp and transaction hash to sequence the transaction; then, 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. After verification, the parallel structure based on DAG will be written in parallel to the corresponding account chain. Finally, the network regularly packages transactions within a period of time into "checkpoint" blocks as a stable reference point for synchronization of the entire network to help nodes quickly recover or join.

[0020] Specifically, with reference to Figure 5 and Figure 6 , the parallel evidence storage and traceability method includes the following steps S1-S4: 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 the verification is passed, the transaction is broadcast to the network and waits for sequencing and writing.

[0021] S2. Transaction sequencing: Transactions in the network are sequenced according to transaction timestamp and transaction hash. If transaction A references transaction B, then the timing of transaction B must be before A. Consensus on the transaction order is reached through asynchronous communication between nodes.

[0022] S3. Parallel writing of transactions: 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 location and update the local ledger.

[0023] S4. Regular synchronization: After the consensus node triggers the synchronization condition, it collects all the 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 (timestamp, node signature, etc.), generates a block header, packages the block header and the transaction list into a new block, and signs the block to form a new block, broadcasts the new block to the entire network for other nodes to verify, and when more than a certain proportion (such as 2 / 3) of the nodes agree on the block, the block is confirmed as a valid checkpoint, and the new block is added to the blockchain, becoming a stable point of the network status. After the consensus is confirmed, all nodes in the network synchronize their status based on the new block.

[0024] Transaction timeliness check: The system sets a time limit (such as half an hour) for each transaction. 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 to ensure that only transactions that meet the timeliness requirements are written into the blockchain.

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

[0026] Reference Figure 1 , the client sends the evidence transaction to the transaction pool of the blockchain node. The field names in the evidence transaction are as follows: Hash, TimeStamp, Key, From, NotionAddr, Value. The meaning of each field is shown in Table 1.

[0027] Table 1. Description of transaction fields

[0028] The field names in the block of the DAG-based blockchain are as follows: ParentHash, Number, TimeStamp, Txlist. The meaning of each field is shown in Table 2.

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

[0030]

[0031] 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.

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

[0033] Specifically, by recording the pointing links between each transaction and its dependency relationships, DAG ensures that even if the running order of transactions is inconsistent, the data finally going on-chain is still dependent and merged in the correct order, thereby ensuring the consistency and sequentiality of the data, that is, finding the order of going on-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.

[0034] 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 order of going on-chain obtained 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 transactions going on-chain can be obtained, that is, A -> C -> D -> B, as Figure 3 shown.

[0035] 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 chains in parallel. However, when multiple accounts operate on the same unique value Key, they are written into the chain after transaction sequencing.

[0036] 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.

[0037] 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.

[0038] By packaging these transactions into blocks, the state synchronization process of nodes in 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.

[0039] 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 historical transaction verification and improving node joining and synchronization speed.

[0040] Through this process, the integrity and consistency of the data in the system are effectively maintained. Although the evidence-based traceability transactions are packaged into blocks, this process does not involve immediate business logic execution and is mainly used for data storage and synchronization. Therefore, it can reduce the processing pressure of each node for real-time transactions and ensure that the evidence-based traceability transactions can be used as a complete reference in subsequent verification or traceability.

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

[0042] The present invention also provides a DAG-based blockchain parallel evidence storage and tracing 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.

[0043] The transaction sending module is used for 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 fields: timestamp TimeStamp and evidence information Value.

[0044] The transaction sequencing module is used to sequence transactions 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 consensus on the transaction order is reached through asynchronous communication between nodes.

[0045] 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.

[0046] 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.

[0047] 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 directly rejects the transaction.

[0048] The present invention has the following technical features / advantages: 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 at the same time, greatly improving the transaction processing speed and system throughput, and supporting higher-frequency data access and traceability requirements. This parallel processing makes the traceability process more efficient and can quickly respond to traceability requests for different businesses or products.

[0049] Flexible data association and cross-business traceability. The DAG structure can flexibly connect and associate different types of data in the form of a directed acyclic graph. For example, transactions, certificate information, logistics information, etc. in different business fields can be effectively associated in the same graph, thereby achieving cross-business traceability and data sharing.

[0050] New transaction type - Evidence transaction. This transaction type does not need to pay attention to the continuity of the transaction, nor does it care about the specific order. Through clear dependencies and timestamp records, it ensures that even if the transaction processing order is different, the final order of the chain can still reflect the true causal relationship of the data, avoiding data inconsistency or traceability errors caused by parallel processing, ensuring the correctness of the transaction chain, and effectively reducing the probability of transaction failure.

[0051] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A DAG-based blockchain parallel evidence tracing method, characterized in that: The following steps are involved: 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 a storage transaction. The storage transaction also includes the following fields: timestamp, storage information Value, storage traceability business address NotionAddr, sender address From, and Hash value. S2. Sequence transactions 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 that of 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 into the corresponding account chain. 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 synchronization of the entire network to help nodes recover or join quickly.

2. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: The hash value Hash of the evidence storage 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: The system sequences transactions based on the Timestamp and transaction Hash of the evidence-based transactions, including: finding the order of on-chain transactions based on the Timestamp of each transaction, the earlier the time, the higher the order; when the Timestamp is the same, sorting is based on the Hash value, the smaller the Hash value, the higher the order.

4. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: After the transaction is sequenced, 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.

5. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: After writing the transaction to the corresponding account chain, it also includes updating the local ledger.

6. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: The consensus node regularly packages transactions within a period of time into a new block, including: after the consensus node triggers the synchronization condition, it collects all the 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 the transaction list into a new block, and signs the block to form a new block.

7. 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 of the network status.

8. The DAG-based blockchain parallel evidence storage and traceability method according to claim 1 is characterized in that: Also includes: After the consensus is confirmed, all nodes in the network synchronize their status based on the new block.

9. The DAG-based blockchain parallel evidence tracing 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.

10. A DAG-based blockchain parallel evidence storage and traceability device, characterized in that: include: The transaction sending module is used for users to sign the data to be stored 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 a stored transaction. The stored transaction also includes the following fields: timestamp TimeStamp, stored information Value, stored traceability business address NotionAddr, sender address From, and Hash value; The transaction sequencing module is used to sequence transactions 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 that of A. The 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 will be written into the corresponding account chain; The regular 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; 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 directly rejects the transaction.

Citation Information

Patent Citations

  • Transaction data processing method and device and computer equipment

    CN112508573A

  • Method for improving blockchain throughput based on transaction DAG

    CN113674095A

  • High-throughput distributed account book system based on DAG

    CN116846674A

  • Parallel transaction validation and block generation in a blockchain

    US20200052884A1

  • Method and apparatus for executing blockchain transaction

    WO2023098041A1

Cited By

  • Block chain-based jewelry personalized customization standardized tracing method

    CN120387838A

  • DAG-based hard wallet transaction rapid synchronization method, medium and system

    CN120410528A