CN112929154B - Block chain audit tracing method and system applied to third terminal and electronic equipment - Google Patents

Block chain audit tracing method and system applied to third terminal and electronic equipment Download PDF

Info

Publication number
CN112929154B
CN112929154B CN202011605453.9A CN202011605453A CN112929154B CN 112929154 B CN112929154 B CN 112929154B CN 202011605453 A CN202011605453 A CN 202011605453A CN 112929154 B CN112929154 B CN 112929154B
Authority
CN
China
Prior art keywords
data
hash value
value
blockchain
terminal
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
CN202011605453.9A
Other languages
Chinese (zh)
Other versions
CN112929154A (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
Filing date
Publication date
Application filed by Hefei DappWorks Technology Co Ltd filed Critical Hefei DappWorks Technology Co Ltd
Priority to CN202011605453.9A priority Critical patent/CN112929154B/en
Publication of CN112929154A publication Critical patent/CN112929154A/en
Application granted granted Critical
Publication of CN112929154B publication Critical patent/CN112929154B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a blockchain audit tracing method, a system and electronic equipment applied to a third terminal, which comprise the following steps: and acquiring a data record to be subjected to traceability audit from a database, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is real or not based on the data stored in the block chain, if so, determining that the data record is real data, and if not, determining that the data record is possibly tampered. According to the invention, the Beidou short message is used for transmitting the hash value, so that the data uplink operation can be performed in an environment in which internet communication cannot be performed, and meanwhile, the block chain is used for recording the hash value, so that the tamper-proof and traceability characteristics of the data are ensured, and the privacy of the original data is ensured.

Description

Block chain audit tracing method and system applied to third terminal and electronic equipment
Technical Field
The invention relates to the technical field of blockchains, in particular to a blockchain audit tracing method, a blockchain audit tracing system and electronic equipment applied to a third terminal.
Background
Blockchain is a distributed billing technique. Because the blockchain has the advantages of decentralization, non-falsification and no third party trust guarantee, the blockchain is widely valued. The use of the data non-tamperable nature of a blockchain to enable the traceability of supply chains is one of the important applications of blockchains in various industries. Through the close combination of technologies such as blockchain and the Internet of things, a commodity quality management mode is innovated based on the characteristic that data cannot be tampered, commodity production information intercommunication sharing efficiency is enhanced, whole-process commodity quality tracing, supervision and whole-chain management are realized, information is contacted with enterprises, consumers and governments, and product quality and management efficiency of a supply chain are comprehensively improved.
However, the traceability of supply chain data relies on the uploading of raw data by the internet of things device. In an environment that some internet of things equipment cannot be connected with a network, original data cannot be uploaded to the data at the first time through the Internet, so that the possibility of the purpose that the data cannot be tampered by using a blockchain to store the data is cut off from the source, and the fact that the data is not tampered cannot be guaranteed.
In the prior patent, for example, the invention patent application with the application number of CN201810906021.8 discloses a block chain system based on Beidou satellite radio measurement service (RDSS) and an implementation method thereof, wherein the block chain system comprises a plurality of Beidou RDSS terminals and Beidou satellites which are connected with block chain link points; when the packing node generates a block, broadcasting the complete block through the Internet, transmitting the block header to a Beidou satellite through the Beidou RDSS terminal by utilizing the packing node, and broadcasting the block header to other nodes by utilizing a superframe format after the Beidou satellite receives data; and the Beidou RDSS terminals of other nodes calculate the block head and the accurate time during broadcasting, and the Beidou broadcasting time is recorded in a time stamp (TimeStamp) field of the new block structure, so that the Beidou block head is obtained. The patent scheme is mainly applied to the problem that the real generation time of a block cannot be accurately known due to the existence of network delay, and the problem of traceability of network-free communication cannot be solved;
In another example, the patent application number is CN201811237478.0 discloses a safety protection method and a device for marine combat data based on a block chain, wherein the method comprises the following steps: constructing a block chain-based offshore military information system model; gradually designing a high-efficiency verifiable PoS consensus mechanism from static to dynamic; constructing a trusted data storage mechanism with high dynamic network characteristics; constructing an attack tracing and tracing responsibility-pursuing mechanism; and constructing a privacy protection mechanism of the data trusted storage. The method aims at the demands of distributed trusted storage, privacy protection, attack tracing and the like of the maritime formation combat data, but in the patent scheme, the manner of tracing the data is completely different from that of the invention.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defect that in an environment where the Internet of things equipment cannot be connected with a network, a blockchain is utilized to store data, but the data cannot be ensured to be untampered.
The invention solves the technical problems by the following technical means:
A blockchain audit tracing method is applied to a third terminal and comprises the following steps:
and acquiring a data record to be subjected to traceability audit from a database, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is real or not based on the data stored in the block chain, if so, determining that the data record is real data, and if not, determining that the data record is possibly tampered.
And judging whether the second hash value is true or not, wherein the possibility that the data is attacked and tampered in the transmission process of Beidou communication is provided.
As a further scheme of the invention: the determining whether the second hash value is authentic based on the stored data in the blockchain includes: querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
As a further scheme of the invention: querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
As a further scheme of the invention: the format of the data record is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
As a further scheme of the invention: the format of the second data is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
As a further scheme of the invention: the database of the first terminal stores a signature result and a first hash value;
and the signature result and the first hash value are obtained by the first terminal in real time, the first hash value is obtained by carrying out hash calculation on the first data, the first hash value is signed by utilizing the private key, and meanwhile, the signature result and the first hash value are stored in the database.
A blockchain audit tracing system is applied to a third terminal and comprises:
The traceability audit module is used for acquiring a data record to be subjected to traceability audit from the first terminal database, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is real or not based on the data stored in the blockchain, if so, determining that the data record is real data, and if not, determining that the data record is possibly tampered.
As a further scheme of the invention: the determining whether the second hash value is authentic based on the stored data in the blockchain includes: querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
As a further scheme of the invention: querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
An electronic device includes a memory and a processor; wherein the memory is to store one or more computer instructions, wherein the one or more computer instructions are to be executed by the processor to implement a blockchain audit trail method as claimed in any of the claims.
The invention has the advantages that:
1. And judging whether the second hash value is true or not, wherein the possibility that the data is attacked and tampered in the transmission process of Beidou communication is provided.
2. According to the invention, the Beidou short message is used for data transmission, so that the data uplink operation can be realized in an environment where Internet communication cannot be performed.
3. In the invention, hash calculation is adopted for compressing each group of data, thereby greatly reducing the data quantity required to be transmitted by the Beidou short message, enabling the transmission of multiple groups of data at one time, and greatly improving the data uplink frequency.
4. According to the invention, the Beidou short message is used for transmitting the hash value, so that the data uplink operation can be performed in an environment in which internet communication cannot be performed, and meanwhile, the block chain is used for recording the hash value, so that the tamper-proof and traceability characteristics of the data are ensured, and the privacy of the original data is ensured.
Drawings
Fig. 1 is a flow chart of a blockchain audit tracing method provided in embodiment 1 of the present invention.
Fig. 2 is a flowchart of a blockchain audit tracing method provided in embodiment 2 of the present invention.
Fig. 3 is a flowchart of a blockchain audit tracing method provided in embodiment 3 of the present invention.
Fig. 4 is a flowchart of a blockchain audit tracing method provided in embodiment 4 of the present invention.
Fig. 5 is a schematic structural diagram of a blockchain audit tracing system provided in embodiment 5 of the present invention.
Fig. 6 shows a block diagram of a device according to an embodiment of the present disclosure.
FIG. 7 is a schematic diagram of a computer system suitable for use in implementing a blockchain audit trail method according to an embodiment of the present disclosure.
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.
In some of the flows described in the specification and claims of this disclosure and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 10, 11, etc. is merely for distinguishing between the various operations, and that the order of execution does not itself represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
According to the technical scheme provided by the embodiment of the disclosure, first data are obtained in real time through a first terminal, hash calculation is performed on the first data to obtain a first hash value, the first hash value is signed by a private key, a signature result is sent to a second terminal in a short message form, and meanwhile, the signature result and the first hash value are stored in a database; the second terminal receives the short message, reads the signature result, analyzes the signature result by using the public key, reads the first hash value if the analysis is successful, packages the signature result and the first hash value into a transaction, and sends the transaction to the blockchain for storage; if analysis fails, the first data is tampered in the transmission process; the third terminal acquires a data record to be subjected to traceability audit from the database of the first terminal, extracts second data from the data record, carries out hash calculation to obtain a second hash value, judges whether the second hash value is true or not, if true, the data record is true, and if not true, the data record is possibly tampered.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a blockchain audit tracing method provided in embodiment 1 of the present invention, and fig. 1 schematically illustrates an exemplary system architecture to which a blockchain consensus achieving method and apparatus may be applied according to an embodiment of the present invention. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present invention may be applied to help those skilled in the art understand the technical content of the present invention (fig. 2, 3, 4, etc. are also only examples), but it does not mean that the embodiments of the present invention may not be used in other devices, systems, environments or scenarios. The method comprises the following steps:
S10, a first terminal acquires first data in real time, carries out hash calculation on the first data to obtain a first hash value, signs the first hash value by using a private key, sends a signature result to a second terminal in a short message form, and simultaneously stores the signature result and the first hash value in a database;
S11, the second terminal receives the short message, reads the signature result, analyzes the signature result by using the public key, reads the first hash value if the analysis is successful, packages the signature result and the first hash value into a transaction, and sends the transaction to the blockchain for storage; if analysis fails, the first data is tampered in the transmission process;
S12, the third terminal acquires a data record to be subjected to source tracing audit from a database of the first terminal, extracts second data from the data record, carries out hash calculation to obtain a second hash value, judges whether the second hash value is true or not based on data stored in the blockchain, if true, the data record is true, and if not, the data record is possibly tampered.
In step S10, the first data includes sensor data, current positioning data.
The first terminal receiving the first data in real time includes: the first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained.
It should be noted that in the embodiment of the present disclosure, the first terminal is mainly installed in an environment where networking is impossible, such as an ocean going ship, and at this time, a plurality of corresponding sensors are installed on the ocean going ship, and longitude and latitude data of the current ship can be obtained through a first Beidou communication module built in the first terminal.
The sensor can comprise a temperature sensor, a speed sensor and the like, the arrangement position of the sensor equipment can be selected according to actual conditions, the scheme of the embodiment of the disclosure mainly aims at ocean going ships, and when the sensor is applied to other scenes, the type of the sensor can be selected according to the actual conditions.
The format of the first hash value is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value), where N is any positive integer.
The storage format of the signature result and the first hash value is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
In step S11, the second terminal receives the short message through the built-in second beidou communication module.
The step S10 is used for uploading data in the non-networked area and is matched with the step S11, so that whether the data is attacked to be tampered or not in the process of judging the data to be uplink in the networked land area is realized.
In step S12, the determining whether the second hash value is true based on the data stored in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
Wherein querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
Through step S12, the possibility that the data is tampered in the transmission process of Beidou communication is eliminated.
In addition, in step S12,
The format of the data record is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
The format of the second data is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
Specifically, in order to more conveniently understand the steps of embodiment 1 of the present disclosure, the following description will be given with a first terminal and a second terminal built-in module:
In step S10, the first terminal receives sensor data sent by a plurality of sensors in real time through a built-in first data processing module; meanwhile, a built-in first data processing module sends a current positioning information acquisition request to a first Beidou communication module, the first Beidou communication module responds to the current positioning information acquisition request and calculates current longitude and latitude data, so that current positioning information is acquired and sent to the first data processing module, the first data processing module calculates the current positioning information and sensor data through hashing to acquire a first hash value, a signature module built-in the first terminal acquires the first hash value and signs the first hash value, a signature result is sent to the first data processing module, the first data processing module stores (the first hash value signs, position information+ (first sensor equipment ID+first sensor numerical value) + (second sensor equipment ID+second sensor numerical value)) … … (N sensor equipment ID+N sensor numerical value) to a database module, and meanwhile, the first Beidou communication module sends the signature result to a second Beidou communication module built-in the second terminal in a short message mode.
In step S11, the second beidou communication module receives the short message and sends the short message to a second data processing module built in the second terminal, the second data processing module analyzes the short message and reads the signed first hash value in the short message, then sends the first hash value to a data verification module built in the second terminal, and the data verification module uses a corresponding public key to analyze the signed data, so as to read the first hash value in the signed data; if analysis fails, indicating that the data is tampered in the transmission process; if the analysis is successful, the hash value is sent to a second data processing module, the second data processing module signs the hash value, and the first hash value is packaged into a transaction in a format of (first hash value signature, first hash value) and is sent to a blockchain for storage.
Example 2
Referring to fig. 2, fig. 2 is a flow chart of a blockchain audit tracing method provided in embodiment 2 of the present invention, where the blockchain audit tracing method is applied to a first terminal, and includes the following steps:
S20, acquiring first data in real time, carrying out hash calculation on the first data to obtain a first hash value, signing the first hash value by using a private key, sending a signature result to a second terminal in a short message form for verification, and simultaneously storing the signature result and the first hash value into a database;
In step S20, the first data includes sensor data, current positioning data.
The first terminal receiving the first data in real time includes: the first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained.
It should be noted that in the embodiment of the present disclosure, the first terminal is mainly installed in an environment where networking is not possible, such as an ocean going ship, and at this time, a corresponding plurality of sensors are installed on the ocean going ship, and longitude and latitude data of the current ship can be obtained through the first Beidou communication module.
The sensor can comprise a temperature sensor, a speed sensor and the like, the arrangement position of the sensor equipment can be selected according to actual conditions, the scheme of the embodiment of the disclosure mainly aims at ocean going ships, and when the sensor is applied to other scenes, the type of the sensor can be selected according to the actual conditions.
The format of the first hash value is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value), where N is any positive integer.
The storage format of the signature result and the first hash value is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
In this step, the second terminal performs authentication including: the second terminal receives the short message, reads the signature result, analyzes the signature result by using the public key, reads the first hash value if the analysis is successful, packages the signature result and the first hash value into a transaction, and sends the transaction to the blockchain for storage;
if the analysis fails, the first data is tampered in the transmission process.
Example 3
Referring to fig. 3, fig. 3 is a flow chart of a blockchain audit tracing method provided in embodiment 3 of the present invention, where the blockchain audit tracing method is applied to a second terminal, and includes:
S30, receiving a short message sent by the first terminal, reading a signature result, analyzing the signature result by using a public key, if the analysis is successful, reading a first hash value, packaging the signature result and the first hash value into a transaction, and sending the transaction to a blockchain for storage; if the analysis fails, the first data is tampered in the transmission process.
Example 4
Referring to fig. 4, fig. 4 is a flow chart of a blockchain audit tracing method provided in embodiment 4 of the present invention, where the blockchain audit tracing method is applied to a third terminal, and includes:
S40, acquiring a data record to be subjected to traceability audit from a database, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is true or not based on the data stored in the block chain, if true, judging that the data record is true, and if not, judging that the data record is possibly tampered.
Wherein the determining whether the second hash value is authentic based on the stored data in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
Querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
In addition, the format of the data record is: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
The format of the second data is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
Example 5
Referring to fig. 5, fig. 5 is a schematic structural diagram of a blockchain audit tracing system according to an embodiment of the disclosure, where the blockchain audit tracing system includes:
The data uploading module 401 is configured to enable a first terminal to obtain first data in real time, perform hash computation on the first data to obtain a first hash value, sign the first hash value by using a private key, send a signature result to a second terminal in a short message form, and store the signature result and the first hash value together in a database;
The parsing module 402 is configured to enable the second terminal to receive the short message and read the signature result, parse the signature result using the public key, read the first hash value if parsing is successful, package the signature result and the first hash value into a transaction, and send the transaction to the blockchain for storage; if analysis fails, the first data is tampered in the transmission process;
the verification module 403 is configured to enable the third terminal to obtain a data record to be subjected to source tracing audit from a database in the first terminal, extract second data from the data record, perform hash calculation to obtain a second hash value, determine whether the second hash value is true based on data stored in the blockchain, if true, the data record is true, and if not true, the data record is possibly tampered.
Specifically, in the data uploading module 401, the first data includes sensor data and current positioning data.
The first terminal receiving the first data in real time includes: the first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained.
It should be noted that in the embodiment of the present disclosure, the first terminal is mainly installed in an environment where networking is not possible, such as an ocean going ship, and at this time, a corresponding plurality of sensors are installed on the ocean going ship, and longitude and latitude data of the current ship can be obtained through the first Beidou communication module.
The sensor can comprise a temperature sensor, a speed sensor and the like, the arrangement position of the sensor equipment can be selected according to actual conditions, the scheme of the embodiment of the disclosure mainly aims at ocean going ships, and when the sensor is applied to other scenes, the type of the sensor can be selected according to the actual conditions.
The format of the first hash value is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value), where N is any positive integer.
The storage format of the signature result and the first hash value is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
In the verification module 403, the determining whether the second hash value is authentic based on the data stored in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
Wherein querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
In addition, in the authentication module 403,
The format of the data record is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
The format of the second data is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
Example 6
A blockchain audit tracing system is applied to a first terminal and comprises:
the acquisition module is used for enabling the first terminal to acquire first data in real time, carrying out hash calculation on the first data to obtain a first hash value, signing the first hash value by using a private key, sending a signature result to the second terminal for verification in a short message mode, and simultaneously storing the signature result and the first hash value in a database.
In the acquisition module, the first data includes sensor data, current positioning data.
The first terminal receiving the first data in real time includes: the first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained.
It should be noted that in the embodiment of the present disclosure, the first terminal is mainly installed in an environment where networking is not possible, such as an ocean going ship, and at this time, a corresponding plurality of sensors are installed on the ocean going ship, and longitude and latitude data of the current ship can be obtained through the first Beidou communication module.
The sensor can comprise a temperature sensor, a speed sensor and the like, the arrangement position of the sensor equipment can be selected according to actual conditions, the scheme of the embodiment of the disclosure mainly aims at ocean going ships, and when the sensor is applied to other scenes, the type of the sensor can be selected according to the actual conditions.
The format of the first hash value is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value), where N is any positive integer.
The storage format of the signature result and the first hash value is as follows: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
The second terminal performs authentication including: the second terminal receives the short message, reads the signature result, analyzes the signature result by using the public key, reads the first hash value if the analysis is successful, packages the signature result and the first hash value into a transaction, and sends the transaction to the blockchain for storage;
if the analysis fails, the first data is tampered in the transmission process.
Example 7
A blockchain audit tracing system is applied to a third terminal and comprises:
The traceability audit module is used for acquiring a data record to be subjected to traceability audit from a database in the first terminal, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is true or not based on the data stored in the blockchain, if true, determining that the data record is true, and if not, determining that the data record is possibly tampered.
Wherein the determining whether the second hash value is authentic based on the stored data in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered.
Querying the blockchain for a value corresponding to the second hash value includes: and querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key.
In addition, the format of the data record is: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
The format of the second data is as follows: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
It should be noted that, the present invention is mainly aimed at tracing the supply chain data under the condition that the internet of things equipment cannot access the internet, so as to facilitate understanding of the present invention, for example, the present invention is as follows: when the ocean-going ship is transported in ocean-going navigation, the first terminal is installed on the ocean-going ship under the condition of large ocean-going navigation without coverage of a range of a mobile signal tower, and the second terminal is installed in a region which can be networked (such as a land which can be networked), but it is to be understood that the invention is not only applicable to the ocean-going ship.
The first terminal is usually a system device installed on a ship, such as a computer terminal, a mobile phone, a tablet, a portable wearable device, etc. installed with a ship data uplink system;
The second terminal is typically a system device installed in a region where networking is possible, such as a computer terminal, a mobile phone, a tablet, a portable wearable device, etc.
The third terminal is an authentication device, and may be a computer terminal, a mobile phone, a tablet, a portable wearable device, etc.
Fig. 6 shows a block diagram of a device according to an embodiment of the present disclosure.
The foregoing embodiments describe the internal functions and structures of the first terminal, the second terminal, the third terminal, etc., which in one possible design may be implemented as an electronic device, which electronic device 600 may include a processor 601 and a memory 602.
The memory 602 is configured to store a program for supporting a processor to perform the block chain audit trail method of any of the above embodiments, and the processor 601 is configured to execute the program stored in the memory 602.
The memory 602 is configured to store one or more computer instructions that are executed by the processor 601 to implement the steps in embodiment 1: s10, S11 and S12; or step S20 in embodiment 2, or step S30 in embodiment 3, or step S40 in embodiment 4.
FIG. 7 is a schematic diagram of a computer system suitable for use in implementing a blockchain audit trail method according to an embodiment of the present disclosure.
As shown in fig. 7, the computer system 1000 includes a processor (CPU, GPU, FPGA or the like) 1001, which can execute part or all of the processing in the embodiment shown in the above-described drawings according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage portion 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data required for the operation of the system 1000 are also stored. The processor 1001, the ROM1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
In particular, according to embodiments of the present disclosure, the method described above with reference to the drawings may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method in the accompanying drawings. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the terminal in the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
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 (5)

1. The blockchain audit tracing method is applied to a third terminal and is characterized by comprising the following steps:
acquiring a data record to be subjected to traceability audit from a database of a first terminal, extracting second data from the data record, performing hash calculation to obtain a second hash value, judging whether the second hash value is true or not based on data stored in the blockchain, if true, determining that the data record is true data, and if not true, determining that the data record is possibly tampered;
the determining whether the second hash value is authentic based on the stored data in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered;
Querying a value corresponding to a second hash value in the blockchain includes: querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key;
The database of the first terminal stores a signature result and a first hash value;
the signature result and the first hash value are obtained by the first terminal in real time, the first data are subjected to hash calculation to obtain the first hash value, the first hash value is signed by using a private key, and meanwhile the signature result and the first hash value are stored in a database;
The first terminal receiving the first data in real time includes: the method comprises the steps that a first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained;
A second Beidou communication module is arranged in the second terminal, the second terminal receives the short message and reads a signature result, the signature result is analyzed by using a public key, if the analysis is successful, a first hash value is read, and the signature result and the first hash value are packaged into a transaction and sent to a block chain for storage; if the analysis fails, the first data is tampered in the transmission process.
2. The blockchain audit trail method of claim 1, wherein the format of the data record is: first hash value signature, location information + (first sensor device ID + first sensor value) + (second sensor device ID + second sensor value) … … (nth sensor device ID + nth sensor value).
3. The blockchain audit trail method of claim 1, wherein the format of the second data is: position information+ (first sensor device id+first sensor value) + (second sensor device id+second sensor value) … … (nth sensor device id+nth sensor value).
4. The blockchain audit traceability system is applied to a third terminal and is characterized by comprising:
The traceability audit module is used for acquiring a data record to be subjected to traceability audit from the first terminal database, extracting second data from the data record, carrying out hash calculation to obtain a second hash value, judging whether the second hash value is real or not based on the data stored in the blockchain, if so, determining that the data record is real data, and if not, determining that the data record is possibly tampered;
the determining whether the second hash value is authentic based on the stored data in the blockchain includes:
querying a value corresponding to the second hash value in the blockchain, and if the value is not queried, the data record is possibly tampered;
If the corresponding value is inquired, judging whether the corresponding value is consistent with the second hash value or not;
If the data record is consistent, the data record is real data, and if the data record is inconsistent, the data record is possibly tampered;
Querying the blockchain for a value corresponding to the second hash value includes: querying a value corresponding to the second hash value in the blockchain by using the hash value signature as a key;
The database of the first terminal stores a signature result and a first hash value;
the signature result and the first hash value are obtained by the first terminal in real time, the first data are subjected to hash calculation to obtain the first hash value, the first hash value is signed by using a private key, and meanwhile the signature result and the first hash value are stored in a database;
The first terminal receiving the first data in real time includes: the method comprises the steps that a first terminal receives sensor data sent by a plurality of sensors in real time, and calculates current longitude and latitude data through a built-in first Beidou communication module, so that current positioning information is obtained;
A second Beidou communication module is arranged in the second terminal, the second terminal receives the short message and reads a signature result, the signature result is analyzed by using a public key, if the analysis is successful, a first hash value is read, and the signature result and the first hash value are packaged into a transaction and sent to a block chain for storage; if the analysis fails, the first data is tampered in the transmission process.
5. An electronic device includes a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the blockchain audit trail method of any of claims 1-3.
CN202011605453.9A 2020-12-29 Block chain audit tracing method and system applied to third terminal and electronic equipment Active CN112929154B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011605453.9A CN112929154B (en) 2020-12-29 Block chain audit tracing method and system applied to third terminal and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011605453.9A CN112929154B (en) 2020-12-29 Block chain audit tracing method and system applied to third terminal and electronic equipment

Publications (2)

Publication Number Publication Date
CN112929154A CN112929154A (en) 2021-06-08
CN112929154B true CN112929154B (en) 2024-05-31

Family

ID=

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704493A (en) * 2017-08-23 2018-02-16 中链科技有限公司 It is a kind of to be used to provide the method and system that product is traced to the source
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium
CN110097377A (en) * 2019-04-18 2019-08-06 深圳市科迈爱康科技有限公司 Antifake method for products and device based on block chain
CN110163628A (en) * 2019-04-04 2019-08-23 上海能链众合科技有限公司 A kind of agricultural product traceability system based on block chain
CN110188243A (en) * 2019-05-10 2019-08-30 北京农业信息技术研究中心 A kind of anti-fake information storage and method for quickly querying and the device of tracing to the source of agricultural product
CN111008404A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Service call auditing method, equipment and medium based on block chain
CN111325564A (en) * 2020-03-17 2020-06-23 河南佼荣网络科技有限公司 Method and system for tracing supply chain by using block chain
CN112036901A (en) * 2019-05-17 2020-12-04 优物链控股私人有限公司 Method for protecting supply chain data in block chain and system for recording supply chain information

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704493A (en) * 2017-08-23 2018-02-16 中链科技有限公司 It is a kind of to be used to provide the method and system that product is traced to the source
CN108573016A (en) * 2017-12-25 2018-09-25 北京金山云网络技术有限公司 A kind of data consistent check method, apparatus, equipment and storage medium
CN110163628A (en) * 2019-04-04 2019-08-23 上海能链众合科技有限公司 A kind of agricultural product traceability system based on block chain
CN110097377A (en) * 2019-04-18 2019-08-06 深圳市科迈爱康科技有限公司 Antifake method for products and device based on block chain
CN110188243A (en) * 2019-05-10 2019-08-30 北京农业信息技术研究中心 A kind of anti-fake information storage and method for quickly querying and the device of tracing to the source of agricultural product
CN112036901A (en) * 2019-05-17 2020-12-04 优物链控股私人有限公司 Method for protecting supply chain data in block chain and system for recording supply chain information
CN111008404A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Service call auditing method, equipment and medium based on block chain
CN111325564A (en) * 2020-03-17 2020-06-23 河南佼荣网络科技有限公司 Method and system for tracing supply chain by using block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Framework for Track Consistency Processing Based on Blockchain;Lin Li等;《2019 IEEE 10th International Conference on Software Engineering and Service Science (ICSESS)》;20200319;全文 *
基于联盟链的物联网动态数据溯源机制;乔蕊等;《软件学报》;20190327;全文 *

Similar Documents

Publication Publication Date Title
WO2022141058A1 (en) Blockchain auditing and traceability method and system, electronic device and storage medium
US7890765B2 (en) Generating and verifying trusted digital time stamp
CN112929178B (en) Block chain audit tracing method and system applied to first terminal and electronic equipment
CN111182525B (en) Method and device for storing data
CN109388417B (en) Communication protocol updating method, system and terminal equipment
CN114500690B (en) Interface data processing method and device, electronic equipment and storage medium
US7529942B2 (en) Time proof server, terminal, and time proving method
CN110765025A (en) Test method, test device, computer equipment and storage medium
CN113452526B (en) Electronic file certification method, verification method and corresponding devices
CN112738244B (en) Block chain audit traceability system
CN112929154B (en) Block chain audit tracing method and system applied to third terminal and electronic equipment
CN115801530B (en) Network management type looped network switch with modularized design
Hemminghaus et al. SIGMAR: Ensuring Integrity and Authenticity of Maritime Systems using Digital Signatures
CN112929154A (en) Block chain audit source tracing method and system applied to third terminal and electronic equipment
US11507803B2 (en) System for generating synthetic digital data for data multiplication
CN114186104A (en) Method, system and server for recording, storing and querying protocol data
CN113726779A (en) Rule false alarm test method and device, electronic equipment and computer storage medium
CN112804066A (en) Method and device for transferring message in cross-link mode based on relay equipment
CN111181809A (en) Monitoring method and device for reference station in network RTK center resolving software
CN109039651A (en) A kind of transmission method of location information, transmitting device and global position system
CN114707606B (en) Data processing method and device based on federal learning, equipment and storage medium
Jackson Ensuring honest behaviour in cooperative surveillance systems
CN116702219B (en) Block chain-based trusted certification method and device
CN103473245A (en) Webpage evidence saving method and system
CN110324353B (en) Method, device and system for network tracking long chain attack

Legal Events

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