CN111667279A - Product source tracing method and system based on double block chains - Google Patents

Product source tracing method and system based on double block chains Download PDF

Info

Publication number
CN111667279A
CN111667279A CN202010389555.5A CN202010389555A CN111667279A CN 111667279 A CN111667279 A CN 111667279A CN 202010389555 A CN202010389555 A CN 202010389555A CN 111667279 A CN111667279 A CN 111667279A
Authority
CN
China
Prior art keywords
product
chain
information
private chain
private
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
CN202010389555.5A
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.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
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 Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CN202010389555.5A priority Critical patent/CN111667279A/en
Publication of CN111667279A publication Critical patent/CN111667279A/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
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a product traceability method and system based on a double-block chain, which aim at processing existing cloud computing data and server resources of an enterprise, combine a high-efficiency private chain mode and a chain-crossing technology to construct a double-block chain fusion model based on a private chain and a public chain, effectively fuse cloud computing data and the block chain, extract cloud computing data and record hash values of the cloud computing data on the private chain, upload necessary private chain traceability data on the public chain, ensure that the data cannot be falsified and verified subsequently, further realize high-efficiency interaction of the cloud computing data and the on-chain data, reduce the difficulty of deploying the block chain system by an enterprise, finally realize intelligent generation of product traceability information, and simultaneously eliminate figure factors of information circulation among main bodies of a supply chain so as to generate more accurate, complete and reliable traceability information authentication compared with the traditional product.

Description

Product source tracing method and system based on double block chains
Technical Field
The embodiment of the invention relates to the technical field of block chains, in particular to a product tracing method and system based on double block chains.
Background
Product tracing is an important means of modern supply chain management, with the growing concern about food safety, product tracing such as food and agricultural products at present aims to solve the balance problem of credibility, privacy and efficiency of data, and a blockchain is an effective method for keeping stored data credible.
Most of original product original information data of a production enterprise are efficiently stored and operated through a cloud computing center, the problem of low efficiency exists in a block chain technology, particularly in a public chain mode, product traceability depends heavily on the original product original information data of the enterprise, how to combine the block chain technology with the original product original information data of the enterprise is a key for applying the block chain technology to the product traceability field.
The block chain technology is divided into a public chain, a alliance chain and a private chain according to the openness degree of the read-write permission, and different types of block chains are suitable for different application occasions. The alliance chain and the private chain have a certain trust foundation, and compared with the public chain, the consensus mechanism can be replaced by a low-consumption consensus mechanism, so that the efficiency is higher compared with that of the public chain.
At present, a relevant solution is lacking for how to combine the blockchain technology with original product original information data of an enterprise to efficiently apply the blockchain technology to the product tracing field.
Disclosure of Invention
The embodiment of the invention provides a product tracing method and system based on double block chains, which are used for solving the problem that how to combine the block chain technology with original product original information data of an enterprise to efficiently apply the block chain technology to the product tracing field in the prior art is lacked.
In a first aspect, an embodiment of the present invention provides a product tracing method based on a dual blockchain, where the method includes:
s1, inputting original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and a digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain.
S2, according to the plurality of hash values, obtaining a private chain hash value as the label information of the product, and storing the ID of the product and the label information of the product on a public chain through an intelligent contract.
S3, generating the label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain.
S4, according to the product label, verifying whether the label information on the public chain is consistent with the local information on the private chain, verifying whether the local information on the private chain is consistent with the original information data in the cloud server, and inquiring the original information data on the private chain if the local information on the private chain is consistent with the original information data in the cloud server.
Further, step S1 includes:
s11, generating a first creation block on the private chain, wherein the first creation block comprises a first special field, and the first special field comprises the ID of the product and an agent rights and interests certification consensus mechanism;
s12, generating a plurality of first subsequent blocks linked with the first surname block by a hash value on the private chain, and storing the original information data, the digital signature and the hash value in each of the first subsequent blocks.
Further, the original information data comprises purchase information, production information, warehousing information and sales information; in step S2, obtaining a private chain hash value according to the plurality of hash values, specifically including:
and generating a first hash value according to the purchase information and the digital signature corresponding to the purchase information.
And generating a second hash value according to the production information and the digital signature corresponding to the production information.
And generating a third hash value according to the warehousing information and the digital signature corresponding to the warehousing information.
And generating a fourth hash value according to the sales information and the digital signature corresponding to the sales information.
And obtaining the private chain hash value based on the first hash value, the second hash value, the third hash value and the fourth hash value.
Further, step S2 includes:
s21, generating a second creation block on the public chain based on the intelligent contract; the second creation block contains a second special field comprising an ID of the product, a rights and interests certification consensus mechanism, and label information of the product;
and S22, generating a plurality of second subsequent blocks which are linked with the second founder block by hash values on the public chain, and storing the ID of the product and the label information of the product in each second subsequent block through an intelligent contract.
Further, between step S2 and step S3, the method further includes:
and checking whether the tag information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server based on the intelligent contract, and if the tag information on the public chain is not consistent with the original information data in the cloud server, repeating the step S1 until the tag information on the public chain is consistent with the original information data in the cloud server.
Further, in step S4, the condition that the label information on the public chain is consistent with the local information on the private chain is:
Hpu=Hpr=H(∑H(Mi,Si))
in the formula, HpuThe hash value corresponding to the label information of any ID product stored in the public chain; hpr=H(∑H(Mi,Si) The hash value corresponding to the local information of the ID product stored in the private chain, which is called private chain hash value for short.
In a second aspect, an embodiment of the present invention provides a product tracing system based on a dual blockchain, where the system includes:
the purchase node and the subsequent production node are used for inputting original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and the digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain.
The selling node is used for acquiring a private chain hash value as the label information of the product according to the plurality of hash values and storing the ID of the product and the label information of the product on a public chain through an intelligent contract; and generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain.
And the quality inspection node is used for verifying whether the tag information on the public chain is consistent with the local information on the private chain or not and whether the local information on the private chain is consistent with the original information data in the cloud server or not according to the tag of the product, and inquiring the original information data on the private chain if the local information on the private chain is consistent with the original information data in the cloud server.
Further, the purchasing node is further configured to generate a first creation block on the private chain, where the first creation block includes a first special field, and the first special field includes an ID of the product and an agent rights and interests certification consensus mechanism; and generating a second creation block on the public chain based on the intelligent contract; the second creation block contains a second special field comprising an ID of the product, a rights and interests certification consensus mechanism, and label information of the product;
the subsequent production node is further configured to generate a plurality of subsequent blocks linked with the first surcreation block by hash values on the private chain, and store the original information data, the digital signature, and the hash values in each of the subsequent blocks respectively; and generating a plurality of second subsequent blocks linked with the second founder block by a hash value on the public chain based on the intelligent contract, and storing the ID of the product and the tag information of the product in each second subsequent block through the intelligent contract.
Further, the system further comprises a management node, and the management node is configured to:
and checking whether the tag information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server or not based on the intelligent contract, and if the local information on the private chain is not consistent with the original information data in the cloud server, repeating the steps of executing the purchasing node and the subsequent production node until the two items are consistent.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the dual-blockchain-based product tracing method according to the first aspect.
According to the product tracing method and system based on the double block chains, which are provided by the embodiment of the invention, the existing cloud computing data and server resources of an enterprise are processed, a double block chain fusion model based on the private chain and the public chain is constructed by combining a high-efficiency private chain mode and a chain-crossing technology, the cloud computing data and the block chains are effectively fused, the cloud computing data are extracted, the hash value of the cloud computing data is recorded on the private chain, the necessary private chain tracing data is uploaded to the public chain, the data cannot be falsified and is verified subsequently, so that the high-efficiency interaction of the cloud computing data and the data on the chain is realized, the difficulty of deploying the block chain system by an enterprise can be reduced, the intelligent generation of the product tracing information is finally realized, and the figure factors of information circulation among all main bodies of a supply chain can be eliminated, so that the tracing information authentication is more accurate, more complete and more reliable than the traditional product.
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 introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a product tracing method based on a dual block chain according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a product tracing system based on a dual block chain according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a product tracing system based on a dual blockchain according to an embodiment of the present invention;
fig. 4 is another schematic overall structural diagram of a product tracing system based on a dual blockchain according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
It should be noted that the common chain in all embodiments of the present application mainly refers to a federation chain created and maintained by a limited range of industries and management institutions and enterprise federation, or a mature system with numerous nodes, such as an ethernet platform. In the following detailed description of the embodiments, the supply chain alliance establishes a public chain, each enterprise deploys a private chain as a participating node, and hash values of source tracing information of each link from growth, warehousing, processing to sale of each ID product are packaged in a block and stored in the private chain.
Fig. 1 is a schematic flow diagram of a product tracing method based on a dual block chain according to an embodiment of the present invention, and referring to fig. 1, an embodiment of the present invention provides a product tracing method based on a dual block chain, where the method includes:
and S1, recording the original information data of any ID product into the cloud server, generating a plurality of hash values according to the original information data and the digital signature of the original information data, and storing the original information data, the digital signature and the hash values as the local information of the product on a private chain.
Specifically, a supplier inputs original information data including necessary traceability production information of any ID product into a cloud server, carries out digital signature on the original information data, calculates hash values of the original information data and the digital signature of the original information data so as to obtain a plurality of hash values, and stores the original information data, the corresponding digital signature, and the hash values of the original information data and the corresponding digital signature as local information of the product on a private chain.
And S2, acquiring the private chain hash value as the label information of the product according to the plurality of hash values, and storing the ID of the product and the label information of the product on a public chain through an intelligent contract.
Specifically, the original information data includes information of a plurality of production links of the ID product, such as purchasing, production, warehousing, sales, and the like, so that after the information of each link is digitally signed, a plurality of hash values can be generated according to the information of each link and the corresponding digital signature. According to the generated multiple hash values, a private chain hash value can be obtained through calculation, and the private chain hash value is used as the label information of the product for later useChecking is continued. The ID of the product and the label information of the product, namely the private chain hash value HPrStored on a public chain by intelligent contracts.
And S3, generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain.
Specifically, the position information of the original information data of the product in the private chain is stored in the position link LprIn the method, the position information of the original information data of the product on the public chain is stored in a position link LPuIn (1). Linking the ID of the product and the position of the original information data of the product on the private chain to form a link LprThe position of the original information data of the product on the public chain is linked LPuAnd generating a label Tag of the product and storing the label Tag of the product on the public chain.
S4, according to the label of the product, whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server are verified, and if the two items are consistent, the original information data on the private chain is inquired.
Specifically, the customer or the related quality inspection department can obtain the ID of the product and the position link L of the original information data of the product on the private chain according to the Tag of the productprThe position of the original information data of the product on the public chain is linked LPu. Linking L by the location of the product's original information data on the private chainprQuerying local information of the product in a private chain; linking L by the position of the product's original information data on the public chainPuAnd ID of the product, i.e. (L)PuID) inquiring the label information of the product in the public chain, verifying whether the label information on the public chain is consistent with the local information on the private chain and verifying whether the local information on the private chain is consistent with the original information data in the cloud server, if the two items are consistent, the local information on the private chain is true and the local information on the private chain is consistent with the original data information in the cloud server, and finally checkingThe original information data of the product on the private chain is polled.
According to the product tracing method based on the double block chains, cloud computing data and the block chains are effectively fused, the cloud computing data are extracted, the hash values of the cloud computing data are recorded in the private chains, necessary private chain tracing data are uploaded to the public chains, and data cannot be tampered and subsequently verified, so that efficient interaction between the cloud computing data and the data on the chains is achieved, intelligent generation of product tracing information is finally achieved, the difficulty of deploying the block chain system by an enterprise can be reduced, and the benefits of the enterprise are protected.
Further, step S1 includes:
and S11, generating a first creation block on the private chain, wherein the first creation block comprises a first special field, and the first special field comprises the ID of the product and the agency rights and interests certification consensus mechanism.
Specifically, the supplier further needs to record the relevant authentication standard information into the private chain, and therefore, the supplier generates a first creation block on the private chain for the ID product by a purchasing node according to the production flow, the first creation block includes a first special field, the first special field includes the ID of the product and a proxy rights and interests certification consensus mechanism (DPoS) adopted by the private chain, and deploys a cross-chain intelligent contract, so that the private chain and the public chain are mutually side chains, and simultaneously deploys a verification contract, so as to check the relevant product data in the cloud server in a subsequent checking process.
S12, generating a plurality of first subsequent blocks linked with the first created block by a hash value on the private chain, and storing the original information data, the digital signature and the hash value in each of the first subsequent blocks.
Specifically, a supplier subsequent production node inputs production information of a certain ID product into a cloud end according to a production flow, and inputs necessary traceability information of the same ID product into a private chain, so as to generate a first subsequent block, namely, the subsequent production node generates a plurality of first subsequent blocks which are sequentially linked with a first creation block on the private chain, the first creation block and the plurality of first subsequent blocks are linked by a hash value, and the first subsequent block comprises original information data of the ID product, a corresponding digital signature, and the hash value of the original information data and the corresponding digital signature.
Further, the original information data includes purchase information M1Production information M2Storage information M3And sales information M4(ii) a In step S2, obtaining the private chain hash value according to the plurality of hash values, specifically including:
according to the purchasing information M1Digital signature S corresponding to purchase information1Generating a first hash value H1 ═ H (M)1,S1)。
According to production information M2Digital signature S corresponding to production information2Generating a second hash H2 ═ H (M)2,S2)。
According to the warehousing information M3Digital signature S corresponding to warehousing information3Generating a third hash value H3 ═ H (M)3,S3)。
According to the sales information M4Digital signature S corresponding to sales information4Generating a fourth hash value H4 ═ H (M)4,S4)。
Obtaining a private chain hash value H based on the first hash value H1, the second hash value H2, the third hash value H3 and the fourth hash value H4Pr=H(H(M1,S1),H(M2,S2),H(M3,S3),H(M4,S4))。
It can be understood that the original information data of the product in the embodiment of the present application includes the purchase information M1Production information M2Storage information M3And sales information M4The production link information is only exemplary, and actually more production links can be included, the enterprise of each production link accesses the private chain as a new node, and the hash value of the source tracing information of each production link from purchase, production, storage to sale of each product is packaged in a block of the private chain, such as a first creation block or a subsequent block.
Further, fig. 2 is a schematic structural diagram of a product tracing system based on a dual block chain according to an embodiment of the present invention, and with reference to fig. 1 and fig. 2, step S2 further includes:
s21, generating a second creation block on the public chain based on the intelligent contract; the second generation block contains a second special field including the ID of the product, the rights-to-prove-consensus mechanism, and the label information of the product.
Specifically, the hash value of each private chain is stored on the public chain through an intelligent contract, the federation node completes the intelligent contract sent by the public chain, and the federation node needs to record relevant authentication standard information on the public chain. Therefore, the alliance node generates a second creation block on the public chain, the second creation block comprises a second special field, the second special field comprises label information of the product, namely a private chain hash value, for subsequent examination, and a rights and interests certification mechanism (PoS) is used as a public chain consensus mechanism to deploy node trading, tracing and inquiring intelligent contracts.
And S22, generating a plurality of second subsequent blocks which are linked with the second creation block by hash values on the public chain, and storing the ID of the product and the label information of the product in each second subsequent block through an intelligent contract.
Specifically, the federation node, i.e. the subsequent production node, further generates a second subsequent block on the public chain, the second genesis block is linked with a plurality of second subsequent blocks by hash values, and the second subsequent block includes the ID of the product and the label information of the product, i.e. the private chain hash value.
Further, between step S2 and step S3, the method further includes: and based on the intelligent contract, checking whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server, and if the two items are not consistent, repeatedly executing the step S1 until the two items are consistent.
Specifically, the control node checks the traceability information of the product based on the intelligent contract, namely checks the consistency between the data of each node block of the public chain and the data in the private chain, checks the consistency between the data in the private chain and the data in the cloud server, and completes traceability authentication.
Firstly, the control node triggers a check contract, the check contract automatically extracts tracing information of the product stored in a public chain block, the consistency of data of a public chain and a private chain is checked, information consistency check of a plurality of first subsequent blocks of the private chain node started by a first creation block and a cloud server is triggered, after all the nodes meet conditions, necessary information is extracted and input into a local tracing anti-counterfeiting server of the control node, otherwise, an abnormal node is triggered to warn and inform the node, the node executes a step S1 again, data input into the alliance chain is updated, and an authentication contract is triggered again. Secondly, the control node triggers an authentication contract, the tags Tag of the product are traced and authenticated and are input into a public chain together, a finished product manufacturer approves the public chain, and the tracing and authentication process is completed.
Further, in step S4, the condition that the tag information on the public chain is consistent with the local information on the private chain is:
Hpu=Hpr=H(∑H(Mi,Si))
in the formula, HpuThe hash value corresponding to the label information of any ID product stored in the public chain; hpr=H(∑H(Mi,Si) The hash value corresponding to the local information of the ID product stored in the private chain, which is called private chain hash value for short.
Specifically, a hash value corresponding to the tag information of any ID product stored in the public chain is verified, and a hash value H corresponding to the local information of the ID product stored in the private chain is verifiedpr=H(∑H(Mi,Si) Local information (M) in each production run1,M2,…,S1,S2…) satisfies the above formula. Here, the local information in the private chain storing the ID product includes the original information data, the digital signature, and the hash value in S1. If yes, the label information on the public chain is consistent with the local information on the private chain, and the information stored in the private chain is true. Meanwhile, the local information of the ID product in the private chain is verified to be consistent with the original information data of the corresponding ID product in the cloud server, if so, the public chain determines the uniqueness of the product according to the related sales record of the product in the public chain, and the original information of the product in the private chain is inquiredAnd (4) data.
Fig. 3 is a schematic diagram of an overall structure of a product traceability system based on a dual blockchain according to an embodiment of the present invention, and in combination with fig. 2 and fig. 3, in a second aspect, an embodiment of the present invention provides a product traceability system based on a dual blockchain, where the system includes:
the purchasing node 301 and the subsequent production node 302 are configured to record original information data of any ID product into the cloud server, generate a plurality of hash values according to the original information data and a digital signature of the original information data, and store the original information data, the digital signature, and the hash values as local information of the product in a private chain.
The selling node 303 is configured to obtain a private chain hash value as the label information of the product according to the plurality of hash values, and store the ID of the product and the label information of the product in a public chain through an intelligent contract; and generating a label of the product according to the position link of the product on the private chain, the position link on the public chain and the ID of the product, and storing the label on the public chain.
And the quality inspection node 304 is configured to verify whether the tag information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server according to the tag of the product, and if both the items are consistent, query the original information data on the private chain.
Further, the purchasing node 301 is further configured to generate a first creation block on the private chain, where the first creation block includes a first special field, and the first special field includes the ID of the product and the agent rights and interests certification consensus mechanism; and generating a second creation block on the public chain based on the intelligent contract; the second generation block contains a second special field including the ID of the product, the rights-to-prove-consensus mechanism, and the label information of the product.
The subsequent production node 302 is further configured to generate a plurality of first subsequent blocks linked with the first surcreation block by hash values on the private chain, and store the original information data, the digital signature, and the hash values in each first subsequent block respectively; and generating a plurality of second subsequent blocks linked with the second creation block by a hash value on the public chain based on the intelligent contract, and storing the ID of the product and the label information of the product in each second subsequent block through the intelligent contract. The last subsequent production node is the final product production node.
Further, fig. 4 is another schematic general structural diagram of a product tracing system based on a dual blockchain according to an embodiment of the present invention, and with reference to fig. 2, fig. 3, and fig. 4, the system further includes a management node 305, where the management node is configured to:
and based on the intelligent contract, checking whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server, and if the two items are not consistent, repeating the steps of purchasing the node and the subsequent production node until the two items are consistent.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, in a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device may include: a processor (processor)501, a communication Interface (Communications Interface)502, a memory (memory)503, and a communication bus 504, wherein the processor 501, the communication Interface 502, and the memory 503 are configured to communicate with each other via the communication bus 504. The communication interface 502 may be used for information transmission between the server and the smart tv. The processor 501 may call logic instructions in the memory 503 to perform methods including, for example: s1, inputting the original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and the digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain; s2, according to the multiple hash values, obtaining the hash value of the private chain as the label information of the product, and storing the ID of the product and the label information of the product on the public chain through an intelligent contract; s3, generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain; s4, according to the label of the product, whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server are verified, if the two items are consistent, the local information on the private chain is true, and the original information data on the private chain is inquired.
The present embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, enable the computer to perform the methods provided by the above-described method embodiments, for example, including: s1, inputting the original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and the digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain; s2, according to the multiple hash values, obtaining the hash value of the private chain as the label information of the product, and storing the ID of the product and the label information of the product on the public chain through an intelligent contract; s3, generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain; s4, according to the label of the product, verifying whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server, and inquiring the original information data on the private chain if the two items are consistent.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: s1, inputting the original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and the digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain; s2, according to the multiple hash values, obtaining the hash value of the private chain as the label information of the product, and storing the ID of the product and the label information of the product on the public chain through an intelligent contract; s3, generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain; s4, according to the label of the product, verifying whether the label information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server, and inquiring the original information data on the private chain if the two items are consistent.
In summary, the product tracing method and system based on the dual blockchains provided by the embodiments of the present invention effectively fuse cloud computing data and blockchains, extract cloud computing data and record hash values of the cloud computing data in private chains, upload necessary data for tracing to the private chains to public chains, and ensure that the data cannot be tampered and subsequently verified, thereby achieving efficient interaction between the cloud computing data and the data on the chains, and finally achieving intelligent generation of product tracing information, which can reduce difficulty of deploying the blockchain system by an enterprise and protect benefits of the enterprise.
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 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 described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A product tracing method based on a double block chain is characterized by comprising the following steps:
s1, inputting original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and a digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain;
s2, according to the plurality of hash values, obtaining a private chain hash value as the label information of the product, and storing the ID of the product and the label information of the product on a public chain through an intelligent contract;
s3, generating a label of the product according to the position link of the product on the private chain, the position link of the product on the public chain and the ID of the product, and storing the label on the public chain;
s4, according to the product label, verifying whether the label information on the public chain is consistent with the local information on the private chain, verifying whether the local information on the private chain is consistent with the original information data in the cloud server, and inquiring the original information data on the private chain if the local information on the private chain is consistent with the original information data in the cloud server.
2. The dual blockchain-based product tracing method according to claim 1, wherein step S1 further includes:
s11, generating a first creation block on the private chain, wherein the first creation block comprises a first special field, and the first special field comprises the ID of the product and an agent rights and interests certification consensus mechanism;
s12, generating a plurality of first subsequent blocks linked with the first surname block by a hash value on the private chain, and storing the original information data, the digital signature and the hash value in each of the first subsequent blocks.
3. The dual blockchain-based product tracing method according to claim 1, wherein the raw information data includes purchase information, production information, warehousing information and sales information; in step S2, obtaining a private chain hash value according to the plurality of hash values, specifically including:
generating a first hash value according to the purchase information and a digital signature corresponding to the purchase information;
generating a second hash value according to the production information and the digital signature corresponding to the production information;
generating a third hash value according to the warehousing information and the digital signature corresponding to the warehousing information;
generating a fourth hash value according to the sales information and the digital signature corresponding to the sales information;
and obtaining the private chain hash value based on the first hash value, the second hash value, the third hash value and the fourth hash value.
4. The dual blockchain-based product tracing method according to claim 1, wherein step S2 further includes:
s21, generating a second creation block on the public chain based on the intelligent contract; the second creation block contains a second special field comprising an ID of the product, a rights and interests certification consensus mechanism, and label information of the product;
and S22, generating a plurality of second subsequent blocks which are linked with the second founder block by hash values on the public chain, and storing the ID of the product and the label information of the product in each second subsequent block through an intelligent contract.
5. The dual blockchain-based product tracing method according to claim 1, wherein between the step S2 and the step S3, the method further comprises:
and checking whether the tag information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server based on the intelligent contract, and if the tag information on the public chain is not consistent with the original information data in the cloud server, repeating the step S1 until the tag information on the public chain is consistent with the original information data in the cloud server.
6. The dual blockchain-based product tracing method according to claim 1, wherein in step S4, the condition that the tag information on the public chain is consistent with the local information on the private chain is:
Hpu=Hpr=H(∑H(Mi,Si))
in the formula, HpuThe hash value corresponding to the label information of any ID product stored in the public chain; hpr=H(∑H(Mi,Si) Represents a hash value corresponding to local information in the private chain that stores the ID product.
7. A product traceability system based on a double block chain is characterized by comprising:
the system comprises a purchase node and a subsequent production node, wherein the purchase node and the subsequent production node are used for inputting original information data of any ID product into a cloud server, generating a plurality of hash values according to the original information data and a digital signature of the original information data, and storing the original information data, the digital signature and the hash values as local information of the product on a private chain;
the selling node is used for acquiring a private chain hash value as the label information of the product according to the plurality of hash values and storing the ID of the product and the label information of the product on a public chain through an intelligent contract; generating a label of the product according to the position link of the product on the private chain, the position link on the public chain and the ID of the product, and storing the label on the public chain;
and the quality inspection node is used for verifying whether the tag information on the public chain is consistent with the local information on the private chain or not and whether the local information on the private chain is consistent with the original information data in the cloud server or not according to the tag of the product, and inquiring the original information data on the private chain if the local information on the private chain is consistent with the original information data in the cloud server.
8. The dual blockchain based product traceability system of claim 7,
the purchasing node is further used for generating a first creation block on the private chain, wherein the creation block comprises a first special field, and the first special field comprises the ID of the product and an agent rights and interests certification consensus mechanism; and generating a second creation block on the public chain based on the intelligent contract; the second creation block contains a second special field comprising an ID of the product, a rights and interests certification consensus mechanism, and label information of the product;
the subsequent production node is further configured to generate a plurality of subsequent blocks linked with the first surcreation block by hash values on the private chain, and store the original information data, the digital signature, and the hash values in each of the subsequent blocks respectively; and generating a plurality of second subsequent blocks linked with the second founder block by a hash value on the public chain based on the intelligent contract, and storing the ID of the product and the tag information of the product in each second subsequent block through the intelligent contract.
9. The dual blockchain based product traceability system of claim 7, further comprising a management node configured to:
and checking whether the tag information on the public chain is consistent with the local information on the private chain and whether the local information on the private chain is consistent with the original information data in the cloud server or not based on the intelligent contract, and if the local information on the private chain is not consistent with the original information data in the cloud server, repeating the steps of executing the purchasing node and the subsequent production node until the two items are consistent.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the dual blockchain based product tracing method according to any one of claims 1 to 6.
CN202010389555.5A 2020-05-10 2020-05-10 Product source tracing method and system based on double block chains Pending CN111667279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010389555.5A CN111667279A (en) 2020-05-10 2020-05-10 Product source tracing method and system based on double block chains

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010389555.5A CN111667279A (en) 2020-05-10 2020-05-10 Product source tracing method and system based on double block chains

Publications (1)

Publication Number Publication Date
CN111667279A true CN111667279A (en) 2020-09-15

Family

ID=72383465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010389555.5A Pending CN111667279A (en) 2020-05-10 2020-05-10 Product source tracing method and system based on double block chains

Country Status (1)

Country Link
CN (1) CN111667279A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112598361A (en) * 2021-03-02 2021-04-02 华鹏飞股份有限公司 Logistics management method and system based on block chain technology
CN112671514A (en) * 2020-12-29 2021-04-16 链博(成都)科技有限公司 Block chain-based federal learning data protection method and system
CN112887375A (en) * 2021-01-13 2021-06-01 中南林业科技大学 Block chain-based message verification method and equipment
CN113411348A (en) * 2021-07-02 2021-09-17 江西农业大学 Data protection method and system for 1+ N multi-chain traceability system
CN113535732A (en) * 2021-07-23 2021-10-22 东北大学 Credibility-behavior association double-block chain oriented verifiable query optimization method
CN114205088A (en) * 2021-11-01 2022-03-18 黄传明 Intelligent traffic facility management method and system based on double block chains
CN115374189A (en) * 2022-10-25 2022-11-22 湖南木屋网络科技有限公司 Block chain-based food safety tracing method, device and equipment
CN117155964A (en) * 2023-08-02 2023-12-01 北京太格时代电气股份有限公司 Chemical plant production flow tracing system and method
CN117852103A (en) * 2024-03-07 2024-04-09 南昌大学 Trusted data tracing method and system based on blockchain trust root concept

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712276A (en) * 2018-04-19 2018-10-26 上海分布信息科技有限公司 Common recognition network management, device, equipment and storage medium based on block chain technology
CN109002725A (en) * 2018-07-19 2018-12-14 合肥工业大学 Data processing system based on block chain
CN109255622A (en) * 2018-01-08 2019-01-22 浙江甲骨文超级码科技股份有限公司 A kind of back-tracing anti-fake data-storage system
CN110163628A (en) * 2019-04-04 2019-08-23 上海能链众合科技有限公司 A kind of agricultural product traceability system based on block chain
CN111010430A (en) * 2019-12-05 2020-04-14 江苏荣泽信息科技股份有限公司 Cloud computing security data sharing method based on double-chain structure
CN111078799A (en) * 2019-12-27 2020-04-28 中钞信用卡产业发展有限公司杭州区块链技术研究院 Tracing information storage method, device, equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109255622A (en) * 2018-01-08 2019-01-22 浙江甲骨文超级码科技股份有限公司 A kind of back-tracing anti-fake data-storage system
CN108712276A (en) * 2018-04-19 2018-10-26 上海分布信息科技有限公司 Common recognition network management, device, equipment and storage medium based on block chain technology
CN109002725A (en) * 2018-07-19 2018-12-14 合肥工业大学 Data processing system based on block chain
CN110163628A (en) * 2019-04-04 2019-08-23 上海能链众合科技有限公司 A kind of agricultural product traceability system based on block chain
CN111010430A (en) * 2019-12-05 2020-04-14 江苏荣泽信息科技股份有限公司 Cloud computing security data sharing method based on double-chain structure
CN111078799A (en) * 2019-12-27 2020-04-28 中钞信用卡产业发展有限公司杭州区块链技术研究院 Tracing information storage method, device, equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘家稷等: "使用双区块链的防伪溯源系统" *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671514B (en) * 2020-12-29 2022-08-09 链博(成都)科技有限公司 Block chain-based federal learning data protection method and system
CN112671514A (en) * 2020-12-29 2021-04-16 链博(成都)科技有限公司 Block chain-based federal learning data protection method and system
CN112887375A (en) * 2021-01-13 2021-06-01 中南林业科技大学 Block chain-based message verification method and equipment
CN112887375B (en) * 2021-01-13 2022-08-05 中南林业科技大学 Block chain-based message verification method and equipment
CN112598361A (en) * 2021-03-02 2021-04-02 华鹏飞股份有限公司 Logistics management method and system based on block chain technology
CN112598361B (en) * 2021-03-02 2021-05-25 华鹏飞股份有限公司 Logistics management method and system based on block chain technology
CN113411348A (en) * 2021-07-02 2021-09-17 江西农业大学 Data protection method and system for 1+ N multi-chain traceability system
CN113411348B (en) * 2021-07-02 2022-02-11 江西农业大学 Data protection method and system for 1+ N multi-chain traceability system
CN113535732A (en) * 2021-07-23 2021-10-22 东北大学 Credibility-behavior association double-block chain oriented verifiable query optimization method
CN113535732B (en) * 2021-07-23 2023-07-25 东北大学 Verifiable query optimization method for reputation-behavior correlation-oriented double-block chain
CN114205088A (en) * 2021-11-01 2022-03-18 黄传明 Intelligent traffic facility management method and system based on double block chains
CN115374189A (en) * 2022-10-25 2022-11-22 湖南木屋网络科技有限公司 Block chain-based food safety tracing method, device and equipment
CN117155964A (en) * 2023-08-02 2023-12-01 北京太格时代电气股份有限公司 Chemical plant production flow tracing system and method
CN117852103A (en) * 2024-03-07 2024-04-09 南昌大学 Trusted data tracing method and system based on blockchain trust root concept
CN117852103B (en) * 2024-03-07 2024-05-14 南昌大学 Trusted data tracing method and system based on blockchain trust root concept

Similar Documents

Publication Publication Date Title
CN111667279A (en) Product source tracing method and system based on double block chains
Zhao et al. Blockchain enabled industrial Internet of Things technology
Zuo Making smart manufacturing smarter–a survey on blockchain technology in Industry 4.0
US11139954B2 (en) Blockchain proof of custody, proof against tampering, proof of chain of custody
CN106600405B (en) Block chain-based data rights and interests protection method
US20230291544A1 (en) Advanced non-fungible token blockchain architecture
EP3540662A1 (en) Computer implemented method for supply chain management and provenance in a data processing network
JP2022510885A (en) Trading account data maintenance using blockchain
CN110335055B (en) Service data tracing method and device based on cloud platform
An et al. Building a product origins tracking system based on blockchain and PoA consensus protocol
CN108306873A (en) A kind of intelligent contract data interactive system based on manufacture block chain
CN108615195B (en) Resource transfer information transmission method and device, storage medium and electronic device
CN111368262B (en) Artificial intelligent model protection and loose coupling distributed training method based on blockchain
WO2020118859A1 (en) Decentralized chip research and development transaction data storage method and system
CN111159458A (en) Agricultural product image processing and block chain interactive identification method and system
US20190295081A1 (en) System and Method for the Verification and Visualization of Subcomponents in a Product
Wang et al. Research on agricultural product traceability technology (economic value) based on information supervision and cloud computing
WO2021017635A1 (en) Digital asset financial system
CN115018431B (en) BOM data sharing method, block chain server and computer readable storage medium
CN110689356A (en) Method for recording commodity circulation process by using nested digital twin
CN110648233A (en) Block chain-based supply chain platform side chain expansion method and device
CN114398678A (en) Registration verification method and device for preventing electronic file from being tampered, electronic equipment and medium
Sharma et al. A blockchain based approach for improving transparency and traceability in silk production and marketing
Yin et al. Modeling Tobacco Traceability System Based on Blockchain and RFID Technologies
Maroun et al. Opportunities for use of blockchain technology in supply chains: Australian manufacturer case study

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