CN112000730B - Tracing information writing and tracing information verification method and system based on block chain - Google Patents

Tracing information writing and tracing information verification method and system based on block chain Download PDF

Info

Publication number
CN112000730B
CN112000730B CN202010666460.3A CN202010666460A CN112000730B CN 112000730 B CN112000730 B CN 112000730B CN 202010666460 A CN202010666460 A CN 202010666460A CN 112000730 B CN112000730 B CN 112000730B
Authority
CN
China
Prior art keywords
transaction
data
tracing
unique identifier
block chain
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
CN202010666460.3A
Other languages
Chinese (zh)
Other versions
CN112000730A (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.)
Bangbang Automobile Sales Service Beijing Co ltd
Original Assignee
Bangbang Automobile Sales Service Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bangbang Automobile Sales Service Beijing Co ltd filed Critical Bangbang Automobile Sales Service Beijing Co ltd
Priority to CN202010666460.3A priority Critical patent/CN112000730B/en
Publication of CN112000730A publication Critical patent/CN112000730A/en
Application granted granted Critical
Publication of CN112000730B publication Critical patent/CN112000730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention provides a tracing information writing method based on a block chain, a tracing information verification method and a tracing information verification system, wherein the tracing information writing method is applied to a tracing service system, and the method comprises the following steps: receiving the tracing original data to obtain a unique tracing identifier; determining abstract data of the tracing original data by using an abstract algorithm to serve as first abstract data; packaging the traceable unique identifier and the first abstract data into block chain transaction data, and determining the transaction unique identifier; the transaction data is sent to the blockchain system. The incidence relation between the tracing original data and the block chain transaction data corresponding to the tracing unique identifier is inquired from both the tracing service system and the block chain system, and the possibility of the source tracing information being falsified can be completely eliminated by a mode of bidirectionally verifying whether the data is falsified based on the non-falsification characteristic of the block chain data.

Description

Tracing information writing and tracing information verification method and system based on block chain
Technical Field
The invention relates to the field of block chains, in particular to a method and a system for tracing information writing and tracing information verification based on a block chain.
Background
At present, most traceability systems store traceability data in a single database, the data is centralized, and potential safety hazards exist, for example, the risk that the data is tampered in some links such as storage, transmission and display, or the data is damaged or lost due to attack of a malicious third party. In order to prevent data from being tampered, the prior art utilizes a data storage process, a tracing data recording process and a query verification process of a blockchain system to determine whether the tracing data is changed, specifically: processing the tracing original data R in the tracing service system through a summary algorithm to obtain summary data H _ B, packaging the summary data H _ B into transaction data T, transmitting the transaction data T to the blockchain system, and recording a transaction unique identifier txID in the blockchain system; and then reading the tracing data R from the tracing service system, obtaining the abstract data H _ A through the abstract algorithm processing, finding the abstract data H _ B of the tracing original data R stored in the block chain by utilizing the relation between the transaction unique identifier txID in the block chain and the transaction data T, then comparing the current tracing data to obtain whether the abstract data H _ A is consistent with the abstract data H _ B of the tracing original data R stored in the block chain, if so, determining that no data is tampered, otherwise, determining that tampering is suspected.
However, the existing block chain scheme cannot completely stop the change of the traceability information, because the block chain only records the abstract H of the traceability data R, and the incidence relation between the traceability service data and the block chain data is maintained in the traceability service system. If one piece of tracing data R is to be tampered, only the original tracing record needs to be changed into R 'in the tracing service system, then the R' is abstracted to obtain H ', the H' is stored into the block chain again to obtain txID ', and finally the txID' corresponding to the service data is updated, and at the moment, according to the original verification logic, the verification still can pass. Therefore, the existing method cannot determine whether the traceability information is tampered.
Disclosure of Invention
In order to solve the problem that whether the traceability information is tampered or not can not be accurately determined in the existing mode, the invention provides a traceability information writing and traceability information verification method and system based on a block chain.
In a first aspect, the present invention provides a method for writing tracing information based on a block chain, where the method is applied to a tracing service system, and the method includes:
receiving the tracing original data to obtain a unique tracing identifier;
determining abstract data of the tracing original data by using an abstract algorithm to serve as first abstract data;
packaging the traceable unique identifier and the first abstract data into block chain transaction data, and determining the transaction unique identifier;
the transaction data is sent to the blockchain system.
Further, the method comprises:
receiving a message that the blockchain system successfully stores the transaction data;
the transaction unique identification is stored.
In a second aspect, the present invention provides a method for writing tracing information based on a blockchain, where the method is applied to a blockchain system, and the method includes:
receiving transaction data and determining a unique transaction identifier;
determining the corresponding relation between the transaction unique identifier and the first abstract data and the corresponding relation between the transaction unique identifier and the traceable unique identifier according to the corresponding relation between the transaction unique identifier and the transaction data;
transaction data is stored.
Further, the method comprises:
and sending a message of successful transaction data storage to the tracing service system.
In a third aspect, the present invention provides a method for performing tracing information verification based on a blockchain, where the method is applied to a tracing service system, and the method includes:
reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
searching a transaction unique identifier corresponding to the traceable unique identifier in the blockchain system according to the corresponding relation between the transaction unique identifier and the traceable unique identifier;
determining abstract data of the tracing original data by using an abstract algorithm to serve as second abstract data;
and verifying the tracing information according to the transaction unique identification stored in the tracing system, the transaction unique identification stored in the block chain system, the first abstract data and the second abstract data.
Further, verifying the tracing information according to the transaction unique identifier stored in the tracing system, the transaction unique identifier in the blockchain system, the first abstract data and the second abstract data comprises:
comparing whether the transaction unique identification stored in the tracing system is consistent with the transaction unique identification stored in the block chain system;
and if so, comparing whether the second abstract data is consistent with the first abstract data or not, and finishing the verification of the tracing information.
In a fourth aspect, the present invention provides a tracing service system for writing tracing information based on a block chain, where the tracing service system includes:
the source tracing original data receiving module is used for receiving source tracing original data to obtain a source tracing unique identifier;
the first abstract data determining module is used for determining abstract data of the source tracing original data by using an abstract algorithm to serve as the first abstract data;
the transaction packaging module is used for packaging the traceable unique identifier and the first abstract data into block chain transaction data and determining the transaction unique identifier;
and the sending module is used for sending the transaction data to the blockchain system.
In a fifth aspect, the present invention provides a blockchain system for tracing source information writing based on blockchain, the blockchain system comprising:
the transaction data receiving module is used for receiving transaction data and determining a unique transaction identifier;
the acquiring corresponding relation module is used for determining the corresponding relation between the transaction unique identifier and the first summary data and the corresponding relation between the transaction unique identifier and the traceable unique identifier according to the corresponding relation between the transaction unique identifier and the transaction data;
and the storage module is used for storing the transaction data.
In a sixth aspect, the present invention provides a tracing service system for performing tracing information verification based on a block chain, where the tracing service system includes:
the reading module is used for reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
the searching module is used for searching the transaction unique identifier corresponding to the traceable unique identifier in the block chain system according to the corresponding relation between the transaction unique identifier and the traceable unique identifier;
a second abstract data determining module, configured to determine abstract data of the source-tracing original data by using an abstract algorithm, as second abstract data;
and the verification traceability information module is used for verifying traceability information according to the transaction unique identifier stored in the traceability system, the transaction unique identifier stored in the block chain system, the first abstract data and the second abstract data.
In a seventh aspect, the present invention provides an electronic device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method provided in the first, second or third aspect when executing the program.
According to the method, the incidence relation between the unique block chain transaction identifier and the unique traceability identifier in the traceability service system is added in the block chain, so that the incidence relation between the original traceability data and the block chain transaction data corresponding to the unique traceability identifier can be inquired from both the traceability service system and the block chain, and the possibility of counterfeiting traceability information can be completely eliminated by a mode of bidirectionally verifying whether the data is tampered based on the non-tampering characteristic of the block chain data.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of a data writing process of a conventional blockchain system;
fig. 2 is a schematic flowchart of a method for writing source tracing information based on a block chain according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for writing source tracing information based on a block chain according to another embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for performing source tracing information verification based on a blockchain according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a data writing process of the improved blockchain system according to an embodiment of the present invention;
fig. 6 is a block diagram of a tracing service system for writing tracing information based on a block chain according to an embodiment of the present invention;
fig. 7 is a block diagram of a tracing service system for writing tracing information based on a blockchain according to another embodiment of the present invention;
fig. 8 is a block diagram of a traceability service system for performing traceability information verification based on a block chain according to an embodiment of the present invention;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Description of keywords:
a tracing service system: in particular to various service systems or technical platforms aiming at tracing. The block chain system: a system constructed using block chaining techniques.
R: and tracing the original data.
RID: and (4) unique identification of the tracing original data in the tracing service system.
H: a digest of the source raw data, stored on the blockchain, H ═ hash (r).
T: minimum unit of block chain writing.
txID: and the transaction unique identifier in the block chain.
Referring to fig. 1, the data writing process of the conventional blockchain system:
and the calling party packages the data into a transaction through the blockchain system SDK and transmits the transaction to the blockchain system, the blockchain system writes the transaction into the system after performing various safety checks, and returns the unique transaction identifier (txID) of the calling party, and the txID is specifically added into the traceability application system, and the calling party is the traceability service system. Block chain system record
the corresponding relation between the txID and the transaction data H has the following specific structure:
Figure GDA0002742385580000061
the tracing service system generally records tracing original data R and a transaction unique identifier (txID) thereof on a blockchain, and the specific structure is as follows:
Figure GDA0002742385580000071
the existing tracing service system based on the block chain has the following specific recording and verifying steps:
tracing data recording process:
1. a tracing service system: and writing the tracing original data R into a service system to obtain a tracing unique identifier RID.
2. A tracing service system: and processing the tracing original data R by a summarization algorithm to obtain summarized data H, wherein H is hash (R) and can also be expressed as H _ B, and then packaging H into a transaction T through a block chain SDK and transmitting the transaction T to the block chain system. This step results in a transaction unique identification txID.
3. The block chain system: receiving a calling party transaction T, writing the transaction T into the system after the verification security verification is passed, wherein the block chain system has an incidence relation between the txID and the transaction T, and the transaction T is packaged by the H, namely the incidence relation between the txID and the H.
4. A tracing service system: after receiving the message that the blockchain system successfully writes the transaction T, the traceable service system writes back the txID to the traceable service system.
And (3) query verification flow:
1. reading tracing original data R and a transaction unique identifier txID from a tracing service system;
2. calculating R through a summarization algorithm to obtain summarized data H _ A;
3. inquiring abstract data H _ B corresponding to the txID in the block chain system according to the txID;
4. and comparing the H _ A with the H _ B, if the H _ A and the H _ B are consistent, the data is not tampered, otherwise, the tampering is suspected.
However, the existing block chain scheme cannot completely stop the change of the traceability information, because the block chain only records the abstract H of the traceability data R, and the incidence relation between the traceability service data and the block chain data is maintained in the traceability service system. If one piece of tracing data R is to be tampered, only the original tracing record needs to be changed into R 'in the tracing service system, then the R' is abstracted to obtain H ', the H' is stored into the block chain again to obtain txID ', and finally the txID' corresponding to the service data is updated, and at the moment, according to the original verification logic, the verification still can pass. Therefore, the existing method cannot determine whether the traceability information is tampered. In order to solve the problem that the existing block chain scheme cannot completely stop the change of the tracing information, an embodiment of the present invention provides a method for writing the tracing information based on a block chain, as shown in fig. 2, where the method is applied to a tracing service system, and includes:
step S201, receiving tracing original data to obtain a unique tracing identifier;
step S202, determining abstract data of the source tracing original data by using an abstract algorithm to serve as first abstract data;
step S203, packaging the traceable unique identifier and the first abstract data into block chain transaction data, and determining the transaction unique identifier;
step S204, the transaction data is sent to the blockchain system.
Specifically, the traceable service system receives traceable original data R sent by other service systems, determines a traceable unique identifier RID according to the traceable original R data, and modifies a transaction structure of the blockchain system by adding the traceable unique identifier RID.
Processing the tracing original data by a summary algorithm to obtain summary data H, wherein H is hash (R) and is used as first summary data; and packaging the traceable unique identifier RID and the first summary data H into transaction data T through a block chain SDK, and determining the transaction unique identifier txID. And finally, transmitting the transaction data T to the block chain system.
A tracing service system: after receiving the message that the block chain system successfully writes the transaction T, the traceable service system writes the txID back to the traceable service system to complete storage, and then obtains the relationship of RID, R and txID.
According to another aspect of the present invention, an embodiment of the present invention provides a method for writing tracing information based on a blockchain, where the method is applied to a blockchain system, as shown in fig. 3, and the method includes:
step S301, receiving transaction data and determining a unique transaction identifier;
step S302, determining the corresponding relation between the transaction unique identifier and the first abstract data and the corresponding relation between the transaction unique identifier and the traceable unique identifier according to the corresponding relation between the transaction unique identifier and the transaction data;
step S303, store the transaction data.
Specifically, the blockchain system receives transaction data T, determines a transaction unique identifier txID according to the transaction data T, then takes out a business unique identifier in a transaction, and then determines a corresponding relation between the transaction unique identifier txID and the first summary data H and a corresponding relation between the transaction unique identifier txID and the traceable unique identifier RID. The transaction unique identification and the first summary data are stored within the blockchain system.
After receiving the transaction data T, the blockchain system writes the transaction data T into the blockchain system after passing the verification security verification, and then sends a message that the transaction data T is successfully stored to the tracing service system.
According to another aspect of the present invention, an embodiment of the present invention provides a method for performing tracing information verification based on a blockchain, where the method is applied to a tracing service system, as shown in fig. 4, and the method includes:
step S401, reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
step S402, searching a transaction unique identifier corresponding to the tracing unique identifier in the block chain system according to the corresponding relation between the transaction unique identifier and the tracing unique identifier;
step S403, determining abstract data of the source tracing original data by using an abstract algorithm as second abstract data;
step S404, verifying the tracing information according to the transaction unique identifier stored in the tracing system, the transaction unique identifier stored in the block chain system, the first abstract data and the second abstract data.
Specifically, the embodiment of the present invention adds an API interface for querying the txID according to the RID. And the tracing service system reads the tracing original data, the tracing unique identifier and the transaction unique identifier, and queries out the transaction unique identifier txID' corresponding to the tracing unique identifier in the block chain system through RID according to the added interface. And determining the abstract data of the obtained tracing original data by using an abstract algorithm to be used as second abstract data, and then verifying the tracing information according to the transaction unique identifier stored in the tracing system, the transaction unique identifier stored in the block chain system, the first abstract data and the second abstract data.
More specifically, whether the transaction unique identification stored in the tracing system is consistent with the transaction unique identification stored in the blockchain system is compared, if the transaction unique identification is not consistent with the transaction unique identification stored in the blockchain system, tampering suspicion exists, if the transaction unique identification is consistent with the transaction unique identification stored in the blockchain system, whether the second abstract data is consistent with the first abstract data is continuously compared, if the second abstract data is consistent with the first abstract data, no tampering data exists, and if the second abstract data is not consistent with the first abstract data, tampering suspicion exists.
According to the embodiment of the invention, the incidence relation between the block chain transaction unique identifier and the traceability unique identifier in the traceability service system is added in the block chain, so that the incidence relation between the traceability original data corresponding to the traceability unique identifier and the block chain transaction data can be inquired from both the traceability service system and the block chain, and the possibility of counterfeiting traceability information can be completely eliminated by a mode of bidirectionally verifying whether the data is tampered based on the non-tampering characteristic of the block chain data.
Based on the content of the above embodiments, as an alternative embodiment: as shown in fig. 5, the specific steps related to the source tracing service system in fig. 5 are as follows:
tracing data recording process:
1. a tracing service system: writing the tracing original data R into a service system to obtain a tracing unique identifier RID;
2. a tracing service system: and processing the tracing original data R by a summarization algorithm to obtain summarized data H, wherein H is hash (R) and can also be expressed as H _ B, then packaging H and RID into a transaction T through a block chain SDK, and transmitting T to the block chain system. This step results in a transaction unique identification txID.
3. The block chain system: and receiving a calling party transaction T, and writing the transaction T into the system after the verification security verification is passed, which is the same as the original block chain system. At this time, the blockchain system has an association relationship between the txID and the transaction T, and since the transaction T is encapsulated by H, there is an association relationship between the txID and H.
4. The block chain system: and taking out the unique identifier RID of the tracing service in the transaction, and increasing the incidence relation between the unique identifier RID of the tracing service and the txID.
5. A tracing service system: after receiving the message that the block chain system successfully writes the transaction T, the traceable service system writes the txID back to the traceable service system to obtain the relationship of the RID, the R and the txID.
Verifying the tracing information:
1. a tracing service system: and reading the tracing original data R, the tracing unique identifier RID and the transaction unique identifier txID.
2. The block chain system: the corresponding txID' stored in the blockchain system is queried through the RID through the added interface.
3. And comparing whether the txID is consistent with the txID', if not, the tampering is suspected, and if so, continuing the following logic.
4. And calculating the read tracing original data through a summary algorithm to obtain a summary H _ A of the tracing original data.
5. And inquiring in the block chain system according to the txID to obtain the summary data H _ B corresponding to the txID.
6. And comparing the H _ A with the H _ B, if the H _ A and the H _ B are consistent, the data is not tampered, otherwise, the tampering is suspected.
According to another aspect of the present invention, an embodiment of the present invention provides a tracing service system based on block chain tracing information writing, and the method for writing tracing information based on block chain provided in the foregoing embodiments of the present invention is applied to description and definition in the tracing service system, and can be used for understanding each execution module in the embodiments of the present invention.
As shown in fig. 6, the tracing service system includes:
a source tracing original data receiving module 601, configured to receive source tracing original data to obtain a source tracing unique identifier;
a first abstract data determining module 602, configured to determine abstract data of the source-tracing original data by using an abstract algorithm, as first abstract data;
the transaction encapsulation module 603 is configured to encapsulate the traceable unique identifier and the first summary data into blockchain transaction data, and determine a transaction unique identifier;
a sending module 604, configured to send the transaction data to the blockchain system.
Specifically, the specific process of each module of this embodiment for implementing its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
According to another aspect of the present invention, an embodiment of the present invention provides a block chain system for writing tracing information based on a block chain, and the method for writing tracing information based on a block chain provided in the foregoing embodiments of the present invention is applied to description and definition in the block chain system, and can be used for understanding each execution module in the embodiments of the present invention.
As shown in fig. 7, the blockchain system includes:
a receive transaction data module 701, configured to receive transaction data and determine a unique transaction identifier;
the acquiring correspondence module 702 is configured to determine, according to a correspondence between the transaction unique identifier and the transaction data, a correspondence between the transaction unique identifier and the first summary data, and a correspondence between the transaction unique identifier and the traceable unique identifier;
the storage module 703 is used for storing transaction data.
Specifically, the specific process of each module of this embodiment for implementing its function may refer to the related description in the corresponding method embodiment, and is not described herein again.
According to another aspect of the present invention, an embodiment of the present invention provides a tracing service system for performing tracing information verification based on a blockchain, and the method for performing tracing information verification based on a blockchain provided in the foregoing embodiments of the present invention is applied to description and definition in the tracing service system, and can be used for understanding each execution module in the embodiments of the present invention.
As shown in fig. 8, the tracing service system includes:
the reading module 801 is used for reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
the searching module 802 is configured to search, according to a correspondence between the transaction unique identifier and the traceable unique identifier, a transaction unique identifier corresponding to the traceable unique identifier in the blockchain system;
a second abstract data determining module 803, configured to determine, by using an abstract algorithm, abstract data of the source-tracing original data as second abstract data;
the verification traceability information module 804 is configured to verify traceability information according to the transaction unique identifier stored in the traceability system, the transaction unique identifier stored in the block chain system, the first abstract data, and the second abstract data.
Specifically, the specific implementation process of this embodiment may refer to the related description in the corresponding method embodiment, and details are not repeated here.
Fig. 9 is a block diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 9, the electronic device includes: a processor 901, memory 902, and bus 903;
the processor 901 and the memory 902 complete communication with each other through the bus 903 respectively; the processor 901 is configured to call program instructions in the memory 902 to execute the method for writing tracing information based on a blockchain provided by the foregoing embodiment, where the method is applied to a tracing service system, and for example, the method includes: receiving the tracing original data to obtain a unique tracing identifier; determining abstract data of the tracing original data by using an abstract algorithm to serve as first abstract data; packaging the traceable unique identifier and the first abstract data into block chain transaction data, and determining the transaction unique identifier; the transaction data is sent to the blockchain system.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of a method for writing tracing information based on a blockchain, where the method is applied to a tracing service system. Examples include: receiving the tracing original data to obtain a unique tracing identifier; determining abstract data of the tracing original data by using an abstract algorithm to serve as first abstract data; packaging the traceable unique identifier and the first abstract data into block chain transaction data, and determining the transaction unique identifier; the transaction data is sent to the blockchain system.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, the principle and the implementation of the present invention are explained by applying the specific embodiments in the present invention, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (7)

1. A method for tracing source information writing based on block chain is characterized in that the method is applied to a block chain system, and the method comprises the following steps:
receiving transaction data and determining a unique transaction identifier;
determining the corresponding relation between the transaction unique identifier and the first abstract data and the corresponding relation between the transaction unique identifier and the source tracing unique identifier according to the corresponding relation between the transaction unique identifier and the transaction data;
storing the transaction data.
2. The method according to claim 1, characterized in that it comprises:
and sending a message of successful transaction data storage to the tracing service system.
3. A method for verifying traceability information based on a block chain is applied to a traceability service system, and comprises the following steps:
reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
searching a transaction unique identifier corresponding to the traceable unique identifier in the blockchain system according to the corresponding relation between the transaction unique identifier and the traceable unique identifier;
determining abstract data of the tracing original data by using an abstract algorithm to serve as second abstract data;
and verifying the tracing information according to the transaction unique identifier stored in the tracing service system, the transaction unique identifier stored in the block chain system, the first abstract data and the second abstract data.
4. The method of claim 3, wherein the verifying the tracing information according to the transaction unique identifier stored in the tracing service system, the transaction unique identifier stored in the blockchain system, the first summary data and the second summary data comprises:
comparing whether the transaction unique identification stored in the tracing service system is consistent with the transaction unique identification stored in the block chain system;
and if so, comparing whether the second abstract data is consistent with the first abstract data or not, and finishing the verification of the tracing information.
5. A blockchain system for traceback information writing based on blockchains, the blockchain system comprising:
the transaction data receiving module is used for receiving transaction data and determining a unique transaction identifier;
the acquiring corresponding relation module is used for determining the corresponding relation between the transaction unique identifier and the first summary data and the corresponding relation between the transaction unique identifier and the traceable unique identifier according to the corresponding relation between the transaction unique identifier and the transaction data;
and the storage module is used for storing the transaction data.
6. A traceability service system for performing traceability information verification based on a block chain is characterized in that the traceability service system comprises:
the reading module is used for reading the tracing original data, the tracing unique identifier and the transaction unique identifier;
the searching module is used for searching the transaction unique identifier corresponding to the traceable unique identifier in the block chain system according to the corresponding relation between the transaction unique identifier and the traceable unique identifier;
a second abstract data determining module, configured to determine, by using an abstract algorithm, abstract data of the source tracing original data as second abstract data;
and the verification traceability information module is used for verifying traceability information according to the transaction unique identifier stored in the traceability service system, the transaction unique identifier stored in the block chain system, the first abstract data and the second abstract data.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in claim 1 or claim 3 or claim 5 are implemented by the processor when executing the program.
CN202010666460.3A 2020-07-10 2020-07-10 Tracing information writing and tracing information verification method and system based on block chain Active CN112000730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010666460.3A CN112000730B (en) 2020-07-10 2020-07-10 Tracing information writing and tracing information verification method and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010666460.3A CN112000730B (en) 2020-07-10 2020-07-10 Tracing information writing and tracing information verification method and system based on block chain

Publications (2)

Publication Number Publication Date
CN112000730A CN112000730A (en) 2020-11-27
CN112000730B true CN112000730B (en) 2021-12-24

Family

ID=73466863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010666460.3A Active CN112000730B (en) 2020-07-10 2020-07-10 Tracing information writing and tracing information verification method and system based on block chain

Country Status (1)

Country Link
CN (1) CN112000730B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685436B (en) * 2020-12-24 2022-10-28 中国人民解放军战略支援部队信息工程大学 Tracing information processing method and device
CN112667661B (en) * 2020-12-24 2022-10-28 中国人民解放军战略支援部队信息工程大学 Tracing information correlation query method and device
CN113411373B (en) * 2021-04-26 2023-07-25 艾普工华科技(武汉)有限公司 Transaction data storage method, tracking and tracing method and blockchain network
CN113052617B (en) * 2021-06-01 2021-08-24 云上(江西)大数据发展有限公司 Tracing method and tracing system for cross-border e-commerce three-order data
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107316239A (en) * 2017-07-14 2017-11-03 众安信息技术服务有限公司 A kind of authentification of message and source tracing method and system based on block chain
CN107391735A (en) * 2017-08-04 2017-11-24 北京明朝万达科技股份有限公司 Business datum source tracing method, device, system and storage device based on block chain
US11228584B2 (en) * 2018-12-28 2022-01-18 Speedchain, Inc. Systemized blockchain reconciliation in a hybrid distributed network ecosystem
CN110232576A (en) * 2019-05-21 2019-09-13 深圳壹账通智能科技有限公司 A kind of trace to the source data processing method and relevant apparatus based on block chain
CN110851843A (en) * 2019-10-08 2020-02-28 立旃(上海)科技有限公司 Data management method and device based on block chain
CN110912937B (en) * 2019-12-23 2021-09-07 杭州中科先进技术研究院有限公司 Block chain-based digital certificate storage platform and certificate storage method

Also Published As

Publication number Publication date
CN112000730A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
CN112000730B (en) Tracing information writing and tracing information verification method and system based on block chain
CN108415784B (en) Cross-block-chain interaction method, device, system and electronic equipment
CN112491551B (en) Data verification method and device based on block chain and electronic equipment
CN109558748B (en) Data processing method and device, electronic equipment and storage medium
CN110851879B (en) Method, device and equipment for infringement and evidence preservation based on evidence preservation block chain
CN110751475A (en) Cross-chain method, system, equipment and storage medium for blockchain transaction
CN110730225A (en) Data processing method of Internet of things based on block chain, Internet of things and storage medium
CN109918668A (en) Credit information management method, device, equipment and storage medium based on block chain
WO2021208762A1 (en) Data storage and query
CN113220717B (en) Block chain-based data verification method and device and electronic equipment
CN112487011A (en) Block chain based Internet of things terminal data chaining method and system
CN111651525A (en) Block chain data storage method and device
CN104836777B (en) Identity verification method and system
KR20210008486A (en) Secure dataset management
CN111723159A (en) Data verification method and device based on block chain
CN112015806A (en) Method and device for storing data by block chain
CN109858285B (en) Block chain data processing method, device, equipment and medium
CN110033367A (en) Based on the contract record method and device of block chain, electronic equipment
CN110347678B (en) Financial data storage method, system, device and equipment
CN113742235A (en) Method and device for checking codes
CN115203747A (en) Data account creation method and device
CN114782045A (en) Cross-chain non-transactional writing method and device, storage medium and electronic equipment
CN113221164A (en) Block chain-based data verification method and device and electronic equipment
CN109218320A (en) Web-site links security verification method, device, computer equipment and storage medium
CN112000713A (en) Data processing method, device, equipment and medium

Legal Events

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