Data verification method and device, equipment and medium

By using Merkle tree structure to verify data integrity in the blockchain network, the single point of failure and data tampering problems of centralized database systems when storing time sequence data is solved, and high data reliability and security are achieved.

CN119475427APending Publication Date: 2025-02-18太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411588690.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Centralized database systems are susceptible to the risk of single points of failure and data tampering when storing and managing timing data, resulting in reduced data reliability and security.

Method used

Data is stored on multiple nodes of the target block through blockchain technology, and the integrity of the data is verified by using the Merkle tree structure to ensure that the data has not been tampered with in the blockchain network.

Benefits of technology

Reduces the risk of single point of failure, improves data reliability and security, and ensures data integrity and traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475427A_ABST
    Figure CN119475427A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data verification method and device, equipment and a medium, and relates to the technical field of block chains. The method comprises the steps of obtaining a to-be-verified hash value of to-be-verified data; determining a target block comprising the to-be-verified data from the block chain network; determining a Merkle tree structure in the target block; and if the hash value of each layer of node of the Merkle tree structure is matched with the to-be-verified hash value to confirm that the to-be-verified data item is located in the Merkle tree structure, determining that the to-be-verified data is not tampered in the block chain network. Therefore, the data is stored on the multiple nodes of the target block by utilizing the block chain technology instead of depending on a single central node, the risk of single-point failure is greatly reduced by the decentralized storage mode, and even if part of nodes fail, other nodes can still work normally, so that the data storage efficiency is improved. Therefore, the reliability and availability of the data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a data verification method, device, equipment and medium. Background Art

[0002] Time series data, such as sensor readings and transaction records, need to be stored in an efficient and reliable way because of its time-varying characteristics. Centralized database systems have always been the preferred solution for time series data storage due to their clear structure and easy management.

[0003] In related technologies, time series data is centrally stored in the central node of a centralized database system and accessed and managed through a unified interface. This management method makes the storage and retrieval of time series data relatively simple and efficient, and also facilitates the unified management and maintenance of time series data.

[0004] However, this centralized evidence storage method is susceptible to the risks of single point failure and data tampering. Once the central node fails or is attacked, it may cause the entire database system to be paralyzed or the time series data to be tampered with or deleted, reducing the reliability and security of the time series data. Summary of the invention

[0005] Based on the above problems, the present application provides a data verification method, device, equipment and medium, which can improve the reliability and security of time series data.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, the present application discloses a data verification method, the method comprising:

[0008] Get the hash value of the data to be verified;

[0009] Determine a target block including the data to be verified from the blockchain network;

[0010] Determine the Merkle tree structure in the target block;

[0011] If it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified, it is determined that the data to be verified has not been tampered with in the blockchain network.

[0012] Optionally, the Merkle tree structure is an N-layer data structure, where N is a positive integer; if the data item to be verified is confirmed to be located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified, then determining that the data to be verified has not been tampered with in the blockchain network includes:

[0013] Determine whether the hash value of the first layer node of the Merkle tree structure matches the hash value to be verified;

[0014] If not, continue to determine whether the hash value of the second layer node of the Merkle tree structure matches the hash value to be verified;

[0015] Repeat the above steps until the hash value of the Mth layer node of the Merkle tree structure matches the hash value to be verified, then it is determined that the data to be verified has not been tampered with in the blockchain network, where M is a positive integer less than or equal to N.

[0016] Optionally, the method further comprises:

[0017] If each layer of nodes in the Merkle tree structure does not match the hash value to be verified, it is determined that the data to be verified has been tampered with in the blockchain network.

[0018] Optionally, after performing the step of determining that the data to be verified has been tampered with in the blockchain network, the method further includes:

[0019] Send a warning indication to other blocks in the blockchain network, wherein the warning indication is used to prompt that the data to be verified in the target block has been tampered with in the blockchain network.

[0020] Optionally, the blockchain network is constructed in the following manner:

[0021] Get time series data;

[0022] Performing hash processing on the time series data to obtain a hash value corresponding to the time series data;

[0023] Organizing the hash value using the Merkle tree structure to obtain a Merkle root;

[0024] By packaging the Merkle root and timestamp into a block, a blockchain network is constructed.

[0025] In a second aspect, the present application discloses a data verification device, the device comprising: a data acquisition module, a first determination module, a second determination module and a third determination module;

[0026] The data acquisition module is used to obtain the hash value to be verified of the data to be verified;

[0027] The first determination module is used to determine a target block including the data to be verified from a blockchain network;

[0028] The second determination module is used to determine the Merkle tree structure in the target block;

[0029] The third determination module is used to determine that the data to be verified has not been tampered with in the blockchain network if it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified.

[0030] Optionally, the Merkle tree structure is an N-layer data structure, where N is a positive integer;

[0031] The third determination module is specifically used to: determine whether the hash value of the first-layer node of the Merkle tree structure matches the hash value to be verified; if not, continue to determine whether the hash value of the second-layer node of the Merkle tree structure matches the hash value to be verified; repeat the above steps until the hash value of the Mth-layer node of the Merkle tree structure matches the hash value to be verified, then determine that the data to be verified has not been tampered with in the blockchain network, where M is a positive integer less than or equal to N.

[0032] Optionally, the device further includes: a fourth determining module;

[0033] The fourth determination module is used to determine that the data to be verified has been tampered with in the blockchain network if each layer of nodes in the Merkle tree structure does not match the hash value to be verified.

[0034] Optionally, the device further comprises: an indication warning module;

[0035] The indication warning module is used to send warning indications to other blocks in the blockchain network, and the warning indication is used to prompt that the data to be verified in the target block has been tampered with in the blockchain network.

[0036] Optionally, the blockchain network is constructed by the following units: an acquisition unit, a hash unit, an organization unit, and a construction unit;

[0037] The acquisition unit is used to acquire time series data;

[0038] The hash unit is used to perform hash processing on the time series data to obtain a hash value corresponding to the time series data;

[0039] The organizing unit is used to organize the hash value by using the Merkle tree structure to obtain a Merkle root;

[0040] The building unit is used to build a blockchain network by packaging the Merkle root and the timestamp into a block.

[0041] In a third aspect, the present application discloses a data verification device, the device comprising: a memory and a processor;

[0042] The memory is used to store programs;

[0043] The processor is used to execute the program to implement the various steps of the data verification method as described in the first aspect.

[0044] In a fourth aspect, the present application discloses a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the various steps of the data verification method described in the first aspect are implemented.

[0045] Compared with the prior art, this application has the following beneficial effects:

[0046] The embodiment of the present application provides a data verification method, device, equipment and medium, the method comprising: obtaining a hash value to be verified of the data to be verified; determining a target block including the data to be verified from the blockchain network; determining the Merkle tree structure in the target block; if the data item to be verified is confirmed to be in the Merkle tree structure by matching the hash value of each layer of the Merkle tree structure with the hash value to be verified, then it is determined that the data to be verified has not been tampered with in the blockchain network. Therefore, the present application uses blockchain technology to store data on multiple nodes of the target block instead of relying on a single central node. This decentralized storage method greatly reduces the risk of single point failure, because even if some nodes fail, other nodes can still work normally, thereby ensuring the reliability and availability of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 A flowchart of a data verification method provided in an embodiment of the present application;

[0049] Figure 2A schematic diagram of a data verification device provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of a computer-readable medium provided for an embodiment of the present application. DETAILED DESCRIPTION

[0051] As described above, time series data is stored in a centralized database system on a central node and accessed and managed through a unified interface. This management method makes the storage and retrieval of time series data relatively simple and efficient, and also facilitates the unified management and maintenance of time series data.

[0052] However, this centralized evidence storage method is susceptible to the risks of single point failure and data tampering. Once the central node fails or is attacked, it may cause the entire database system to be paralyzed or the time series data to be tampered with or deleted, reducing the reliability and security of the time series data.

[0053] After research, the inventor proposed a data verification method, device, equipment and medium, which includes: obtaining a hash value to be verified of the data to be verified; determining a target block including the data to be verified from the blockchain network; determining the Merkle tree structure in the target block; if the data item to be verified is confirmed to be in the Merkle tree structure by matching the hash value of each layer of the Merkle tree structure with the hash value to be verified, it is determined that the data to be verified has not been tampered with in the blockchain network. Therefore, the present application uses blockchain technology to store data on multiple nodes of the target block instead of relying on a single central node. This decentralized storage method greatly reduces the risk of single point failure, because even if some nodes fail, other nodes can still work normally, thereby ensuring the reliability and availability of the data. Moreover, through the Merkle tree structure, the present application can efficiently verify the integrity of the data. The Merkle tree structure allows any minor modification to the data to result in a change in the Merkle root, which can be easily detected. Therefore, the present application can effectively prevent data from being tampered with and improve the security of the data.

[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] See also Figure 1 , which is a flow chart of a data verification method provided by an embodiment of the present application. The method includes:

[0056] S101: Obtain a hash value of the data to be verified.

[0057] First, obtain the data to be verified. The data to be verified refers to any time series data whose integrity or authenticity needs to be verified. For example, it can be environmental parameters (such as temperature, humidity, air quality, etc.) collected by IoT devices (such as sensors), or it can be time series data in the financial field (such as stock prices, transaction records, etc.).

[0058] Subsequently, the data to be verified is hashed to obtain a hash value of the data to be verified. Hash processing is a data processing technology that can convert data of any length into a hash value of a fixed length.

[0059] It is understandable that hash processing is unidirectional and unique. Unidirectionality means that the hash value to be verified can be easily calculated from the data to be verified, but it is almost impossible to reversely deduce the data to be verified from the hash value to be verified. This ensures the security of the data to be verified, and even if the hash value to be verified is leaked, the data to be verified remains safe. Uniqueness means that different data to be verified should produce different hash values ​​to be verified. Although there is theoretically the possibility of hash collision (that is, different data produces the same hash value), for a well-designed hash function, this probability is extremely low and almost negligible. Therefore, by hashing the data to be verified, a unique identifier of the data to be verified (that is, a hash value) can be obtained, providing a basis for subsequent data verification.

[0060] S102: Determine a target block including the data to be verified from the blockchain network.

[0061] Blockchain is a distributed ledger technology that records a series of data blocks (blocks) arranged in chronological order and uses cryptographic methods to ensure that the data cannot be tampered with or forged. Each block contains multiple transactions or data records, as well as related metadata such as timestamps and Merkle roots. These blocks are connected through a chain data structure to form a continuous, tamper-proof chain of records.

[0062] In some specific implementations, the blockchain network is constructed in the following ways:

[0063] First, obtain time series data from various data sources (such as sensors, terminal devices, databases, etc.). Time series data refers to data arranged in chronological order, such as environmental parameters collected by IoT devices, time series of stock prices, etc. It should be noted that since the collected time series data may contain noise or outliers, subsequent processing and cleaning are required, including data filtering, deduplication, missing value processing and other steps to ensure the accuracy and reliability of the time series data.

[0064] Secondly, hash the time series data to obtain the hash value of the time series data. By hashing the time series data, a unique identifier for each time series data can be obtained. This uniqueness ensures that the time series data cannot be tampered with, because any slight change to the time series data will result in a huge change in the hash value.

[0065] Subsequently, the hash value of the time series data is processed using the Merkle tree to obtain the Merkle root. The Merkle tree is an efficient data structure that is often used to quickly verify the integrity and consistency of large-scale data sets. The root node of the Merkle tree, i.e., the Merkle root, can be obtained through recursive calculation. Through the Merkle tree structure, it is easy to verify whether a certain data exists in the data set without transmitting the entire data set, thereby greatly improving the efficiency of data verification.

[0066] Finally, the blockchain network is constructed by packaging the Merkle root and timestamp into a block. Blocks are the basic building blocks of blockchain. In this step, metadata such as the Merkle root and timestamp are packaged into a new block. Among them, the timestamp records the time when the block was created and can be used for subsequent data tracing and sorting. The Merkle root represents the unique identification and integrity of all data in the block. By packaging this information into a block, the immutability and traceability of the time series data can be ensured. Subsequently, the newly created block is broadcast to the blockchain network, and the nodes in the network verify and reach consensus. Once consensus is reached, the block will be added to the end of the blockchain to form a new chain data structure. This process is continuous, and each newly created block will be connected to the previous block to form an immutable record chain.

[0067] S103: Determine the Merkle tree structure in the target block.

[0068] After determining the target block containing the data to be verified from the blockchain network, it is necessary to determine the Merkle tree structure in the target block. The Merkle tree is a tree structure consisting of multiple levels, each of which contains a series of nodes that store the hash values ​​of the time series data.

[0069] S104: If it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified, it is determined that the data to be verified has not been tampered with in the blockchain network.

[0070] In order to verify whether the data to be verified exists in the Merkle tree and has not been tampered with, it is necessary to match the hash value of the data to be verified with the hash value of each node in the Merkle tree. Specifically, if the Merkle tree structure is an N-layer data structure (N is a positive integer), first start from the first layer of the Merkle tree and check whether the hash value of each node matches the hash value to be verified. If the hash value of the node in the first layer does not match the hash value to be verified, continue to check the hash value of the node in the second layer. If the hash value of the node in the second layer still does not match the hash value to be verified, continue to check the next layer, and so on, until a node with a hash value matching the hash value to be verified is found in the Mth layer of the Merkle tree (M is a positive integer less than or equal to N). Once a node matching the hash value to be verified is found in a certain layer of the Merkle tree, it can be determined that the data item to be verified is indeed in the Merkle tree structure, and all hash values ​​on the path from the data item to the Merkle root are correct. Therefore, the data to be verified has not been tampered with in the blockchain network.

[0071] S105: If each layer of nodes in the Merkle tree structure does not match the hash value to be verified, it is determined that the data to be verified has been tampered with in the blockchain network.

[0072] If during the verification process of step S104, the hash value of each layer of the Merkle tree node does not match the hash value to be verified, it means that the hash value to be verified corresponding to the data item to be verified cannot be found in the Merkle tree. According to the properties of the Merkle tree, if the data to be verified has not been tampered with, the hash value to be verified should be able to find the corresponding node in the Merkle tree. Therefore, if a matching hash value cannot be found, it can be reasonably inferred that the data to be verified has been tampered with in the blockchain network.

[0073] S106: Send a warning indication to other blocks in the blockchain network, where the warning indication is used to prompt that the data to be verified in the target block has been tampered with in the blockchain network.

[0074] After confirming that the data to be verified has been tampered with, a warning indication is sent to other blocks in the blockchain network. The purpose of the warning indication is to notify other nodes in the network that the data to be verified in the target block has been tampered with.

[0075] In a specific implementation, the specific operation of sending a warning indication may include: broadcasting a warning message (broadcasting a message containing warning information to all nodes through the communication mechanism of the blockchain network, and this message should clearly indicate that the data item of the target block has been tampered with), recording the event (adding an entry in the blockchain log or event record to record the data tampering event) and triggering a response mechanism (such as suspending interaction with the block, starting a data recovery process, or taking other security measures).

[0076] In summary, the embodiment of the present application provides a data verification method, which includes: obtaining a hash value to be verified of the data to be verified; determining a target block including the data to be verified from the blockchain network; determining the Merkle tree structure in the target block; if the hash value of each layer node of the Merkle tree structure is matched with the hash value to be verified to confirm that the data item to be verified is located in the Merkle tree structure, it is determined that the data to be verified has not been tampered with in the blockchain network. Therefore, the present application has the following beneficial effects: First, the present application uses blockchain technology to store data on multiple nodes of the target block instead of relying on a single central node. This decentralized storage method greatly reduces the risk of single point failure, because even if some nodes fail, other nodes can still work normally, thereby ensuring the reliability and availability of the data. Second, through the Merkle tree structure, the present application can efficiently verify the integrity of the data. The Merkle tree structure allows any minor modification to the data to result in a change in the Merkle root, which can be easily detected. Therefore, the present application can effectively prevent data from being tampered with and improve the security of the data. Third, through the Merkle tree structure, this application can reduce the physical space required to store a large amount of time series data, and improve the data retrieval speed through orderly data organization, making data verification more efficient. Fourth, this application has good scalability and can adapt to data sets and application scenarios of different sizes. Fifth, this application records the historical changes of each data block through the blockchain, providing powerful data traceability capabilities.

[0077] See also Figure 2 , which is a schematic diagram of a data verification device provided by an embodiment of the present application. The data verification device 200 includes: a data acquisition module 201, a first determination module 202, a second determination module 203 and a third determination module 204;

[0078] The data acquisition module 201 is used to obtain the hash value of the data to be verified;

[0079] The first determination module 202 is used to determine a target block including the data to be verified from the blockchain network;

[0080] The second determination module 203 is used to determine the Merkle tree structure in the target block;

[0081] The third determination module 204 is used to determine that the data to be verified has not been tampered with in the blockchain network if it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified.

[0082] In some specific implementations, the Merkle tree structure is an N-layer data structure, where N is a positive integer;

[0083] The third determination module 204 is specifically used to: determine whether the hash value of the first-layer node of the Merkle tree structure matches the hash value to be verified; if not, continue to determine whether the hash value of the second-layer node of the Merkle tree structure matches the hash value to be verified; repeat the above steps until the hash value of the M-th layer node of the Merkle tree structure matches the hash value to be verified, then determine that the data to be verified has not been tampered with in the blockchain network, where M is a positive integer less than or equal to N.

[0084] In some specific implementations, the data verification device 200 further includes: a fourth determination module;

[0085] The fourth determination module is used to determine that the data to be verified has been tampered with in the blockchain network if each layer of nodes in the Merkle tree structure does not match the hash value to be verified.

[0086] In some specific implementations, the data verification device 200 further includes: an indication warning module;

[0087] The indication warning module is used to send warning indications to other blocks in the blockchain network. The warning indication is used to prompt that the data to be verified in the target block has been tampered with in the blockchain network.

[0088] In some specific implementations, the blockchain network is constructed by the following units: an acquisition unit, a hash unit, an organization unit, and a construction unit;

[0089] An acquisition unit, used for acquiring time series data;

[0090] A hash unit is used to perform hash processing on the time series data to obtain a hash value corresponding to the time series data;

[0091] The organization unit is used to organize the hash value using the Merkle tree structure to obtain the Merkle root;

[0092] A building block used to construct a blockchain network by packaging a Merkle root and a timestamp into a block.

[0093] In summary, the embodiment of the present application provides a data verification device, and the present application has the following beneficial effects: First, the present application uses blockchain technology to store data on multiple nodes of the target block, rather than relying on a single central node. This decentralized storage method greatly reduces the risk of single point failure, because even if some nodes fail, other nodes can still work normally, thereby ensuring the reliability and availability of the data. Second, through the Merkle tree structure, the present application can efficiently verify the integrity of the data. The Merkle tree structure allows any minor modification to the data to result in a change in the Merkle root, which can be easily detected. Therefore, the present application can effectively prevent data from being tampered with and improve data security. Third, through the Merkle tree structure, the present application can reduce the physical space required to store a large amount of time series data, and improve the data retrieval speed through orderly data organization, making data verification more efficient. Fourth, the present application has good scalability and can adapt to data sets and application scenarios of different sizes. Fifth, the present application records the historical changes of each data block through the blockchain, providing powerful data traceability capabilities.

[0094] The embodiments of the present application also provide corresponding data verification devices and computer-readable media for implementing the data verification methods provided in the embodiments of the present application.

[0095] Among them, the data verification device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute instructions or codes so that the device executes a data verification method of any embodiment of the present application.

[0096] See also Figure 3 , which is a schematic diagram of a computer readable medium provided in an embodiment of the present application. The computer readable medium 300 stores a computer program 311, which implements the above-mentioned Figure 1 The steps of the data validation method.

[0097] It should be noted that in the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0098] It should be noted that the machine-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0099] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0100] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

[0101] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0102] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A data verification method, characterized in that: The method comprises: Get the hash value of the data to be verified; Determine a target block including the data to be verified from the blockchain network; Determine the Merkle tree structure in the target block; If it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified, it is determined that the data to be verified has not been tampered with in the blockchain network.

2. The method according to claim 1, characterized in that The Merkle tree structure is an N-layer data structure, where N is a positive integer; if the hash value of each layer node of the Merkle tree structure is matched with the hash value to be verified, and it is confirmed that the data item to be verified is located in the Merkle tree structure, then it is determined that the data to be verified has not been tampered with in the blockchain network, including: Determine whether the hash value of the first layer node of the Merkle tree structure matches the hash value to be verified; If not, continue to determine whether the hash value of the second layer node of the Merkle tree structure matches the hash value to be verified; Repeat the above steps until the hash value of the Mth layer node of the Merkle tree structure matches the hash value to be verified, then it is determined that the data to be verified has not been tampered with in the blockchain network, where M is a positive integer less than or equal to N.

3. The method according to claim 2, characterized in that The method further comprises: If each layer of nodes in the Merkle tree structure does not match the hash value to be verified, it is determined that the data to be verified has been tampered with in the blockchain network.

4. The method according to claim 3, characterized in that After performing the step of determining that the data to be verified has been tampered with in the blockchain network, the method further includes: Send a warning indication to other blocks in the blockchain network, wherein the warning indication is used to prompt that the data to be verified in the target block has been tampered with in the blockchain network.

5. The method according to claim 1, characterized in that The blockchain network is constructed in the following way: Get time series data; Performing hash processing on the time series data to obtain a hash value corresponding to the time series data; Organizing the hash value using the Merkle tree structure to obtain a Merkle root; By packaging the Merkle root and timestamp into a block, a blockchain network is constructed.

6. A data verification device, characterized in that: The device comprises: a data acquisition module, a first determination module, a second determination module and a third determination module; The data acquisition module is used to obtain the hash value to be verified of the data to be verified; The first determination module is used to determine a target block including the data to be verified from a blockchain network; The second determination module is used to determine the Merkle tree structure in the target block; The third determination module is used to determine that the data to be verified has not been tampered with in the blockchain network if it is confirmed that the data item to be verified is located in the Merkle tree structure by matching the hash value of each layer node of the Merkle tree structure with the hash value to be verified.

7. The device according to claim 6, characterized in that The Merkle tree structure is an N-layer data structure, where N is a positive integer; The third determination module is specifically used to: determine whether the hash value of the first layer node of the Merkle tree structure matches the hash value to be verified; if not, continue to determine whether the hash value of the second layer node of the Merkle tree structure matches the hash value to be verified; Repeat the above steps until the hash value of the Mth layer node of the Merkle tree structure matches the hash value to be verified, then it is determined that the data to be verified has not been tampered with in the blockchain network, where M is a positive integer less than or equal to N.

8. The device according to claim 6, characterized in that The device further includes: a fourth determining module; The fourth determination module is used to determine that the data to be verified has been tampered with in the blockchain network if each layer of nodes in the Merkle tree structure does not match the hash value to be verified.

9. A data verification device, characterized in that: The device comprises: a memory and a processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the data verification method as described in any one of claims 1 to 5.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the data verification method according to any one of claims 1 to 5 is implemented.