CN111429136B - Block chain-based data auditing method and device - Google Patents

Block chain-based data auditing method and device Download PDF

Info

Publication number
CN111429136B
CN111429136B CN202010148716.1A CN202010148716A CN111429136B CN 111429136 B CN111429136 B CN 111429136B CN 202010148716 A CN202010148716 A CN 202010148716A CN 111429136 B CN111429136 B CN 111429136B
Authority
CN
China
Prior art keywords
blockchain
data
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
CN202010148716.1A
Other languages
Chinese (zh)
Other versions
CN111429136A (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 CN202010148716.1A priority Critical patent/CN111429136B/en
Publication of CN111429136A publication Critical patent/CN111429136A/en
Application granted granted Critical
Publication of CN111429136B publication Critical patent/CN111429136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • 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 auditing method based on a block chain, which is applied to an original data end, and comprises the following steps: acquiring a hash value for original data; taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain, taking the storage address as a value, and generating a key value pair corresponding to the original data; receiving a data query request sent by a data verification terminal; judging whether a key value pair matched with a hash value in the query request can be acquired or not according to the query 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. By applying the embodiment of the invention, whether the data is tampered can be verified.

Description

Block chain-based data auditing method and device
Technical Field
The invention relates to the technical field of data fidelity, in particular to a data auditing 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 auditing method, device and system based on a blockchain 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 auditing method based on a block chain, which is applied to a data auditing end and comprises the following steps:
obtaining a hash value aiming at original data, wherein the hash value is generated for the original data by an original data terminal and is sent to a blockchain so that the blockchain stores the hash value on the latest block of the blockchain;
taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain, taking the storage address as a value, and generating a key value pair corresponding to the original data;
receiving a data query request sent by a data verification terminal, wherein the query request is obtained by the data verification terminal according to target data corresponding to original data, the hash value is obtained by encoding, the query request comprises the hash value of the target data, and the target data is the data corresponding to the original data;
judging whether a key value pair matched with a hash value in the query request can be acquired or not according to the query 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.
Optionally, the obtaining a hash value for 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.
Optionally, when the original data end sends the hash value to the data audit end, the original data end obtains a time stamp when the original data end obtains the original data, and sends 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 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.
Optionally, the block chain receives a hash value for the original data sent by the original data end, and stores the hash value on the latest block of the block chain.
Optionally, when the hash value is stored on the latest block of the blockchain, the method further includes:
and receiving a time stamp sent by the original data terminal when the hash value of the original data is generated, and storing the time stamp and the hash value in the same block.
Optionally, the block chain receives a splicing result sent by the original data end, and the spliced result is stored on the latest block of the block chain, wherein the splicing result is obtained by splicing the hash value and the timestamp by the original data end.
The embodiment of the invention provides a data auditing device based on a block chain, which is applied to a data auditing end and comprises the following components:
the acquisition module is used for acquiring a hash value aiming at the original data;
the generation module is used for taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain and taking the storage address as a value, and generating a key value pair corresponding to the original data;
the receiving module is used for receiving 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 judging module is applied to judging whether a key value pair matched with the hash value in the query request can be acquired or not according to the query request;
the first sending module is configured to send first preset information to the data verification terminal when the judgment result of the judgment module is yes, where the first preset information includes: a storage address in a key value pair that matches a hash value in the query request;
the second sending module is configured to send second preset information to the data verification terminal when the judgment result of the judging module is no, where the preset information includes: null value.
Optionally, the acquiring module 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.
Optionally, when the original data end sends the hash value to the data audit end, the original data end obtains a time stamp when the original data end obtains the original data, and sends 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 original data end splices 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 block chain receives a hash value for the original data sent by the original data end, and stores the hash value on the latest block of the block chain.
Optionally, when the hash value is stored on the latest block of the blockchain, the method further includes:
and receiving a time stamp sent by the original data terminal when the hash value of the original data is generated, and storing the time stamp and the hash value in the same block.
Optionally, the block chain receives a splicing result sent by the original data end, and the spliced result is stored on the latest block of the block chain, wherein the splicing result is obtained by splicing the hash value and the timestamp by the original data end.
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 flow chart of a blockchain-based data auditing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a blockchain-based data auditing system 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
In order to fully explain the embodiment of the present invention, the following describes an application scenario of the embodiment of the present invention in advance, where the following is:
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.
Then, the hash value is sent to a block chain network, after the block chain network receives the hash value for the original data sent by the original data end, each block node in the block chain is subjected to consensus authentication to newly generate a latest block on the block chain,
then, the hash value is stored on the latest block of the block chain, the data auditing end generates a key value pair corresponding to the hash value of the original data, and whether target data corresponding to the original data is consistent with the original data or not is checked according to the key value pair. The blockchain may be a public chain, a private chain, or a federated chain.
Then, after receiving the hash value of the original data, the blockchain network newly generates a 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.
Further, after the blockchain receives the hash value of the original data, all the hash values stored in the blockchain may be compared first, and a latest block is generated in the blockchain under the condition that the hash values identical to 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.
Fig. 1 is a block chain-based data auditing method according to an embodiment of the present invention, as shown in fig. 1, applied to a data auditing end, where the method includes:
s101: after a new block is added to the blockchain, the blockchain network may send information of the "newly added block" to the data auditing end, so that the data auditing end knows that the new hash value is stored in the blockchain, and then reads the new hash value and the corresponding address of the block for storing the hash value from the block on the blockchain.
Further, the data auditing end may monitor whether a new hash value is stored in a new block on the blockchain by using 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 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, and 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 a key value pair corresponding to the original data.
By applying the embodiment of the invention, the data auditing end can actively monitor the block chain network, and the working instantaneity of the data auditing end is improved.
S102: and taking the address corresponding to the block as a value, taking the read new hash value as a primary key, namely taking the hash value corresponding to the original data as a value to generate key value pairs corresponding to the original data, and storing 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.
S103: after a period of negotiations, for example, a few months later, company B purchases a company a's database. To ensure that the database purchased by company B remains the database declared by company a prior to negotiations. The company B needs to verify the received target data to ensure that the target data is completely consistent with the original data promised by the company a. 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. The data audit terminal receives a data query request sent by the 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 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.
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.
S104: 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 auditing end searches and compares key value pairs stored in the data auditing end based on the hash value of the target data, so that the hash value of the target data contained in the inquiry request can be obtained, then the locally stored key value pairs are 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.
S105: if the hash value of the target data is found to be exactly the same, it is indicated that the hash value stored in the block matches the hash value of the target data. And taking the block as a target block, acquiring a block address of the block, and sending the block address as first preset information to a data verification end.
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 from the key value pair stored in the key value pair, 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, and may also include the data amount of the original data, the generation time of the original data, the time of storing the hash value on the block chain, and the like, so that the user can more comprehensively understand the information of the original data.
S106: if the hash value of the target data is not found, indicating that the hash value stored in the block is not matched with the hash value of the target data, and sending second preset information to the data verification terminal, wherein the preset information comprises: null value.
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, 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. 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 6 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.
Further, 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.
By applying the embodiment of the invention, the data auditing terminal can search on the blockchain according to the timestamp corresponding to the original data input by the user or the input timestamp range when conducting data auditing, thereby improving the searching speed and further improving the data auditing speed.
Further, the storing the timestamp and the hash value in the same block includes: and receiving a splicing result sent by the original data end, and storing the spliced result on the latest block of the block chain, wherein the splicing result is obtained by splicing the hash value and the time stamp by the original data end.
By applying the embodiment of the invention, after the hash value and the timestamp are spliced, one data head and one data tail can be reduced compared with the data which are respectively stored in the same block, so that the storage space on a block chain is saved.
On the basis of embodiment 1 of the present invention, when the original data terminal generates the hash value corresponding to the original data, the original data terminal also obtains the time value corresponding to the time when the original data terminal obtains the original data, for example, when the original data terminal obtains the original data at the time when the time stamp value is a, the time stamp a is used as the 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, where the time stamp refers to the total number of milliseconds from the greenwich time 1970, 01, 00 minutes, 00 seconds (Beijing time 1970, 01, 08, 00 minutes, 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.
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, the blockchain network generates a new block on the blockchain after receiving the spliced result, and stores the spliced result on the latest block of the blockchain.
Example 2
Fig. 2 is a schematic structural diagram of a data auditing system based on a blockchain, where, as shown in fig. 2, corresponding to embodiment 1 of the present invention, embodiment 2 of the present invention provides a data auditing device based on a blockchain, applied to a data auditing end, and the device includes:
the acquisition module is used for acquiring a hash value aiming at the original data;
the generation module is used for taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain and taking the storage address as a value, and generating a key value pair corresponding to the original data;
the receiving module is used for receiving 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 judging module is applied to judging whether a key value pair matched with the hash value in the query request can be acquired or not according to the query request;
the first sending module is configured to send first preset information to the data verification terminal when the judgment result of the judgment module is yes, where the first preset information includes: a storage address in a key value pair that matches a hash value in the query request;
the second sending module is configured to send second preset information to the data verification terminal when the judgment result of the judging module is no, where the preset information includes: null value.
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.
In a specific implementation manner of the embodiment of the present invention, the obtaining module 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.
In a specific implementation manner of the embodiment of the present invention, when the original data end sends the hash value to the data audit end, a timestamp of when the original data end obtains the original data is obtained, and the timestamp is sent to the blockchain, so that the blockchain stores the hash value and the timestamp on the latest block of the blockchain.
In a specific implementation manner of the embodiment of the invention, an original data end splices a hash value and a timestamp 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 of the embodiment of the present invention, the block chain receives a hash value for the original data sent by the original data end, and stores the hash value on the latest block of the block chain.
In a specific implementation of the embodiment of the present invention, when the hash value is stored on the latest block of the blockchain, the method further includes:
and receiving a time stamp sent by the original data terminal when the hash value of the original data is generated, and storing the time stamp and the hash value in the same block.
In a specific implementation manner of the embodiment of the present invention, a block link receives a splicing result sent by an original data end, and the spliced result is stored on a latest block of the block link, where the splicing result is obtained by splicing a hash value and a timestamp by the original data end.
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 (14)

1. A blockchain-based data auditing method, characterized by being applied to a data auditing end, the method comprising:
obtaining a hash value aiming at original data, wherein the hash value is generated for the original data by an original data terminal and is sent to a blockchain so that the blockchain stores the hash value on the latest block of the blockchain;
taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain, taking the storage address as a value, and generating a key value pair corresponding to the original data;
receiving a data query request sent by a data verification terminal, wherein the query request is obtained by the data verification terminal according to target data corresponding to original data, the hash value is obtained by encoding, the query request comprises the hash value of the target data, and the target data is the data corresponding to the original data;
judging whether a key value pair matched with a hash value in the query request can be acquired or not according to the query 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.
2. The blockchain-based data auditing method of claim 1, wherein the obtaining a hash value for 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.
3. The blockchain-based data auditing method according to claim 1, wherein when the original data terminal sends the hash value to the data auditing terminal, a timestamp of when the original data terminal obtains the original data is obtained, and the timestamp is sent to the blockchain, so that the blockchain stores the hash value and the timestamp on the latest block of the blockchain.
4. A blockchain-based data auditing method as in claim 3, wherein 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.
5. The blockchain-based data auditing method of claim 1, wherein the blockchain receives a hash value for the original data sent by the original data side, and the hash value is stored on a latest block of the blockchain.
6. The blockchain-based data auditing method of claim 5, wherein the blockchain, when storing the hash value on a latest block of the blockchain, further comprises:
and receiving a time stamp sent by the original data terminal when the hash value of the original data is generated, and storing the time stamp and the hash value in the same block.
7. The blockchain-based data auditing method according to claim 6, wherein the blockchain receives a splicing result sent by an original data terminal, and the spliced result is stored on a latest block of the blockchain, wherein the splicing result is obtained by splicing a hash value and a time stamp by the original data terminal.
8. A blockchain-based data auditing apparatus, for use at a data auditing end, the apparatus comprising:
the acquisition module is used for acquiring a hash value aiming at the original data;
the generation module is used for taking the hash value as a primary key, acquiring a storage address of the hash value on a blockchain and taking the storage address as a value, and generating a key value pair corresponding to the original data;
the receiving module is used for receiving 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 judging module is applied to judging whether a key value pair matched with the hash value in the query request can be acquired or not according to the query request;
the first sending module is configured to send first preset information to the data verification terminal when the judgment result of the judgment module is yes, where the first preset information includes: a storage address in a key value pair that matches a hash value in the query request;
the second sending module is configured to send second preset information to the data verification terminal when the judgment result of the judging module is no, where the preset information includes: null value.
9. The blockchain-based data auditing apparatus of claim 8, wherein the acquisition module 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.
10. The blockchain-based data auditing apparatus of claim 8, wherein when the original data side sends the hash value to the data auditing side, the timestamp of the original data side when the original data side obtained the original data is obtained, and the timestamp is sent to the blockchain, so that the blockchain stores the hash value and the timestamp on a latest block of the blockchain.
11. The blockchain-based data auditing device according to claim 10, wherein the original data terminal splices the hash value with the timestamp 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.
12. The blockchain-based data auditing apparatus of claim 8, wherein the blockchain receives a hash value for the original data sent by the original data side, and stores the hash value on a latest block of the blockchain.
13. The blockchain-based data auditing apparatus of claim 12, wherein the blockchain, when storing the hash value on a latest block of the blockchain, further comprises:
and receiving a time stamp sent by the original data terminal when the hash value of the original data is generated, and storing the time stamp and the hash value in the same block.
14. The blockchain-based data auditing device according to claim 13, wherein the blockchain receives a splicing result sent by an original data terminal, and the spliced result is stored on a latest block of the blockchain, wherein the splicing result is obtained by splicing a hash value and a timestamp by the original data terminal.
CN202010148716.1A 2020-03-05 2020-03-05 Block chain-based data auditing method and device Active CN111429136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148716.1A CN111429136B (en) 2020-03-05 2020-03-05 Block chain-based data auditing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148716.1A CN111429136B (en) 2020-03-05 2020-03-05 Block chain-based data auditing method and device

Publications (2)

Publication Number Publication Date
CN111429136A CN111429136A (en) 2020-07-17
CN111429136B true CN111429136B (en) 2023-04-28

Family

ID=71546208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148716.1A Active CN111429136B (en) 2020-03-05 2020-03-05 Block chain-based data auditing method and device

Country Status (1)

Country Link
CN (1) CN111429136B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884488B (en) * 2021-02-22 2024-03-22 湖南大学 Block chain-based fraud prevention crowd funding method and system
CN113239255B (en) * 2021-05-13 2022-08-05 杭州趣链科技有限公司 Heterogeneous data resource sharing method and device, computer equipment and medium
CN113411191B (en) * 2021-08-20 2021-11-23 深圳前海微众银行股份有限公司 Data auditing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107508806A (en) * 2017-08-11 2017-12-22 北京理工大学 Internet financial electronic data safety system and method based on block chain
CN109145651A (en) * 2018-08-22 2019-01-04 何晓行 A kind of data processing method and device
CN109409122A (en) * 2018-09-13 2019-03-01 远光软件股份有限公司 File memory method and its electronic equipment, storage medium
CN109639410A (en) * 2018-10-31 2019-04-16 阿里巴巴集团控股有限公司 Data based on block chain deposit card method and device, electronic equipment
CN110223064A (en) * 2019-05-27 2019-09-10 四川大学 A kind of undeniable safety data transmission method based on block chain
JP2019161580A (en) * 2018-03-16 2019-09-19 日本電気株式会社 Data transmission device, data transmission/reception system, data reception device, data transmission method, and program
CN110263579A (en) * 2018-11-16 2019-09-20 腾讯科技(深圳)有限公司 A kind of data processing method, system and relevant device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160283920A1 (en) * 2015-03-28 2016-09-29 Justin Fisher Authentication and verification of digital data utilizing blockchain technology
US10554753B2 (en) * 2017-07-06 2020-02-04 Acronis International Gmbh System and method for service level agreement based data storage and verification

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107508806A (en) * 2017-08-11 2017-12-22 北京理工大学 Internet financial electronic data safety system and method based on block chain
JP2019161580A (en) * 2018-03-16 2019-09-19 日本電気株式会社 Data transmission device, data transmission/reception system, data reception device, data transmission method, and program
CN109145651A (en) * 2018-08-22 2019-01-04 何晓行 A kind of data processing method and device
CN109409122A (en) * 2018-09-13 2019-03-01 远光软件股份有限公司 File memory method and its electronic equipment, storage medium
CN109639410A (en) * 2018-10-31 2019-04-16 阿里巴巴集团控股有限公司 Data based on block chain deposit card method and device, electronic equipment
CN110263579A (en) * 2018-11-16 2019-09-20 腾讯科技(深圳)有限公司 A kind of data processing method, system and relevant device
CN110223064A (en) * 2019-05-27 2019-09-10 四川大学 A kind of undeniable safety data transmission method based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张逸飞 ; 曹少中 ; 杨彦红 ; .基于区块链的图书数字版权保护技术研究.北京印刷学院学报.2019,(03),全文. *

Also Published As

Publication number Publication date
CN111429136A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN112214780B (en) Data processing method and device, intelligent equipment and storage medium
CN111414649B (en) Data verification method and system based on block chain
CN111429136B (en) Block chain-based data auditing method and device
US20220020001A1 (en) Decisional Architectures in Blockchain Environments
US11501533B2 (en) Media authentication using distributed ledger
CN108665372B (en) Information processing, inquiring and storing method and device based on block chain
CN113691597B (en) Block chain contract deployment method, device, equipment and storage medium
US11048690B2 (en) Contribution of multiparty data aggregation using distributed ledger technology
CA3087297A1 (en) Blockchain-based data verification method and apparatus, and electronic device
KR101948721B1 (en) Method and apparatus for examining forgery of file by using file hash value
CN111444550A (en) Block chain-based service data verification method and device and readable storage medium
WO2021174499A1 (en) Blockchain-based data verification method, apparatus and system
CN111461622B (en) Block chain-based warehouse credit rating, result acquisition and verification method and device
CN111414418B (en) Data storage method and device based on block chain
CN111459935B (en) Internet of things data storage method, storage system, query method and storage medium
US20120239937A1 (en) Information processing device, computer program product, and access control system
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN115879164A (en) Data verification method, device, equipment and storage medium
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
CN113792102A (en) Service processing method based on block chain, electronic device and storage medium
CN115221532A (en) Method and system for storing resource bill data, computer equipment and storage medium
CN110704451A (en) Ownership registration and evidence-providing method and device based on block chain
CN115208640B (en) Named data networking public key management method based on blockchain intelligent contract
US20230239153A1 (en) System and method for digital proof generation

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