WO2022141058A1 - 区块链审计溯源方法、系统、电子设备及存储介质 - Google Patents

区块链审计溯源方法、系统、电子设备及存储介质 Download PDF

Info

Publication number
WO2022141058A1
WO2022141058A1 PCT/CN2020/140865 CN2020140865W WO2022141058A1 WO 2022141058 A1 WO2022141058 A1 WO 2022141058A1 CN 2020140865 W CN2020140865 W CN 2020140865W WO 2022141058 A1 WO2022141058 A1 WO 2022141058A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
hash value
value
terminal
blockchain
Prior art date
Application number
PCT/CN2020/140865
Other languages
English (en)
French (fr)
Inventor
张焱
施逸
杨东
李汪红
Original Assignee
合肥达朴汇联科技有限公司
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 合肥达朴汇联科技有限公司 filed Critical 合肥达朴汇联科技有限公司
Priority to PCT/CN2020/140865 priority Critical patent/WO2022141058A1/zh
Publication of WO2022141058A1 publication Critical patent/WO2022141058A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Definitions

  • the invention relates to the technical field of blockchain, and in particular to a blockchain audit traceability method, system, electronic device and storage medium.
  • Blockchain is a distributed ledger technology. Due to the advantages of decentralization, non-tampering, and no need for third-party trust guarantees, the blockchain has been widely valued. It is one of the important applications of blockchain in various industries to use the data immutability feature of blockchain to realize the traceability of supply chain. Through the close combination of blockchain and Internet of Things and other technologies, based on the characteristics of data that cannot be tampered with, the product quality management model is innovated, the efficiency of product production information exchange and sharing is strengthened, and the quality traceability, supervision and whole chain management of all categories and the entire process are realized. Information reaches enterprises, consumers, and governments, and comprehensively improves the product quality and management efficiency of the supply chain.
  • the traceability of supply chain data relies on the uploading of raw data by IoT devices.
  • the original data cannot be uploaded through the Internet at the first time, so that the purpose of using the blockchain to save data so that the data cannot be tampered with is cut off from the source. Make sure that the data has not been tampered with.
  • the invention patent application with the application number "CN201810906021.8” discloses a blockchain system based on the Beidou Satellite Radio Determination Service (RDSS) and its implementation method.
  • RDSS Beidou Satellite Radio Determination Service
  • Several Beidou RDSS terminals and Beidou satellites are connected to the block chain nodes; when the packaging node generates a block, it broadcasts the complete block through the Internet, and uses the packaging node to send the block header to the Beidou satellite through the Beidou RDSS terminal, and the Beidou After the satellite receives the data, it broadcasts the block header to other nodes using the superframe format; the Beidou RDSS terminal of the other nodes calculates the block header and the precise time of the broadcast, and records the Beidou broadcast in the timestamp (TimeStamp) field of the new block structure. time to get the Beidou block header.
  • the patented solution is mainly applied to the problem of inability to accurately know the real generation time of a block caused by the existence
  • Another example is the invention patent with the application number "CN201811237478.0”, which discloses a blockchain-based maritime combat data security protection method and device, wherein the method includes: constructing a blockchain-based maritime military information system model; From static to dynamic, gradually design an efficient and verifiable PoS consensus mechanism; build a trusted data storage mechanism with high dynamic network characteristics; build an attack traceability and tracking accountability mechanism; build a privacy protection mechanism for trusted data storage.
  • This method meets the requirements of distributed trusted storage, privacy protection, and attack traceability of maritime formation combat data.
  • the way of implementing data traceability is completely different from that of the present invention.
  • the technical problem to be solved by the present invention is to overcome the environment where IoT devices cannot be connected to the network, and use the blockchain to save data but cannot ensure that the data has not been tampered with.
  • a blockchain audit traceability method including:
  • the first terminal obtains the first data in real time, performs a hash calculation on the first data to obtain a first hash value, signs the first hash value with a private key, and sends the signature result to the second terminal in the form of a short message.
  • the terminal simultaneously stores the signature result and the first hash value in the database;
  • the second terminal receives the short message and reads the signature result, uses the public key to parse the signature result, if the parsing is successful, reads the first hash value, and packages the signature result and the first hash value into a transaction and sends it to the zone Stored in the block chain; if the parsing fails, the first data is tampered with during the transmission process;
  • the third terminal obtains the data record to be audited from the database of the first terminal, extracts the second data from the data record and performs hash calculation to obtain the second hash value, and judges the second hash value based on the data stored in the blockchain Whether the hash value is true, if true, the data record is true data, if not, the data record may be tampered with.
  • the private key is stored in the first terminal, so that the data encapsulation and signature operation can be completed in a non-networked environment, eliminating the possibility of data being attacked and tampered with during the transmission process of Beidou communication and the data uploading process of the land system .
  • the first terminal receiving the first data in real time includes: the first terminal receiving the sensor data sent by several sensors in real time, and calculating the current latitude and longitude data through the built-in first Beidou communication module to obtain the current positioning information .
  • the format of the first hash value is: location 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: the first hash value signature, the location information+(the first sensor device ID+the first sensor value)+(the second sensor device ID+ Second sensor value)...(Nth sensor device ID+Nth sensor value).
  • the judging whether the second hash value is true includes: querying the blockchain for the value corresponding to the second hash value, if not found, the data record has been tampered with possible;
  • the data record is real data, if it is inconsistent, the data record may be tampered with;
  • querying the value corresponding to the second hash value in the blockchain includes: using the hash value signature as a key to query the value corresponding to the second hash value in the blockchain.
  • the format of the data record is: the first hash value signature, the location information+(the first sensor device ID+the first sensor value)+(the second sensor device ID+the second sensor value)... (Nth sensor device ID + Nth sensor value).
  • the format of the second data is: location information+(first sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+ Nth sensor value).
  • the first terminal is installed on an ocean ferry, and the second terminal is installed in a networked area.
  • a blockchain audit traceability method applied to a second terminal, includes:
  • a blockchain audit traceability system including:
  • the data uploading module is used to enable the first terminal to obtain the first data in real time, perform a hash calculation on the first data to obtain a first hash value, use the private key to sign the first hash value, and sign the signature result with a short
  • the message is sent to the second terminal, and the signature result and the first hash value are stored in the database at the same time;
  • the parsing module is used to make the second terminal receive the short message and read the signature result, use the public key to parse the signature result, if the parsing is successful, read the first hash value, and compare the signature result and the first hash value Package it into a transaction and send it to the blockchain for storage; if the parsing fails, the first data is tampered with during the transmission process;
  • the verification module is used to enable the third terminal to obtain the data record to be audited for traceability from the database of the first terminal, extract the second data from the data record and perform hash calculation to obtain the second hash value, based on the blockchain If the second hash value is real, the data is recorded as real data, and if it is not real, the data record may be tampered with.
  • An electronic device comprising a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement any of the above The blockchain audit traceability method.
  • the private key is stored in the first terminal, so that the data encapsulation and signature operation is completed in a non-networked environment, and the data transmission process in the Beidou communication and the data uploading process in the land area that can be connected to the Internet are eliminated.
  • the data uplink operation can be performed in an environment where Internet communication cannot be performed.
  • each group of data is compressed by hash calculation, thereby greatly reducing the amount of data that the Beidou short message needs to send, thereby making it possible to send multiple groups of data at one time, and greatly improving the frequency of data uploading.
  • the Beidou short message is used to transmit the hash value, so that the data upload operation can be performed in an environment where Internet communication cannot be performed, and the hash value is recorded using the blockchain to ensure that the data cannot be accessed. Tampering and traceability features while maintaining the privacy of the original data.
  • FIG. 1 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 1 of the present invention.
  • FIG. 2 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 2 of the present invention.
  • FIG. 3 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 3 of the present invention.
  • FIG. 4 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a blockchain audit traceability system provided in Embodiment 5 of the present invention.
  • FIG. 6 shows a structural block diagram of a device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a computer system suitable for implementing a blockchain audit traceability method according to an embodiment of the present disclosure.
  • the first data is acquired in real time by the first terminal, the first hash value is obtained by hashing the first data, the first hash value is signed with the private key, and the The signature result is sent to the second terminal in the form of a short message, and at the same time, the signature result and the first hash value are stored in the database; the second terminal receives the short message and reads the signature result, and uses the public key to perform the signature result.
  • Parsing if the parsing is successful, the first hash value is read, and the signature result and the first hash value are packaged into a transaction and sent to the blockchain for storage; if the parsing fails, the first data is tampered with during transmission;
  • the third terminal obtains the data record to be audited from the database of the first terminal, extracts the second data from the data record and performs hash calculation to obtain the second hash value, and judges the second hash value based on the data stored in the blockchain Whether the hash value is true, if true, the data record is true data, if not, the data record may be tampered with.
  • FIG. 1 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 1 of the present invention
  • FIG. 1 schematically shows an exemplary method and apparatus for applying blockchain consensus according to an embodiment of the present invention system structure.
  • FIG. 1 is only an example of the system architecture to which the embodiments of the present invention can be applied, so as to help those skilled in the art to understand the technical content of the present invention (FIG. 2, FIG. 3, FIG. 4, etc. are also only examples) , but it does not mean that the embodiments of the present invention cannot be used in other devices, systems, environments or scenarios.
  • the method includes the following steps:
  • the first terminal acquires the first data in real time, performs hash calculation on the first data to obtain a first hash value, signs the first hash value with a private key, and sends the signature result in the form of a short message to The second terminal simultaneously stores the signature result and the first hash value in the database;
  • the second terminal receives the short message and reads the signature result, uses the public key to parse the signature result, and if the parsing is successful, reads the first hash value, and packages the signature result and the first hash value into a transaction for sending Store in the blockchain; if the parsing fails, the first data is tampered with during transmission;
  • the third terminal obtains the data record to be audited from the database of the first terminal, extracts the second data from the data record and performs hash calculation to obtain the second hash value, and judges based on the data stored in the blockchain Whether the second hash value is true, if true, the data record is true data, if not, the data record may be tampered with.
  • the first data includes sensor data and current positioning data.
  • the first terminal receiving the first data in real time includes: the first terminal receiving the sensor data sent by several sensors in real time, and calculating the current latitude and longitude data through the built-in first Beidou communication module, so as to obtain the current positioning information.
  • the first terminal is mainly installed in an environment that cannot be connected to the Internet, such as an ocean-going ship. At this time, several corresponding sensors are installed on the ocean-going ship, and the first terminal is built-in through the first terminal.
  • the first Beidou communication module can obtain the latitude and longitude data of the current ship.
  • the sensors may include temperature sensors, speed sensors, etc., and the arrangement position of the sensor equipment can also be selected according to the actual situation.
  • the solution of the embodiment of the present disclosure is mainly aimed at ocean-going ships. When applied to other scenarios, the sensor can be selected according to the actual situation. type.
  • the format of the first hash value is: location 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: 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).
  • step S11 the second terminal receives the short message through the built-in second Beidou communication module.
  • Step S10 realizes data uploading in areas that are not connected to the Internet, and cooperates with S11 to determine whether the data has been attacked and tampered with during the process of uploading data to the chain in a land area that can be connected to the Internet.
  • step S12 judging whether the second hash value is true based on the data stored in the blockchain includes:
  • the data record may be tampered with
  • the data record is real data; if they are inconsistent, the data record may be tampered with.
  • querying the value corresponding to the second hash value in the blockchain includes: using the hash value signature as a key to query the value corresponding to the second hash value in the blockchain.
  • step S12 the possibility of data being tampered with in the transmission process of Beidou communication is eliminated.
  • step S12 Furthermore, in step S12,
  • the format of the data record is: the first hash value signature, the location information + (the first sensor device ID + the first sensor value) + (the second sensor device ID + the second sensor value)... (the Nth sensor device ID + the first sensor device ID + the first sensor value) N sensor value).
  • the format of the second data is: location information+(first sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+Nth sensor value).
  • step S10 the first terminal receives sensor data sent by several sensors in real time through the built-in first data processing module; at the same time, the built-in first data processing module sends a request for obtaining the current positioning information to the first Beidou communication module, and the first Beidou In response to the request for obtaining the current positioning information, the communication module calculates the current latitude and longitude data, thereby obtaining the current positioning information and sending it to the first data processing module.
  • the first data processing module uses the hash to calculate the current positioning information and the sensor data to obtain the first Hash value
  • the built-in signature module of the first terminal obtains the first hash value and signs it, and sends the signature result to the first data processing module
  • the first data processing module signs (the first hash value, the location information + (th A sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+Nth sensor value)) is saved to the database module, and the first Beidou communication module sends the signature result as The form of short message is sent to the second Beidou communication module built in the second terminal.
  • the second Beidou communication module receives the short message and sends it to the second data processing module built in the second terminal, and the second data processing module parses the short message and reads the signed first hash. value, and then send the first hash value to the data verification module built in the second terminal.
  • the data verification module uses the corresponding public key to parse the signature data to read the first hash value; if the parsing fails, the data tampered during transmission; if the parsing is successful, the hash value is sent to the second data processing module, the second data processing module signs the hash value, the first hash value is signed with (the first hash value, the first hash value A hash value) format is packaged into transactions and sent to the blockchain for storage.
  • FIG. 2 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 2 of the present invention.
  • the blockchain audit traceability method, applied to a first terminal, includes the following steps:
  • the first data includes sensor data and current positioning data.
  • the first terminal receiving the first data in real time includes: the first terminal receiving the sensor data sent by several sensors in real time, and calculating the current latitude and longitude data through the built-in first Beidou communication module, so as to obtain the current positioning information.
  • the first terminal is mainly installed in an environment that cannot be connected to the Internet, such as an ocean-going ship.
  • several corresponding sensors are installed on the ocean-going ship, and communicate through the first Beidou. module, which can obtain the latitude and longitude data of the current ship.
  • the sensors may include temperature sensors, speed sensors, etc., and the arrangement position of the sensor equipment can also be selected according to the actual situation.
  • the solution of the embodiment of the present disclosure is mainly aimed at ocean-going ships. When applied to other scenarios, the sensor can be selected according to the actual situation. type.
  • the format of the first hash value is: location 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: 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 verification performed by the second terminal includes: the second terminal receives the short message and reads the signature result, uses the public key to parse the signature result, if the parsing is successful, reads the first hash value, and uses the signature result , the first hash value is packaged into a transaction and sent to the blockchain for storage;
  • the parsing fails, the first data is tampered with during the transmission process.
  • FIG. 3 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 3 of the present invention.
  • the blockchain audit traceability method, applied to a second terminal includes:
  • S30 Receive the short message sent by the first terminal and read the signature result, use the public key to parse the signature result, if the parsing is successful, read the first hash value, and package the signature result and the first hash value The completed transaction is sent to the blockchain for storage; if the parsing fails, the first data is tampered with during the transmission process.
  • FIG. 4 is a schematic flowchart of a blockchain audit traceability method provided in Embodiment 4 of the present invention.
  • the blockchain audit traceability method, applied to a third terminal includes:
  • judging whether the second hash value is true based on the data stored in the blockchain includes:
  • the data record may be tampered with
  • the data record is real data; if they are inconsistent, the data record may be tampered with.
  • Querying the value corresponding to the second hash value in the blockchain includes: using the hash value signature as a key to query the value corresponding to the second hash value in the blockchain.
  • 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: location information+(first sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+Nth sensor value).
  • FIG. 5 is a schematic structural diagram of a blockchain audit traceability system provided by the disclosed embodiments of the present invention, a blockchain audit traceability system, including:
  • the data uploading module 401 is configured to enable the first terminal to obtain the first data in real time, perform a hash calculation on the first data to obtain a first hash value, use the private key to sign the first hash value, and sign the signature result as The short message is sent to the second terminal, and the signature result and the first hash value are stored in the database at the same time;
  • the parsing module 402 is configured to enable the second terminal to receive the short message and read the signature result, use the public key to parse the signature result, if the parsing is successful, read the first hash value, and compare the signature result, the first hash value The value is packaged into a transaction and sent to the blockchain for storage; if the parsing fails, the first data is tampered with during transmission;
  • the verification module 403 is used to make the third terminal obtain the data record to be audited for traceability from the database of the first terminal, extract the second data from the data record and perform hash calculation to obtain the second hash value, based on the block
  • the data stored in the chain judges whether the second hash value is true. If true, the data record is true data. If it is not true, the data record may be tampered with.
  • the first data includes sensor data and current positioning data.
  • the first terminal receiving the first data in real time includes: the first terminal receiving the sensor data sent by several sensors in real time, and calculating the current latitude and longitude data through the built-in first Beidou communication module, so as to obtain the current positioning information.
  • the first terminal is mainly installed in an environment that cannot be connected to the Internet, such as an ocean-going ship.
  • several corresponding sensors are installed on the ocean-going ship, and communicate through the first Beidou. module, which can obtain the latitude and longitude data of the current ship.
  • the sensors may include temperature sensors, speed sensors, etc., and the arrangement position of the sensor equipment can also be selected according to the actual situation.
  • the solution of the embodiment of the present disclosure is mainly aimed at ocean-going ships. When applied to other scenarios, the sensor can be selected according to the actual situation. type.
  • the format of the first hash value is: location 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: 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).
  • determining whether the second hash value is true based on the data stored in the blockchain includes:
  • the data record may be tampered with
  • the data record is real data; if they are inconsistent, the data record may be tampered with.
  • querying the value corresponding to the second hash value in the blockchain includes: using the hash value signature as a key to query the value corresponding to the second hash value in the blockchain.
  • the format of the data record is: the first hash value signature, the location information + (the first sensor device ID + the first sensor value) + (the second sensor device ID + the second sensor value)... (the Nth sensor device ID + the first sensor device ID + the first sensor value) N sensor value).
  • the format of the second data is: location information+(first sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+Nth sensor value).
  • a blockchain audit traceability system applied to a first terminal, includes:
  • the obtaining module is configured to enable the first terminal to obtain the first data in real time, perform a hash calculation on the first data to obtain a first hash value, use the private key to sign the first hash value, and report the signature result as a short message
  • the text form is sent to the second terminal for verification, and the signature result and the first hash value are stored in the database at the same time.
  • the first data includes sensor data and current positioning data.
  • the first terminal receiving the first data in real time includes: the first terminal receiving the sensor data sent by several sensors in real time, and calculating the current latitude and longitude data through the built-in first Beidou communication module, so as to obtain the current positioning information.
  • the first terminal is mainly installed in an environment that cannot be connected to the Internet, such as an ocean-going ship.
  • several corresponding sensors are installed on the ocean-going ship, and communicate through the first Beidou. module, which can obtain the latitude and longitude data of the current ship.
  • the sensors may include temperature sensors, speed sensors, etc., and the arrangement position of the sensor equipment can also be selected according to the actual situation.
  • the solution of the embodiment of the present disclosure is mainly aimed at ocean-going ships. When applied to other scenarios, the sensor can be selected according to the actual situation. type.
  • the format of the first hash value is: location 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: 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 verification performed by the second terminal includes: the second terminal receives the short message and reads the signature result, uses the public key to parse the signature result, if the parsing is successful, reads the first hash value, and compares the signature result and the first hash value The value is packaged into a transaction and sent to the blockchain for storage;
  • the parsing fails, the first data is tampered with during the transmission process.
  • a blockchain audit traceability system applied to a third terminal, includes:
  • the traceability audit module is used to obtain the data records to be audited from the database, extract the second data from the data records and perform hash calculation to obtain the second hash value, and determine the second hash value based on the data stored in the blockchain Whether the value is true, if true, the data record is true data, if not true, the data record may be tampered with.
  • judging whether the second hash value is true based on the data stored in the blockchain includes:
  • the data record may be tampered with
  • the data record is real data; if they are inconsistent, the data record may be tampered with.
  • Querying the value corresponding to the second hash value in the blockchain includes: using the hash value signature as a key to query the value corresponding to the second hash value in the blockchain.
  • 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: location information+(first sensor device ID+first sensor value)+(second sensor device ID+second sensor value)...(Nth sensor device ID+Nth sensor value).
  • the present invention is mainly aimed at tracing the source of supply chain data when the Internet of Things devices cannot access the Internet.
  • the ocean-going ship does not have the range coverage of the mobile signal tower.
  • the first terminal is installed on the ocean-going ship, and the second terminal is installed in an area that can be connected to the Internet (for example, a land that can be connected to the Internet), but it should be understood that the present invention is not only applicable to ocean-going ships. of.
  • the first terminal is usually a system device installed on a ship, such as a computer terminal, mobile phone, tablet, portable wearable device installed with the ship's data uplink system;
  • the second terminal is usually a system device installed in a networked area, such as a computer terminal, a mobile phone, a tablet, a portable wearable device, and the like.
  • the third terminal is a verification device, which may be a computer terminal, a mobile phone, a tablet, a portable wearable device, or the like.
  • FIG. 6 shows a structural block diagram of a device according to an embodiment of the present disclosure.
  • the electronic device 600 may include a processor 601 and a memory 602 .
  • the memory 602 is configured to store a program that supports the processor to execute the blockchain audit traceability method in any of the foregoing embodiments, and the processor 601 is configured to execute the program stored in the memory 602 .
  • the memory 602 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 601 to implement the steps in Embodiment 1: S10, S11, S12; or Embodiment 2 in step S20, or step S30 in embodiment 3, or step S40 in embodiment 4.
  • Fig. 7 is a schematic structural diagram of a computer system suitable for implementing a blockchain audit traceability method according to an embodiment of the present disclosure.
  • a computer system 1000 includes a processor (CPU, GPU, FPGA, etc.) 1001, which can be loaded into a random access memory (RAM) according to a program stored in a read only memory (ROM) 1002 or from a storage section 1008
  • the program in 1003 executes part or all of the processing in the embodiments shown in the above drawings.
  • various programs and data necessary for the operation of the system 1000 are also stored.
  • the processor 1001 , the ROM 1002 and the RAM 1003 are connected to each other through a bus 1004 .
  • An input/output (I/O) interface 1005 is also connected to the bus 1004 .
  • the following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc. ; and a communication section 1009 including a network interface card such as a LAN card, a modem, and the like. The communication section 1009 performs communication processing via a network such as the Internet.
  • a 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, etc., is mounted on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.
  • embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a readable medium thereof, the computer program containing program code for performing the methods of the accompanying drawings.
  • the computer program may be downloaded and installed from the network through the communication section 1009, and/or installed from the removable medium 1011.
  • each block in the diagram or block diagram may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function. executable instructions.
  • the functions noted in the blocks 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.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units or modules involved in the embodiments of the present disclosure can be implemented in software or hardware.
  • the described units or modules may also be provided in the processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves in certain circumstances.
  • the present disclosure also provides a computer-readable storage medium.
  • the computer-readable storage medium may be the computer-readable storage medium included in the terminal in the above-mentioned embodiments; it may also exist independently and not be assembled into the device. computer-readable storage medium.
  • the computer-readable storage medium stores one or more programs used by one or more processors to perform the methods described in the present disclosure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及一种区块链审计溯源方法、系统、电子设备及存储介质,包括:第一终端将签名结果以短报文形式发送至第二终端,将签名结果、第一哈希值一并存储至数据库中;第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,判断第二哈希值是否真实。本发明中,私钥于第一终端中存储,从而使数据封装签名操作在无联网的环境中完成,杜绝了数据在北斗通讯的传输过程中和陆地系统的数据上链过程中受到攻击而被篡改的可能性。

Description

区块链审计溯源方法、系统、电子设备及存储介质 技术领域
本发明涉及区块链技术领域,尤其涉及区块链审计溯源方法、系统、电子设备及存储介质。
背景技术
区块链是一种分布式记账技术。由于区块链具有去中心化,不可篡改,无需第三方信任担保的优点而得到广泛重视。使用区块链的数据不可篡改特性实现供应链的溯源是区块链在各个产业中的重要应用之一。通过区块链与物联网等技术的密切结合,基于数据不可篡改的特性创新商品质量管理模式,强化商品生产信息互通共享效率,实现全品类、全过程商品质量溯源、监督与全链条管理,将信息触达企业、消费者、政府,全面提升供应链的产品质量和管理效率。
然而,对供应链数据的溯源依赖于物联网设备对原始数据的上传。对于一些物联网设备无法与网络连接的环境中,则原始数据无法通过互联网在第一时间对数据进行上传,使得利用区块链保存数据使数据无法篡改的目的从源头上切断了可能性,无法保证数据是未被篡改的。
现有的专利中,例如申请号为“CN201810906021.8”的发明专利申请公开了一种基于北斗卫星无线电测定业务(RDSS)的区块链系统及其实现方法,该区块链系统包括与区块链节点相连的若干北斗RDSS终端和北斗卫星;当打包节点生成区块时,通过互联网广播完整的区块,并利用打包节点通过所述北斗RDSS终端将区块头发送至北斗卫星,所述北斗卫星接收 数据后,利用超帧格式广播区块头至其他节点;所述其他节点的北斗RDSS终端解算出区块头和广播时的精准时间,在新区块结构的时间戳(TimeStamp)字段中记录北斗广播时间,从而得到北斗区块头。该专利方案主要运用于网络延时的存在所导致的无法准确获知一个区块的真实生成时间的问题,并不能够解决无网络通讯的溯源问题;
又如申请号为“CN201811237478.0”发明专利公开了一种基于区块链的海上作战数据的安全防护方法及装置,其中,该方法包括:构建基于区块链的海上军用信息系统模型;以静态到动态逐步设计高效可验证PoS共识机制;构建高动态网络特性的可信数据存储机制;构建攻击溯源与追踪追责机制;构建数据可信存储的隐私保护机制。该方法针对海上编队作战数据的分布式可信存储、隐私保护与攻击溯源等需求,但是该专利方案中,所实现对数据溯源的方式与本发明的溯源的方式完全不同。
发明内容
本发明所要解决的技术问题在于克服物联网设备无法与网络连接的环境中,利用区块链保存数据但无法确保该数据是未被篡改的。
本发明通过以下技术手段实现解决上述技术问题的:
一种区块链审计溯源方法,包括:
第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发 送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
私钥于第一终端中存储,从而使得数据封装签名操作在无联网的环境中完成,杜绝了数据在北斗通讯的传输过程中和陆地系统的数据上链过程中受到攻击而被篡改的可能性。
作为本发明进一步的方案:所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,获得当前定位信息。
作为本发明进一步的方案:所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值),其中N为任意正整数。
作为本发明进一步的方案:所述签名结果、第一哈希值的存储格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
作为本发明进一步的方案:所述判断第二哈希值是否真实包括:在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能;
其中,在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
作为本发明进一步的方案:所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
作为本发明进一步的方案:所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
作为本发明进一步的方案:所述第一终端安装于远洋轮渡,所述第二终端安装于联网的地区。
一种区块链审计溯源方法,应用于第二终端,包括:
接收第一终端所发送的短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改。
一种区块链审计溯源系统,包括:
数据上传模块,用于使第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
解析模块,用于使第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
验证模块,用于使第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
一种电子设备,包括存储器和处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现如任一项所述的区块链审计溯源方法。
一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如任一项所述的区块链审计溯源方法。
本发明的优点在于:
1、本发明中,私钥于第一终端中存储,从而使得数据封装签名操作在无联网的环境中完成,杜绝了数据在北斗通讯的传输过程中和可联网的陆地地区的数据上链过程中受到攻击而被篡改的可能性,从而实现了数据审计溯源。
2、本发明中,通过使用北斗短报文进行数据传输,从而实现可在无法进行互联网通讯的环境中进行数据上链操作。
3、本发明中,对每组数据采用哈希计算进行压缩,从而大大减少北斗短报文需要发送的数据量,从而使得一次发送多组数据成为可能,大大提 高了数据上链频率。
4、本发明中,使用北斗短报文对哈希值进行传输,从而可在无法进行互联网通讯的环境中进行数据上链操作,同时使用区块链对哈希值进行记录,从而保证数据不可篡改和可追溯特性的同时保证原始数据的隐私性。
附图说明
图1为本发明实施例1提供的区块链审计溯源方法的流程示意图。
图2为本发明实施例2提供的区块链审计溯源方法的流程示意图。
图3为本发明实施例3提供的区块链审计溯源方法的流程示意图。
图4为本发明实施例4提供的区块链审计溯源方法的流程示意图。
图5为本发明实施例5提供的区块链审计溯源系统的结构示意图。
图6示出根据本公开一实施方式的设备的结构框图。
图7是适于用来实现根据本公开一实施方式的区块链审计溯源方法的计算机系统的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本公开的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如10、11等, 仅仅是用于区分开各个不同的操作,序号本身不代表任何的执行顺序。另外,这些流程可以包括更多或更少的操作,并且这些操作可以按顺序执行或并行执行。需要说明的是,本文中的“第一”、“第二”等描述,是用于区分不同的消息、设备、模块等,不代表先后顺序,也不限定“第一”和“第二”是不同的类型。
根据本公开实施例提供的技术方案,通过第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
实施例1
参阅图1,图1为本发明实施例1提供的区块链审计溯源方法的流程示意图,图1示意性示出了根据本发明实施例的可以应用区块链共识达成方法和装置的示例性系统架构。需要注意的是,图1所示仅为可以应用本发明实施例的系统架构的示例,以帮助本领域技术人员理解本发明的技术内容(图2、图3、图4等也仅为示例),但并不意味着本发明实施例不可以用于其他设备、系统、环境或场景。该方法包括以下步骤:
S10、第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
S11、第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
S12、第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
在步骤S10中,所述第一数据包括传感器数据、当前定位数据。
所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,从而获得当前定位信息。
应当说明的是,本公开实施例中,所述第一终端主要是安装于无法联网的环境,如远洋轮船,此时对应的若干个传感器是安装于远洋轮船上的,而通过第一终端内置的第一北斗通讯模块,可以获取当前轮船的经纬度数据。
所述传感器可以包括温度传感器、速度传感器等等,而传感器设备布置位置也可以根据实际情况进行选择,本公开实施例方案主要是针对远洋轮船,当运用于其他场景时,可以根据实际情况选择传感器种类。
所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器 数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值),其中N为任意正整数。
其中,签名结果、第一哈希值的存储格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
在步骤S11中,所述第二终端通过内置的第二北斗通讯模块接收短报文。
通过步骤S10实现在未联网的地区数据上传,并与S11的配合,实现在可联网的陆地地区判断数据上链过程中,数据是否遭受到攻击而导致被篡改。
在步骤S12中,所述基于所述区块链中存储数据判断第二哈希值是否真实包括:
在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能。
其中,在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
通过步骤S12,杜绝了数据在北斗通讯的传输过程中被篡改的可能。
此外,在步骤S12中,
所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设 备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
具体的,为了更加方便的了解本公开实施例1的步骤,下面内容以第一终端、第二终端内置模块来进行说明:
在步骤S10中,第一终端通过内置的第一数据处理模块实时接收若干个传感器发送的传感器数据;同时内置的第一数据处理模块向第一北斗通讯模块发送获取当前定位信息请求,第一北斗通讯模块响应于获取当前定位信息请求,计算当前经纬度数据,从而获得当前定位信息并发送至第一数据处理模块,所述第一数据处理模块用哈希计算当前定位信息以及传感器数据从而获取第一哈希值,第一终端内置的签名模块获取第一哈希值并签名,将签名结果发送至第一数据处理模块,第一数据处理模块将(第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值))保存至数据库模块,同时第一北斗通讯模块将签名结果以短报文的形式发送至第二终端内置的第二北斗通讯模块。
在步骤S11中,第二北斗通讯模块接收到短报文并发送至第二终端内置的第二数据处理模块,第二数据处理模块解析短报文并读取其中的签名后的第一哈希值,然后将第一哈希值发送至第二终端内置的数据验证模块,数据验证模块使用对应公钥对签名数据进行解析,从而读取其中的第一哈 希值;若解析失败则说明数据在传输过程中被篡改;若解析成功,则将哈希值发送给第二数据处理模块,第二数据处理模块将哈希值签名,第一哈希值以(第一哈希值签名,第一哈希值)格式打包成交易并发送至区块链中保存。
实施例2
参阅图2,图2为本发明实施例2提供的区块链审计溯源方法的流程示意图,该区块链审计溯源方法,应用于第一终端,包括以下步骤:
S20、实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端进行验证,同时将签名结果、第一哈希值一并存储至数据库中。
在步骤S20中,所述第一数据包括传感器数据、当前定位数据。
所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,从而获得当前定位信息。
应当说明的是,本公开实施例中,所述第一终端主要是安装于无法联网的环境,如远洋轮船,此时对应的若干个传感器是安装于远洋轮船上的,而通过第一北斗通讯模块,可以获取当前轮船的经纬度数据。
所述传感器可以包括温度传感器、速度传感器等等,而传感器设备布置位置也可以根据实际情况进行选择,本公开实施例方案主要是针对远洋轮船,当运用于其他场景时,可以根据实际情况选择传感器种类。
所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第 N传感器数值),其中N为任意正整数。
其中,签名结果、第一哈希值的存储格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
在该步骤中,第二终端进行验证包括:第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;
若解析失败,则第一数据在传输过程中被篡改。
实施例3
参阅图3,图3为本发明实施例3提供的区块链审计溯源方法的流程示意图,该区块链审计溯源方法,应用于第二终端,包括:
S30、接收第一终端所发送的短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改。
实施例4
参阅图4,图4为本发明实施例4提供的区块链审计溯源方法的流程示意图,该区块链审计溯源方法,应用于第三终端,包括:
S40、从数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
其中,所述基于所述区块链中存储数据判断第二哈希值是否真实包括:
在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能。
在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
此外,所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
实施例5
参阅图5,图5为本发明公开实施例提供的一种区块链审计溯源系统的结构示意图,一种区块链审计溯源系统,包括:
数据上传模块401,用于使第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
解析模块402,用于使第二终端接收短报文并读取签名结果,使用公钥 对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
验证模块403,用于使第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
具体的,在数据上传模块401中,所述第一数据包括传感器数据、当前定位数据。
所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,从而获得当前定位信息。
应当说明的是,本公开实施例中,所述第一终端主要是安装于无法联网的环境,如远洋轮船,此时对应的若干个传感器是安装于远洋轮船上的,而通过第一北斗通讯模块,可以获取当前轮船的经纬度数据。
所述传感器可以包括温度传感器、速度传感器等等,而传感器设备布置位置也可以根据实际情况进行选择,本公开实施例方案主要是针对远洋轮船,当运用于其他场景时,可以根据实际情况选择传感器种类。
所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值),其中N为任意正整数。
其中,签名结果、第一哈希值的存储格式为:第一哈希值签名,位置 信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
在验证模块403中,所述基于所述区块链中存储数据判断第二哈希值是否真实包括:
在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能。
其中,在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
此外,在验证模块403中,
所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
实施例6
一种区块链审计溯源系统,应用于第一终端,包括:
获取模块,用于使第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果 以短报文形式发送至第二终端进行验证,同时将签名结果、第一哈希值一并存储至数据库中。
在获取模块中,所述第一数据包括传感器数据、当前定位数据。
所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,从而获得当前定位信息。
应当说明的是,本公开实施例中,所述第一终端主要是安装于无法联网的环境,如远洋轮船,此时对应的若干个传感器是安装于远洋轮船上的,而通过第一北斗通讯模块,可以获取当前轮船的经纬度数据。
所述传感器可以包括温度传感器、速度传感器等等,而传感器设备布置位置也可以根据实际情况进行选择,本公开实施例方案主要是针对远洋轮船,当运用于其他场景时,可以根据实际情况选择传感器种类。
所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值),其中N为任意正整数。
其中,签名结果、第一哈希值的存储格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
第二终端进行验证包括:第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;
若解析失败,则第一数据在传输过程中被篡改。
实施例7
一种区块链审计溯源系统,应用于第三终端,包括:
溯源审计模块,用于从数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
其中,所述基于所述区块链中存储数据判断第二哈希值是否真实包括:
在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能。
在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
此外,所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
需要说明的是,本发明主要针对物联网设备无法上网的情况下对供应链数据溯源,为了更加方便理解本发明,例如为:冷鲜在远洋航行运输时, 远洋轮船在没有移动信号塔射程覆盖的大海上航行的情况下,第一终端安装于该远洋轮船,第二终端安装于可以联网的地区(例如可以进行联网的陆地),但需要理解的是,本发明并不仅仅适用于远洋轮船的。
而第一终端通常为安装于轮船上的系统设备,例如安装有轮船数据上链系统的电脑终端、手机、平板、便携式可穿戴设备等;
第二终端通常为安装于可联网地区的系统设备,例如电脑终端、手机、平板、便携式可穿戴设备等。
第三终端为验证设备,可以为电脑终端、手机、平板、便携式可穿戴设备等。
图6示出根据本公开一实施方式的设备的结构框图。
前述实施例描述了第一终端、第二终端、第三终端等的内部功能和结构,在一个可能的设计中,前述第一终端、第二终端、第三终端等的内部功能和结构可实现为电子设备,如图9中所示,该电子设备600可以包括处理器601和存储器602。
所述存储器602用于存储支持处理器执行上述任一实施例中区块链审计溯源方法的程序,所述处理器601被配置为用于执行所述存储器602中存储的程序。
所述存储器602用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器601执行以实现实施例1中的步骤:S10、S11、S12;或者实施例2中的步骤S20,或者实施例3中的步骤S30,或者实施例4中的步骤S40。
图7是适于用来实现根据本公开一实施方式的区块链审计溯源方法的 计算机系统的结构示意图。
如图7所示,计算机系统1000包括处理器(CPU、GPU、FPGA等)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储部分1008加载到随机访问存储器(RAM)1003中的程序而执行上述附图所示的实施方式中的部分或全部处理。在RAM1003中,还存储有系统1000操作所需的各种程序和数据。处理器1001、ROM1002以及RAM1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。
以下部件连接至I/O接口1005:包括键盘、鼠标等的输入部分1006;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1007;包括硬盘等的存储部分1008;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1009。通信部分1009经由诸如因特网的网络执行通信处理。驱动器1010也根据需要连接至I/O接口1005。可拆卸介质1011,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1010上,以便于从其上读出的计算机程序根据需要被安装入存储部分1008。
特别地,根据本公开的实施方式,上文参考附图描述的方法可以被实现为计算机软件程序。例如,本公开的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行附图中的方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分1009从网络上被下载和安装,和/或从可拆卸介质1011被安装。
附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方 法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
作为另一方面,本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中终端所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本公开的方法。
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分 技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (12)

  1. 一种区块链审计溯源方法,其特征在于,包括:
    第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
    第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
    第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,基于所述区块链中存储数据判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
  2. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述第一终端实时接收第一数据包括:第一终端实时接收若干个传感器发送的传感器数据,以及通过内置的第一北斗通讯模块计算当前经纬度数据,获得当前定位信息。
  3. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述第一哈希值的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值),其中N为任意正整数。
  4. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述签名结果、第一哈希值的存储格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)…… (第N传感器设备ID+第N传感器数值)。
  5. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述基于所述区块链中存储数据判断第二哈希值是否真实包括:
    在所述区块链中查询第二哈希值相对应的值,若未查询到,则该数据记录存在被篡改的可能;
    若查询到对应的值,则判断所述对应的值与第二哈希值是否一致;
    若一致,则该数据记录为真实数据,若不一致,则该数据记录存在被篡改的可能;
    其中,在所述区块链中查询第二哈希值相对应的值包括:在区块链中使用哈希值签名作为key查询第二哈希值对应的值。
  6. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述数据记录的格式为:第一哈希值签名,位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
  7. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述第二数据的格式为:位置信息+(第一传感器设备ID+第一传感器数值)+(第二传感器设备ID+第二传感器数值)……(第N传感器设备ID+第N传感器数值)。
  8. 根据权利要求1所述的区块链审计溯源方法,其特征在于,所述第一终端安装于远洋轮渡,所述第二终端安装于联网的地区。
  9. 一种区块链审计溯源方法,应用于第二终端,其特征在于,包括:接收第一终端所发送的短报文并读取签名结果,使用公钥对签名结果进行 解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改。
  10. 一种区块链审计溯源系统,其特征在于,包括:
    数据上传模块(401),用于使第一终端实时获取第一数据,对所述第一数据进行哈希计算得到第一哈希值,利用私钥对第一哈希值进行签名,将签名结果以短报文形式发送至第二终端,同时将签名结果、第一哈希值一并存储至数据库中;
    解析模块(402),用于使第二终端接收短报文并读取签名结果,使用公钥对签名结果进行解析,若解析成功,读取第一哈希值,并将签名结果、第一哈希值打包成交易发送至区块链中存储;若解析失败,则第一数据在传输过程中被篡改;
    验证模块(403),用于使第三终端从第一终端的数据库中获取要进行溯源审计的数据记录,从数据记录中提取第二数据进行哈希计算得到第二哈希值,判断第二哈希值是否真实,若真实,则该数据记录为真实数据,若不真实,则该数据记录存在被篡改的可能。
  11. 一种电子设备,包括存储器和处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现如权利要求1~8任一项所述的区块链审计溯源方法。
  12. 一种可读存储介质,其上存储有计算机指令,该计算机指令被处理器执行时实现如权利要求1~8任一项所述的区块链审计溯源方法。
PCT/CN2020/140865 2020-12-29 2020-12-29 区块链审计溯源方法、系统、电子设备及存储介质 WO2022141058A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140865 WO2022141058A1 (zh) 2020-12-29 2020-12-29 区块链审计溯源方法、系统、电子设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/140865 WO2022141058A1 (zh) 2020-12-29 2020-12-29 区块链审计溯源方法、系统、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2022141058A1 true WO2022141058A1 (zh) 2022-07-07

Family

ID=82258755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/140865 WO2022141058A1 (zh) 2020-12-29 2020-12-29 区块链审计溯源方法、系统、电子设备及存储介质

Country Status (1)

Country Link
WO (1) WO2022141058A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115242802A (zh) * 2022-08-10 2022-10-25 上海柚子工道物联技术有限公司 一种区块链的溯源链路构建方法、系统和电子设备
CN115314288A (zh) * 2022-08-08 2022-11-08 广州晁沓科技有限公司 一种基于区块链技术的数据溯源的系统和方法
CN117040718A (zh) * 2023-08-23 2023-11-10 重庆易保全网络科技有限公司 一种基于多层级上链式的电子签证方法、系统及终端
WO2024055407A1 (zh) * 2022-09-14 2024-03-21 中化现代农业有限公司 一种基于终端设备的物联网数据上链方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180285479A1 (en) * 2017-04-03 2018-10-04 Superna Inc. Scalable audit analytics
CN109246192A (zh) * 2018-08-10 2019-01-18 北斗链信息科技(广州)有限公司 基于北斗rdss的区块链系统及其实现方法
US20200026862A1 (en) * 2018-07-20 2020-01-23 Fujitsu Limited Method and apparatus for processing information by cooperation of multiple subjects
CN111355570A (zh) * 2020-02-24 2020-06-30 北京瑞友科技股份有限公司 一种面向软件复杂网络的可信应用网络数据溯源方法及审计方法
US20200364817A1 (en) * 2019-05-17 2020-11-19 UCOT Holdings Pty Ltd Machine type communication system or device for recording supply chain information on a distributed ledger in a peer to peer network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180285479A1 (en) * 2017-04-03 2018-10-04 Superna Inc. Scalable audit analytics
US20200026862A1 (en) * 2018-07-20 2020-01-23 Fujitsu Limited Method and apparatus for processing information by cooperation of multiple subjects
CN109246192A (zh) * 2018-08-10 2019-01-18 北斗链信息科技(广州)有限公司 基于北斗rdss的区块链系统及其实现方法
US20200364817A1 (en) * 2019-05-17 2020-11-19 UCOT Holdings Pty Ltd Machine type communication system or device for recording supply chain information on a distributed ledger in a peer to peer network
CN111355570A (zh) * 2020-02-24 2020-06-30 北京瑞友科技股份有限公司 一种面向软件复杂网络的可信应用网络数据溯源方法及审计方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314288A (zh) * 2022-08-08 2022-11-08 广州晁沓科技有限公司 一种基于区块链技术的数据溯源的系统和方法
CN115314288B (zh) * 2022-08-08 2023-11-10 上海好剧影视发行有限公司 一种基于加密验证技术的数据溯源系统和方法
CN115242802A (zh) * 2022-08-10 2022-10-25 上海柚子工道物联技术有限公司 一种区块链的溯源链路构建方法、系统和电子设备
CN115242802B (zh) * 2022-08-10 2023-11-24 上海柚子工道物联技术有限公司 一种区块链的溯源链路构建方法、系统和电子设备
WO2024055407A1 (zh) * 2022-09-14 2024-03-21 中化现代农业有限公司 一种基于终端设备的物联网数据上链方法及系统
CN117040718A (zh) * 2023-08-23 2023-11-10 重庆易保全网络科技有限公司 一种基于多层级上链式的电子签证方法、系统及终端

Similar Documents

Publication Publication Date Title
WO2022141058A1 (zh) 区块链审计溯源方法、系统、电子设备及存储介质
TWI710979B (zh) 跨區塊鏈的互動方法及裝置、系統、電子設備
WO2023077794A1 (zh) 区块链访问权限控制方法和系统、设备、程序及介质
Yue et al. Blockchain-based verification framework for data integrity in edge-cloud storage
CN103019803B (zh) 一种用于遥感卫星地面数据处理网格节点的虚拟环境系统
CN112929178B (zh) 应用于第一终端的区块链审计溯源方法、系统及电子设备
Clementi et al. When air traffic management meets blockchain technology: a blockchain-based concept for securing the sharing of flight data
CN111447068B (zh) 一种基于区块链的授时存证方法
CN114902717A (zh) Wlan感知测量方法及装置、电子设备及存储介质
US20240061565A1 (en) Method and apparatus for generating image processing interface, device, and storage medium
Wang et al. An efficient data sharing scheme for privacy protection based on blockchain and edge intelligence in 6G-VANET
CN113779642B (zh) 数据处理方法及其装置、系统、电子设备
Liu et al. Trusted blockchain oracle scheme based on aggregate signature
CN114244525A (zh) 请求数据处理方法、装置、设备及存储介质
WO2023207529A1 (zh) 数据处理方法、装置及设备、介质、产品
CN112738244B (zh) 一种区块链审计溯源系统
CN111681011A (zh) 数据处理方法、区块链系统、计算机系统和介质
CN112929154B (zh) 应用于第三终端的区块链审计溯源方法、系统、电子设备
CN110705935B (zh) 一种物流单据的处理方法和装置
CN112929154A (zh) 应用于第三终端的区块链审计溯源方法、系统、电子设备
CN114168218A (zh) 数据处理方法、装置、计算机设备和存储介质
CN113472715A (zh) 数据传输方法和装置
Jackson Ensuring honest behaviour in cooperative surveillance systems
CN115987979B (zh) 边缘计算中基于区块信任选举机制的数据完整性审计方法
WO2024001507A1 (zh) 数据处理方法、系统、装置、设备及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20967406

Country of ref document: EP

Kind code of ref document: A1