CN108846010B - Method, system, computer system and storage medium for tracing product source in network - Google Patents

Method, system, computer system and storage medium for tracing product source in network Download PDF

Info

Publication number
CN108846010B
CN108846010B CN201810407371.XA CN201810407371A CN108846010B CN 108846010 B CN108846010 B CN 108846010B CN 201810407371 A CN201810407371 A CN 201810407371A CN 108846010 B CN108846010 B CN 108846010B
Authority
CN
China
Prior art keywords
alliance
product
block
node
federation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810407371.XA
Other languages
Chinese (zh)
Other versions
CN108846010A (en
Inventor
施伟
周洪飞
王慧星
胡利明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd, Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910680938.5A priority Critical patent/CN110489485B/en
Priority to CN201810407371.XA priority patent/CN108846010B/en
Priority to CN201910686420.2A priority patent/CN110472116B/en
Publication of CN108846010A publication Critical patent/CN108846010A/en
Application granted granted Critical
Publication of CN108846010B publication Critical patent/CN108846010B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q30/0185Product, service or business identity fraud
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • 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 invention discloses a method, a system, a computer system and a computer readable storage medium for realizing product tracing in a network. The method comprises the following steps: receiving a request for inquiring product data corresponding to different circulation links of a product which is circulated on a supply chain by an alliance block chain service network; at a federation node of the federation blockchain service network, querying the metadata according to the product identifier in the request; locating to the block through the metadata; and reading the corresponding product data from the positioned block to obtain the circulation record. The product tracing in the network is realized through a business network of an alliance block chain architecture, data related to circulation of products in all circulation links on a supply chain are stored in all alliance nodes on the alliance block chain, a centralized mode is distinguished, and any alliance node stores the product data, so that the safety and reliability are enhanced, the product tracing by means of the network has high reliability, and accurate and reliable circulation records can be obtained for given products.

Description

Method, system, computer system and storage medium for tracing product source in network
Technical Field
The invention relates to the technical field of internet application, in particular to a method, a system, a computer system and a computer readable storage medium for realizing product tracing in a network.
Background
Product tracing based on the Internet application technology is realized through a centralized data management platform. On the data management platform, the data related to the product is stored, the stored data is inquired correspondingly, and the purpose of product tracing is achieved according to the data obtained through inquiry.
Correspondingly, in order to realize traceability of the whole industrial chain of the product, taking the medicine as an example, it is necessary that each circulation link on the supply chain of a production enterprise, a pharmaceutical association, a circulation enterprise, a pharmacy, a hospital, etc. uploads data related to the medicine to the data management platform.
The process of uploading data related to product tracing to a trusted center node for storage and sharing is achieved. However, this centralized approach faces problems of centralized malicious attack, single point of failure, and even malicious tampering of stored data.
Therefore, the existing realization of product tracing has the limitation of low reliability, and the reliability of product tracing in the network needs to be improved urgently.
Disclosure of Invention
In order to solve the technical problem of low reliability in network implementation of product tracing in the related art, the invention provides a method, a system, a computer system and a computer readable storage medium for implementing product tracing in a network.
A method for tracing the source of a product in a network is adapted to the circulation of the product in each circulation link on a supply chain, alliance nodes in an alliance block chain service network respectively correspond to the circulation links on the supply chain, and each alliance node corresponds to one circulation link on the supply chain; the method comprises the following steps:
receiving a request for inquiring product data corresponding to products which have been streamed to different circulation links on a supply chain by the alliance block chain service network, wherein the request carries a product identifier;
at a federation node of the federated blockchain business network, querying metadata based on the product identifier, the metadata relating to products and blocks in the federation node;
locating all metadata obtained through query to a block in the federation node;
reading the corresponding product data from the located block, and obtaining the circulation record of the product on the supply chain.
A system for realizing product source tracing in a network is adapted to the circulation of products in each circulation link on a supply chain, alliance nodes in an alliance block chain service network respectively correspond to different circulation links on the supply chain, and each alliance node corresponds to one circulation link on the supply chain; the system comprises:
a request receiving module, configured to receive a request for querying product data corresponding to products that have been streamed to different circulation links on a supply chain by the alliance block chain service network, where the request carries a product identifier;
a query module configured to query, at a federation node of the federated blockchain service network, metadata according to the product identifier, the metadata relating to products and blocks in the federation node;
the positioning module is used for positioning all metadata obtained through query to blocks in the alliance nodes;
and the data reading module is used for reading the corresponding product data from the positioned block and obtaining the circulation record of the product on the supply chain.
In an exemplary embodiment, the query module is further configured to query, in a federation node where the request is received by the federation blockchain service network, metadata of an index block according to the product identifier to obtain all metadata matching the product identifier.
In one exemplary embodiment, the data reading module includes:
the product data reading unit is used for respectively reading product data corresponding to each circulation link of the product on a supply chain from the positioned blocks;
and the circulation record obtaining unit is used for connecting the read product data together according to the sequence of the blocks to form the circulation record of the product on the supply chain.
In one exemplary embodiment, the system further comprises:
the acquisition module is used for acquiring product data of products communicated to the corresponding circulation links through union nodes corresponding to the circulation links on the supply chain in the union block chain service network;
and the storage implementation module is used for storing the product data corresponding to the circulation link for the products circulated on the supply chain in the block chain business network of the alliance under the control of the main alliance node through the acquired product data.
In one exemplary embodiment, the acquisition module includes:
the acquisition execution unit is used for acquiring product data of a product in a circulation link corresponding to a supply chain by an alliance node in the alliance block chain service network, wherein the product data is used for describing the circulation of the product in the circulation link of the supply chain;
a synchronization unit, configured to perform synchronization of the product data to other alliance nodes in the alliance block chain service network.
In an exemplary embodiment, the synchronization unit is further configured to perform, by each alliance node in the alliance block chain service network, point-to-point transmission of the collected product data to the other alliance nodes, so that each alliance node in the alliance block chain service network synchronizes to obtain the collected product data, and the alliance nodes that obtain the product data synchronously include slave alliance nodes and/or master alliance nodes.
In one exemplary embodiment, the storage implementation module includes:
a block generation unit, configured to issue a block for the synchronized product data through a master federation node in the federation blockchain service network, where the block fills the synchronized product data;
a transmission verification unit, configured to perform transmission and verification of the block in the alliance block chain service network;
a block writing unit, configured to write the block that passes the verification into a slave alliance node in the alliance blockchain service network, and obtain storage of product data of each circulation link of the product in the alliance blockchain service network on a supply chain;
wherein the storage of the product data in the federated blockchain business network is indexed by metadata comprising the corresponding product identifier.
In one exemplary embodiment, the storage implementation module further comprises:
a block verification unit for repeatedly performing verification of the block for a slave federation node that fails to verify the block;
and the malicious identification unit is used for identifying a malicious alliance node in the alliance block chain service network according to the verification failure and removing the malicious alliance node from the alliance block chain service network.
In one exemplary embodiment, the system further comprises:
and the election module is used for electing the alliance node with the highest computing power as a main alliance node according to the current computing power of each alliance node in the alliance block chain service network, and other alliance nodes in the alliance block chain service network are slave alliance nodes.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the realization of product tracing in the network is adapted to the circulation of products in a plurality of circulation links on a supply chain, alliance nodes in an alliance block chain service network respectively correspond to different circulation links on the supply chain, for the tracing of a given product, a request for inquiring product data corresponding to different circulation links on the supply chain by the alliance block chain service network is received, the request carries a product identifier, metadata is inquired according to the product identifier at the alliance nodes of the alliance block chain service network, the metadata is related to the product and the blocks in the alliance nodes, at the moment, the metadata obtained by inquiry can be positioned to the blocks in the alliance nodes, the reading of the corresponding product data is carried out from the positioned blocks, the circulation record of the product on the supply chain is obtained, and the product tracing in the network can be realized by the service network of an alliance block chain architecture, the data related to circulation of products in each circulation link on a supply chain, namely the product data is stored in each alliance node on an alliance block chain, and the method is different from the centralized mode of a data management platform in the conventional implementation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic, diagrammatic illustration of an environment in which the present invention is practiced, according to an exemplary embodiment;
FIG. 2 is a block diagram illustrating an apparatus in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method for implementing product tracing in a network in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating a method of implementing product tracing in a network in accordance with another exemplary embodiment;
FIG. 5 is a flowchart illustrating a description of step 370, according to a corresponding embodiment of FIG. 3;
FIG. 6 is a flow chart illustrating a method of implementing product tracing in a network in accordance with another exemplary embodiment;
FIG. 7 is a flowchart illustrating a description of step 510 according to a corresponding embodiment of FIG. 6;
FIG. 8 is a flowchart illustrating a description of step 530 according to a corresponding embodiment of FIG. 6;
FIG. 9 is a flowchart illustrating a description of step 531 in accordance with the corresponding embodiment of FIG. 8;
FIG. 10 is a flowchart illustrating a description of step 530 according to another exemplary embodiment;
FIG. 11 is an architecture diagram of a federated blockchain business network, shown in accordance with an exemplary embodiment;
FIG. 12 is a timing diagram illustrating the implementation of storage traffic between a master federation node and a slave federation node, according to an exemplary embodiment;
FIG. 13 is a block diagram illustrating an apparatus in a network that implements product tracing in an exemplary embodiment;
FIG. 14 is a block diagram illustrating a system for implementing product tracing in a network in accordance with another exemplary embodiment;
FIG. 15 is a block diagram illustrating a data read module according to the corresponding embodiment of FIG. 13;
FIG. 16 is a block diagram illustrating a system for implementing product tracing in a network in accordance with another exemplary embodiment;
FIG. 17 is a block diagram illustrating a description of an acquisition module according to the corresponding embodiment of FIG. 16;
FIG. 18 is a block diagram illustrating a description of a storage implementation module according to the corresponding embodiment of FIG. 16.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
FIG. 1 is a schematic, simplified diagram illustrating an implementation environment to which the present invention relates, according to an exemplary embodiment. In an exemplary embodiment, the product tracing implemented by the invention through the network provides tracing service for various products, so that any product can obtain the whole process of product circulation by means of the implementation of the invention.
For example, the product can be obtained through the product source tracing inquiry realized by the network of the invention from the production and manufacture to the distribution of the whole process of the drug store or the hospital.
The invention realizes product tracing through a network and an alliance block chain formed by a plurality of nodes, wherein the nodes are alliance nodes.
Therefore, as shown in the architecture of fig. 1, the traced product is a drug, and in the alliance block chain business network that implements drug tracing, a plurality of alliance nodes 110 are deployed, where each alliance node 110 corresponds to each circulation link in the supply chain, for example, in a drug manufacturing circulation link, the corresponding alliance node 110 is deployed in a drug manufacturing enterprise.
Any one person can obtain the medicine data corresponding to each circulation link of the medicine on the supply chain through the query interface provided by the alliance node 110, and further obtain the circulation record of the medicine on the supply chain, so that the medicine tracing in the alliance block chain service network is realized.
FIG. 2 is a block diagram illustrating an apparatus according to an example embodiment. For example, the apparatus 200 may be a node server as shown in FIG. 1.
Referring to fig. 2, the apparatus 200 may have a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 222 (e.g., one or more processors) and a memory 232, one or more storage media 230 (e.g., one or more mass storage devices) storing an application 242 or data 244. Memory 232 and storage medium 230 may be, among other things, transient or persistent storage. The program stored in the storage medium 230 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, the central processor 222 may be configured to communicate with the storage medium 230 to execute a series of instruction operations in the storage medium 230 on the device 200. The device 200 may also include one or more power supplies 226, one or more wired or wireless network interfaces 250, one or more input-output interfaces 258, and/or one or more operating systems 241, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth. The steps performed by the node server described in the embodiments shown in fig. 3, 4, 5, 6, 7 and 8 below may be based on the apparatus structure shown in fig. 2.
FIG. 3 is a flow chart illustrating a method of implementing product tracing in a network, according to an example embodiment. The method for tracing the source of the product in the network is adapted to the circulation of the product in a plurality of circulation links on a supply chain, and in an exemplary embodiment, as shown in fig. 3, at least comprises the following steps.
In step 310, a request for querying product data corresponding to products that have been streamed to different circulation links on a supply chain by an alliance block chain service network is received, and the request carries a product identifier.
The alliance block chain service network is a service network formed by alliance block chains, different deployed alliance nodes respectively correspond to different circulation links on a supply chain, and each alliance node corresponds to one circulation link on the supply chain. That is, each federation node corresponds to a different distribution link through which products are distributed across the supply chain. For example, one alliance node uniquely corresponds to one circulation link on the supply chain, and each circulation link on the supply chain also has a uniquely corresponding alliance node, so that the product circulation performed among any circulation links on the supply chain can be detected by the corresponding alliance node.
For example, the circulation links of the drugs in the supply chain include a drug manufacturing circulation link, a drug qualification certification circulation link, a logistics circulation link, a circulation link to a supplier, a circulation link to a sales terminal by the supplier, and the like.
Different kinds of products, even the same kind of products, but different batches, have the same or slightly different circulation processes in the supply chain, and the circulation links are nodes in the circulation processes.
The alliance block chain service network provides a query interface for tracing the product, so that the query related to the product tracing can be realized by calling the query interface. The alliance block chain service network realizes storage of data related to product circulation on the supply chain so as to record circulation of products on the supply chain, and performs data query corresponding to the storage so as to acquire circulation of the products on the supply chain.
Thus, the product data stored and available for querying by the alliance blockchain service network corresponds to a certain circulation link in the supply chain, and the product data corresponding to the circulation link describes the circulation of the product in the circulation link. For example, corresponding to a union node of a drug manufacturing circulation link of a drug manufacturing enterprise, the corresponding drug production data is drug production data; corresponding to a alliance node of a drug qualification certification circulation link of a drug industry association, wherein the corresponding drug data is drug qualification certification data; and corresponding to the alliance node of the logistics circulation link of the medicine circulation enterprise, wherein the corresponding medicine data is logistics data in the medicine circulation process.
The alliance block chain service network receives a request for inquiring product data corresponding to each circulation link of a product on a supply chain, and the request is received by an alliance node in the alliance block chain service network.
It should be understood that the product tracing query initiated to the alliance blockchain service network is executed on the alliance node to which the terminal can be connected, and then the alliance node receives the initiated request and executes the query of the product data corresponding to each circulation link of the product on the supply chain for the request.
The initiated request carries a product identifier, which uniquely identifies a product, which is a specific one of the corresponding products with a name, such as a box or a bottle of medicine corresponding to a medicine.
At a federation node of the federated blockchain business network, metadata is queried based on the product identifier, the metadata relating to the product and to the blocks in the federation node, at step 330.
As mentioned above, the query initiated by the federated blockchain service network is directed to a federated node in the federated blockchain service network, that is, as the query-related request is initiated in the federated blockchain service network, the terminal initiating the query-related request is connected to the federated node, and the federated node performs product tracing for the terminal, that is, performs the query related to the received request first.
The request carries a product identifier for uniquely identifying the product, and in the federation node, the query can be executed for the corresponding product according to the product identifier in the request.
It should be noted that the alliance blockchain service network stores product data of circulation links of products on a supply chain, and the stored product data are all indexed by corresponding metadata. The metadata will be used to describe the corresponding product data and the storage location to which the product data corresponds.
And the storage of the product data in the alliance blockchain service network is realized through the created blocks and the constructed blockchain. That is, product data is stored in a block, and product data corresponding to the same product in each circulation link of the supply chain is often distributed in different blocks of the block chain. The metadata used as the index provides an index for the product data on the block, so that the metadata is related to the product and the block in the federation node, and the block containing the product data corresponding to the product is obtained by searching through the metadata.
According to the query in the metadata executed by the product identifier, the queried metadata is matched with the product identifier on one hand to obtain all metadata corresponding to the product which requests to trace the source, and on the other hand, a mapping block is obtained under the action of the queried metadata, is related to the product which requests to trace the source, and stores the product data corresponding to the product.
And inquiring all corresponding metadata by the product identifier on the alliance node of the alliance blockchain service network. That is, all metadata corresponding to the product identifier is queried, and the process is performed as a query process in the federation blockchain service network.
Although a plurality of federation nodes are deployed in the federation blockchain service network, data is stored consistently between each federation node, and thus product tracing can be achieved in the federation blockchain service network by only connecting to one federation node.
In one exemplary embodiment, step 330 includes: in the alliance node of the alliance block chain service network receiving request, inquiring the metadata of the index block according to the product identifier to obtain all metadata matched with the product identifier.
Wherein the metadata of the index block includes a product identifier. For a metadata query that carries a product identifier according to a request, it is a process of finding metadata that contains the product tag.
In step 350, all metadata obtained from the query is located to a block in the federation node.
Where, as previously mentioned, the stored metadata is an index of the block, the metadata that can be derived from the query is located to the block in the federation node.
For example, in an exemplary embodiment, the metadata and the data stored in the block, i.e., the data of the block, are mapped to each other in the form of key value pairs and stored in an associated manner. Therefore, after all the metadata corresponding to the product identifier are obtained through query, each metadata obtained through query is located to the block in the local federation node.
It should be understood that the block located by the metadata in the federation node stores the product data of the product identified by the product identifier, and so on, all the blocks located by all the metadata store all the product data, and all the product data can be obtained through the located block in the subsequent step execution.
In step 370, reading the corresponding product data from the located block, and obtaining the circulation record of the product on the supply chain.
Reading the product data corresponding to the product identifier on the block obtained by the positioning of the metadata, so as to trace the source of the product marked for the product identifier carried by the product data query request, and then obtaining the circulation record corresponding to the circulation of the product in each circulation link of the supply chain by the product data read from the block.
It should be added here that the blocks located by the metadata obtained by the query are necessarily on the block chain constructed in the federation node, so that, on the one hand, there is a linking order between the blocks, and on the other hand, there is a certain time order along with the existence of the time stamps on the blocks.
Sequential processing of the read product data will be achieved, and a record of the circulation of the product in the supply chain will be obtained.
By means of the exemplary embodiment as described above, the product tracing is realized by means of a network, so that the initiation of a query related to a product is facilitated, and any consumer can query the circulation condition of the purchased or taken product before the product is obtained.
In the exemplary embodiment, under the action of the alliance blockchain service network and the alliance nodes deployed by the alliance blockchain service network, on one hand, the data transparency is ensured, on the other hand, the data security and reliability are ensured, the data is stored in each alliance node, a decentralized architecture of data storage is realized, and the problems of existing implementation such as centralized malicious attack, single-point failure and malicious tampering of the data are solved.
In the exemplary embodiment described above, each federation node corresponds to a circulation link on the supply chain, and in the circulation of the product, no matter which circulation link the federation node is in, the corresponding federation node detects the circulation link and realizes corresponding product data storage, so that timeliness and accuracy can be ensured for product traceability realized by the federation blockchain service network.
FIG. 4 is a flow chart illustrating a method of implementing product tracing in a network, according to another exemplary embodiment. In another exemplary embodiment, before step 310, the method for implementing product tracing in the network further includes the following steps.
In step 410, a selection of a scan of a product barcode is received, obtaining product barcode information.
The product barcode is barcode information for uniquely identifying a product, and may be an entity barcode existing on a package where the product is located, or barcode information obtained via a network, which is not limited herein and is flexibly set according to a specific operation business scenario. The product bar code may be a bar code, a two-dimensional code, an RFID (Radio Frequency Identification) tag, and the like.
And with the scanning of the terminal selected and executed aiming at the product bar code, the corresponding product bar code information can be obtained through the scanned product bar code. The product bar code information is used for describing the corresponding product condition in a graphic coding mode.
In step 430, the product barcode information is parsed to obtain a product identifier.
The product bar code information obtained by scanning the product bar code carries the product identifier, so that the product bar code information can be obtained through analysis processing.
In step 450, a request for querying product data corresponding to each circulation link of the product on the supply chain is initiated to the alliance block chain service network according to the product identifier.
After the product bar code information is analyzed and processed to obtain the product identifier, the obtained product identifier can initiate a query request of product data corresponding to the product in each circulation link on the supply chain.
Through the exemplary embodiment, tracing of products is initiated for the alliance blockchain service network, and for a terminal initiating a request to the alliance blockchain service network, connection between the terminal and an alliance node is achieved, and then a response executed by the alliance node on behalf of the alliance blockchain service network is waited.
For consumers, the whole process of obtaining the circulation of products on a supply chain can be requested from an alliance block chain service network by initiating product bar code scanning through a terminal carried by the consumer, and the product tracing at any time and any place is realized.
Fig. 5 is a flow chart illustrating a description of step 370 according to a corresponding embodiment of fig. 3. This step 370, as shown in FIG. 5, includes at least the following steps.
In step 371, product data corresponding to each circulation link of the product on the supply chain is read from the located blocks respectively.
In step 373, the read product data are concatenated together according to the block sequence to form a distribution record of the product on the supply chain.
As described above, the block located by all the metadata obtained by the query stores product data of the product corresponding to each circulation link in its own circulation. These product data describe the condition of the product in circulation to each circulation segment separately.
The read product data form circulation records of products on the supply chain according to the sequence of the blocks in the block chain or corresponding time stamps. The time stamp referred to is recorded in the metadata as well as the chunk.
By the exemplary embodiment, the product data stored in the area can form a circulation record of the product on a supply chain, so that the product source tracing in the network is realized.
FIG. 6 is a flow chart illustrating a method of implementing product tracing in a network, according to another exemplary embodiment. In the method for implementing product tracing in the network, the federation nodes in the federation blockchain service network include a master federation node and a slave federation node, and in another exemplary embodiment, as shown in fig. 6, the method further includes the following steps.
In step 510, product data is obtained for products communicated to each circulation link in the supply chain through a federation node corresponding to each circulation link in the federation blockchain service network.
As described above, the federation nodes deployed in the federation blockchain service network respectively correspond to the distribution links in the supply chain. When the product is circulated to the circulation link, the corresponding alliance nodes are detected, and corresponding product data are collected.
The product data collection of each alliance node in the alliance block chain service network is executed for the corresponding supply chain circulation link, and the product data collection of the corresponding circulation link is carried out no matter what alliance node.
Therefore, with the circulation of many products in the supply chain, each alliance node in the alliance block chain service network often acquires a certain amount of product data, that is, the products circulated to the corresponding circulation link include multiple or the same products but correspond to a certain amount of products, and the product data acquisition is required.
In step 530, under the control of the main alliance node, storing the product data corresponding to the circulation link for the products circulated on the supply chain in the alliance block chain business network through the acquired product data.
The alliance nodes deployed in the alliance blockchain service network comprise a main alliance node and a slave alliance node. However, the division and classification of the master federation node and the slave federation nodes is not fixed, but determined according to the corresponding computing capabilities.
That is, the federating node with the best computing power is dynamically configured as the master federating node, while other federating nodes in the federating blockchain service network are dynamically configured as slave federating nodes.
And the main alliance node is used for initiating the consensus behavior and controlling the writing and the storage of newly added product data in the alliance block chain service network. And the slave alliance node realizes the writing and storage of the new product data in the alliance block chain service network under the control of the master alliance node.
In this exemplary embodiment, through cooperation between the master alliance node and the slave alliance node, the full utilization of computing resources in the alliance blockchain service network is achieved, and further, the processing efficiency of the alliance blockchain service network is improved on the basis.
Fig. 7 is a flow chart illustrating a description of step 510 according to a corresponding embodiment of fig. 6. This step 510, as shown in FIG. 7, includes at least the following steps.
In step 511, the federation nodes in the federation blockchain service network collect product data for the product in the corresponding circulation link of the supply chain, where the product data is used to describe circulation of the product in the circulation link of the supply chain.
Each alliance node in the alliance block chain service network detects product circulation in the corresponding circulation link and collects product data. When the product circulates to a circulation link, the alliance node corresponding to the circulation link detects the arrival of the product in the circulation link and collects product data.
In step 513, synchronization of the product data is performed to other federation nodes in the federated blockchain service network.
In the process of acquiring the product data, each alliance node is executed in a corresponding circulation link, so that different product data are acquired among the alliance nodes, and the product data among the alliance nodes in the alliance block chain service network needs to be synchronized.
In an exemplary embodiment, step 513 includes: each alliance node in the alliance block chain service network carries out point-to-point transmission of the collected product data to other alliance nodes, so that each alliance node in the alliance block chain service network can synchronously obtain the collected product data, and the alliance nodes synchronously obtaining the product data comprise slave alliance nodes and/or master alliance nodes.
Synchronization of product data between federation nodes is achieved through point-to-point transmission. The alliance node for collecting the product data comprises a slave alliance node and/or a master alliance node, and as long as the corresponding circulation link has a circulation product, the collection of the product data and the subsequent synchronization are carried out.
In one exemplary embodiment, the synchronization of the product data will also be performed after the product data is encrypted and a digital signature is appended. That is to say, the federation nodes encrypt the product data which needs to be synchronized to other federation nodes to obtain encrypted characters of the product data, and use a private key to sign the encrypted characters to obtain a digital signature.
At this time, the encrypted characters and the digital signature are transmitted to other alliance nodes to strengthen data security and prevent data tampering and counterfeiting.
And other alliance nodes receive the encrypted character and the digital signature, decrypt the digital signature, compare the character obtained by decryption with the encrypted character in a consistent manner, decrypt the encrypted character to obtain the synchronized product data if the character obtained by decryption is consistent with the encrypted character, and indicate that the data is falsified and forged if the character obtained by decryption is inconsistent with the encrypted character. It should be understood that decrypting the digital signature is accomplished through a public key distributed by the federation node.
Fig. 8 is a flow chart illustrating a description of step 530 according to a corresponding embodiment of fig. 6. In an exemplary embodiment, as shown in FIG. 8, this step 530 includes at least the following steps.
In step 531, blocks are published for synchronized product data by the master federation node in the federation blockchain services network, and the blocks are populated with synchronized product data.
In step 533, the transmission and verification of the block in the alliance blockchain service network is performed.
In step 535, the verified block is written to a slave federation node in the federation blockchain service network, and storage of product data for each distribution link of products in the federation blockchain service network on the supply chain is obtained.
The storage of the product data in the block chain service network of the alliance takes the metadata containing the corresponding product identifier as an index.
The storage of the product data is realized by creation and distribution of the tile, that is, the product data is stored as tile data. In the alliance block chain service network, alliance nodes have good cooperation relations such as network connection and the like, and along with product data synchronization, all alliance nodes have all product data needing to be written into block storage.
At this time, the master federation node initiates creation of a block, the created block is used for assembling product data required to be stored into a block body in the block, so that the product data is written into the master federation node for storage, and writing storage in other federation nodes is realized along with the writing storage in the master federation node.
After the block created by the master alliance node is issued to the alliance blockchain service network, transmission in the alliance blockchain service network can be performed, and the block is transmitted to the slave alliance node through point-to-point transmission.
After receiving the block transmitted by the main alliance node from the alliance node, the block is verified according to preset configuration information, and after the verification is passed, the received block can be added to the tail end of the block chain stored in the slave alliance node to realize the writing of the block.
And each slave alliance node performs block receiving verification and writing on the own block chain, and by analogy, writing and storing of product data on the alliance block chain service network can be obtained.
The storage of product data in the alliance blockchain service network is also constructed by indexing after the writing of blocks on the stored blockchain. That is, metadata is obtained for the written block, and blocks that are contiguous to the written block are indexed by the obtained metadata.
Fig. 9 is a flowchart illustrating the description of step 531 according to the corresponding embodiment of fig. 8. In an exemplary embodiment, step 531, as shown in FIG. 9, includes at least the following steps.
In step 601, the master federation node initiates generation of a block corresponding to the synchronized product data through a consensus behavior in the federation blockchain business network.
It should be understood that the federation block chain executes a consensus algorithm by the main federation nodes, that is, initiates a consensus action, and generates and writes the blocks corresponding to the product data after achieving the consensus among the nodes. Thus, a new block for writing the product data can be generated by using the consensus mechanism.
In an exemplary embodiment, the initiation of the consensus activity and the generation of the blocks are performed at specified time intervals, i.e., the consensus activity is initiated periodically and the generation of the execution blocks is controlled.
In step 603, the tile data filled into the generated tile is obtained through the synchronized product data.
The newly added product data in the alliance block chain service network, that is, the data acquired and synchronized by each alliance node, is filled into the block to be stored as block data.
The block includes a block header containing metadata and a block body for storing block data. The metadata comprises a block identifier which uniquely identifies the block and a product identifier corresponding to product data written by the block, but the block identifier or the product identifier is a hash value obtained by hash encryption so as to ensure the security of the data.
Certainly, the block header includes, in addition to the metadata, a version number, a workload certification, a target difficulty, and a random value, and elects in the federation blockchain service network through the recorded workload certification, so as to dynamically configure a master federation node in the federation blockchain service network.
In step 605, the generated tile is filled with tile data, and metadata of the index tile is constructed according to the product data and the tile in the tile data.
After the completion of the filling of the tile data in the generated tile, the index of the tile is constructed, that is, the metadata is used as the index to associate the storage tile data. It should be understood that the reference to the block data includes the written product data, but is not limited thereto, and includes all data present in the block.
The block data is obtained after the data in the blocks are serialized, each block has the corresponding block data, and key value pairs are constructed with the corresponding metadata to realize storage, so that very high response speed is provided for the subsequent query.
In another exemplary embodiment, after step 531, step 530 further comprises:
and the issued blocks take the constructed metadata as indexes to store the issued blocks on the block chain of the main alliance node.
In both the master alliance node and the slave alliance node, the issued block needs to be stored in the blockchain of the slave alliance node, so that all data can be stored in all alliance nodes in the alliance blockchain service network.
Fig. 10 is a flowchart illustrating a description of step 530 according to another exemplary embodiment. This step 530, as shown in fig. 10, further includes the following steps after the step 533 is executed.
In step 701, the verification of the block is repeatedly performed from the federation node for which the verification of the block failed.
In step 703, a malicious federation node in the federation blockchain service network is identified based on the failure of the verification, and the malicious federation node is removed from the federation blockchain service network.
After receiving the new block transmitted by the master federation node, the slave federation node verifies the block. If the verification is passed, the writing of the block in the slave federation node can be realized as in the corresponding embodiment of FIG. 8. However, if the verification does not pass, the verification of the block needs to be performed again according to the setting.
In the verification performed again, if the verification fails, the malicious alliance nodes in the alliance blockchain service network can be identified, and then the malicious alliance nodes in the alliance blockchain service network are eliminated.
In another exemplary embodiment, before step 530, the method for implementing product tracing in the network further includes the following steps.
And selecting the alliance node with the highest computing power as a main alliance node and other alliance nodes in the alliance blockchain service network as slave alliance nodes according to the current computing power of each alliance node in the alliance blockchain service network.
And selecting the alliance node with the highest computing capability as a main alliance node in the alliance blockchain service network. In an exemplary embodiment, the high or low computation capability of the federation node can be measured by the workload proof in the block, that is, the workload proof recorded in the block at the end of the block chain can indicate the high or low computation capability of the federation node.
The workload certification indicates a number of computations for hashing data in the chunk header that is less than a target value. The more computation times indicated by the workload proof, the higher the computing power of the federation node.
Thus, in one exemplary embodiment, elections in a federated blockchain business network are conducted through workload proofs, a master federation node in the federated blockchain business network is obtained, and slave federation nodes are configured accordingly.
By the exemplary embodiment, dynamic configuration of the master alliance node and the slave alliance nodes in the alliance block chain service network is achieved, so that the execution of calculation in the alliance block chain service network is adaptive to the highest calculation capacity of the current block chain service network, and the realization of tracing of products circulated by the supply chain by the alliance block chain service network is guaranteed.
Through the exemplary embodiment, a block chain business network of the alliance is realized for tracing the product, the product circulating on the supply chain is accurately and quickly traced on the basis of the block chain business network, the detailed data of the product in each circulation link is traced and recorded for the purpose, the data accuracy is guaranteed, meanwhile, the data legality and authenticity are guaranteed, and the data tampering is avoided.
The federation blockchain service network implemented by the exemplary embodiment described above is implemented based on federation blockchains, so as to implement distributed storage, thereby ensuring safe storage of data.
In addition, a globally credible third party entity is not required to be relied on, a point-to-point communication mode is adopted among all the alliance nodes, and the expandability and the reliability of the system are enhanced, so that the safety risk of the traditional centralized data storage is avoided.
Taking a medicine circulating on a supply chain as an example, a method for realizing medicine tracing in the network is described. The circulating medicine is not only a certain medicine, but also a box of medicine corresponding to the medicine. The circulation of a box of medicine in each circulation link on the supply chain is realized on the basis of the method, the tracking record of the box of medicine in the block chain business network of the alliance is realized, and the related medicine data is stored in the block chain business network of the alliance, so that the inquiry of the box of medicine is realized.
It should be understood that drug traceability is a chain for tracing the circulation of drugs, and each circulation link in a supply chain of a production enterprise, a circulation enterprise, a pharmacy/hospital, etc. is traced by registering each circulation of drugs.
Based on the above, enterprises or institutions such as pharmaceutical manufacturing enterprises, pharmaceutical associations, drug distribution enterprises, drug stores, hospitals and the like on the supply chain are correspondingly deployed with the federation nodes in the federation blockchain business network, so as to ensure that the federation nodes in the federation blockchain business network can correspond to each distribution link on the supply chain.
For a plurality of enterprises or institutions related to the supply chain, the drug manufacturing enterprises are responsible for generating a unique drug identifier for each drug, the unique drug identifier exists in the form of a bar code, a two-dimensional code or an RFID (radio frequency identification) tag, and the corresponding alliance node collects the related generation condition of the drug to obtain drug data in the production and circulation link.
Similarly, the pharmaceutical industry association is responsible for collecting drug certification and qualification data; the drug circulation enterprise is responsible for collecting logistics data in the drug circulation process; the pharmacy or the hospital is responsible for collecting the circulation data of suppliers of the medicines, and the data is the medicine data collected in each circulation link. After each alliance node collects medicine data related to the node of the alliance node, the medicine data are reported to other alliance nodes; and each alliance node carries out workload certification on the medicine data after a period of time, and election main alliance nodes are selected to obtain the right of creating a new data block, so that system rewards are obtained. After the workload certification of the alliance nodes is completed, the main alliance nodes are selected, the other nodes are slave alliance nodes, the main alliance nodes generate new blocks and transmit the new blocks to each slave alliance node, each slave alliance node verifies the blocks, and the verification is performed by writing the new blocks into an alliance block chain system, so that the data consistency on each alliance node is finally guaranteed.
A consumer uses a mobile terminal APP or other modes to scan the unique identifier of the medicine, connects the unique identifier to a block chain system of the alliance for inquiry, and returns detailed data of the medicine in each circulation link, so that the tracing of the medicine is realized.
Fig. 11 is an architecture diagram illustrating a federated blockchain service network in accordance with an exemplary embodiment. As shown in fig. 11, data synchronization is performed between federation nodes, and for a query to be performed, the federated node can be connected to a federation node through an APP (Application) or a Web (World Wide Web) page to which the federated node is connected, for example, the federated node that can provide the most superior quality of service, and then the query corresponding to performing drug tracing is performed. For each federation node, its internal implementation is as shown in detail in FIG. 11. Each federation node includes an MQ (910), a Collector (920), a Consortium (930), a Database (940), and a Query (950).
The MQ (910) is a message queue module. The system is responsible for uniformly distributing communication messages among all the alliance nodes;
the Collector (920) is a data acquisition module. Collecting drug data, marking the drug with a unique identifier, namely a drug identifier, processing the drug by using encryption and digital signature technologies, and then sending the collected drug data to other alliance nodes through network messages;
consortium (930) is a Federation chain module. And carrying out workload certification on the acquired medicine data at regular time, selecting a main alliance node, integrating the medicine data into a new data block, and writing the newly generated block into an alliance block chain service network with other slave alliance nodes through a consensus mechanism. Each newly generated chunk contains a cryptographic hash value linked to the previous chunk, i.e., the chunk identifier corresponding to the previous chunk, which is used to track and verify the data chunk.
Database (940) is a data storage module. And storing the block corresponding to the medicine data to support the inquiry operation for the external support.
Query (950) is a data Query module. And inquiring the information of the drug at each alliance node through the drug identifier.
The alliance nodes in the alliance block chain service network are in peer-to-peer mode, data collection is carried out in each alliance node, and therefore the alliance nodes are respectively responsible for collecting medicine data related to the nodes and sending the collected data to other alliance nodes. In order to ensure the source reliability and authenticity of the drug data acquired by the alliance nodes, digital certificates and signature technologies are used among the alliance nodes to verify that the alliance nodes send drug data requests and identity information, and the drug data sent by the alliance nodes can be received only after verification is passed.
And the storage service in the alliance block chain service network is also performed based on each alliance node, so that the acquired medicine data is stored in a new block under the mutual cooperation of each alliance node, and the consistency of data storage in each alliance node is ensured. Therefore, the main alliance node performs workload certification on new medicine data after a certain time, generates a new block, and writes the block in the alliance block chain service network after the main alliance node agrees with each other.
FIG. 12 is a timing diagram illustrating the implementation of storage traffic between a master federation node and a slave federation node, according to an example embodiment. In this exemplary embodiment, as shown in fig. 12, a consensus mechanism is first used to select a master federation node from various federation nodes, and the other nodes are slave federation nodes, that is, as shown in step (1), the system referred to herein is the entire federation block chain service network.
After the master federation node is elected, for the selected master federation node, medicine data transmitted point-to-point by each slave federation node is received, and the medicine data is newly acquired by each slave federation node, as shown in step (2). By now it should be appreciated that each slave federation node will also be synchronized to newly collected drug data in the federation blockchain services network.
After receiving the new drug data, the union node regularly generates a new block by using a consensus mechanism, processes the new drug data in the generated new block by using a signature algorithm and a hash algorithm, adds a block hash value, a timestamp and a difficulty value field, and fills the new block together, namely as described in the step (3) and the step (4).
And (3) transmitting the new block to other slave alliance nodes by using a point-to-point transmission mechanism, verifying by using a signature algorithm and a hash algorithm after each slave alliance node receives the new block, and writing the new block after the verification is passed, namely as shown in the step (5) and the step (6).
Therefore, technologies such as a consensus mechanism, point-to-point transmission, a signature algorithm, a Hash algorithm and the like are utilized, the consistency, the tamper resistance and the safety of data are ensured, the data of each node is ensured to be public and transparent to other nodes, and the trust among all alliance nodes of a drug supply chain system is enhanced.
Of course, if there is a partial authentication failure of the slave federation node in the performance of step (6), i.e., the slave federation node does not agree with the master federation node. And at the moment, the main alliance node analyzes and checks the consensus result of the new block, if necessary, the main alliance node resends the new data block to the slave alliance node for second consensus verification, if the slave alliance node fails to verify, a few slave alliance nodes obey the principle of majority are adopted, and if the slave alliance nodes with more than half of the proportion succeed in verification, the block is written.
And the master alliance node further analyzes the consensus result of the individual slave alliance nodes which fail to verify, judges whether malicious behaviors exist or not, and processes the malicious slave alliance nodes in time. Therefore, the malicious alliance can be found, the block chain business network can be eliminated in time, and the safe and stable operation of the whole block chain business network can be ensured.
The following is an embodiment of the apparatus of the present invention, which can be used to implement the embodiment of the method for tracing the source of the drug in the network of the present invention. For details that are not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method for tracing the source of the medicine in the network of the present invention.
Fig. 13 is a block diagram illustrating an apparatus in a network for implementing product tracing in an exemplary embodiment. The device for realizing product tracing in the network is adapted to the circulation of a plurality of circulation links of a product on a supply chain, different alliance nodes in an alliance block chain service network respectively correspond to different circulation links on the supply chain, and each alliance node corresponds to one circulation link on the supply chain; as shown in fig. 13, the system includes but is not limited to: a request receiving module 1110, a query module 1130, a location module 1150, and a data reading module 1170.
A request receiving module 1110, configured to receive a request for querying product data corresponding to products that have been streamed to different circulation links on a supply chain by the federation blockchain service network, where the request carries a product identifier;
a query module 1130, configured to query, at a federation node of the federated blockchain service network, metadata according to the product identifier, the metadata relating to a product and a block in the federation node;
a positioning module 1150, configured to position all metadata obtained through query to a block in the federation node;
and a data reading module 1170, configured to read the product data from the located block, and obtain a circulation record of the product on the supply chain.
FIG. 14 is a block diagram illustrating a system for implementing product tracing in a network, according to another exemplary embodiment. In another exemplary embodiment, as shown in fig. 14, the system for implementing product tracing in the network further includes a selection receiving module 1210, a parsing module 1230 and a request initiating module 1250.
The selection receiving module 1210 is used for receiving selection of scanning codes of the product bar codes to obtain information of the product bar codes.
And the analyzing module 1230 is configured to analyze and process the product barcode information to obtain a product identifier.
A request initiating module 1250, configured to initiate, according to the product identifier, a request for querying product data corresponding to each circulation link of a product on a supply chain to the federation block chain service network.
In another exemplary embodiment, the query module 1130 is further configured to query the metadata of the index block according to the product identifier in the federation node receiving the request in the federation blockchain service network, and obtain all metadata matching the product identifier.
Fig. 15 is a block diagram illustrating a data read module according to the corresponding embodiment of fig. 13. The data reading module 1170, as shown in fig. 15, includes at least a product data reading unit 1171 and a circulation record obtaining unit 1173.
A product data reading unit 1171, configured to respectively read, from the located block, product data corresponding to each circulation link of the product on the supply chain.
A circulation record obtaining unit 1173, configured to link the read product data together according to the sequence of the located blocks to form a circulation record of the product on the supply chain.
FIG. 16 is a block diagram illustrating a system for implementing product tracing in a network in accordance with another exemplary embodiment. In another exemplary embodiment, as shown in fig. 16, the system for implementing product tracing in the network further includes an acquisition module 1310 and a storage implementation module 1330.
An acquisition module 1310, configured to acquire product data for a product that is communicated to a corresponding circulation link through a federation node corresponding to each circulation link in a supply chain in a federation blockchain service network;
a storage implementation module 1330, configured to, under the control of a master alliance node, perform, in the alliance block chain service network, product data storage corresponding to the circulation link for the product circulating on the supply chain through the obtained product data.
Fig. 17 is a block diagram illustrating a description of an acquisition module according to a corresponding embodiment of fig. 16. The acquisition module 1310, as shown in fig. 17, includes at least an acquisition execution unit 1311 and a synchronization unit 1313.
An acquisition execution unit 1311, configured to acquire, by an alliance node in the alliance block chain service network, product data for a product in a circulation link corresponding to a supply chain, where the product data is used to describe circulation of the product in the circulation link of the supply chain;
a synchronization unit 1313, configured to perform synchronization of the product data to other federation nodes in the federation blockchain service network.
In another exemplary embodiment, the synchronization unit 1313 is further configured to enable each alliance node in the alliance block chain service network to perform point-to-point transmission of the collected product data to the other alliance nodes, so that each alliance node in the alliance block chain service network synchronizes to obtain the collected product data, where the alliance nodes that obtain the product data synchronously include slave alliance nodes and/or master alliance nodes.
FIG. 18 is a block diagram illustrating a description of a storage implementation module according to the corresponding embodiment of FIG. 16. In an exemplary embodiment, as shown in fig. 18, the storage implementation module 1330 includes at least: a block verification unit 1331 and a malicious identification unit 1333.
A block verification unit 1331, configured to repeatedly perform verification of the block on a slave federation node that fails to verify the block;
a malicious identification unit 1333, configured to identify a malicious alliance node in the alliance blockchain service network according to the failure of the verification, and remove the malicious alliance node from the alliance blockchain service network.
In another exemplary embodiment, the system for implementing product tracing in a network as described above further comprises an election module. The election module is used for electing the alliance node with the highest computing power as a main alliance node according to the current computing power of all alliance nodes in the alliance block chain service network, and other alliance nodes in the alliance block chain service network are slave alliance nodes.
Optionally, the present invention further provides a computer system, which can be used in the foregoing implementation environment to execute all or part of the steps of any one of the methods described above. The computer system is adapted to the circulation of products in each circulation link on a supply chain, and the alliance nodes in the alliance block chain service network respectively correspond to the circulation links on the supply chain, and the alliance nodes comprise:
a processor;
a memory for storing processor-executable instructions;
the computer readable instructions, when executed by the processor, implement the foregoing method.
The specific manner in which the processor of the apparatus in this embodiment performs the operations has been described in detail in the foregoing method embodiments, and will not be elaborated upon here.
In an exemplary embodiment, a storage medium is also provided that is a computer-readable storage medium, such as may be transitory and non-transitory computer-readable storage media, including instructions. The storage medium, for example, includes a memory of instructions executable by a processor of the apparatus to perform the method described above.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (12)

1. A method for realizing product tracing in a network is characterized in that the method is adapted to the circulation of a plurality of circulation links of a product on a supply chain, different alliance nodes in an alliance block chain service network respectively correspond to different circulation links on the supply chain, and each alliance node corresponds to one circulation link on the supply chain; when the product stream is delivered to a circulation link, product data collected by corresponding alliance nodes are assembled to a newly created block, and the block is added to the tail end of a stored block chain;
the method comprises the following steps:
receiving a request for inquiring product data corresponding to products which have been streamed to different circulation links on a supply chain by the alliance block chain service network, wherein the request carries a product identifier; at a federation node of the federated blockchain business network, querying metadata based on the product identifier, the metadata relating to products and blocks in the federation node; locating all metadata obtained through query to a block in the federation node; reading the corresponding product data from the located block to obtain the circulation record of the product on the supply chain;
federation nodes in the federated blockchain services network include a master federation node and slave federation nodes, the method further comprising:
acquiring product data of products transferred to corresponding circulation links through union nodes corresponding to different circulation links on a supply chain in a union block chain service network; issuing blocks for the synchronized product data through a master federation node in the federation blockchain service network, the blocks populating the synchronized product data;
performing transmission and verification of the block in the alliance block chain service network; writing the verified block into a slave alliance node in the alliance block chain service network to obtain storage of product data of each circulation link of the product in the alliance block chain service network on a supply chain; the storage of the product data in the alliance blockchain service network takes metadata comprising the corresponding product identifier as an index;
repeatedly performing the verification of the block for the slave federation nodes that failed to verify the block; identifying a malicious alliance node in the alliance block chain service network according to the verification failure, and removing the malicious alliance node from the alliance block chain service network; writing the block to a slave federation node in the federation blockchain services network if more than half of the slave federation nodes in the federation blockchain services network successfully authenticate the block.
2. The method of claim 1, wherein prior to receiving the request for the federation blockchain service network to query for product data corresponding to products that have been streamed over a supply chain to different distribution links, the method further comprises:
receiving selection of scanning codes of the product bar codes to obtain the bar code information of the product;
analyzing and processing the bar code information of the product to obtain a product identifier;
and initiating a request for inquiring product data corresponding to different circulation links of a product on a supply chain to the alliance block chain service network according to the product identifier.
3. The method of claim 1, wherein querying metadata at a federation node of the federated block-chain services network based on the product identifier comprises:
and in the alliance node of the alliance block chain service network receiving the request, inquiring the metadata of the index block according to the product identifier to obtain all metadata matched with the product identifier.
4. The method of claim 1, wherein the reading of the corresponding product data from the located block to obtain a flow record of the product through the supply chain comprises:
respectively reading product data corresponding to different circulation links of the product on a supply chain from the positioned blocks;
and the read product data are connected together according to the sequence of the blocks to form a circulation record of the product on the supply chain.
5. The method of claim 1, wherein obtaining product data for products communicated to a corresponding distribution link via a federation node in a federation blockchain service network corresponding to different distribution links in a supply chain comprises:
an alliance node in the alliance block chain service network collects product data of a product in a circulation link corresponding to a supply chain, wherein the product data is used for describing the circulation of the product in the circulation link of the supply chain;
synchronizing the product data to other federation nodes in the federation blockchain services network.
6. The method of claim 5, wherein the synchronizing the product data to other federated nodes in the federated blockchain service network comprises:
and each alliance node in the alliance block chain service network carries out point-to-point transmission of the acquired product data to other alliance nodes, so that each alliance node in the alliance block chain service network synchronously acquires the acquired product data, and the alliance nodes synchronously acquiring the product data comprise slave alliance nodes and/or master alliance nodes.
7. The method of claim 1, wherein the publishing blocks for the synchronized product data by a master federation node in the federated blockchain services network, the blocks populating the synchronized product data, comprises:
the main alliance node initiates block generation corresponding to the synchronized product data through consensus behavior in the alliance block chain service network;
obtaining block data filled in the generated block through the synchronized product data;
and filling the block data into the generated block, and constructing metadata for indexing the block according to the product data in the block data and the block.
8. The method of claim 1, wherein prior to issuing and writing blocks that populate the product data to slave federation nodes under control of a master federation node in the federation blockchain services network, the method further comprises:
and selecting the alliance node with the highest computing power as a main alliance node according to the current computing power of each alliance node in the alliance block chain service network, wherein other alliance nodes in the alliance block chain service network are slave alliance nodes.
9. A system for realizing product tracing in a network is characterized in that the system is adapted to the circulation of a plurality of circulation links of a product on a supply chain, different alliance nodes in an alliance block chain service network respectively correspond to different circulation links on the supply chain, and each alliance node corresponds to one circulation link on the supply chain; when the product stream is delivered to a circulation link, product data collected by corresponding alliance nodes are assembled to a newly created block, and the block is added to the tail end of a stored block chain; the system comprises:
a request receiving module, configured to receive a request for querying product data corresponding to products that have been streamed to different circulation links on a supply chain by the alliance block chain service network, where the request carries a product identifier;
a query module configured to query, at a federation node of the federated blockchain service network, metadata according to the product identifier, the metadata relating to products and blocks in the federation node;
the positioning module is used for positioning all metadata obtained through query to blocks in the alliance nodes;
the data reading module is used for reading the corresponding product data from the positioned block to obtain the circulation record of the product on the supply chain;
the federation nodes in the federated blockchain services network include a master federation node and slave federation nodes, the system further comprising modules for:
acquiring product data of products transferred to corresponding circulation links through union nodes corresponding to different circulation links on a supply chain in a union block chain service network; issuing blocks for the synchronized product data through a master federation node in the federation blockchain service network, the blocks populating the synchronized product data;
performing transmission and verification of the block in the alliance block chain service network; writing the verified block into a slave alliance node in the alliance block chain service network to obtain storage of product data of each circulation link of the product in the alliance block chain service network on a supply chain; the storage of the product data in the alliance blockchain service network takes metadata comprising the corresponding product identifier as an index;
repeatedly performing the verification of the block for the slave federation nodes that failed to verify the block; identifying a malicious alliance node in the alliance block chain service network according to the verification failure, and removing the malicious alliance node from the alliance block chain service network;
writing the block to a slave federation node in the federation blockchain services network if more than half of the slave federation nodes in the federation blockchain services network successfully authenticate the block.
10. The system of claim 9, further comprising:
the selection receiving module is used for receiving the selection of the bar code scanning of the product to obtain the bar code information of the product;
the analysis module is used for analyzing and processing the bar code information of the product to obtain a product identifier;
and the request initiating module is used for initiating a request for inquiring product data corresponding to different circulation links of a product on a supply chain to the alliance block chain service network according to the product identifier.
11. A computer system comprising a federation node in a federated block chain business network respectively corresponding to a circulation link on a supply chain adapted for circulation of a product on each circulation link on the supply chain, the federation node comprising:
a processor; and
a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method of any of claims 1 to 8.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN201810407371.XA 2018-04-28 2018-04-28 Method, system, computer system and storage medium for tracing product source in network Active CN108846010B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201910680938.5A CN110489485B (en) 2018-04-28 2018-04-28 Federated blockchain network, method and storage medium for storing product data therein
CN201810407371.XA CN108846010B (en) 2018-04-28 2018-04-28 Method, system, computer system and storage medium for tracing product source in network
CN201910686420.2A CN110472116B (en) 2018-04-28 2018-04-28 Alliance block chain service network, alliance node thereof and product data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810407371.XA CN108846010B (en) 2018-04-28 2018-04-28 Method, system, computer system and storage medium for tracing product source in network

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN201910686420.2A Division CN110472116B (en) 2018-04-28 2018-04-28 Alliance block chain service network, alliance node thereof and product data storage method
CN201910680938.5A Division CN110489485B (en) 2018-04-28 2018-04-28 Federated blockchain network, method and storage medium for storing product data therein

Publications (2)

Publication Number Publication Date
CN108846010A CN108846010A (en) 2018-11-20
CN108846010B true CN108846010B (en) 2021-12-14

Family

ID=64212525

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201910686420.2A Active CN110472116B (en) 2018-04-28 2018-04-28 Alliance block chain service network, alliance node thereof and product data storage method
CN201910680938.5A Active CN110489485B (en) 2018-04-28 2018-04-28 Federated blockchain network, method and storage medium for storing product data therein
CN201810407371.XA Active CN108846010B (en) 2018-04-28 2018-04-28 Method, system, computer system and storage medium for tracing product source in network

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN201910686420.2A Active CN110472116B (en) 2018-04-28 2018-04-28 Alliance block chain service network, alliance node thereof and product data storage method
CN201910680938.5A Active CN110489485B (en) 2018-04-28 2018-04-28 Federated blockchain network, method and storage medium for storing product data therein

Country Status (1)

Country Link
CN (3) CN110472116B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020103105A1 (en) * 2018-11-22 2020-05-28 北京比特大陆科技有限公司 Data processing apparatus
CN111222935A (en) * 2018-11-26 2020-06-02 北京沃东天骏信息技术有限公司 Transportation means sharing method based on block chain network, terminal and storage medium
CN109409784A (en) * 2018-11-28 2019-03-01 杭州云象网络技术有限公司 A kind of supervision of petroleum oil mass and method for quality control based on block chain
CN109547214B (en) * 2018-12-26 2022-10-11 成都健数科技有限公司 Medicine information acquisition and tracking method
CN109727043A (en) * 2018-12-29 2019-05-07 厦门物之联智能科技有限公司 A kind of product traceability method, system and storage medium based on block chain
CN109995536A (en) * 2019-03-15 2019-07-09 广州杰赛科技股份有限公司 A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN110162527B (en) * 2019-04-29 2020-08-25 阿里巴巴集团控股有限公司 Service tracing method and device based on block chain and electronic equipment
US11055792B2 (en) 2019-04-29 2021-07-06 Advanced New Technologies Co., Ltd. Blockchain-based service source tracing method, apparatus, and electronic device
CN110472427A (en) * 2019-08-02 2019-11-19 重庆康格瑞物联网技术有限公司 A kind of whole with no paper agriculture site inspection or enforcement approach and system
CN110602455B (en) * 2019-09-10 2021-06-18 腾讯科技(深圳)有限公司 Video storage system, video processing method, device, equipment and storage medium
CN110766417A (en) * 2019-09-19 2020-02-07 北京三快在线科技有限公司 Information query method and device, electronic equipment and computer readable medium
CN111064776B (en) * 2019-12-05 2023-02-03 全链通有限公司 Block generation method in block chain, accounting node and storage medium
CN111126869B (en) * 2019-12-30 2024-03-15 航天信息股份有限公司 Workload accounting method and system for grain circulation process
CN111339089B (en) * 2020-02-21 2023-09-22 联动优势科技有限公司 Data storage and acquisition method and device applied to blockchain
CN113496126A (en) * 2020-03-20 2021-10-12 陕西尚品信息科技有限公司 RFID reader-writer, recording method, mobile terminal device and configuration method
CN111694898A (en) * 2020-06-12 2020-09-22 中国银行股份有限公司 Block chain transaction pool model and uplink transaction data interaction system
CN111858768B (en) * 2020-07-27 2023-06-16 苏州区盟链数字科技有限公司 Device for optimizing block chain trusted node and consensus algorithm
CN112395647B (en) * 2020-11-02 2023-06-13 迅鳐成都科技有限公司 Block chain light node data acquisition system
CN112733198B (en) * 2020-11-02 2023-06-13 迅鳐成都科技有限公司 Block chain light node data acquisition method and device
CN112434341B (en) * 2020-11-02 2023-07-11 迅鳐成都科技有限公司 Business tampering-resistant blockchain light node data acquisition method and device
CN112417469B (en) * 2020-11-02 2023-06-16 迅鳐成都科技有限公司 Block chain light node data acquisition method and device based on hardware encryption
CN112749181B (en) * 2021-01-20 2021-08-17 方正国际软件(广州)有限公司 Big data processing method aiming at authenticity verification and credible traceability and cloud server
CN112788145B (en) * 2021-01-21 2022-05-10 中国科学院信息工程研究所 Cross-domain functional security anomaly detection and tracing method based on non-embedded probe
CN113011975A (en) * 2021-02-22 2021-06-22 西安超越申泰信息科技有限公司 Block chain anti-counterfeiting transaction method supporting national cryptographic algorithm and computer equipment
CN113190618A (en) * 2021-04-28 2021-07-30 宁夏中小在线资信服务有限公司 Enterprise government affair service data storage method based on block chain technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107392625A (en) * 2017-06-29 2017-11-24 雷霞 Distributed medicine source tracing method and device based on block chain
CN107657463A (en) * 2017-09-29 2018-02-02 北京京东尚科信息技术有限公司 Article is traced to the source platform and method and device
CN107807991A (en) * 2017-11-07 2018-03-16 泰康保险集团股份有限公司 For handling the method and device of block chain data
CN107870983A (en) * 2017-09-30 2018-04-03 深圳市易成自动驾驶技术有限公司 Vehicle peccancy approaches to IM, block chain and storage medium based on block chain
CN107909372A (en) * 2017-10-25 2018-04-13 复旦大学 A kind of agricultural product source tracing method based on block chain technology

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10176481B2 (en) * 2015-12-21 2019-01-08 Beston Technologies Pty Ltd Method and apparatus for managing and providing provenance of product using blockchain
WO2017194976A1 (en) * 2016-05-13 2017-11-16 De La Rue International Limited Methods and systems for processing assets
CN107018125B (en) * 2017-02-17 2019-08-09 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN107103480A (en) * 2017-05-18 2017-08-29 电子科技大学 Supply chain management method based on block chain with sovereign right
CN107341676A (en) * 2017-07-17 2017-11-10 深圳天净喔溯源科技有限公司 False proof mark and the method for tracing to the source
CN107547529A (en) * 2017-08-21 2018-01-05 集合智造(北京)餐饮管理有限公司 A kind of method, system that shared retail is realized based on block chain
CN107733855B (en) * 2017-08-31 2019-11-05 中国科学院信息工程研究所 A kind of block catenary system and application method that can support publicly-owned chain, alliance's chain and privately owned chain simultaneously
CN107657553A (en) * 2017-09-21 2018-02-02 浙江惠码科技有限公司 A kind of electronic contract generation method based on alliance's chain, information anti-fake method of tracing to the source
CN107819749A (en) * 2017-10-26 2018-03-20 平安科技(深圳)有限公司 Block catenary system and transaction data processing method based on ether mill

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107392625A (en) * 2017-06-29 2017-11-24 雷霞 Distributed medicine source tracing method and device based on block chain
CN107657463A (en) * 2017-09-29 2018-02-02 北京京东尚科信息技术有限公司 Article is traced to the source platform and method and device
CN107870983A (en) * 2017-09-30 2018-04-03 深圳市易成自动驾驶技术有限公司 Vehicle peccancy approaches to IM, block chain and storage medium based on block chain
CN107909372A (en) * 2017-10-25 2018-04-13 复旦大学 A kind of agricultural product source tracing method based on block chain technology
CN107807991A (en) * 2017-11-07 2018-03-16 泰康保险集团股份有限公司 For handling the method and device of block chain data

Also Published As

Publication number Publication date
CN110472116A (en) 2019-11-19
CN108846010A (en) 2018-11-20
CN110489485A (en) 2019-11-22
CN110472116B (en) 2022-03-04
CN110489485B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
CN108846010B (en) Method, system, computer system and storage medium for tracing product source in network
US10681133B2 (en) Methods and systems for endpoint device operating system in an asset intelligence platform
US10192198B2 (en) Tracking code generation, application, and verification using blockchain technology
JP6923239B2 (en) How to Securely Serialize Product Units in the Supply Chain
Qi et al. Cpds: Enabling compressed and private data sharing for industrial Internet of Things over blockchain
CN109255622B (en) Traceable anti-fake data storage system
WO2020048241A1 (en) Blockchain cross-chain authentication method and system, and server and readable storage medium
US20160164884A1 (en) Cryptographic verification of provenance in a supply chain
Janjua et al. Proactive forensics in IoT: Privacy-aware log-preservation architecture in fog-enabled-cloud using holochain and containerization technologies
CN111949672B (en) Block chain storage method for supporting incremental update of Internet-of-things data
CN110599095B (en) Block chain network-based hazardous waste treatment method and node of block chain network
US10855758B1 (en) Decentralized computing resource management using distributed ledger
US20230089134A1 (en) Data communication method and apparatus, computer device, and storage medium
US20200387859A1 (en) Methods, Application Server, Block Chain Node and Media For Logistics Tracking and Source Tracing
CN112434113B (en) MES system identification analysis data management system and method
CN111881481B (en) Medical data processing method, device, equipment and storage medium based on blockchain
CN112883015A (en) Block chain data management method, device and storage medium
CN109861996B (en) Block chain-based relationship proving method, device, equipment and storage medium
CN109905351B (en) Method, device, server and computer readable storage medium for storing data
CN113157733A (en) Efficient tracing query method for multi-chain data relevance
CN113837760B (en) Data processing method, data processing device, computer equipment and storage medium
WO2019157122A1 (en) Rf tag operating system with iot connector core
CN111459935B (en) Internet of things data storage method, storage system, query method and storage medium
KR101954304B1 (en) Method for tracking and tracing distribution route of tobacco, and tobacco tracking and tracing server using the same
CN115694949A (en) Private data sharing method and system based on block chain

Legal Events

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