CN116483919A - Method, device, equipment and medium for tracing data uplink and tracing data query - Google Patents

Method, device, equipment and medium for tracing data uplink and tracing data query Download PDF

Info

Publication number
CN116483919A
CN116483919A CN202310403164.8A CN202310403164A CN116483919A CN 116483919 A CN116483919 A CN 116483919A CN 202310403164 A CN202310403164 A CN 202310403164A CN 116483919 A CN116483919 A CN 116483919A
Authority
CN
China
Prior art keywords
data
tracing
chain
traceability
sub
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
CN202310403164.8A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310403164.8A priority Critical patent/CN116483919A/en
Publication of CN116483919A publication Critical patent/CN116483919A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The disclosure provides a method for tracing data uplink and tracing data query, which can be applied to the technical field of block chains. The method for tracing the source data to be uplink comprises the following steps: the method for tracing the data to the uplink is applied to a blockchain, the blockchain comprises a plurality of nodes, and an upstream-downstream relationship exists among the nodes, and the method comprises the following steps: for a single node, responding to a transaction request of a previous node, and calling a check contract to check whether the received tracing data is legal or not, wherein the tracing data corresponds to different supply chain links one by one; under the condition that the tracing data is legal, calling an uplink contract, storing the tracing data into a sub-chain corresponding to the current node, and returning the mapping relation between the tracing code and the transaction hash address, wherein the transaction hash address is the address of the tracing data in the sub-chain; and storing the mapping relationship in the main chain. The disclosure also provides a traceable data uplink and traceable data query device, equipment and medium.

Description

Method, device, equipment and medium for tracing data uplink and tracing data query
Technical Field
The disclosure relates to the technical field of blockchains, in particular to a method, a device, equipment and a medium for tracing data uplink and tracing data query.
Background
At present, the conventional supply chain traceability application has the following pain point problems: firstly, the traditional supply chain traceability system is generally centrally managed, data information of each link in the supply chain is stored in a centralized database and manually recorded and modified, so that the problem of data loss or tampered occurs easily, the safety of data storage is low, and once the problem occurs, the problem source is difficult to quickly find out; secondly, the whole process of the supply chain involves more links, the data volume is large, the information is scattered, and the data of each link is stored in different centralized databases separately, so that the data information interaction capacity of each link is limited, the phenomenon of data information asymmetry among merchants of different links in the supply chain is easy to cause, and the effective performance of tracing work is further hindered.
Disclosure of Invention
In view of the above problems, the present disclosure provides a method, an apparatus, a device, and a storage medium for tracing data uplink and tracing data query, which improve data preservation security and query efficiency.
According to a first aspect of the present disclosure, there is provided a method for tracing data to a source system established based on a blockchain, the blockchain including a plurality of nodes, there being an upstream-downstream relationship between the plurality of nodes, different nodes corresponding to different supply chain links, the method comprising: for a single node, responding to a transaction request of a previous node, and calling a check contract to check whether the received tracing data is legal or not, wherein the tracing data corresponds to different supply chain links one by one; under the condition that the tracing data are legal, calling an uplink contract, storing the tracing data into a sub-chain corresponding to a current node, and returning a mapping relation between tracing codes and transaction hash addresses, wherein the transaction hash addresses are addresses of the tracing data in the sub-chain; and storing the mapping relation into a main chain.
According to an embodiment of the present disclosure, when the tracing data is legal, invoking an uplink contract, storing the tracing data in a sub-chain corresponding to the current node, and returning a mapping relationship between tracing codes and a transaction hash address, where the method includes: generating a transaction based on the traceability data; storing the transaction into a block of the subchain; generating the traceability code and the transaction hash address based on the uplink contract; and establishing a mapping relation based on the tracing code and the transaction hash address.
According to an embodiment of the disclosure, before the generating the trace data into the transaction, the method further includes: and converting the tracing data from a plaintext form to a ciphertext form.
According to an embodiment of the present disclosure, the tracing data includes significant hazard data, and the calling a check contract to check whether the received tracing data is legal in response to a transaction request of a previous node includes: judging whether the significant hazard data is within a preset limit value or not based on the traceability data; and under the condition that the obvious hazard data is within a preset limit value, the traceability data is considered to be legal.
According to a second aspect of the present disclosure, there is provided a method for querying traceable data, where the method is applied to a traceable system built based on a blockchain, the blockchain includes a plurality of nodes, there are upstream-downstream relationships between the plurality of nodes, and different nodes correspond to different supply chain links, and the method includes: receiving a tracing code input by a user; obtaining a mapping relation from a main chain, wherein the mapping relation is the mapping relation between the tracing code and a transaction hash address, and the transaction hash address is the address of the tracing data in a sub-chain; inquiring a corresponding transaction hash address in the mapping relation based on the traceability code; and acquiring the traceability data in the sub-chain based on the transaction hash address.
According to an embodiment of the present disclosure, the mapping relationship is a one-to-many relationship between the tracing code and the transaction hash address, and the obtaining tracing data in a sub-chain based on the transaction hash address includes: acquiring traceability data in a plurality of sub-chains based on the transaction hash address; after the tracing data in the multiple sub-chains are acquired based on the transaction hash address, the method further comprises the following steps: splicing the traceability data in the multiple sub-chains to obtain final traceability data; and verifying the completeness of the final traceability data.
According to an embodiment of the present disclosure, the tracing data includes ciphertext data, and after the tracing data in the sub-chain is obtained based on the transaction hash address, the method further includes: decrypting the tracing data from ciphertext data to plaintext data.
In a third aspect of the present disclosure, a traceable data uplink device is provided, where the traceable data uplink device is applied to a traceable system established based on a blockchain, the blockchain includes a plurality of nodes, there are upstream-downstream relationships between the plurality of nodes, and different nodes correspond to different supply chain links, and the device includes: the verification module is used for calling a verification contract to verify whether the received tracing data is legal or not for a single node in response to a transaction request of a previous node, wherein the tracing data corresponds to different supply chain links one by one; the uplink module is used for calling an uplink contract under the condition that the tracing data are legal, storing the tracing data into a sub-chain corresponding to a current node, and returning a mapping relation between tracing codes and transaction hash addresses, wherein the transaction hash addresses are addresses of the tracing data in the sub-chain; and the mapping relation storage module is used for storing the mapping relation into the main chain.
According to an embodiment of the disclosure, the uplink module is further configured to generate a transaction based on the traceability data; storing the transaction into a block of the subchain; generating the traceability code and the transaction hash address based on the uplink contract; and establishing a mapping relation based on the tracing code and the transaction hash address.
According to the embodiment of the disclosure, the uplink module is further configured to convert the tracing data from a plaintext form to a ciphertext form.
According to an embodiment of the disclosure, the traceability data includes significant hazard data, and the verification module is further configured to determine, based on the traceability data, whether the significant hazard data is within a preset limit; and under the condition that the obvious hazard data is within a preset limit value, the traceability data is considered to be legal.
In a fourth aspect of the present disclosure, a traceability data query apparatus is provided, where the traceability data query apparatus is applied to a traceability system established based on a blockchain, the blockchain includes a plurality of nodes, there are upstream-downstream relationships between the plurality of nodes, and different nodes correspond to different supply chain links, and the apparatus includes: the source tracing code receiving module is used for receiving a source tracing code input by a user; the mapping relation acquisition module is used for acquiring a mapping relation from a main chain, wherein the mapping relation is the mapping relation between the tracing code and a transaction hash address, and the transaction hash address is the address of the tracing data in a sub-chain; the address inquiry module is used for inquiring the corresponding transaction hash address in the mapping relation based on the traceability code; and the traceability data acquisition module is used for acquiring traceability data in the sub-chain based on the transaction hash address.
According to an embodiment of the disclosure, the mapping relationship is a one-to-many relationship between the tracing code and the transaction hash address, and the tracing data obtaining module is further configured to obtain tracing data in a plurality of sub-chains based on the transaction hash address; the apparatus further comprises: the verification module is used for splicing the traceability data in the multiple sub-chains to obtain final traceability data; and verifying the completeness of the final traceability data.
According to an embodiment of the disclosure, the tracing data includes ciphertext data, and the apparatus further includes a decryption module configured to decrypt the tracing data from the ciphertext data to plaintext data.
In a fifth aspect of the present disclosure, there is provided an electronic device, including: one or more processors; and the memory is used for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the tracing data uplink and tracing data query method.
In a sixth aspect of the present disclosure, there is also provided a computer readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described trace data uplink trace data query method.
In a seventh aspect of the present disclosure, a computer program product is provided, where the computer program product implements the method for tracing data to be used for tracing data uplink and tracing data query when the computer program is executed by a processor.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
fig. 1A schematically illustrates an application scenario diagram of a traceable data uplink, traceable data query method according to an embodiment of the disclosure;
FIG. 1B schematically illustrates an architecture diagram of a fresh product traceability system based on blockchain technology in accordance with embodiments of the present disclosure;
FIG. 1C schematically illustrates a system interaction diagram of a fresh product traceability system based on blockchain technology in accordance with embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of tracing data chaining in accordance with an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a method of tracing data up-link according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a flow chart of a method of tracing data queries, in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a traceability data chaining apparatus according to an embodiment of the disclosure;
FIG. 6 schematically illustrates a block diagram of a traceable data querying device according to an embodiment of the disclosure; and
fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a method for tracing data uplink, tracing data query, according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In order to solve the technical problems existing in the prior art, an embodiment of the present disclosure provides a method for tracing data to be uplink, where the method for tracing data to be uplink is applied to a tracing system established based on a blockchain, the blockchain includes a plurality of nodes, upstream and downstream relationships exist between the plurality of nodes, and different nodes correspond to different supply chain links, and the method includes: for a single node, responding to a transaction request of a previous node, and calling a check contract to check whether the received tracing data is legal or not, wherein the tracing data corresponds to different supply chain links one by one; under the condition that the tracing data are legal, calling an uplink contract, storing the tracing data into a sub-chain corresponding to a current node, and returning a mapping relation between tracing codes and transaction hash addresses, wherein the transaction hash addresses are addresses of the tracing data in the sub-chain; and storing the mapping relation into a main chain.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
Fig. 1A schematically illustrates an application scenario diagram of a method for tracing data uplink and tracing data query according to an embodiment of the disclosure.
As shown in fig. 1A, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the method for querying the trace data in the trace data uplink and the trace data provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the trace data uplink and trace data query device provided by the embodiments of the present disclosure may be generally disposed in the server 105. The method for tracing data uplink and tracing data query provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the trace data uplink and trace data query device provided by the embodiments of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1A is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 1B schematically illustrates an architecture diagram of a fresh product traceability system based on blockchain technology according to an embodiment of the disclosure.
As shown in figure 1B of the drawings,
wherein, the liquid crystal display device comprises a liquid crystal display device,
the data storage layer adopts a distributed storage mode of a block chain, and the core of the layer comprises a hash algorithm, asymmetric encryption, a chain structure, a Merkle tree and the like, is packaged into a chain in a block mode through the chain structure and is connected according to the time sequence generated by the block, so that the non-falsification of data information is ensured.
The network layer adopts a P2P mode, follows the principle of collective maintenance, takes the participants of each link in the supply chain as account nodes in the blockchain network, and stores the traceable data of the related links in each node in a distributed manner. And after each node receives the traceable data, the node begins to apply for transactions to the downstream node, finds out the data needing to be recorded sent by the node with accounting right, stores the traceable data after full network verification, and ensures the normal operation of blockchain storage in the technical aspect.
The consensus layer comprises a PBFT and other consensus algorithms, so that consensus among the traceability information of the fresh product supply chain and each node is achieved, and the information is stored in a uplink mode. The layer of consensus mechanism ensures that data is not tampered with so that nodes joining the blockchain network together maintain blockchain operation, should there be nodes attempting to tamper with the information, they will be kicked off the network or be restricted from competing for accounting rights. The contract layer contains various transaction contracts and other standard specifications, such as policies, legal regulations and the like, which are signed among enterprise subjects in various links in the fresh product supply chain, so as to realize the automation of part of supervision functions. When preset conditions of the contract codes are triggered, the contracts are automatically executed and verified with all nodes on the chain, and the safety and reliability of data are guaranteed. The interface layer is used for guaranteeing the data access between the block chain network and enterprises in all links of the fresh product supply chain, and an administrator or responsible person in all links of the supply chain can upload the source tracing data information through the interface and can also use the interface for data access.
The user layer is connected with the blockchain network through the interface layer, and fresh product data information is input through an interface provided by the system, and the system comprises a supervisor responsible for supervising whether a supply chain is normally operated according to legal compliance standards, a consumer needing to be traced and inquired, and participants responsible for providing the traced data information in each link of the fresh product supply chain, wherein the participants of the fresh product supply chain comprise a planting producer, a processor, a warehouse, a logistics carrier and a distributor.
The method for tracing data uplink and tracing data query in the disclosed embodiment will be described in detail below with reference to fig. 1C to 4 based on the scenario described in fig. 1A and 1B.
Fig. 1C schematically illustrates a system interaction diagram of a fresh product traceability system based on blockchain technology according to an embodiment of the disclosure.
Fig. 2 schematically illustrates a flow chart of a method of tracing data up-link according to an embodiment of the disclosure.
As shown in fig. 2, the trace-source data uplink of this embodiment includes operations S210 to S230, and the trace-source data uplink method may be executed by the server 105.
According to the embodiment of the disclosure, the traceability data uplink method is applied to a traceability system established based on a blockchain, the blockchain comprises a plurality of nodes, an upstream-downstream relationship exists among the nodes, and different nodes correspond to different supply chain links.
Blockchains are a distributed ledger that maintains a trusted and reliable database by way of decentralization. Because distributed storage is used, no centralized hardware or management mechanism exists, any node is equal, and the data blocks in the system are updated and maintained together by the nodes with maintenance functions in the whole system. The system is open, except that private information related to the project is encrypted, the blockchain data is transparent to the owner, and anyone can query or upload the blockchain data through the published query interface. Information data is added to the blockchain through a consensus algorithm and is permanently stored, and the on-chain data cannot be tampered based on a time stamp and a hash algorithm.
As shown in connection with fig. 1C, the blockchain network includes various participating entities representing fresh product supply chains, including plant manufacturers, processors, warehousing, logistics carriers, and distributors. That is, the planting manufacturer, the processor, the warehouse, the logistics carrier and the distributor correspond to one supply chain link respectively, and the planting manufacturer, the processor, the warehouse, the logistics carrier and the distributor correspond to one node respectively.
In operation S210, for a single node, in response to a transaction request from a previous node, a check contract is invoked to check whether the received trace data is legal, where the trace data corresponds to the different supply chain links one-to-one.
Taking the raw and fresh product tracing as an example, as shown in fig. 1C, firstly, an account node in a planting production link requests transaction from an account node in a designated processing link according to the processing requirement of the raw and fresh product and sends tracing data of the planting production node, and then the tracing data of the planting production link is verified through a consensus mechanism. After verification is successful, the transaction of the data between the planting production node and the processing node is completed. The nodes in the processing link also send the traceability data of the processing business to the designated warehouse account nodes according to the flow of the supply chain and the warehouse requirement of the fresh products, and the warehouse nodes verify the received traceability data. Meanwhile, account nodes in the warehousing link can apply for transactions to appointed logistics transportation account nodes according to the transportation demand of the fresh products, and the logistics transportation nodes verify the account nodes in the same way and receive the traceability data of the warehousing nodes. And finally, the logistics transportation node sends the commodity circulation transportation node to a seller account node of a corresponding sales link according to the sales requirement of the fresh product, so that the transaction and mutual access of the traceable data of each link in the whole supply chain flow are completed.
According to an embodiment of the present disclosure, the tracing data includes significant hazard data, and the calling a check contract to check whether the received tracing data is legal in response to a transaction request of a previous node includes: judging whether the significant hazard data is within a preset limit value or not based on the traceability data; and under the condition that the obvious hazard data is within a preset limit value, the traceability data is considered to be legal.
Specifically, the hazard information also needs to call a check contract to check whether the obvious hazard is qualified or not, whether the limit information exceeds the limit, if all the hazard information is qualified, the hazard information is normally uplink, otherwise, the hazard information returns to the corresponding unqualified fault reporting. The verification of the obvious hazard data refers to limit hazard auditing performed according to corresponding business processes in different participating subjects in a supply chain.
Specifically, referring to fig. 1C, the planting production process includes: and the system is responsible for uploading the production data of fresh products such as names, production places, purchasing time and the like to a blockchain, and applying for transaction to a downstream link when the products enter a downstream ring node, and after the two parties pass the audit, the transaction is completed, so that a processor becomes a new authorized party. And (3) processing: the processing information comprises processing standards, processing time and the like, and the processing information is applied to the downstream ring section after the transaction is completed. And (3) storage link: and uploading the storage information of the fresh products, such as storage mode, storage time, storage total amount and the like, to a blockchain, and submitting a transaction application to a downstream logistics transportation link. And (3) logistics transportation link: according to the requirements of all links in the fresh product supply chain, a proper transportation mode is selected, accurate logistics information is recorded, related logistics information such as the transportation mode, the transportation time, transportation responsible persons and the like is linked, and finally, the application is submitted to the sales link. Sales links: the products are distributed to different sales points, and the data information of the sales links such as sales time, sales places, sales persons and the like are uplink, and the integrity of the traceability data of the fresh products is ensured by circulation of links above the whole supply chain.
With reference to fig. 1C, the above operation S210 implements a fresh product security judgment function. Whether the data of the obvious harm of the fresh product is within the limit value is judged, so that the edible safety of the fresh product is strictly controlled. Taking a fresh product supply chain storage stage as an example, the stage can judge whether the processing link meets the requirements, if the processing stage has problems, the abnormal processing stage is immediately thrown out, and if the processing stage meets the requirements, the storage link is continued.
In operation S220, under the condition that the tracing data is legal, an uplink contract is called, the tracing data is stored in a sub-chain corresponding to the current node, and a mapping relationship between the tracing code and a transaction hash address is returned, wherein the transaction hash address is an address of the tracing data in the sub-chain.
Specifically, the sub-chain generates the ciphertext data into a transaction after receiving the request, and then stores the transaction in the current block. The sub-chain uplink contract returns the transaction hash address and the fresh product traceability code to the link node, the node calls the mapping contract to establish mapping relation between the traceability code and each transaction, and finally the fresh product mapping relation is stored in the main chain.
Fig. 3 schematically illustrates a flow chart of a method of tracing data up-link according to an embodiment of the disclosure.
As shown in fig. 3, the trace-source data uplink of this embodiment includes operations S310 to S340, and operations S310 to S340 may at least perform operation S220 described above.
In operation S310, a transaction is generated based on the trace data.
In operation S320, the transaction is stored into a block of the sub-chain.
In operation S330, the traceability code and the transaction hash address are generated based on the uplink contract.
In operation S340, a mapping relationship is established based on the traceability code and the transaction hash address.
With reference to fig. 1C, the mapping relationship is established through a mapping contract and written into the main chain, when the mapping relationship is not established for the fresh product, the mapping relationship is newly established, and when the mapping relationship exists for the fresh product, the mapping relationship is updated. The specific algorithm is as follows: and each link node is uplink by calling an intelligent contract, the intelligent contract firstly uploads all data of the link to a corresponding sub-link, then a mapping relation is established between the tracing code and the sub-link transaction hash address, and if the data of the tracing code exist in the mapping relation, the corresponding transaction hash address is updated.
According to an embodiment of the present disclosure, before the above operation S310, the method further includes: and converting the tracing data from a plaintext form to a ciphertext form.
Referring to fig. 1C, when the data is uplink, firstly, manufacturers call the data encryption module to convert plaintext data into ciphertext data through uplink contracts after collecting information, then submit uplink requests to transmit the ciphertext data to respective sub-chains, and the ciphertext data is stored in the sub-chains, so that upstream and downstream data leakage can be prevented.
In operation S230, the mapping relationship is stored into the backbone.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
Fig. 4 schematically illustrates a flow chart of a method of tracing data queries in accordance with an embodiment of the disclosure.
As shown in fig. 4, the tracing data query method of this embodiment includes operations S410 to S440.
According to the embodiment of the disclosure, the tracing data query method is applied to a tracing system established based on a blockchain, the blockchain comprises a plurality of nodes, an upstream-downstream relationship exists among the nodes, and different nodes correspond to different supply chain links.
And in combination with the illustration of fig. 1C, the system comprises a supervisor and a consumer, the supervisor has the right to access and supervise the information data of each link in the fresh product supply chain, and judge whether the flow of each link of the product meets the specification or not according to the information data, and other nodes in the chain update the data of the block in real time so as to prevent the phenomenon of chain breakage of the product traceability data in the process of storing and inquiring.
In operation S410, a trace source code input by a user is received.
In operation S420, a mapping relationship is obtained from the main chain, where the mapping relationship is a mapping relationship between the tracing code and a transaction hash address, and the transaction hash address is an address of the tracing data in a sub-chain.
In operation S430, the corresponding transaction hash address in the mapping relationship is queried based on the traceability code.
In operation S440, trace-source data in the sub-chain is obtained based on the transaction hash address.
According to an embodiment of the present disclosure, the mapping relationship is a one-to-many relationship between the tracing code and the transaction hash address, and the obtaining tracing data in a sub-chain based on the transaction hash address includes: acquiring traceability data in a plurality of sub-chains based on the transaction hash address; after the tracing data in the multiple sub-chains are acquired based on the transaction hash address, the method further comprises the following steps: splicing the traceability data in the multiple sub-chains to obtain final traceability data; and verifying the completeness of the final traceability data.
According to an embodiment of the present disclosure, the tracing data includes ciphertext data, and after the tracing data in the sub-chain is obtained based on the transaction hash address, the method further includes: decrypting the tracing data from ciphertext data to plaintext data.
Specifically, verifying data in the transaction, splicing all the data into complete raw and fresh product traceability data, and verifying data integrity.
Specifically, referring to fig. 1C, when tracing data, a consumer needs to input the tracing code on the package of the fresh product to the client node, and the client node verifies the tracing code and then transmits the tracing code to the blockchain bottom network. Inquiring the main chain by calling the mapping contract, obtaining the mapping relation, returning to the node, obtaining the transaction hash address of each sub-chain by the mapping relation, and inquiring the transaction address index of each sub-chain by the node respectively, wherein the transaction information of a certain block can be directly positioned by the transaction address. After the ciphertext data of each sub-chain are obtained, a data decryption module is called to decrypt the ciphertext data into plaintext data, and finally the plaintext data are spliced into complete raw and fresh product traceability information and displayed at a client.
For example, when a user performs a source tracing query on a fresh product, the source tracing code is input through a query contract to query information on a sub-chain. The tracing codes and the transaction addresses of the sub-chain storage tracing information form a mapping relation, and the tracing codes serve as indexes and unique identifiers, wherein the tracing codes comprise cultivation lot numbers, processing lot numbers, warehouse bill numbers, logistics bill numbers and sales bill numbers. The data mapping of the main chain and the sub-chain is the key for improving the tracing inquiry efficiency, the mapping relation is a data structure similar to a tree, and the one-to-many relation between the product tracing code and the transaction address is reflected. When tracing, indexing is carried out through the mapping relation, and the query speed is high. The root node records the product tracing code, the batch number or the single number at each stage and the transaction address, and the transaction address is addressed to the leaf node, so that the transaction ID in the sub-chain has uniqueness and the data is prevented from being tampered. The leaf nodes store manufacturer information, product information, qualification certificates and other information in a classified mode.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
Based on the tracing data uplink and tracing data query method, the present disclosure also provides a tracing data uplink and tracing data query device. The device will be described in detail below in connection with fig. 5 and 6.
Fig. 5 schematically illustrates a block diagram of a traceable data chaining apparatus according to an embodiment of the disclosure.
As shown in fig. 5, the trace-source data uplink device 500 of this embodiment includes a verification module 510, an uplink module 520, and a mapping relation storage module 530.
The verification module 510 is configured to, for a single node, respond to a transaction request of a previous node, invoke a verification contract to verify whether the received trace data is legal, where the trace data corresponds to the different supply chain links one to one. In an embodiment, the verification module 510 may be configured to perform the operation S210 described above, which is not described herein.
The uplink module 520 is configured to invoke an uplink contract, store the tracing data in a sub-chain corresponding to a current node, and return a mapping relationship between tracing codes and a transaction hash address, where the transaction hash address is an address of the tracing data in the sub-chain, when the tracing data is legal. In an embodiment, the uplink module 520 may be configured to perform the operation S220 described above, which is not described herein.
The mapping relation storage module 530 is configured to store the mapping relation into the main chain. In an embodiment, the mapping relation storage module 530 may be used to perform the operation S230 described above, which is not described herein.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
According to an embodiment of the disclosure, the uplink module is further configured to generate a transaction based on the traceability data; storing the transaction into a block of the subchain; generating the traceability code and the transaction hash address based on the uplink contract; and establishing a mapping relation based on the tracing code and the transaction hash address.
According to the embodiment of the disclosure, the uplink module is further configured to convert the tracing data from a plaintext form to a ciphertext form.
According to an embodiment of the disclosure, the traceability data includes significant hazard data, and the verification module is further configured to determine, based on the traceability data, whether the significant hazard data is within a preset limit; and under the condition that the obvious hazard data is within a preset limit value, the traceability data is considered to be legal.
Any of the plurality of modules in the verification module 510, the uplink module 520, and the mapping relation storage module 530 may be combined in one module to be implemented, or any of the plurality of modules may be split into a plurality of modules according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the verification module 510, the uplink module 520, and the mapping relation storage module 530 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware, such as any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the verification module 510, the uplink module 520 and the mapping relation storage module 530 may be at least partially implemented as a computer program module, which when executed, may perform the corresponding functions.
Fig. 6 schematically illustrates a block diagram of a traceable data query apparatus according to an embodiment of the disclosure.
As shown in fig. 6, the trace data query device 600 of this embodiment includes a trace code receiving module 610, a mapping relationship obtaining module 620, an address query module 630, and a trace data obtaining module 640.
According to the embodiment of the disclosure, the traceability data query device is applied to a traceability system established based on a blockchain, the blockchain comprises a plurality of nodes, an upstream-downstream relationship exists among the nodes, and different nodes correspond to different supply chain links.
The tracing code receiving module 610 is configured to receive a tracing code input by a user. In an embodiment, the source code receiving module 610 may be configured to perform the operation S410 described above, which is not described herein.
The mapping relationship obtaining module 620 is configured to obtain a mapping relationship from a main chain, where the mapping relationship is a mapping relationship between the tracing code and a transaction hash address, and the transaction hash address is an address of the tracing data in a sub-chain. In an embodiment, the mapping relationship obtaining module 620 may be configured to perform the operation S420 described above, which is not described herein.
The address query module 630 is configured to query the transaction hash address corresponding to the mapping relationship based on the traceability code. In an embodiment, the address query module 630 may be configured to perform the operation S430 described above, which is not described herein.
The tracing data acquiring module 640 is configured to acquire tracing data in a sub-chain based on the transaction hash address. In an embodiment, the trace data obtaining module 640 may be configured to perform the operation S440 described above, which is not described herein.
In the embodiment of the disclosure, the decentralised blockchain is adopted as a bottom technology, so that decentralised storage and non-falsification of the traceable data in each link in a supply chain scene are ensured, the sharing of the data among different nodes is treated together, mutual supervision is performed, the traceability efficiency is improved, and the operation cost is reduced. Especially, the query efficiency is improved in a main chain and sub-chain mapping mode, and the traceability information is displayed rapidly.
According to an embodiment of the disclosure, the mapping relationship is a one-to-many relationship between the tracing code and the transaction hash address, and the tracing data obtaining module is further configured to obtain tracing data in a plurality of sub-chains based on the transaction hash address; the apparatus further comprises: the verification module is used for splicing the traceability data in the multiple sub-chains to obtain final traceability data; and verifying the completeness of the final traceability data.
According to an embodiment of the disclosure, the tracing data includes ciphertext data, and the apparatus further includes a decryption module configured to decrypt the tracing data from the ciphertext data to plaintext data.
Any of the tracing code receiving module 610, the mapping relation acquiring module 620, the address inquiring module 630, and the tracing data acquiring module 640 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the trace source code receiving module 610, the mapping relationship obtaining module 620, the address querying module 630, and the trace source data obtaining module 640 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the traceability code receiving module 610, the mapping relation obtaining module 620, the address querying module 630 and the traceability data obtaining module 640 may be at least partially implemented as a computer program module, which may perform the corresponding functions when being executed.
Fig. 7 schematically illustrates a block diagram of an electronic device adapted to implement a method for tracing data uplink, tracing data query, according to an embodiment of the disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. Note that the program may be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 700 may further include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 702 and/or RAM 703 and/or one or more memories other than ROM 702 and RAM 703 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to perform the methods provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed over a network medium in the form of signals, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 701. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A method for tracing data to be linked, wherein the method is applied to a tracing system established based on a block chain, the block chain comprises a plurality of nodes, the nodes have upstream and downstream relations, different nodes correspond to different supply chain links,
The method comprises the following steps:
for a single node, responding to a transaction request of a previous node, and calling a check contract to check whether the received tracing data is legal or not, wherein the tracing data corresponds to different supply chain links one by one;
under the condition that the tracing data are legal, calling an uplink contract, storing the tracing data into a sub-chain corresponding to a current node, and returning a mapping relation between tracing codes and transaction hash addresses, wherein the transaction hash addresses are addresses of the tracing data in the sub-chain; and
and storing the mapping relation into a main chain.
2. The method of claim 1, wherein the calling an uplink contract to store the trace data into the sub-chain corresponding to the current node and returning the mapping relationship between the trace source code and the transaction hash address if the trace data is legal comprises:
generating a transaction based on the traceability data;
storing the transaction into a block of the subchain;
generating the traceability code and the transaction hash address based on the uplink contract; and
and establishing a mapping relation based on the tracing code and the transaction hash address.
3. The method of claim 2, wherein prior to the generating the trace data into transactions, the method further comprises:
and converting the tracing data from a plaintext form to a ciphertext form.
4. The method of any of claims 1-3, wherein the provenance data comprises significant hazard data,
and in response to the transaction request of the last node, invoking a check contract to check whether the received tracing data is legal or not, including:
judging whether the significant hazard data is within a preset limit value or not based on the traceability data; and
and under the condition that the obvious hazard data is within a preset limit value, the traceability data is considered to be legal.
5. A method for querying traceable data, wherein the method for querying traceable data is applied to a traceable system established based on a blockchain, the blockchain comprises a plurality of nodes, an upstream-downstream relationship exists among the plurality of nodes, and different nodes correspond to different supply chain links, and the method comprises:
receiving a tracing code input by a user;
obtaining a mapping relation from a main chain, wherein the mapping relation is the mapping relation between the tracing code and a transaction hash address, and the transaction hash address is the address of the tracing data in a sub-chain;
Inquiring a corresponding transaction hash address in the mapping relation based on the traceability code; and
and acquiring the traceability data in the sub-chain based on the transaction hash address.
6. The method of claim 5, wherein the mapping relationship is a one-to-many relationship of the traceability code and the transaction hash address,
the acquiring the traceability data in the sub-chain based on the transaction hash address comprises the following steps:
acquiring traceability data in a plurality of sub-chains based on the transaction hash address;
after the tracing data in the multiple sub-chains are acquired based on the transaction hash address, the method further comprises the following steps:
splicing the traceability data in the multiple sub-chains to obtain final traceability data; and
and checking the completeness of the final traceability data.
7. The method of claim 5 or 6, wherein the trace data comprises ciphertext data,
after the tracing data in the sub-chain is acquired based on the transaction hash address, the method further comprises the following steps:
decrypting the tracing data from ciphertext data to plaintext data.
8. A traceable data uplink device, wherein the traceable data uplink device is applied to a traceable system established based on a blockchain, the blockchain comprises a plurality of nodes, the nodes have upstream and downstream relations, different nodes correspond to different supply chain links,
The device comprises:
the verification module is used for calling a verification contract to verify whether the received tracing data is legal or not for a single node in response to a transaction request of a previous node, wherein the tracing data corresponds to different supply chain links one by one;
the uplink module is used for calling an uplink contract under the condition that the tracing data are legal, storing the tracing data into a sub-chain corresponding to a current node, and returning a mapping relation between tracing codes and transaction hash addresses, wherein the transaction hash addresses are addresses of the tracing data in the sub-chain; and
and the mapping relation storage module is used for storing the mapping relation into the main chain.
9. A tracing data inquiry device, wherein the tracing data inquiry device is applied to a tracing system established based on a blockchain, the blockchain comprises a plurality of nodes, an upstream-downstream relationship exists among the nodes, different nodes correspond to different supply chain links,
the device comprises:
the source tracing code receiving module is used for receiving a source tracing code input by a user;
the mapping relation acquisition module is used for acquiring a mapping relation from a main chain, wherein the mapping relation is the mapping relation between the tracing code and a transaction hash address, and the transaction hash address is the address of the tracing data in a sub-chain;
The address inquiry module is used for inquiring the corresponding transaction hash address in the mapping relation based on the traceability code; and
and the traceability data acquisition module is used for acquiring traceability data in the sub-chain based on the transaction hash address.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-7.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-7.
CN202310403164.8A 2023-04-14 2023-04-14 Method, device, equipment and medium for tracing data uplink and tracing data query Pending CN116483919A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310403164.8A CN116483919A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for tracing data uplink and tracing data query

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310403164.8A CN116483919A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for tracing data uplink and tracing data query

Publications (1)

Publication Number Publication Date
CN116483919A true CN116483919A (en) 2023-07-25

Family

ID=87226213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310403164.8A Pending CN116483919A (en) 2023-04-14 2023-04-14 Method, device, equipment and medium for tracing data uplink and tracing data query

Country Status (1)

Country Link
CN (1) CN116483919A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117171236A (en) * 2023-11-02 2023-12-05 中电科大数据研究院有限公司 Data tracing method and system based on block chain
CN117272405A (en) * 2023-11-21 2023-12-22 广东省电信规划设计院有限公司 Data verification method and device applied to blockchain tracing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117171236A (en) * 2023-11-02 2023-12-05 中电科大数据研究院有限公司 Data tracing method and system based on block chain
CN117171236B (en) * 2023-11-02 2024-02-06 中电科大数据研究院有限公司 Data tracing method and system based on block chain
CN117272405A (en) * 2023-11-21 2023-12-22 广东省电信规划设计院有限公司 Data verification method and device applied to blockchain tracing
CN117272405B (en) * 2023-11-21 2024-04-12 广东省电信规划设计院有限公司 Data verification method and device applied to blockchain tracing

Similar Documents

Publication Publication Date Title
US11283596B2 (en) API request and response balancing and control on blockchain
US11521176B2 (en) Service flow system and service data processing method and apparatus
CN108805656B (en) Supply and demand matching method, platform, system and computer readable storage medium
US20230004537A1 (en) Extracting data from a blockchain network
US10768980B2 (en) Automated execution of a batch job workflows
CN116483919A (en) Method, device, equipment and medium for tracing data uplink and tracing data query
US11003718B2 (en) Systems and methods for enabling a global aggregated search, while allowing configurable client anonymity
WO2021135169A1 (en) Blockchain-based management method, terminal, apparatus, and storage medium
CN111210331A (en) Agricultural supply chain financial service platform based on block chain
CN104270417A (en) Comprehensive service providing system and method based on cloud computing
US20200374131A1 (en) Method and system for generalized provenance solution for blockchain supply chain applications
WO2021208762A1 (en) Data storage and query
CN112163869A (en) Block chain-based drug tracing method, device, server and medium
CN112527873B (en) Big data management application system based on chain number cube
CN111259448A (en) Data sharing method and device
CN112783787A (en) Interface test method, device and system and electronic equipment
Schapranow et al. Costs of authentic pharmaceuticals: research on qualitative and quantitative aspects of enabling anti-counterfeiting in RFID-aided supply chains
US20210176077A1 (en) Integrating blockchain with off-chain services
CN113554443A (en) Block chain-based imported frozen food quality safety tracing method and system
CN112184264A (en) Block chain-based drug supervision method, device, server and medium
CN113011907A (en) Data processing method, device, storage medium and equipment
Linoy et al. Towards eidetic blockchain systems with enhanced provenance
US11334674B2 (en) End point identification
US20240037476A1 (en) Advisor risk score
CN114331481B (en) Product anti-counterfeiting traceability system based on Ether house beacon chain system

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