Block chain-based distributed network data integrity verification method and device

By segmenting the data into multiple data blocks and using a blockchain network for hash storage and verification, combined with a step-by-step strategy of preliminary verification and final verification, the problems of low efficiency and insufficient accuracy of large-scale data verification in the existing technology are solved, and efficient and accurate data integrity verification is achieved.

CN119903559AActive Publication Date: 2025-04-29ANHUI BUSINESS VOCATIONAL COLLEGE

Patent Information

Application Number
CN202411987979.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing blockchain-based data integrity verification methods have shortcomings in efficiency, accuracy and response to large-scale data, especially in the verification process of massive data, computing resources consume too much, and it is difficult to ensure accuracy in complex data environments.

Method used

By splitting the original data into multiple data blocks and calculating the initial hash value of each data block to upload to the blockchain network, a step-by-step verification strategy of preliminary and final verification is adopted. Preliminary verification determines the integrity of the data block by checking parameters and preset thresholds. If passed, a trine tree will be built for final verification to ensure the complete integrity of the data block.

Benefits of technology

It improves the efficiency of data integrity verification, especially for the integrity verification of massive data, enhances the accuracy and efficiency of verification, and allows more detailed analysis and location of tampered data units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903559A_ABST
    Figure CN119903559A_ABST
Patent Text Reader

Abstract

The invention provides a distributed network data integrity verification method and device based on a block chain. The method comprises the steps that original data is divided into m data blocks, each data block comprises n data units, the initial hash value of each data block is calculated, and the initial hash value is uploaded to a block chain network; uploading the data block to be verified to the block chain network, and recalculating the hash value of the data block; preliminarily verifying the integrity of each data block according to the determined verification parameter and a preset threshold value, and judging whether the data block meets a preliminary integrity condition or not; for the data blocks meeting the preliminary integrity condition, constructing a ternary tree according to the hash value of each data unit; judging whether the data in the data block meets a complete condition or not; and when all the segmented data blocks meet a complete integrity condition, judging that the original data is complete. The problems that a traditional data integrity verification method is low in efficiency and prone to being attacked are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computing network technology, and more specifically to a distributed network data integrity verification method and device based on blockchain. Background Art

[0002] In today's digital age, data integrity is crucial in all fields. Traditional data storage and transmission methods face many challenges, such as data being easily tampered with and difficulty in ensuring integrity during transmission. Therefore, it is particularly important to verify the integrity of data after transmission.

[0003] At present, blockchain technology has the advantages of decentralization and immutability, and can be used for data integrity verification. However, the existing blockchain-based data integrity verification methods still have shortcomings in terms of efficiency, accuracy, and coping with large-scale data. For example, for the verification of massive data, the existing methods may cause slow verification speed due to excessive consumption of computing resources, and accuracy is difficult to guarantee in complex data environments.

[0004] Therefore, how to solve the problems of low efficiency and vulnerability of data integrity verification methods in the prior art is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] In view of this, the present invention provides a distributed network data integrity verification method based on blockchain, which is used to at least solve some of the technical problems in the background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A distributed network data integrity verification method based on blockchain, comprising:

[0008] Divide the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l;

[0009] Calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕H(d nj ), and the initial hash value H 0j Upload to the blockchain network, and the initial hash value is stored in the blockchain network in the form of a hash chain;

[0010] Initial verification steps for data integrity:

[0011] The data block D to be verified j Upload to the blockchain network and recalculate data block D j The hash value H 1j ;

[0012] For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n;

[0013] According to the determined calibration parameter p j and the preset threshold for each data block D j Perform preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions;

[0014] Final verification steps for data integrity:

[0015] For data block D that meets the preliminary completeness condition j , according to each data unit d ij The hash value H(d ij )Build a ternary tree;

[0016] Determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition;

[0017] When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

[0018] Furthermore, in the preliminary data integrity verification step, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including:

[0019] When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined jSatisfy the preliminary complete condition; otherwise, judge that the data block D i There is significant tampering and it is marked.

[0020] Furthermore, in the final data integrity verification step, the data block D that meets the preliminary integrity condition is determined based on the constructed ternary tree. j Whether the data in meets the completeness conditions, including:

[0021] Calculate the hash path value P from the leaf node to the root node in the ternary tree j ′;

[0022] The hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in is completely complete.

[0023] Furthermore, in the final data integrity verification step, the constructed ternary tree meets the following requirements:

[0024] Let the root node of the ternary tree be R, the left child node be L, the middle child node be M, and the right child node be R;

[0025] The root node level is represented as level 0, and for the node N at level s in the ternary tree s :

[0026] If node N s The number of layers s is a multiple of 3, then the node N s The left child node L s+1 =H(d 3i,j ), neutron node M s+1 =H(d 3i+1,j ), right child node R s+1 =H(d 3i+2 ,j);

[0027] If node N s The number of layers s is divided by 3 with a remainder of 1, then the node N s The left child node L s+1 =H(d 3i+1,j ), neutron node M s+1 =H(d 3i+2,j )), right child node R s+1 =H(d 3i,j );

[0028] If if node N s The number of layers s is divided by 3 with a remainder of 2, then the node N s The left child node L s+1=H(d 3i+2,j ), neutron node M s+1 =H(d 3i,j ), right child node R s+1 =H(d 3i+1,j ).

[0029] Furthermore, the data preprocessing step also includes adding a traceability label to each data unit.

[0030] Furthermore, in the data preprocessing step, when calculating each data block D j Before the hash value is obtained, the RSA encryption algorithm E is used to encrypt each data block D j Encryption encoding is performed; in the corresponding data integrity preliminary verification step, the encoded data block E(D j ) is uploaded to the blockchain network and the encoded data block E(D j ) hash value.

[0031] Furthermore, the hash algorithm used to calculate the hash value in the present invention includes the SHA-256 algorithm.

[0032] On the other hand, the present invention also discloses a distributed network data integrity verification device based on blockchain, comprising:

[0033] Data preprocessing module:

[0034] Used to split the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l;

[0035] And calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕

[0036] H(d nj ), and the initial hash value H 0j Upload to the blockchain network;

[0037] Data integrity preliminary verification module:

[0038] Used to verify the data block D j Upload to the blockchain network and recalculate data block D j Hash value H 1j ;

[0039] For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n;

[0040] According to the determined calibration parameter p j and the preset threshold for each data block D j Perform preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions;

[0041] Data integrity final verification module:

[0042] Used to receive data blocks D that meet preliminary complete conditions j , and according to each data unit d ij The hash value H(d ij ) construct a ternary tree; determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition;

[0043] When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

[0044] Preferably, in the data integrity preliminary verification module of the present invention, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including:

[0045] When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined j Satisfy the preliminary complete condition; otherwise, judge that the data block D i There is significant tampering and it is marked.

[0046] Preferably, in the data integrity final verification module of the present invention, the data block D that meets the preliminary integrity condition is determined according to the constructed ternary tree. j Whether the data in meets the completeness conditions, including:

[0047] Calculate the hash path value P from the leaf node to the root node in the ternary tree j ′;

[0048] The hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in is completely complete.

[0049] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a distributed network data integrity verification method based on blockchain, which has the following beneficial effects:

[0050] The present invention uses data block technology to divide and process large-scale data, reducing the computational complexity of a single verification process, and adopts a step-by-step verification strategy of preliminary verification + final verification. Through preliminary verification, it roughly determines whether each data block is complete, and through the final verification method, it makes a final judgment on the integrity of the data block. Through the above method and system, the present invention improves the efficiency of data integrity verification, and is particularly suitable for integrity verification of massive data.

[0051] The present invention uses a ternary tree to further verify the data block after preliminary verification, which can analyze the data and locate the tampered data unit in more detail, further improving the efficiency and accuracy of verification.

[0052] The distributed network data integrity verification method and device based on blockchain adopted by the present invention have broad application prospects, such as being able to ensure data security in the fields of cloud computing data storage, financial transaction data storage, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0054] Figure 1 The present invention provides a method for verifying network data integrity.

[0055] Figure 2 A schematic flow chart of the steps for preliminary verification of data integrity provided by the present invention.

[0056] Figure 3A schematic flow chart of the steps of final verification of data integrity provided by the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] The present invention provides a distributed network data integrity verification method and device based on blockchain. By combining uploaded files and making innovations, greater breakthroughs have been made in security, scalability, data privacy protection, etc., making it have higher application value and market competitiveness in the field of data integrity verification.

[0059] Embodiment 1:

[0060] Example 1 discloses a distributed network data integrity verification method based on blockchain, which verifies the integrity of massive data by using a step-by-step verification strategy of data segmentation combined with preliminary verification + final verification. The overall steps are as follows: Figure 1 Shown include:

[0061] Data preprocessing steps:

[0062] The data sender divides the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l;

[0063] Calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕H(d nj ), and the initial hash value H 0j Upload to the blockchain network, and the initial hash value is stored in the blockchain network in the form of a hash chain;

[0064] Initial verification steps for data integrity:

[0065] The data block D to be verified j Upload to the blockchain network and recalculate data block D j The hash value H 1j ;

[0066] For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n;

[0067] According to the determined calibration parameter p j and the preset threshold for each data block D j Perform preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions;

[0068] Final verification steps for data integrity:

[0069] For data block D that meets the preliminary completeness condition j , according to each data unit d ij The hash value H(d ij )Build a ternary tree;

[0070] Determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition;

[0071] When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

[0072] Furthermore, in the preliminary data integrity verification step, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including:

[0073] When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined j Satisfy the preliminary complete condition; otherwise, judge that the data block D i There is serious tampering and it is marked. The steps for preliminary verification of data integrity are as follows Figure 2 shown.

[0074] Furthermore, in the final data integrity verification step, the data block D that meets the preliminary integrity condition is determined based on the constructed ternary tree. j Whether the data in meets the completeness conditions, including:

[0075] Calculate the hash path value P from the leaf node to the root node in the constructed ternary tree j ′;

[0076] The calculated hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in the data is completely complete. The steps for preliminary verification of data integrity are as follows: Figure 3 shown.

[0077] Furthermore, in the final data integrity verification step, the constructed ternary tree meets the following requirements:

[0078] Let the root node of the ternary tree be R, the left child node be L, the middle child node be M, and the right child node be R;

[0079] The root node level is represented as level 0, and for the node N at level s in the ternary tree s :

[0080] If node N s The number of layers s is a multiple of 3, then the node N s The left child node L s+1 =H(d 3i,j ), neutron node M s+1 =H(d 3i+1,j ), right child node R s+1 =H(d 3i+2,j );

[0081] If node N s The number of layers s is divided by 3 with a remainder of 1, then the node N s The left child node L s+1 =H(d 3i+1,j ), neutron node M s+1 =H(d 3i+2,j )), right child node R s+1 =H(d 3i,j );

[0082] If if node N s The number of layers s is divided by 3 with a remainder of 2, then the node N s The left child node L s+1 =H(d 3i+2,j ), neutron node M s+1 =H(d3i,j ), right child node R s+1 =H(d 3i+1,j ).

[0083] Furthermore, in the data preprocessing step, it also includes adding a traceability tag to each data unit, so as to facilitate tracing the tampered data unit in the subsequent steps.

[0084] Furthermore, in the data preprocessing step, when calculating each data block D j Before the hash value is obtained, the RSA encryption algorithm E is used to encrypt each data block D j Encryption is performed, and each coded data block E(D j )’s initial hash value H 0j =H(E(D j ))=H(E(d 1j ))⊕H(E(d 2j ))⊕…⊕H(E(d nj )); In the corresponding data integrity preliminary verification step, the encoded data block E(D j ) is uploaded to the blockchain network and the encoded data block E(D j ) hash value.

[0085] If for each data block D j During the encryption and encoding and final verification of data integrity, the constructed ternary tree meets the following requirements:

[0086] Let the root node of the ternary tree be R, the left child node be L, the middle child node be M, and the right child node be R;

[0087] The root node level is represented as level 0, and for the node N at level s in the ternary tree s :

[0088] If node N s The number of layers s is a multiple of 3, then the node N s The left child node L s+1 =H(E(d 3i,j )), neutron node M s+1 =H(E(d 3i+1,j )), right child node R s+1 =H(E(d 3i+2,j ));

[0089] If node N s The number of layers s is divided by 3 with a remainder of 1, then the node N s The left child node L s+1 =H(E(d 3i+1,j )), neutron node M s+1 =H(E(d 3i+2,j)), right child node R s+1 =H(E(d 3i,j ));

[0090] If if node N s The number of layers s is divided by 3 with a remainder of 2, then the node N s The left child node L s+1 =H(E(d 3i+2,j )), neutron node M s+1 =H(E(d 3i,j )), right child node R s+1 =H(E(d 3i+1,j )).

[0091] Furthermore, the hash algorithm used to calculate the hash value includes the SHA-256 algorithm.

[0092] In practical applications, for example, in a big data storage scenario, the original data M may be a large amount of user behavior data. The original data may be divided into m data blocks D according to the characteristics of the data (such as time interval or data type). j Each data block D j The data unit d in ij Able to store user behavior information of different dimensions, such as login time, operation type, etc.

[0093] For the encrypted code E, the RSA encryption algorithm can be used to encrypt the data block D j When calculating the hash value, take the SHA-256 algorithm as an example. The hash value length of the hash value output by the hash operation of this algorithm is 256 bits. 0j and H 1j When , the number of identical hash bits is obtained by bit-by-bit comparison, thus calculating the check parameter p j .

[0094] For the ternary tree structure constructed in the final verification step, the depth of the ternary tree h = log3 (2n + 1) is determined according to the number of data units n in the data block. Since the depth is an integer, the obtained h is rounded up to obtain the final ternary tree depth. When locating the tampered data unit, by comparing the hash value differences on different paths, the specific data unit can be quickly located according to the structural characteristics of the ternary tree.

[0095] In all data blocks D j After the verification is completed, the integrity of the entire data M needs to be verified. j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D jWhen the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete, and the result is fed back to the data sender.

[0096] On the other hand, the present invention also discloses a distributed network data integrity verification device based on blockchain, comprising:

[0097] Data preprocessing module:

[0098] Used to split the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l;

[0099] And calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕

[0100] H(d nj ), and the initial hash value H 0j Upload to the blockchain network;

[0101] Data integrity preliminary verification module:

[0102] Used to verify the data block D j Upload to the blockchain network and recalculate data block D j Hash value H 1j ;

[0103] For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n;

[0104] According to the determined calibration parameter p j and the preset threshold for each data block D j Perform preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions;

[0105] Data integrity final verification module:

[0106] Used to receive data blocks D that meet preliminary complete conditions j , and according to each data unit d ij The hash value H(d ij ) construct a ternary tree; determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition;

[0107] When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

[0108] Furthermore, in the data integrity preliminary verification module, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including:

[0109] When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined j Satisfy the preliminary complete condition; otherwise, judge that the data block D i There is significant tampering and it is marked.

[0110] Furthermore, in the data integrity final verification module, the data block D that meets the preliminary integrity condition is determined according to the constructed ternary tree. j Whether the data in meets the completeness conditions, including:

[0111] Calculate the hash path value P from the leaf node to the root node in the ternary tree j ′;

[0112] The calculated hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in is completely complete.

[0113] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A distributed network data integrity verification method based on blockchain, characterized in that: include: Data preprocessing steps: Divide the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l; Calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕H(d nj ), and the initial hash value H 0j Upload to the blockchain network, and the initial hash value is stored in the blockchain network in the form of a hash chain; Initial verification steps for data integrity: The data block D to be verified j Upload to the blockchain network and recalculate data block D j The hash value H 1j ; For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n; According to the determined calibration parameter p j and the preset threshold for each data block D j Perform a preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions; Final verification steps for data integrity: For data block D that meets the preliminary completeness condition j , according to each data unit d ij The hash value H(d ij )Build a ternary tree; Determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition; When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

2. According to a distributed network data integrity verification method based on blockchain according to claim 1, it is characterized in that: In the initial data integrity verification step, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including: When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined j Satisfy the preliminary complete condition; otherwise, judge that the data block D i There is significant tampering and it is marked.

3. According to a distributed network data integrity verification method based on blockchain according to claim 1, it is characterized in that: In the final data integrity verification step, the data block D that meets the preliminary integrity condition is determined based on the constructed ternary tree. j Whether the data in meets the completeness conditions, including: Calculate the hash path value P from the leaf node to the root node in the ternary tree j ′; The hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in is completely complete.

4. According to a distributed network data integrity verification method based on blockchain in claim 1, it is characterized in that: In the final data integrity verification step, the constructed ternary tree meets the following requirements: Let the root node of the ternary tree be R, the left child node be L, the middle child node be M, and the right child node be R; The root node level is represented as level 0, and for the node N at level s in the ternary tree s : If node N s The number of layers s is a multiple of 3, then the node N s The left child node L s+1 =H(d 3i,j ), neutron node M s+1 =H(d 3i+1,j ), right child node R s+1 =H(d 3i+2,j ); If node N s The number of layers s is divided by 3 with a remainder of 1, then the node N s The left child node L s+1 =H(d 3i+1,j ), neutron node M s+1 =H(d 3i+2,j )), right child node R s+1 =H(d 3i,j ); If if node N s The number of layers s is divided by 3 with a remainder of 2, then the node N s The left child node L s+1 =H(d 3i+2,j ), neutron node M s+1 =H(d 3i,j ), right child node R s+1 =H(d 3i+1,j ).

5. According to a distributed network data integrity verification method based on blockchain according to claim 1, it is characterized in that: The data preprocessing step also includes adding a traceability label to each data unit.

6. According to a distributed network data integrity verification method based on blockchain in claim 1, it is characterized in that: In the data preprocessing step, when calculating each data block D j Before the hash value is obtained, the RSA encryption algorithm E is used to encrypt each data block D j Encryption encoding is performed; in the corresponding data integrity preliminary verification step, the encoded data block E(D j ) is uploaded to the blockchain network and the encoded data block E(D j ) hash value.

7. According to a distributed network data integrity verification method based on blockchain in claim 1, it is characterized in that: The hash algorithm used to calculate the hash value includes the SHA-256 algorithm.

8. A distributed network data integrity verification device based on blockchain, characterized in that: include: Data preprocessing module: Used to split the original data M into m data blocks D j ,(j=1,2,…,m), each data block D j Contains n data units d ij , (i=1,2,…,n) and each data unit d ij has a fixed length l; And calculate each data block D j The initial hash value H 0j =H(D j )=H(d 1j )⊕H(d 2j )⊕…⊕ H(d nj ), and the initial hash value H 0j Upload to the blockchain network; Data integrity preliminary verification module: Used to verify the data block D j Upload to the blockchain network and recalculate data block D j Hash value H 1j ; For each data block D j Determine the calibration parameter p j , the verification parameters Among them, P 同 Represents each data block D j The number of data units whose hash values ​​recalculated in the calculation are the same as the initial hash values ​​of the data units, P 总 Represents each data block D j The total number of data units in n; According to the determined calibration parameter p j and the preset threshold for each data block D j Perform a preliminary verification of the integrity of the data block to determine whether the data block meets the preliminary integrity conditions; Data integrity final verification module: Used to receive data blocks D that meet preliminary complete conditions j , and according to each data unit d ij The hash value H(d ij ) construct a ternary tree; determine the data block D that meets the preliminary complete condition according to the constructed ternary tree j Whether the data in meets the completeness condition; When all the data blocks D after segmentation j If all the complete conditions are met, the original data M is considered complete; if any of the data blocks D j When the preliminary completeness condition or the complete completeness condition is not met, the original data M is judged to be incomplete.

9. A distributed network data integrity verification device based on blockchain according to claim 8, characterized in that: In the data integrity preliminary verification module, according to the determined verification parameter p j and the preset threshold for each data block D j The integrity of the data block is initially verified to determine whether the data block meets the preliminary integrity conditions, including: When the calibration parameter p is determined j Satisfy p j ≥k, k is the preset threshold, then the corresponding data block D is determined j Satisfy the preliminary complete condition; otherwise, judge that the data block D i There is significant tampering and it is marked.

10. A distributed network data integrity verification device based on blockchain according to claim 8, characterized in that: In the data integrity final verification module, the data block D that meets the preliminary integrity condition is determined based on the constructed ternary tree. j Whether the data in meets the completeness conditions, including: Calculate the hash path value P from the leaf node to the root node in the ternary tree j ′; The hash path value P j ′ and the pre-stored standard path value P 0j For comparison, if P j =P 0j , then the data block D that meets the preliminary complete condition j The data in is completely complete.

Citation Information

Patent Citations

  • A public transport data processing method and apparatus based on a block chain

    CN109241778A

  • Data integrity verification method and system based on block chain technology

    CN115618428A

Cited By

  • Data integrity verification method based on block chain

    CN120492467A

  • A data integrity verification method based on blockchain

    CN120492467B

  • Erasure code redundancy check and increment error correction method for threat intelligence synchronization

    CN121000507A

  • A method for threat intelligence synchronization, erasure code redundancy checking and incremental error correction

    CN121000507B