CN111414418B - Data storage method and device based on block chain - Google Patents

Data storage method and device based on block chain Download PDF

Info

Publication number
CN111414418B
CN111414418B CN202010148074.5A CN202010148074A CN111414418B CN 111414418 B CN111414418 B CN 111414418B CN 202010148074 A CN202010148074 A CN 202010148074A CN 111414418 B CN111414418 B CN 111414418B
Authority
CN
China
Prior art keywords
data
blockchain
hash value
original data
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010148074.5A
Other languages
Chinese (zh)
Other versions
CN111414418A (en
Inventor
张焱
施逸
杨东
李汪红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei DappWorks Technology Co Ltd
Original Assignee
Hefei DappWorks Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei DappWorks Technology Co Ltd filed Critical Hefei DappWorks Technology Co Ltd
Priority to CN202010148074.5A priority Critical patent/CN111414418B/en
Publication of CN111414418A publication Critical patent/CN111414418A/en
Application granted granted Critical
Publication of CN111414418B publication Critical patent/CN111414418B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a data storage method based on a block chain, which is applied to an original data end, and comprises the following steps: and aiming at the original data in the original data end, acquiring a hash value of the original data, and sending the hash value to a blockchain, so that the blockchain stores the hash value on the latest block of the blockchain, the data auditing end generates a key value pair corresponding to the hash value of the original data, and the data auditing end evaluates whether target data corresponding to the original data is consistent with the original data according to the key value pair. By applying the embodiment of the invention, whether the data is tampered can be verified.

Description

Data storage method and device based on block chain
Technical Field
The invention relates to the technical field of data fidelity, in particular to a data storage method and device based on a block chain.
Background
With the continuous development of big data technology, data transaction activities are increasingly occurring in the internet field.
At present, the invention patent application with the application number of 201810877494.X discloses a method for preventing cheating of monitoring data, a verification method, a device, a storage medium and a terminal, wherein the method for preventing cheating of the monitoring data comprises the following steps: acquiring monitoring data, storing the monitoring data, and recording a storage path; calculating a mapping value of the monitoring data to obtain mapping data to be compared, wherein the mapping value corresponds to the monitoring data one by one; the storage path and the mapping data to be compared are sent to a data demand party, so that the data demand party searches the stored monitoring data according to the storage path and verifies the mapping data to be compared; and receiving a verification result from the data requiring party, and writing the storage path and the mapping data to be compared into a blockchain when the verification result indicates that the mapping data to be compared is valid. The technical scheme of the invention can effectively reduce the cheating behavior of the monitoring data in the data transaction.
However, in the prior art, only the monitored data can be guaranteed to be tampered after being inspected, when company a delivers goods to company B, company a changes the data in the database, company B can not find that the data is changed, and the benefit of company B can not be guaranteed. In order to avoid own loss, the company B carries out audit on the data when delivering the database, and if the capacity in the database is large, the audit process is longer; or the data can be audited by a third party, but the possibility of the crosstalk and tampering between the company A and the third party cannot be exhausted, so that how to verify whether the data is tampered is a technical problem to be solved.
Disclosure of Invention
The invention aims to provide a data storage method and device based on a block chain so as to verify whether data are tampered.
The invention solves the technical problems by the following technical means:
the embodiment of the invention provides a data storage method based on a block chain, which is applied to an original data end and comprises the following steps:
and aiming at the original data in the original data end, acquiring a hash value of the original data, and sending the hash value to a blockchain, so that the blockchain stores the hash value on the latest block of the blockchain, the data auditing end generates a key value pair corresponding to the hash value of the original data, and the data auditing end evaluates whether target data corresponding to the original data is consistent with the original data according to the key value pair.
Optionally, when the hash value is sent to the data auditing end, the method further includes:
and the time stamp when the original data end acquires the original data is acquired, and the time stamp is sent to the blockchain, so that the blockchain stores the hash value and the time stamp on the latest block of the blockchain.
Optionally, the step of sending the timestamp to a blockchain includes:
splicing the hash value with the time stamp to obtain a spliced result;
transmitting the spliced result to a block chain;
the blockchain storing the hash value and the timestamp on a latest block of the blockchain, including:
the blockchain stores the spliced results on the latest block of the blockchain.
The data auditing end generates a key value pair corresponding to the hash value of the original data, and according to the key value pair, the auditing whether the target data corresponding to the original data is consistent with the original data comprises the following steps:
the data auditing terminal judges whether a key value pair matched with a hash value in the inquiry request can be obtained according to the inquiry request; if yes, sending first preset information to a data verification terminal, wherein the first preset information comprises: a storage address in a key value pair that matches a hash value in the query request; if not, sending second preset information to the data verification terminal, wherein the preset information comprises: null value; the data auditing end stores a key value pair corresponding to target data, and the key value pair comprises a hash value of original data and a storage address of the hash value on a blockchain, wherein a query request is a data verification end, acquires the hash value of the target data according to the target data corresponding to the original data, and is generated according to the hash value of the target data;
receiving a response result returned by the data auditing end, wherein the response result comprises the following steps: the first preset information or the second preset information.
Optionally, the process of obtaining the hash value of the original data includes:
the method comprises the steps of monitoring the change condition of a block on a block chain in real time, and obtaining a hash value aiming at original data from the block when the block is newly added on the block chain.
The embodiment of the invention also provides a data storage device based on the block chain, which is applied to an original data end and comprises:
the first acquisition module is used for acquiring a hash value of original data aiming at the original data in an original data end, sending the hash value to a blockchain so that the blockchain can store the hash value on the latest block of the blockchain, enabling the data auditing end to generate a key value pair corresponding to the hash value of the original data, and checking whether target data corresponding to the original data are consistent with the original data according to the key value pair.
Optionally, the apparatus further includes:
the second acquisition module is used for acquiring the time stamp of the original data acquired by the original data end and sending the time stamp to the blockchain so that the blockchain stores the hash value and the time stamp on the latest block of the blockchain.
Optionally, the second obtaining module is configured to:
splicing the hash value with the time stamp to obtain a spliced result;
transmitting the spliced result to a block chain;
the blockchain storing the hash value and the timestamp on a latest block of the blockchain, including:
the blockchain stores the spliced results on the latest block of the blockchain.
Optionally, the data auditing end is configured to:
the data auditing terminal judges whether a key value pair matched with a hash value in the inquiry request can be obtained according to the inquiry request; if yes, sending first preset information to a data verification terminal, wherein the first preset information comprises: a storage address in a key value pair that matches a hash value in the query request; if not, sending second preset information to the data verification terminal, wherein the preset information comprises: null value; the data auditing end stores a key value pair corresponding to target data, and the key value pair comprises a hash value of original data and a storage address of the hash value on a blockchain, wherein a query request is a data verification end, acquires the hash value of the target data according to the target data corresponding to the original data, and is generated according to the hash value of the target data;
receiving a response result returned by the data auditing end, wherein the response result comprises the following steps: the first preset information or the second preset information.
Optionally, the data verification terminal is configured to:
the method comprises the steps of monitoring the change condition of a block on a block chain in real time, and obtaining a hash value aiming at original data from the block when the block is newly added on the block chain.
The invention has the advantages that:
by applying the embodiment of the invention, the hash value of the original data is stored on the block chain, the accuracy of the hash value of the original data is ensured by utilizing the non-tamperability of the block chain, so that a data auditing end for data auditing can audit the target data corresponding to the original data according to the hash value stored on the block chain, and further whether the data is tampered can be verified.
Another advantage is that the entire blockchain query system is a public platform since only hash values are stored on the blockchain, there is no concern about exposing the original data. If the original data is stored, the original data cannot be a public platform but is a private platform, and then a data purchasing company can doubt public trust of the platform, so that the data purchasing company can be ensured to obtain the target data which is not tampered on the premise of not revealing the original data.
Drawings
Fig. 1 is a schematic structural diagram of a data verification system applied to a storage device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Based on the foregoing embodiments, embodiment 1 of the present invention provides a data storage method based on a blockchain, where the method is applied to an original data end in a data verification system, and the data verification system includes the original data end, a blockchain network, a data verification end, and a data audit end.
The method comprises the step S601:
s601 (not shown in the figure): the original data end uses a hash algorithm to carry out hash processing on the original data to obtain a hash value of the original data, wherein the hash algorithm can be one or a combination of MD5, SHA-1, SHA256 and other algorithms.
Before selling a database or a certain data, the company A takes the data or the database to be sold as original data, and uses an original data end in advance to acquire a hash value of the original data aiming at the original data in the original data end. The original data end can actively acquire or passively receive the original data, and the original data end uses a hash algorithm to hash the original data to obtain a hash value of the original data, wherein the hash algorithm can be one or a combination of algorithms such as MD5, SHA-1, SHA256 and the like.
In practical applications, the raw data may originate from sensors, industrial personal computers, etc. The original data terminal may be a gateway device of the sensor network. The sensor, the industrial personal computer and the like can transmit original data in a JSON format, a character string format or a binary group format to an original data end in a wired, wifi, zigBee and other communication modes.
And then, the hash value is sent to a block chain network, and each block node in the block chain network is subjected to consensus authentication and is written into the latest block. The blockchain may be a public chain, a private chain, or a federated chain.
In order to fully explain the data storage method provided by the embodiment of the present invention, the application of the data to be stored in the embodiment of the present invention will now be described in detail, as follows:
s602 (not shown in the figure): after receiving the hash value of the original data, the blockchain network newly generates an latest block on the blockchain, stores the hash value on the latest block of the blockchain, enables the data auditing end to generate a key value pair corresponding to the hash value of the original data, and evaluates whether target data corresponding to the original data is consistent with the original data according to the key value pair. Each block node in the blockchain network is subjected to consensus authentication, and the hash value is written into the latest block. The blockchain may be a public chain, a private chain, or a federated chain.
After the hash value of the original data is received, the blockchain can compare all the hash values stored in the blockchain, and a latest block is generated in the blockchain under the condition that the hash values which are the same as the hash values of the original data are not compared. When the hash value identical to the hash value of the original data is compared, the hash value identical to the hash value of the original data is taken as a value, the address of a block used for storing the hash value identical to the hash value of the original data is taken as a main key, and a key value pair is generated according to the key and the value so as to carry out data audit on a B company.
S603 (not shown in the figure): the data auditing end can monitor whether a new hash value is stored in a new block on the blockchain by utilizing an intelligent contract or other technical means, and after knowing that the new hash value is stored in the blockchain, the data auditing end reads the new hash value and a block corresponding address for storing the hash value from the block on the blockchain, takes the address corresponding to the block as a value, and takes the read new hash value as a primary key, namely, the hash value corresponding to the original data as a value to generate a key value pair corresponding to the original data.
After a new block is added to the blockchain, the blockchain network may send information of the "new block" to the data audit terminal, so that the data audit terminal knows that after the new hash value is stored in the blockchain, reads the new hash value and the corresponding address of the block for storing the hash value from the block on the blockchain, takes the address corresponding to the block as a value, takes the read new hash value as a primary key, that is, the hash value corresponding to the original data as a value to generate key value pairs corresponding to the original data, and then stores the key value pairs locally. In general, the data auditing end establishes an index table, the index table stores the key value pairs, and then queries the key value pairs corresponding to the hash values of the target data in the key value pair index table, thereby obtaining the block addresses corresponding to the queried hash values. The key value pair is used as the basis for hash value inquiry by the data auditing end when the company B uses the data verifying end to verify data.
The data auditing end can monitor whether a new hash value is stored in a new block on the blockchain by utilizing an intelligent contract or other technical means, and after knowing that the new hash value is stored in the blockchain, the data auditing end reads the new hash value and a block corresponding address for storing the hash value from the block on the blockchain, takes the address corresponding to the block as a value, and takes the read new hash value as a primary key, namely, the hash value corresponding to the original data as a value to generate a key value pair corresponding to the original data.
S604 (not shown): after a period of negotiations, for example, a few months later, company B purchases a company a's database. The company B receives the data sent by the company a, but the company B cannot confirm whether the data completely accords with the original data promised by the company a, so the data received by the company B is called target data in the embodiment of the invention. To ensure that the database purchased by company B remains the database declared by company a prior to negotiations. And the company B uses the same hash algorithm configured on the data verification terminal and used when the company A generates the hash value of the original data to generate the hash value of the target data. The data verification end encodes the hash value of the target data into a query request, and sends the query request to the data audit end.
S605 (not shown in the figure): after receiving a data query request sent by a data verification end used by a company B, the data audit end analyzes the query request so as to obtain a hash value of target data contained in the query request.
The data audit terminal receives a data query request sent by a data verification terminal, wherein the query request comprises a hash value of target data, and the target data is data corresponding to the original data;
the data auditing end analyzes the query request, so that a hash value of target data contained in the query request can be obtained, then a locally stored key value pair is traversed by taking the hash value of the target data as a reference, and the hash value of each key value pair is compared with the hash value of the target data; judging whether the hash values are consistent or not until hash values which are completely consistent with the hash values of the target data are obtained or all key value pairs are traversed; or each block on the blockchain may be traversed and the hash value stored in each block compared to the hash value of the target data; and judging whether the hash values are consistent or not until the hash value which is completely consistent with the hash value of the target data is obtained or all the blocks are traversed.
S606 (not shown in the figure): the data verification terminal receives the auditing result aiming at the target data and sent by the data auditing terminal, and presents the auditing result to staff of the company B.
If the result of the judgment is that the address of the block storing the hash value identical to the hash value of the target data is obtained, the address is used as the first preset information to be sent to the data query end used by the company B, and of course, in practical application, the first preset information may include, but not limited to, the address of the block, the data amount of the original data, the generation time of the original data, the time of storing the hash value on the blockchain, and the like, so that the user can more comprehensively understand the information of the original data conveniently.
If the result of the judgment is no, that is, the data auditing end does not inquire the hash value which is completely consistent with the hash value of the target data in the block chain, that is, the target data is not completely consistent with the original data, the data auditing end returns second preset information to the data verifying end, and in practical application, the preset information is null for convenience. Currently, in actual application, the second preset information may be a "no" judgment result, or information such as "the target data is tampered with".
It should be emphasized that the key value pair corresponding to the target data is stored in the data audit end, and the key value pair includes a hash value of the original data and a storage address of the hash value on the blockchain, where the original data is data corresponding to the target data.
By applying the embodiment of the invention, the hash value of the original data is stored on the block chain, the accuracy of the hash value of the original data is ensured by utilizing the non-tamperability of the block chain, and then the target data corresponding to the original data is audited according to the hash value stored on the block chain when the data is audited, so that whether the data is tampered can be verified. Due to the non-tamperable characteristic of the block chain, the possibility of data serial modification between the company A and a third party data audit unit is avoided, and the benefit of the company B is further ensured.
In addition, by applying the embodiment 1 of the invention, the original data end only stores the hash value on the blockchain and discloses the original data to each node in the blockchain network, so that the privacy of the original data can be ensured.
Example 2
On the basis of embodiment 1 of the present invention, the embodiment of the present invention further provides a data storage method based on a blockchain, where when the hash value is sent to a data audit end, the method further includes:
when the original data end generates the hash value corresponding to the original data, the original data end also obtains a time value corresponding to the time when the original data end obtains the original data, for example, when the original data end obtains the original data at the time when the time stamp value is a, the time stamp a is used as a time stamp corresponding to the original data, and the time stamp and the hash value corresponding to the original data are both sent to the blockchain network, wherein the time stamp refers to the total number of milliseconds from the time of greenwich in 1970 in 01 month 00 time 00 minutes and 00 seconds (Beijing time in 1970 in 01 month 08 in 00 minutes and 00 seconds).
Then, the blockchain network, after receiving the hash value of the original data and the timestamp corresponding to the original data, newly generates a latest block on the blockchain and stores the hash value and the timestamp on the latest block of the blockchain.
Then, the data auditing end can monitor whether a new hash value is stored in a new block on the blockchain by utilizing an intelligent contract or other technical means, and after knowing that the new hash value is stored in the blockchain, the data auditing end reads the new hash value and a block corresponding address for storing the hash value from the block on the blockchain, takes the address corresponding to the block as a primary key, and generates a key value pair corresponding to the original data by taking the read new hash value, namely the hash value corresponding to the original data as a value.
The data auditing terminal can verify whether the time stamp on the block chain is consistent with the generation time of the target data when conducting data auditing, and further verify whether the data is the original data by matching with the hash value. The searching speed can be improved according to the time stamp input by the user and corresponding to the original data acquisition or the input time stamp range on the blockchain, and the data auditing speed can be improved.
Further, in embodiment 2 of the present invention, the step of sending the timestamp to the blockchain includes: and the original data end splices the hash value and the time stamp to obtain a spliced result, and sends the spliced result to the block chain.
After receiving the spliced result, the blockchain network generates a new block on the blockchain and stores the spliced result on the latest block of the blockchain.
Example 3
Fig. 1 is a schematic structural diagram of a data verification system applied to a storage device according to an embodiment of the present invention, and as shown in fig. 1, corresponding to embodiment 1 of the present invention, embodiment 3 of the present invention provides a data storage device based on a blockchain, applied to an original data side, where the device includes:
the first acquisition module is used for acquiring a hash value of original data aiming at the original data in an original data end, sending the hash value to a blockchain so that the blockchain can store the hash value on the latest block of the blockchain, enabling the data auditing end to generate a key value pair corresponding to the hash value of the original data, and checking whether target data corresponding to the original data are consistent with the original data according to the key value pair.
By applying the embodiment of the invention, the hash value of the original data is stored on the block chain, the accuracy of the hash value of the original data is ensured by utilizing the non-tamperability of the block chain, so that a data auditing end for data auditing can audit the target data corresponding to the original data according to the hash value stored on the block chain, and further whether the data is tampered can be verified.
In a specific implementation manner of the embodiment of the present invention, the apparatus further includes:
the second acquisition module is used for acquiring the time stamp of the original data acquired by the original data end and sending the time stamp to the blockchain so that the blockchain stores the hash value and the time stamp on the latest block of the blockchain.
In a specific implementation manner of the embodiment of the present invention, the second obtaining module is configured to:
splicing the hash value with the time stamp to obtain a spliced result;
transmitting the spliced result to a block chain;
the blockchain storing the hash value and the timestamp on a latest block of the blockchain, including:
the blockchain stores the spliced results on the latest block of the blockchain.
In a specific implementation manner of the embodiment of the present invention, the data auditing end is configured to:
the data auditing terminal judges whether a key value pair matched with a hash value in the inquiry request can be obtained according to the inquiry request; if yes, sending first preset information to a data verification terminal, wherein the first preset information comprises: a storage address in a key value pair that matches a hash value in the query request; if not, sending second preset information to the data verification terminal, wherein the preset information comprises: null value; the data auditing end stores a key value pair corresponding to target data, and the key value pair comprises a hash value of original data and a storage address of the hash value on a blockchain, wherein a query request is a data verification end, acquires the hash value of the target data according to the target data corresponding to the original data, and is generated according to the hash value of the target data;
receiving a response result returned by the data auditing end, wherein the response result comprises the following steps: the first preset information or the second preset information.
In a specific implementation manner of the embodiment of the present invention, the data verification terminal is configured to:
the method comprises the steps of monitoring the change condition of a block on a block chain in real time, and obtaining a hash value aiming at original data from the block when the block is newly added on the block chain.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A blockchain-based data storage method, applied to an original data side, the method comprising:
for original data in an original data end, acquiring a hash value of the original data, and sending the hash value to a blockchain, so that the blockchain stores the hash value on a latest block of the blockchain, a data audit end generates a key value pair corresponding to the hash value of the original data, and checks whether target data corresponding to the original data is consistent with the original data according to the key value pair, and the method comprises the following steps:
the data auditing terminal judges whether a key value pair matched with a hash value in the inquiry request can be obtained according to the inquiry request; if yes, sending first preset information to a data verification terminal, wherein the first preset information comprises: a storage address in a key value pair that matches a hash value in the query request; if not, sending second preset information to the data verification terminal, wherein the second preset information comprises: null value; the data auditing end stores a key value pair corresponding to target data, and the key value pair comprises a hash value of original data and a storage address of the hash value on a blockchain, wherein a query request is a data verification end, acquires the hash value of the target data according to the target data corresponding to the original data, and is generated according to the hash value of the target data;
receiving a response result returned by the data auditing end, wherein the response result comprises the following steps: the first preset information or the second preset information.
2. The blockchain-based data storage method of claim 1, wherein when the hash value is sent to a data auditing end, the method further comprises:
and the time stamp when the original data end acquires the original data is acquired, and the time stamp is sent to the blockchain, so that the blockchain stores the hash value and the time stamp on the latest block of the blockchain.
3. The blockchain-based data storage method of claim 2, wherein the step of sending the timestamp to the blockchain includes:
splicing the hash value with the time stamp to obtain a spliced result;
transmitting the spliced result to a block chain;
the blockchain storing the hash value and the timestamp on a latest block of the blockchain, including:
the blockchain stores the spliced results on the latest block of the blockchain.
4. The blockchain-based data storage method of claim 1, wherein the obtaining the hash value of the original data includes:
the method comprises the steps of monitoring the change condition of a block on a block chain in real time, and obtaining a hash value aiming at original data from the block when the block is newly added on the block chain.
5. A blockchain-based data storage device, for application to a primary data side, the device comprising:
the first acquisition module is used for acquiring a hash value of original data aiming at the original data in an original data end, sending the hash value to a blockchain so that the blockchain stores the hash value on the latest block of the blockchain, enabling a data auditing end to generate a key value pair corresponding to the hash value of the original data, and checking whether target data corresponding to the original data is consistent with the original data according to the key value pair;
the data auditing end is used for:
the data auditing terminal judges whether a key value pair matched with a hash value in the inquiry request can be obtained according to the inquiry request; if yes, sending first preset information to a data verification terminal, wherein the first preset information comprises: a storage address in a key value pair that matches a hash value in the query request; if not, sending second preset information to the data verification terminal, wherein the second preset information comprises: null value; the data auditing end stores a key value pair corresponding to target data, and the key value pair comprises a hash value of original data and a storage address of the hash value on a blockchain, wherein a query request is a data verification end, acquires the hash value of the target data according to the target data corresponding to the original data, and is generated according to the hash value of the target data;
receiving a response result returned by the data auditing end, wherein the response result comprises the following steps: the first preset information or the second preset information.
6. A blockchain-based data storage device according to claim 5, wherein the device further comprises:
the second acquisition module is used for acquiring the time stamp of the original data acquired by the original data end and sending the time stamp to the blockchain so that the blockchain stores the hash value and the time stamp on the latest block of the blockchain.
7. The blockchain-based data storage device of claim 6, wherein the second acquisition module is configured to:
splicing the hash value with the time stamp to obtain a spliced result;
transmitting the spliced result to a block chain;
the blockchain storing the hash value and the timestamp on a latest block of the blockchain, including:
the blockchain stores the spliced results on the latest block of the blockchain.
8. The blockchain-based data storage device of claim 5, wherein the data validation side is configured to:
the method comprises the steps of monitoring the change condition of a block on a block chain in real time, and obtaining a hash value aiming at original data from the block when the block is newly added on the block chain.
CN202010148074.5A 2020-03-05 2020-03-05 Data storage method and device based on block chain Active CN111414418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148074.5A CN111414418B (en) 2020-03-05 2020-03-05 Data storage method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148074.5A CN111414418B (en) 2020-03-05 2020-03-05 Data storage method and device based on block chain

Publications (2)

Publication Number Publication Date
CN111414418A CN111414418A (en) 2020-07-14
CN111414418B true CN111414418B (en) 2023-09-29

Family

ID=71490909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148074.5A Active CN111414418B (en) 2020-03-05 2020-03-05 Data storage method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111414418B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device
CN114339653B (en) * 2022-03-04 2022-05-24 杭州格物智安科技有限公司 Block chain system based on wireless sensor network and data recording method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391298A (en) * 2017-07-06 2017-11-24 上海策链信息科技有限公司 State data memory detection method, device and computer-readable recording medium
WO2018119587A1 (en) * 2016-12-26 2018-07-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, and system, and information acquisition apparatus
CN109543065A (en) * 2018-11-14 2019-03-29 成都皓图智能科技有限责任公司 A kind of video active identification method of combination block chain
CN109656882A (en) * 2017-10-10 2019-04-19 上海能链众合科技有限公司 Data record method, extracting method and device, storage medium, terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119587A1 (en) * 2016-12-26 2018-07-05 深圳前海达闼云端智能科技有限公司 Data processing method, device, and system, and information acquisition apparatus
CN107391298A (en) * 2017-07-06 2017-11-24 上海策链信息科技有限公司 State data memory detection method, device and computer-readable recording medium
CN109656882A (en) * 2017-10-10 2019-04-19 上海能链众合科技有限公司 Data record method, extracting method and device, storage medium, terminal
CN109543065A (en) * 2018-11-14 2019-03-29 成都皓图智能科技有限责任公司 A kind of video active identification method of combination block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱凤霞 ; .基于区块链技术的交易数据库加密技术.电子设计工程.2020,(03),全文. *

Also Published As

Publication number Publication date
CN111414418A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
AU2019295815C1 (en) Blockchain-based data verification method and apparatus, and electronic device
US10491390B2 (en) Proof chaining and decomposition
JP6754495B2 (en) Methods and systems for the protection and verification of identities and certificates via the blockchain
CN111414649B (en) Data verification method and system based on block chain
US20210209373A1 (en) Media authentication using distributed ledger
CN108370318B (en) Method and system for blockchain variants using digital signatures
US20160283920A1 (en) Authentication and verification of digital data utilizing blockchain technology
CN111429136B (en) Block chain-based data auditing method and device
US11048690B2 (en) Contribution of multiparty data aggregation using distributed ledger technology
KR101948721B1 (en) Method and apparatus for examining forgery of file by using file hash value
US20200097950A1 (en) Privileged entity consensus for digital asset creation
WO2021174499A1 (en) Blockchain-based data verification method, apparatus and system
CN111753014B (en) Identity authentication method and device based on block chain
CN111414418B (en) Data storage method and device based on block chain
CN111461622B (en) Block chain-based warehouse credit rating, result acquisition and verification method and device
CN111046078A (en) Block chain-based credit investigation query method and device and electronic equipment
CN110347678B (en) Financial data storage method, system, device and equipment
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN115879164A (en) Data verification method, device, equipment and storage medium
US20150081429A1 (en) Method and system for integrating audience data with a social media site
WO2024011863A9 (en) Communication method and apparatus, sim card, electronic device, and terminal device
CN111817859A (en) Data sharing method, device, equipment and storage medium based on zero knowledge proof
CN114398678A (en) Registration verification method and device for preventing electronic file from being tampered, electronic equipment and medium
CN115619395A (en) Data processing method based on block chain and related equipment
CN112115101B (en) Method and system for determinacy deletion of data in cloud storage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant