CN111429136A - Data auditing method and device based on block chain - Google Patents

Data auditing method and device based on block chain Download PDF

Info

Publication number
CN111429136A
CN111429136A CN202010148716.1A CN202010148716A CN111429136A CN 111429136 A CN111429136 A CN 111429136A CN 202010148716 A CN202010148716 A CN 202010148716A CN 111429136 A CN111429136 A CN 111429136A
Authority
CN
China
Prior art keywords
data
hash value
original data
block chain
blockchain
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.)
Granted
Application number
CN202010148716.1A
Other languages
Chinese (zh)
Other versions
CN111429136B (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 aiming at original data; taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end; 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; if yes, first preset information is sent to a data verification end, wherein the first preset information comprises: a storage address in a key value pair that matches the hash value in the query request; if not, sending second preset information to the data verification end, wherein the preset information comprises: a null value. By applying the embodiment of the invention, whether the data is tampered or not can be verified.

Description

Data auditing method and device based on block chain
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 behaviors are more and more appeared in the field of internet.
At present, an invention patent application with the application number of 201810877494.X discloses a monitoring data anti-cheating method, a verification method, a device, a storage medium and a terminal, wherein the monitoring data anti-cheating method 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 to one; sending the storage path and the mapping data to be compared to a data demand side, so that the data demand side 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 demand side, and writing the storage path and the mapping data to be compared into a block chain when the verification result shows that the mapping data to be compared is valid. The technical scheme of the invention can effectively reduce the cheating action on the monitoring data in the data transaction.
However, in the prior art, it can only be guaranteed that the monitored data cannot be tampered after being inspected, when the company a delivers the monitored data to the company B, the company a changes the data in the database, and the company B cannot find that the monitored data is changed, so that the benefit of the company B cannot be guaranteed. In order to avoid the loss of the company B, the company B needs to audit the data during delivery of the database, and if the capacity of the database is large, the auditing process is long; or the data can be submitted to a third party for data auditing, but the possibility of the company a and the third party going through falsification cannot be eliminated, so how to verify whether the data is falsified is an urgent technical problem to be solved.
Disclosure of Invention
The technical problem to be solved by the invention is how to provide a data auditing method, device and system based on a block chain to verify whether data is tampered.
The invention solves the technical problems through 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:
acquiring a hash value aiming at original data, wherein the hash value is generated aiming at the original data by an original data end, and sending the hash value to a block chain so that the block chain stores the hash value on a latest block of the block chain;
taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end, wherein the query request is obtained by the data verification end according to target data corresponding to original data and encoding the hash value, the query request comprises the hash value of the target data, and the target data is data corresponding to the original data;
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;
if yes, first preset information is sent to a data verification end, wherein the first preset information comprises: a storage address in a key value pair that matches the hash value in the query request;
if not, sending second preset information to the data verification end, wherein the preset information comprises: a null value.
Optionally, the obtaining the hash value for the original data includes:
and monitoring the change condition of the blocks on the block chain in real time, and acquiring the hash value aiming at the original data from the blocks when the blocks are newly added on the block chain.
Optionally, when the hash value is sent to the data auditing end, the original data end obtains a timestamp when the original data end obtains the original data, and sends the timestamp to the block chain, so that the block chain stores the hash value and the timestamp in the latest block of the block chain.
Optionally, the step of sending the timestamp to a block chain includes:
splicing the hash value and the timestamp to obtain a spliced result;
sending the spliced result to a block chain;
the block chain stores the hash value and the timestamp on the latest block of the block chain, and the method comprises the following steps:
the blockchain stores the spliced result on the latest block of the blockchain.
Optionally, the block chain receives a hash value for the original data sent by the original data side, and stores the hash value on the latest block of the block chain.
Optionally, when the block chain stores the hash value on the newest block of the block chain, the method further includes:
receiving a time stamp sent by an original data end 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 stores the spliced result in the latest block of the block chain, where 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:
an obtaining module, configured to obtain a hash value for original data;
the generation module is used for taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end, 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 used for 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;
a first sending module, configured to send first preset information to a data verification end if a determination result of the determining module is yes, where the first preset information includes: a storage address in a key value pair that matches the hash value in the query request;
a second sending module, configured to send second preset information to the data verification end if the determination result of the determining module is negative, where the preset information includes: a null value.
Optionally, the obtaining module is configured to:
and monitoring the change condition of the blocks on the block chain in real time, and acquiring the hash value aiming at the original data from the blocks when the blocks are newly added on the block chain.
Optionally, when the hash value is sent to the data auditing end, the original data end obtains a timestamp when the original data end obtains the original data, and sends the timestamp to the block chain, so that the block chain stores the hash value and the timestamp in the latest block of the block chain.
Optionally, the original data end splices the hash value and the timestamp to obtain a spliced result;
sending the spliced result to a block chain;
the block chain stores the hash value and the timestamp on the latest block of the block chain, and the method comprises the following steps:
the blockchain stores the spliced result on the latest block of the blockchain.
Optionally, the block chain receives a hash value for the original data sent by the original data side, and stores the hash value on the latest block of the block chain.
Optionally, when the block chain stores the hash value on the newest block of the block chain, the method further includes:
receiving a time stamp sent by an original data end 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 stores the spliced result in the latest block of the block chain, where 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 correctness of the hash value of the original data is ensured by utilizing the non-falsification of the block chain, so that the data auditing end for data auditing audits the target data corresponding to the original data according to the hash value stored on the block chain, and further, whether the data is falsified or not can be verified.
Another advantage is that the entire blockchain query system is a public platform that is open because only hash values are stored on the blockchain, without the concern of exposing the original data. And if the original data is stored, the platform cannot be a public platform but a private platform, and a data purchasing company can doubts the public trust of the platform, so that the embodiment of the invention can ensure that the data purchasing company can obtain the target data which is not tampered on the premise of not revealing the original data.
Drawings
Fig. 1 is a schematic flowchart of a data auditing method based on a blockchain according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data auditing system based on a blockchain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
In order to fully describe the embodiment of the present invention, the following describes an application scenario of the embodiment of the present invention in advance, and the content is as follows:
before selling a database or certain data, company a takes the data to be sold or the database 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 original data, the original data end performs hash processing on the original data by using a hash algorithm 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 raw data end can be a gateway device of the sensor network. The sensor, the industrial personal computer and the like can transmit the raw data in the JSON format, the character string format or the binary array format to the raw data terminal in the communication modes of wire, wifi, ZigBee and the like.
Then, the hash value is sent to a block chain network, after the block chain network receives the hash value aiming at the original data sent by the original data end, each block node in the block chain is subjected to consensus authentication, a latest block is newly generated on the block chain,
and then, storing the hash value on the latest block of the block chain, enabling the data auditing end to generate a key value pair corresponding to the hash value of the original data, and auditing whether the target data corresponding to the original data is consistent with the original data according to the key value pair. The blockchain may be a public chain, a private chain, or a federation chain.
Then, after receiving the hash value of the original data, the block chain network newly generates a latest block on the block chain, stores the hash value on the latest block of the block chain, enables the data auditing end to generate a key value pair corresponding to the hash value of the original data, and audits whether the target data corresponding to the original data is consistent with the original data according to the key value pair.
Further, after receiving the hash value of the original data, the block chain may compare all hash values stored in the block chain, and generate a latest block on the block chain if the hash values identical to the hash value of the original data are not compared. And under the condition that the hash value identical to the hash value of the original data is compared, taking the hash value identical to the hash value of the original data as a value, taking the address of a block for storing the hash value identical to the hash value of the original data as a main key, and generating a key value pair according to the key and the value for data audit of company B.
Fig. 1 is a block chain-based data auditing method provided in an embodiment of the present invention, as shown in fig. 1, and is applied to a data auditing end, where the method includes:
s101: after a block is newly added to the block chain, the block chain network can send information of 'newly added blocks' to the data auditing end, so that after the data auditing end knows that a new hash value is stored in the block chain, the new hash value and a corresponding address of the block for storing the hash value are read from the block in the block chain.
Further, the data auditing end may monitor whether a new hash value is stored in a new block in the block chain by using an intelligent contract or other technical means, and after knowing that the new hash value is stored in the block chain, the data auditing end reads the new hash value and the corresponding address of the block for storing the hash value from the block in the block chain, takes the address corresponding to the block as a value, and uses the read new hash value as a main 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, thereby improving the working real-time performance of the data auditing end.
S102: the address corresponding to the block is used as a value, the read new hash value is used as a main key, namely, the hash value corresponding to the original data is used as a value to generate key value pairs corresponding to the original data, and then the key value pairs are stored locally. In general, the data auditing end establishes an index table, the key value pair is stored in the index table, then the key value pair corresponding to the hash value of the target data is inquired in the key value pair index table, and then the block address corresponding to the inquired hash value is obtained. The key value pair is used as a basis for carrying out hash value query by the data auditing end when the company B uses the data verifying end to carry out data verification.
S103: after some time of negotiation, for example, several months, company B purchases the database of company a. To ensure that the database purchased by company B is still the database declared by company a before the negotiation. Company B needs to verify the received target data to ensure that the target data is completely consistent with the original data promised by company a. Company B generates a hash value of the target data using the same hash algorithm configured on the data verification side as that used when company a generates the hash value of the original data. And the data verification end encodes the hash value of the target data into the query request and sends the query request to the data auditing end. The data auditing end receives a data query request sent by the data verifying end, wherein the query request comprises a hash value of target data, and the target data is data corresponding to the original data.
Company B receives the data sent by company a, but company B cannot confirm whether the data completely conforms to the original data promised by company a, and therefore, in the embodiment of the present invention, the data received by company B is referred to as target data.
Company B generates a hash value of the target data using the same hash algorithm configured on the data verification side as that used when company a generates the hash value of the original data. And the data verification end encodes the hash value of the target data into the query request and sends the query request to the data auditing end.
S104: after receiving a data query request sent by a data verification end used by company B, a data auditing end analyzes the query request to further 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 on the basis of the hash value of the target data so as to obtain the hash value of the target data contained in the query request, then traverses the locally stored key value pairs on the basis of the hash value of the target data, and compares the hash value in each key value pair with the hash value of the target data; further judging whether the two are consistent until a hash value completely consistent with the hash value of the target data is obtained or all key value pairs are traversed; or traversing each block on the block chain, and comparing the hash value stored in each block with the hash value of the target data; and further judging whether the two are consistent until a hash value 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 completely consistent with the hash value of the target data, the hash value stored in the block is matched with 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 serving as first preset information to a data verification end.
If the result of the judgment is yes, 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, and the address is sent to the data query end used by company B as the first preset information.
S106: if the hash value of the target data which is completely consistent with the hash value of the target data cannot be found, the hash value stored in the block is not matched with the hash value of the target data, and second preset information is sent to a data verification end, wherein the preset information comprises: a null value.
If the judgment result is negative, that is, the data auditing end does not inquire the hash value 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 a null value for convenience. Currently, in practical applications, the second preset information may be a result of determining "no", or information such as "target data is tampered".
It is emphasized that 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 block chain, wherein 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 correctness of the hash value of the original data is ensured by utilizing the non-falsification of the block chain, so that the data auditing end for data auditing audits the target data corresponding to the original data according to the hash value stored on the block chain, and further, whether the data is falsified or not can be verified. Due to the non-tampering characteristic of the block chain, the possibility of data falsification between the company A and a third-party data auditing unit is avoided, and the benefit of the company B is further ensured.
In addition, by applying embodiment 6 of the present invention, the original data end only stores the hash value in the blockchain, and discloses the original data to each node in the blockchain network, so that privacy of the original data can be ensured.
Further, the blockchain network newly generates a latest block on the blockchain after receiving the hash value of the original data and the timestamp corresponding to the original data, and stores the hash value and the timestamp on the latest block of the blockchain.
By applying the embodiment of the invention, when the data auditing end carries out data auditing, the data auditing end can search on the block chain according to the timestamp corresponding to the original data input by the user or the input timestamp range, 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 in 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.
By applying the embodiment of the invention, after the hash value and the timestamp are spliced, compared with the hash value and the timestamp which are respectively stored in the same block, one data head and one data tail can be reduced, and the storage space on a block chain is saved.
In addition to embodiment 1 of the present invention, when the original data end generates the hash value corresponding to the original data, the original data end further obtains a time value corresponding to a time at which the original data end obtains the original data, for example, when the original data end obtains the original data at a time at which 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 block chain network, where the time stamp refers to the total number of milliseconds from 1970, 01, 00, and 00 seconds (1970, 01, 08, 00, and 00 seconds) of greenwich time 1970 to the present.
Then, after receiving the hash value of the original data and the timestamp corresponding to the original data, the blockchain network newly generates a latest block on the blockchain, and stores the hash value and the timestamp on the latest block of the blockchain.
When the data auditing end conducts data auditing, whether the time stamp on the block chain is consistent with the generation time of the target data or not can be verified, and then whether the data is original data or not can be verified by matching with the Hash value. The method can also search on the block chain according to the timestamp input by the user and corresponding to the acquired original data or the input timestamp range, so that the searching speed is increased, and the data auditing speed can be increased.
Further, after receiving the result of the concatenation, the blockchain network generates a new block on the blockchain, and stores the result of the concatenation on the latest block of the blockchain.
Example 2
Fig. 2 is a schematic structural diagram of a data auditing system based on a block chain according to an embodiment of the present invention, and as shown in fig. 2, corresponding to embodiment 1 of the present invention, embodiment 2 of the present invention provides a data auditing apparatus based on a block chain, which is applied to a data auditing end, and the apparatus includes:
an obtaining module, configured to obtain a hash value for original data;
the generation module is used for taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end, 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 used for 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;
a first sending module, configured to send first preset information to a data verification end if a determination result of the determining module is yes, where the first preset information includes: a storage address in a key value pair that matches the hash value in the query request;
a second sending module, configured to send second preset information to the data verification end if the determination result of the determining module is negative, where the preset information includes: a null value.
By applying the embodiment of the invention, the hash value of the original data is stored on the block chain, the correctness of the hash value of the original data is ensured by utilizing the non-falsification 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 data audit is carried out, so that whether the data is falsified or not can be verified.
In a specific implementation manner of the embodiment of the present invention, the obtaining module is configured to:
and monitoring the change condition of the blocks on the block chain in real time, and acquiring the hash value aiming at the original data from the blocks when the blocks are newly added on the block chain.
In a specific implementation manner of the embodiment of the present invention, when the hash value is sent to the data auditing end, the original data end obtains a timestamp when the original data end obtains the original data, and sends the timestamp to the block chain, so that the block chain stores the hash value and the timestamp on the latest block of the block chain.
In a specific implementation manner of the embodiment of the present invention, the original data end splices the hash value and the timestamp to obtain a spliced result;
sending the spliced result to a block chain;
the block chain stores the hash value and the timestamp on the latest block of the block chain, and the method comprises the following steps:
the blockchain stores the spliced result on the latest block of the blockchain.
In a specific implementation manner of the embodiment of the present invention, the block chain receives a hash value for the original data sent by the original data side, and stores the hash value on the latest block of the block chain.
In a specific implementation manner of the embodiment of the present invention, when the block chain stores the hash value on the latest block of the block chain, the method further includes:
receiving a time stamp sent by an original data end 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, the block chain receives a splicing result sent by the original data end, and stores the spliced result in a latest block of the block chain, where the splicing result is obtained by splicing the hash value and the timestamp by the original data end.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A data auditing method based on a block chain is characterized by being applied to a data auditing end, and the method comprises the following steps:
acquiring a hash value aiming at original data, wherein the hash value is generated aiming at the original data by an original data end, and sending the hash value to a block chain so that the block chain stores the hash value on a latest block of the block chain;
taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end, wherein the query request is obtained by the data verification end according to target data corresponding to original data and encoding the hash value, the query request comprises the hash value of the target data, and the target data is data corresponding to the original data;
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;
if yes, first preset information is sent to a data verification end, wherein the first preset information comprises: a storage address in a key value pair that matches the hash value in the query request;
if not, sending second preset information to the data verification end, wherein the preset information comprises: a null value.
2. The method for auditing data based on a blockchain according to claim 1, wherein the obtaining of the hash value for the raw data comprises:
and monitoring the change condition of the blocks on the block chain in real time, and acquiring the hash value aiming at the original data from the blocks when the blocks are newly added on the block chain.
3. The data auditing method based on the blockchain according to claim 1, characterized in that when the original data end sends the hash value to the data auditing end, the original data end obtains the time stamp of the original data end when obtaining 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.
4. The method of claim 3, wherein the step of sending the timestamp to the blockchain comprises:
splicing the hash value and the timestamp to obtain a spliced result;
sending the spliced result to a block chain;
the block chain stores the hash value and the timestamp on the latest block of the block chain, and the method comprises the following steps:
the blockchain stores the spliced result on the latest block of the blockchain.
5. The method of claim 1, wherein the blockchain receives a hash value for the original data sent by an original data end, and the hash value is stored on a latest block of the blockchain.
6. The method of claim 5, wherein when storing the hash value on the latest block of the blockchain, the method further comprises:
receiving a time stamp sent by an original data end 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 method according to claim 6, wherein the blockchain receives a splicing result sent by an original data end, and stores the splicing result in a latest block of the blockchain, wherein the splicing result is obtained by splicing the hash value and the timestamp by the original data end.
8. The utility model provides a data audit device based on blockchain which characterized in that is applied to the data audit end, the device includes:
an obtaining module, configured to obtain a hash value for original data;
the generation module is used for taking the hash value as a main key, acquiring a storage address of the hash value on a block chain, 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 end, 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 used for 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;
a first sending module, configured to send first preset information to a data verification end if a determination result of the determining module is yes, where the first preset information includes: a storage address in a key value pair that matches the hash value in the query request;
a second sending module, configured to send second preset information to the data verification end if the determination result of the determining module is negative, where the preset information includes: a null value.
9. The block chain-based data auditing apparatus according to claim 8, where the obtaining module is configured to:
and monitoring the change condition of the blocks on the block chain in real time, and acquiring the hash value aiming at the original data from the blocks when the blocks are newly added on the block chain.
10. The data auditing device based on the block chain according to claim 8, where the original data side obtains the time stamp of the original data side when obtaining the original data when sending the hash value to the data auditing side, and sends the time stamp to the block chain, so that the block chain stores the hash value and the time stamp on the latest block of the block chain.
11. The data auditing apparatus based on blockchain according to claim 10 where the original data end concatenates the hash value with the timestamp to obtain a concatenated result;
sending the spliced result to a block chain;
the block chain stores the hash value and the timestamp on the latest block of the block chain, and the method comprises the following steps:
the blockchain stores the spliced result on the latest block of the blockchain.
12. The device of claim 8, 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.
13. The apparatus of claim 12, wherein when storing the hash value on the latest block of the blockchain, the method further comprises:
receiving a time stamp sent by an original data end 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 device according to claim 13, wherein the blockchain receives a concatenation result sent by an original data end, and stores the concatenation result in a latest block of the blockchain, wherein the concatenation result is obtained by concatenating the hash value and the timestamp by the original data end.
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 true CN111429136A (en) 2020-07-17
CN111429136B 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)

Cited By (3)

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

Citations (9)

* 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
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
US20190014176A1 (en) * 2017-07-06 2019-01-10 Acronis International Gmbh System and method for service level agreement based data storage and verification
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

Patent Citations (9)

* 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
US20190014176A1 (en) * 2017-07-06 2019-01-10 Acronis International Gmbh System and method for service level agreement based data storage and verification
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
张逸飞;曹少中;杨彦红;: "基于区块链的图书数字版权保护技术研究" *

Cited By (5)

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

Also Published As

Publication number Publication date
CN111429136B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN111414649B (en) Data verification method and system based on block chain
CN112214780B (en) Data processing method and device, intelligent equipment and storage medium
CN109409122B (en) File storage method, electronic device and storage medium
US10560261B1 (en) Systems and techniques for capture of trusted media data
US20210209373A1 (en) Media authentication using distributed ledger
CN108681965B (en) Block chain network transaction processing method and device for offline node
CN109819443B (en) Registration authentication method, device and system based on block chain
CN111429136A (en) Data auditing method and device based on block chain
US11048690B2 (en) Contribution of multiparty data aggregation using distributed ledger technology
WO2021174499A1 (en) Blockchain-based data verification method, apparatus and system
CN111444550A (en) Block chain-based service data verification method and device and readable storage medium
CN108154050B (en) Vehicle condition data management method and device
CN103229479B (en) A kind of website identification method, device and network system
CN111523890A (en) Data processing method and device based on block chain, storage medium and equipment
CN112700251B (en) Identity confirmation method, device and system in financial scene
CN111414418B (en) Data storage method and device based on block chain
CN107612877A (en) Verify the methods, devices and systems of multimedia file legitimacy
CN113129008B (en) Data processing method, device, computer readable medium and electronic equipment
CN113806816A (en) Electronic file management method and device based on block chain and electronic equipment
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
CN116346362A (en) Electronic fidelity verification method and system based on blockchain technology
CN111259452A (en) Data management method based on block chain and related device
CN113297176B (en) Database access method based on Internet of things
CN115330419A (en) Anti-counterfeiting verification method and platform based on block chain and computer readable medium

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