CN112150149A - Data tracing method and device based on block chain, computer equipment and storage medium - Google Patents

Data tracing method and device based on block chain, computer equipment and storage medium Download PDF

Info

Publication number
CN112150149A
CN112150149A CN202011015392.0A CN202011015392A CN112150149A CN 112150149 A CN112150149 A CN 112150149A CN 202011015392 A CN202011015392 A CN 202011015392A CN 112150149 A CN112150149 A CN 112150149A
Authority
CN
China
Prior art keywords
block
data
operation data
tracing
block hash
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.)
Pending
Application number
CN202011015392.0A
Other languages
Chinese (zh)
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.)
Shenzhen Zhongzhuang Intelligent Chain Technology Co ltd
Original Assignee
Shenzhen Zhongzhuang Intelligent Chain Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhongzhuang Intelligent Chain Technology Co ltd filed Critical Shenzhen Zhongzhuang Intelligent Chain Technology Co ltd
Priority to CN202011015392.0A priority Critical patent/CN112150149A/en
Publication of CN112150149A publication Critical patent/CN112150149A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data tracing method and device based on a block chain, computer equipment and a storage medium. The method comprises the steps that operation data of each process node in the bill circulation process are linked and stored in a basic database; and performing consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block to generate block hash, and storing the block hash into a cloud database. The invention can inquire the block corresponding to the transaction code when the chain is linked through the transaction code and acquire corresponding data from the block; the corresponding block hash can be traced and obtained through the identification code, the block hash value of the previous process node is obtained from the block hash value of the current process node, the block hash value of the previous process node is obtained according to the block hash value, and through repeated tracing, the whole process tracing of the bill is realized, so that the bottom layer data is traced step by step, and the safety and the authenticity of the data are improved.

Description

Data tracing method and device based on block chain, computer equipment and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a data tracing method and apparatus based on a block chain, a computer device, and a storage medium.
Background
At present, Enterprise Resource Planning (ERP system for short) in the decoration construction industry is stored by adopting a traditional database, upper-layer logic can only be traced from the ERP system logic, database operation is required to be carried out in each step of the ERP system, but the incidence relation of the databases is correlated by the EPR service logic, the steps can not be traced from the bottom-layer data, and the safety and the authenticity of the data are still to be improved.
Disclosure of Invention
The invention aims to provide a data tracing method and device based on a block chain, computer equipment and a storage medium, and aims to solve the problem that the data security and authenticity of bills issued by enterprises are insufficient in the circulation process.
In a first aspect, an embodiment of the present invention provides a data tracing method based on a block chain, including:
linking a bill created by an enterprise according to the transaction information to a block chain platform;
linking the operation data of each process node in the bill transfer process to a block chain platform, and then storing the operation data into a basic database;
after the operation data of each process node in the bill circulation process are linked, generating blocks corresponding to each operation data, generating a transaction code for each block and returning the transaction code, then associating the transaction code with a bill ID and storing the transaction code and the bill ID into a basic database, and establishing a tracing model of the transaction information according to the basic database;
performing consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block to generate block hash, and storing the block hash into a cloud database;
searching a corresponding block by using the identification code, calling all uplink information in the block to obtain block hash, and acquiring a block hash value of a previous flow node from the block hash;
and tracing the block hash of the previous flow node according to the block hash value.
In a second aspect, an embodiment of the present invention provides a data tracing apparatus based on a block chain, including:
the system comprises a creating unit, a block chain platform and a processing unit, wherein the creating unit is used for linking a bill created by an enterprise according to transaction information to the block chain platform;
the first storage unit is used for chaining the operation data of each process node in the bill circulation process to a block chain platform and then storing the operation data into a basic database;
the construction unit is used for generating blocks corresponding to each operation data after the operation data of each process node in the bill circulation process are linked, generating a transaction code for each block and returning the transaction code, then associating the transaction code with a bill ID and storing the transaction code and the bill ID into a basic database, and constructing a tracing model of the transaction information according to the basic database;
the second storage unit is used for carrying out consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block generation block hash and storing the operation data into a cloud database;
the acquisition unit is used for inquiring the corresponding block by using the identification code, calling all uplink information in the block and obtaining block hash, and acquiring the block hash value of the previous flow node from the block hash;
and the tracing unit is used for tracing the block hash of the previous flow node according to the block hash value.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor, when executing the computer program, implements the data tracing method based on the block chain according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the data tracing method based on a block chain according to the first aspect.
The invention discloses a data tracing method and device based on a block chain, computer equipment and a storage medium. The method comprises the steps that operation data of each process node in the bill circulation process are linked and stored in a basic database; and performing consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block to generate block hash, and storing the block hash into a cloud database. The embodiment of the invention can inquire the block corresponding to the transaction code during uplink through the transaction code and acquire corresponding data from the block; the corresponding block hash can be traced and obtained through the identification code, the block hash value of the previous process node is obtained from the block hash value of the current process node, the block hash value of the previous process node is obtained according to the block hash value, and through repeated tracing, the whole process tracing of the bill is realized, so that the bottom layer data is traced step by step, and the safety and the authenticity of the data are improved.
Drawings
In order to more clearly illustrate the technical method of the embodiment of the present invention, the drawings needed to be used in the description of the embodiment will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without inventive labor.
Fig. 1 is a schematic flowchart of a data tracing method based on a block chain according to an embodiment of the present invention;
fig. 2 is a sub-flow diagram of a data tracing method based on a block chain according to an embodiment of the present invention;
fig. 3 is a schematic sub-flowchart of a data tracing method based on a block chain according to an embodiment of the present invention;
fig. 4 is a schematic sub-flowchart of a data tracing method based on a block chain according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of a data tracing apparatus based on a block chain according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical method in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a flowchart of a data tracing method based on a block chain according to an embodiment of the present invention;
as shown in fig. 1, the method includes steps S101 to S106:
s101, linking a bill created by the enterprise according to the transaction information to a block chain platform.
In this embodiment, an enterprise may create a bill according to its own purchasing demand, financing demand, or other demand, and link the bill to a blockchain platform, where a blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission (P2P transmission), consensus mechanism, and confidential algorithm, and is essentially a decentralized database; the block chain can be composed of a plurality of serial transaction records (also called blocks) which are connected in series by cryptography and protect the contents, and the distributed accounts connected in series by the block chain can effectively record the transaction by multiple parties and permanently check the transaction; the bill information is stored through the block chain platform, so that the safety of the bill information can be improved.
And S102, linking the operation data of each process node in the bill circulation process to a block chain platform, and storing the operation data into a basic database.
In this embodiment, after the enterprise creates the bill, the bill is sent to the next process node according to the transaction information and is operated by the next process node, after the operation of the next process node is completed, the bill is continuously sent to the next process node for operation until the bill transfer is completed, the operation data of each process node in the transfer process is all linked to the block chain platform, and the operation data is stored in the basic database.
For example, taking the financing application as an example, in the financing process, the 6 main process nodes include a bill creation process, an internal audit process, an asset audit process, a signing process, a deposit process and a collection confirmation process, and the specific process may be: an enterprise creates a bill according to the financing requirement of the enterprise, links the created data to a block chain platform after the creation is completed, and stores the created data into a basic database after the link is linked; then, the enterprise carries out internal audit on the created bill, links the internally audited data to the block chain platform, and stores the audited data of the enterprise into the basic database after linking; then, the bill flow is transmitted to an owner (bank) for auditing, after the owner audits, the audited data of the owner is linked to a block chain platform, and after the link is completed, the audited data of the owner is stored in a basic database; then, the bill flow is transferred to a signing platform and signed, signing data of an enterprise and an sponsor are linked to a block chain platform, and the signing data are stored in a basic database after the linkage; paying by the sponsor according to the bill information, chaining the paying data to the block chain platform, and storing the paying data into the basic database after chaining; finally, the enterprise confirms collection and links the collection data to the block chain platform, and stores the collection data into the basic database after linking; therefore, in the whole bill flow process, all the operation data of each flow node is linked up; and storing the operation data of each process node into the basic database after uplink.
In one embodiment, the step S102 includes:
and verifying the operation data of the bill at each flow node, judging whether the operation data is correct or not, and storing the operation data into a basic database if the operation data is correct.
In the embodiment, in the data transmission process, a data error condition may exist, and in order to ensure the correctness of data transmission, each operation data of each process node needs to be checked and whether the data is correct is judged, so that the operation data can be found and corrected in time when the data is in error, and the operation data can be completely stored in the basic database; the data check method adopted in this embodiment may be parity check, CRC check, LRC check, gray code check, or sum check.
S103, after the operation data of each process node in the bill circulation process are linked, generating a block corresponding to each operation data, generating a transaction code for each block and returning, then associating the transaction code with a bill ID and storing the transaction code and the bill ID into a basic database, and establishing a tracing model of the transaction information according to the basic database.
In this embodiment, ID is used as a key of a chain code to perform related business operations, during the bill circulation, each change of data state initiates a chain linking operation, after each operation data of each process node is subjected to chain linking, each data change of each process node can be stored, a corresponding block and a transaction code for each block are generated for each data change, the transaction code and the bill ID are associated and stored in a basic database, and all chain linking data are stored in the basic database, so that the method can be used for performing subsequent process tracing.
Taking the financing information as an example, in a release link of a sponsor, the sponsor pays corresponding account according to bill information and generates an account voucher, all operation data in the link are linked to generate an account block and stored in a basic database, an account transaction code is generated after the linking, and the account transaction code and a bill ID are associated and stored in the basic database.
The specific process tracing process of the money release link comprises the following steps: acquiring a related bill ID and an account block corresponding to the bill ID in the basic database through the account transaction code, and acquiring uplink data corresponding to the account transaction code through the account block, so as to realize the tracing of the uplink data of the process of the money release link; furthermore, the uplink data of all process links can be traced through the transaction codes of all process nodes.
In an embodiment, the constructing the tracing model of the transaction information according to the basic database includes:
and establishing a tracing model of the transaction information by combining the plurality of participants corresponding to all the process nodes in the bill circulation process and the uplink data of all the process nodes in the basic database.
In this embodiment, in a complete transaction, a bill flows through a plurality of process nodes from creation to termination, each process node corresponds to a participant, each participant may correspond to one or more process nodes, and by combining each participant and its corresponding process node, and each process node corresponding to uplink data in the basic database, a tracing model about the transaction may be established for tracing back the process nodes under any participant and all uplink data of the process node, thereby implementing whole-course tracing back in the bill flow process.
Taking the financing information as an example, the process from the bill creation of the enterprise to the collection confirmation can be combined with the process nodes corresponding to the enterprise, the sponsor and the signing platform and the third party and the uplink data corresponding to each process node in the basic database to establish a tracing model related to the financing information.
And S104, performing consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block to generate block hash, and storing the block hash into a cloud database.
In the embodiment, when the operation data of each process node is linked, the operation data is broadcasted to each process node through the sequencing node to perform consensus verification, the identification code is obtained after the consensus verification is passed, the operation data is stored in the block to generate block hash and is stored in the cloud database, and in the tracing process of the block hash, the identification code can be used for obtaining the corresponding block hash in the cloud database.
In one embodiment, as shown in FIG. 2, the step S104 includes:
s201, standardizing operation data of each process node through an intelligent contract to unify operation data with different formats, different types and different lengths, verifying the operation data, uploading endorsements after verification is passed to complete consensus verification and obtain identification codes;
s202, storing the operation data into a block, generating block hash corresponding to the identification code, and storing the block hash into a cloud database.
In the embodiment, data are processed through an intelligent contract aiming at information and transaction data structures of a plurality of participants, the data with different formats, different types and different lengths are unified and verified, then the endorsement is uploaded, further consensus verification is carried out, the data are enabled to be consistent through the consensus verification, and the identification code corresponding to each operation data is obtained; and then storing each operation data into a block, generating a block hash corresponding to the identification code, and storing the block hash into a cloud database.
The block hash comprises a single root hash value obtained by carrying out common operation on hash values of all uplink data in the block, the single root hash value is stored in a block header, when the uplink data of the block are changed, the corresponding root hash value is correspondingly changed, if the root hash value is changed, the Merkle root is also changed, and the Merkle tree helps to maintain the integrity of the data; therefore, the root hash value has very important significance in maintaining the authenticity and integrity of the data; the cloud database is a stable, reliable and elastically-telescopic online database, the block hash can be stored in the cloud database, the safety and the authenticity of the block hash can be ensured, and a safe and reliable basis is provided for the subsequent block hash tracing process.
And in the process of calling the uplink data of the block through the identification code, performing hash operation on the obtained uplink data to obtain a hash value, comparing the obtained hash value with a root hash value stored at the head of the block, and if the obtained hash value is the same as the root hash value, indicating that the called uplink data is real and complete.
S105, inquiring the corresponding block by using the identification code, calling all uplink information in the block and obtaining block hash, and obtaining the block hash value of the previous flow node from the block hash.
In this embodiment, in the process of forwarding the whole bill, the block hash value of the previous flow node is recorded in the block hash of each flow node, after the current corresponding block is queried through the identification code, the block hash value of the previous flow node can be obtained from the block hash of the current block, and the block of the previous flow node is traced through the block hash value of the previous flow node, so that the process of tracing the block data step by step upwards is realized.
It should be noted that, here, tracing back the block hash of the previous flow node refers to tracing back the previous block of the current block, and if a plurality of consecutive blocks are generated in one flow node in the bill circulation process, the tracing back process here is to trace back the block hash of the previous block of the current flow node from the current block of the current flow node upward.
In one embodiment, the step S105 includes:
selecting an identification code of any process node, inquiring a corresponding block of the process node, acquiring all uplink data in the block and obtaining block hash, wherein the block hash comprises a data root hash value of the current process node and a block hash value of the previous process node.
In the embodiment, in the whole bill circulation process, one or more blocks can be correspondingly arranged under each process node, and each block corresponds to one identification code; by selecting any identification code for block query, the corresponding process node and the corresponding block under the process node can be directly located, all uplink information is obtained from the block, block hash is obtained according to uplink data, and the root hash value of the current block and the block hash value of the previous process node can be obtained from the block hash.
And S106, tracing the block hash of the previous flow node according to the block hash value, acquiring the block hash value of the next previous flow node from the block hash of the previous flow node, and tracing step by step to realize the tracing of the whole process.
In one embodiment, as shown in FIG. 3, the step S106 includes:
s301, according to the block hash value of the previous flow node stored in the block of the current flow node.
In this embodiment, each block hash value is used as key information for tracing back a corresponding block, and the block hash value of a previous flow node can be obtained in each block hash, so that the operation data of each flow node can be traced back step by step.
And S302, obtaining the block hash value of the previous flow node according to the obtained block hash of the previous flow node, and realizing effective tracing of the whole flow.
In this embodiment, the block hash value of the previous flow node in the current block is traced back, the block hash value of the previous flow node is obtained from the block hash value of the previous flow node, and the tracing back process is repeated, so that the process of tracing back the previous block according to the current block can be realized, the data tracing back in the whole process is achieved, and the obtained data has the advantages of reality and completeness.
In one embodiment, as shown in fig. 4, the method further comprises:
s401, generating a tracing two-dimensional code for the identification code;
s402, identifying the tracing two-dimensional code, inquiring the uplink data of the corresponding block and returning.
In the embodiment, in the tracing process, a user can open a traced appointed page by scanning the tracing two-dimensional code, the tracing system can automatically inquire all data in the block corresponding to the identification code according to the transmitted identification code, and the data is displayed in a web page viewed by the user through the server, so that the tracing of the current block is completed.
Taking the financing information as an example, when the paying link of the sponsor is traced, the tracing two-dimensional code of the block corresponding to the paying link of the sponsor can be directly positioned and obtained to all uplink data in the block corresponding to the paying link, and the paying information is obtained from the obtained uplink data.
The embodiment of the invention also provides a data tracing device based on the block chain, which is used for executing any embodiment of the data tracing method based on the block chain. Specifically, referring to fig. 5, fig. 5 is a schematic block diagram of a data tracing apparatus based on a block chain according to an embodiment of the present invention.
As shown in fig. 5, the data tracing apparatus based on the block chain includes: the device comprises a creating unit 501, a first storage unit 502, a constructing unit 503, a second storage unit 505, an acquiring unit 505 and a tracing unit 506.
A creating unit 501, configured to link a bill created by an enterprise according to the transaction information to a block chain platform;
a first storage unit 502, configured to link operation data of each process node in the bill circulation process to a block chain platform, and store the operation data in a basic database;
a building unit 503, configured to generate a block corresponding to each operation data after chaining the operation data of each process node in the bill circulation process, generate and return a transaction code for each block, associate and store the transaction code and the bill ID in a basic database, and build a trace back model of the transaction information according to the basic database;
a second storage unit 505, configured to perform consensus verification on the operation data of each process node to obtain an identification code, store the operation data in a block generation block hash, and store the operation data in a cloud database;
an obtaining unit 505, configured to query a corresponding block by using the identifier, call all uplink information in the block and obtain a block hash, and obtain a block hash value of a previous flow node from the block hash;
a tracing unit 506, configured to trace the block hash of the previous flow node according to the block hash value.
The device can inquire the block corresponding to the transaction code when the user links the chain through the transaction code and acquire corresponding data from the block; the corresponding block hash can be traced and obtained through the identification code, the block hash value of the previous flow node is obtained from the block hash value of the current flow node, the block hash value of the previous flow node is obtained according to the block hash value, and the whole flow tracing of the bill is realized through repeated tracing, so that the step tracing from bottom data is realized, and the safety and the authenticity of the data are improved.
The above block chain based data tracing apparatus may be implemented in the form of a computer program which can be run on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 600 is a server, and the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 6, the computer device 600 includes a processor 602, memory, and a network interface 605 connected by a system bus 601, where the memory may include a non-volatile storage medium 603 and an internal memory 606.
The non-volatile storage medium 603 may store an operating system 6031 and computer programs 6032. The computer program 6032, when executed, may cause the processor 602 to perform a block chain based data tracing method.
The processor 602 is used to provide computing and control capabilities that support the operation of the overall computer device 600.
The internal memory 606 provides an environment for the execution of a computer program 6032 in the non-volatile storage medium 603, which computer program 6032, when executed by the processor 602, causes the processor 602 to perform a block chain based data trace back method.
The network interface 605 is used for network communication, such as providing transmission of data information. It will be appreciated by those skilled in the art that the architecture shown in fig. 6 is a block diagram of only a portion of the architecture associated with the method of the present invention, and is not intended to limit the computing device 600 to which the method of the present invention may be applied, as a particular computing device 600 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 6 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 6, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 602 may be a Central Processing Unit (CPU), and the Processor 602 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the block chain based data tracing method of an embodiment of the present invention.
The storage medium is an entity and non-transitory storage medium, and may be various entity storage media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data tracing method based on a block chain is characterized by comprising the following steps:
linking a bill created by an enterprise according to the transaction information to a block chain platform;
linking the operation data of each process node in the bill transfer process to a block chain platform, and then storing the operation data into a basic database;
after the operation data of each process node in the bill circulation process are linked, generating blocks corresponding to each operation data, generating a transaction code for each block and returning the transaction code, then associating the transaction code with a bill ID and storing the transaction code and the bill ID into a basic database, and establishing a tracing model of the transaction information according to the basic database;
performing consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block to generate block hash, and storing the block hash into a cloud database;
searching a corresponding block by using the identification code, calling all uplink information in the block to obtain block hash, and acquiring a block hash value of a previous flow node from the block hash;
and tracing the block hash of the previous flow node according to the block hash value.
2. The method of claim 1, wherein the step of linking the operation data of each process node in the bill circulation process to a blockchain platform and then storing the operation data into a basic database comprises:
and verifying the operation data of the bill at each flow node, judging whether the operation data is correct or not, and storing the operation data into a basic database if the operation data is correct.
3. The method for tracing data based on block chains according to claim 1, wherein the building of the tracing model of the transaction information according to the basic database comprises:
and establishing a tracing model of the transaction information by combining the plurality of participants corresponding to all the process nodes in the bill circulation process and the uplink data of all the process nodes in the basic database.
4. The data tracing method based on the block chain as claimed in claim 1, wherein the performing consensus verification on the operation data of each process node and obtaining the identification code, and storing the operation data into the block generation block hash and storing the operation data into the cloud database comprises:
standardizing the operation data of each process node through an intelligent contract to unify the operation data with different formats, different types and different lengths, verifying the operation data, uploading endorsements after the verification is passed to complete consensus verification and obtain identification codes;
and storing the operation data into a block, generating a block hash corresponding to the identification code, and storing the block hash into a cloud database.
5. The method of claim 1, wherein the querying the corresponding block by using the identifier code, calling all uplink information in the block and obtaining a block hash, and obtaining a block hash value of a previous flow node from the block hash comprises:
selecting an identification code of any process node, inquiring a corresponding block of the process node, acquiring all uplink data in the block and obtaining block hash, wherein the block hash comprises a data root hash value of the current process node and a block hash value of the previous process node.
6. A method for tracing data based on block chains according to claim 5, wherein said tracing the block hash of the previous flow node according to the block hash value comprises:
tracing the block hash of the previous flow node according to the block hash value of the previous flow node stored in the block of the current flow node;
and obtaining the block hash value of the previous flow node according to the obtained block hash of the previous flow node, thereby realizing the effective tracing of the whole flow.
7. The method for tracing data based on a block chain according to claim 1, further comprising:
generating a tracing two-dimensional code for the identification code;
and identifying the tracing two-dimensional code, inquiring the uplink data of the corresponding block and returning.
8. A data tracing device based on a block chain is characterized by comprising:
the system comprises a creating unit, a block chain platform and a processing unit, wherein the creating unit is used for linking a bill created by an enterprise according to transaction information to the block chain platform;
the first storage unit is used for chaining the operation data of each process node in the bill circulation process to a block chain platform and then storing the operation data into a basic database;
the construction unit is used for generating blocks corresponding to each operation data after the operation data of each process node in the bill circulation process are linked, generating a transaction code for each block and returning the transaction code, then associating the transaction code with a bill ID and storing the transaction code and the bill ID into a basic database, and constructing a tracing model of the transaction information according to the basic database;
the second storage unit is used for carrying out consensus verification on the operation data of each process node to obtain an identification code, storing the operation data into a block generation block hash and storing the operation data into a cloud database;
the acquisition unit is used for inquiring the corresponding block by using the identification code, calling all uplink information in the block and obtaining block hash, and acquiring the block hash value of the previous flow node from the block hash;
and the tracing unit is used for tracing the block hash of the previous flow node according to the block hash value.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the blockchain-based data tracing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, causes the processor to carry out the blockchain-based data tracing method according to any one of claims 1 to 7.
CN202011015392.0A 2020-09-24 2020-09-24 Data tracing method and device based on block chain, computer equipment and storage medium Pending CN112150149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011015392.0A CN112150149A (en) 2020-09-24 2020-09-24 Data tracing method and device based on block chain, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011015392.0A CN112150149A (en) 2020-09-24 2020-09-24 Data tracing method and device based on block chain, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112150149A true CN112150149A (en) 2020-12-29

Family

ID=73896637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011015392.0A Pending CN112150149A (en) 2020-09-24 2020-09-24 Data tracing method and device based on block chain, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112150149A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860801A (en) * 2021-03-15 2021-05-28 智显互联(深圳)股份有限公司 Commercial display industry supply chain information storage system and information storage and retrieval method thereof
CN113190616A (en) * 2021-04-16 2021-07-30 宁波市民卡运营管理有限公司 Block chain reconciliation system and method, computer device and readable storage medium
CN113377852A (en) * 2021-06-18 2021-09-10 虎彩印艺股份有限公司 Block chain-based method for tracing data source in wind control report
CN113468571A (en) * 2021-07-15 2021-10-01 湖北央中巨石信息技术有限公司 Tracing method based on block chain
CN113641992A (en) * 2021-08-14 2021-11-12 深圳众享互联科技有限公司 Chain tracing method of data and data operation algorithm
CN114240349A (en) * 2021-12-09 2022-03-25 数字未来(福建)信息科技有限公司 Ecological environment supervision method and system based on block chain
CN115905895A (en) * 2023-03-08 2023-04-04 云加速(北京)科技有限公司 SBOM identification clustering model implementation method based on block chain
CN116128390A (en) * 2023-04-17 2023-05-16 长沙智医云科技有限公司 Medical consumable cold chain transportation monitoring method based on Internet of things
CN117254975A (en) * 2023-11-14 2023-12-19 深圳市嘉合劲威电子科技有限公司 Block chain-based data anti-counterfeiting method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN109377244A (en) * 2018-10-24 2019-02-22 武汉珞樱联创信息科技有限公司 A kind of quick traceability system of food and method based on multichain interconnection block chain network
CN109472617A (en) * 2018-09-25 2019-03-15 仲恺农业工程学院 Aquatic product circulation tracking system and method based on block chain
CN109767214A (en) * 2018-12-27 2019-05-17 平安科技(深圳)有限公司 Incorporate supply chain management-control method, device, equipment and the medium of market risk
CN109784951A (en) * 2019-01-29 2019-05-21 浙江甲骨文超级码科技股份有限公司 A kind of anti-fake traceability system of product whole process based on block chain technology
CN110009356A (en) * 2019-04-16 2019-07-12 北京艾摩瑞策科技有限公司 A kind of business datum cochain method and its system based on block chain
CN110516965A (en) * 2019-08-27 2019-11-29 北京工商大学 The credible retrospect model of oil and foodstuffs full supply chain and construction method based on block chain
CN110647582A (en) * 2019-09-17 2020-01-03 腾讯科技(深圳)有限公司 Method and device for block chain network consensus checking, storage medium and computer equipment
CN110766422A (en) * 2019-10-30 2020-02-07 西南石油大学 Drug collaboration and traceability system and method based on alliance chain
CN110838064A (en) * 2019-10-12 2020-02-25 华中科技大学 Method and system for realizing asset tracing based on Fabric Block Link platform
CN111581627A (en) * 2020-05-11 2020-08-25 北京精准沟通传媒科技股份有限公司 Data processing method and device and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018119930A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Transaction verification processing method, apparatus and node device
CN109472617A (en) * 2018-09-25 2019-03-15 仲恺农业工程学院 Aquatic product circulation tracking system and method based on block chain
CN109377244A (en) * 2018-10-24 2019-02-22 武汉珞樱联创信息科技有限公司 A kind of quick traceability system of food and method based on multichain interconnection block chain network
CN109767214A (en) * 2018-12-27 2019-05-17 平安科技(深圳)有限公司 Incorporate supply chain management-control method, device, equipment and the medium of market risk
CN109784951A (en) * 2019-01-29 2019-05-21 浙江甲骨文超级码科技股份有限公司 A kind of anti-fake traceability system of product whole process based on block chain technology
CN110009356A (en) * 2019-04-16 2019-07-12 北京艾摩瑞策科技有限公司 A kind of business datum cochain method and its system based on block chain
CN110516965A (en) * 2019-08-27 2019-11-29 北京工商大学 The credible retrospect model of oil and foodstuffs full supply chain and construction method based on block chain
CN110647582A (en) * 2019-09-17 2020-01-03 腾讯科技(深圳)有限公司 Method and device for block chain network consensus checking, storage medium and computer equipment
CN110838064A (en) * 2019-10-12 2020-02-25 华中科技大学 Method and system for realizing asset tracing based on Fabric Block Link platform
CN110766422A (en) * 2019-10-30 2020-02-07 西南石油大学 Drug collaboration and traceability system and method based on alliance chain
CN111581627A (en) * 2020-05-11 2020-08-25 北京精准沟通传媒科技股份有限公司 Data processing method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨绛先生人生大智慧: ""区块链学习|区块链的核心概念", pages 1 - 9, Retrieved from the Internet <URL:https://baijiahao.***.com/s?id=1613829235267006114&wfr=spider&for=pc> *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860801A (en) * 2021-03-15 2021-05-28 智显互联(深圳)股份有限公司 Commercial display industry supply chain information storage system and information storage and retrieval method thereof
CN113190616A (en) * 2021-04-16 2021-07-30 宁波市民卡运营管理有限公司 Block chain reconciliation system and method, computer device and readable storage medium
CN113377852A (en) * 2021-06-18 2021-09-10 虎彩印艺股份有限公司 Block chain-based method for tracing data source in wind control report
CN113468571A (en) * 2021-07-15 2021-10-01 湖北央中巨石信息技术有限公司 Tracing method based on block chain
CN113641992A (en) * 2021-08-14 2021-11-12 深圳众享互联科技有限公司 Chain tracing method of data and data operation algorithm
CN114240349A (en) * 2021-12-09 2022-03-25 数字未来(福建)信息科技有限公司 Ecological environment supervision method and system based on block chain
CN115905895A (en) * 2023-03-08 2023-04-04 云加速(北京)科技有限公司 SBOM identification clustering model implementation method based on block chain
CN116128390A (en) * 2023-04-17 2023-05-16 长沙智医云科技有限公司 Medical consumable cold chain transportation monitoring method based on Internet of things
CN116128390B (en) * 2023-04-17 2023-06-30 长沙智医云科技有限公司 Medical consumable cold chain transportation monitoring method based on Internet of things
CN117254975A (en) * 2023-11-14 2023-12-19 深圳市嘉合劲威电子科技有限公司 Block chain-based data anti-counterfeiting method and system

Similar Documents

Publication Publication Date Title
CN112150149A (en) Data tracing method and device based on block chain, computer equipment and storage medium
US11687916B2 (en) Decisional architectures in blockchain environments
US20240144263A1 (en) Systems and Methods to Validate Transactions For Inclusion in Electronic Blockchains
CN108846659B (en) Block chain-based transfer method and device and storage medium
TWI768163B (en) Method and device for generating smart contracts
KR102142259B1 (en) System for distribution of content files using smart contract based on block chain and method thereof
WO2021028363A1 (en) Methods and systems for preventing transaction tracing on distributed ledger-based network
CN112862474B (en) Supply chain management method and system based on block chain, equipment and storage medium
US20200280442A1 (en) Methods and systems for distributed cryptographically secured data validation
CN111414434B (en) Block chain-based data transaction management network, transaction device and storage medium
CN110766422B (en) Drug collaboration and traceability system and method based on alliance chain
CN108269064A (en) A kind of Collaborative Manufacturing information sharing method based on intelligent contract
CN109493064B (en) Bin order transaction coordination method and device based on block chain architecture
CN110852816A (en) Block chain based automatic invoicing method, terminal equipment and storage medium
CN111095863A (en) Block chain based system and method for communicating, storing and processing data over a block chain network
CN111507686B (en) Automatic budget system and method for engineering design change
CN112991057A (en) Block chain-based digital letter platform and method
CN110599331A (en) Debt charging system, method, device and storage medium based on block chain
CN110599269A (en) Bill generation method and device, computer readable storage medium and computer equipment
CN111506925A (en) Data processing system based on block chain
Yang et al. Leveraging blockchain for scaffolding work management in construction
CN114127771A (en) System and method for proof of viewing via blockchain
CN108335107A (en) A kind of Collaborative Manufacturing information interacting method based on block chain
Ekici et al. Data cleaning for process mining with smart contract
CN115310920A (en) Management method, device and storage medium for cross-chain interoperation management based on governance chain

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