CN110991961A - Block chain-based article inspection method, device, equipment and readable storage medium - Google Patents

Block chain-based article inspection method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110991961A
CN110991961A CN201911207370.1A CN201911207370A CN110991961A CN 110991961 A CN110991961 A CN 110991961A CN 201911207370 A CN201911207370 A CN 201911207370A CN 110991961 A CN110991961 A CN 110991961A
Authority
CN
China
Prior art keywords
target
circulation
information
article
inspection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911207370.1A
Other languages
Chinese (zh)
Inventor
蔡弋戈
秦青
杨晨
王乐庆
李琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911207370.1A priority Critical patent/CN110991961A/en
Publication of CN110991961A publication Critical patent/CN110991961A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0833Tracking
    • 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

Abstract

The embodiment of the application discloses a block chain-based article inspection method, a device, equipment and a readable storage medium, wherein the method comprises the following steps: acquiring an article inspection request sent by an inspection node, and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the verification node; at least one target block respectively comprises target article information and circulation records to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target object according to the matching result. By adopting the method and the device, the authenticity of the product can be correctly identified.

Description

Block chain-based article inspection method, device, equipment and readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a block chain-based method, an apparatus, a device, and a readable storage medium for inspecting an article.
Background
With the continuous development of social economy, the consumption capacity of people is increasingly enhanced, the circulation of market products is greatly promoted, and fake and shoddy products which flow in the market, such as the bamboo shoots in spring after rain, are also produced.
At present, the anti-counterfeiting technology is developed by monitoring the source, manufacturing, delivery and sale on shelf of a product, so that a large number of companies paste electronic tags with anti-counterfeiting traceability information on the product when the product is delivered from the factory for a user to check, the anti-counterfeiting traceability information contains key information of the source, manufacturing, delivery, logistics and the like of the product, but the counterfeiting technology of a counterfeit producer is continuously enhanced, and the user cannot correctly judge the authenticity of the product by copying the anti-counterfeiting traceability information of the tag or tampering the product.
Disclosure of Invention
The embodiment of the application provides an article inspection method, an article inspection device, an article inspection equipment and a readable storage medium based on a block chain, which can correctly identify the authenticity of a product.
An aspect of an embodiment of the present application provides an article inspection method based on a block chain, including:
acquiring an article inspection request sent by an inspection node, and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs;
and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result.
Wherein the at least one target block comprises a first target block and a second target block, the first target block comprises a first transfer record, and the second target block comprises a second transfer record;
the generating of the target circulation route corresponding to the target article information according to the circulation records to which the target article information belongs, which are included in the at least one target block, includes:
acquiring the first transfer record of the first target block, and acquiring the second transfer record of the second target block;
acquiring a first streaming timestamp and a first streaming mechanism in the first streaming record, and acquiring a second streaming timestamp and a second streaming mechanism in the second streaming record;
and generating the target circulation route corresponding to the target article information according to the first circulation time stamp, the first circulation mechanism, the second circulation time stamp and the second circulation mechanism.
Wherein the generating the target circulation route corresponding to the target article information according to the first circulation time stamp, the first circulation mechanism, the second circulation time stamp, and the second circulation mechanism includes:
acquiring a first transfer party and a first receiving party in the first transfer mechanism, and acquiring a second transfer party and a second receiving party in the second transfer mechanism; wherein the first diversion timestamp is a timestamp for the first transferor to transfer the target item to the first recipient, and the second diversion timestamp is a timestamp for the second transferor to transfer the target item to the second recipient;
if the first receiving party is the second transfer party, the target circulation route corresponding to the target article information is generated according to the first circulation time stamp, the first transfer party, the second circulation time stamp, the second transfer party and the second receiving party.
The matching of the circulation route to be verified and the target circulation route and the determination of the inspection result corresponding to the target article information according to the matching result comprise the following steps:
acquiring a to-be-verified circulation timestamp and a to-be-verified circulation mechanism of the to-be-verified circulation route, and acquiring a circulation timestamp and a circulation mechanism in the target circulation route;
matching the to-be-verified circulation timestamp with the circulation timestamp in the target circulation route to obtain a timestamp matching result;
matching the circulation mechanism to be verified with the circulation mechanism in the target circulation route to obtain a mechanism matching result;
and determining the inspection result corresponding to the target article information according to the timestamp matching result and the mechanism matching result.
Wherein the determining the inspection result corresponding to the target article information according to the timestamp matching result and the mechanism matching result includes:
if the timestamp matching result is that the to-be-verified circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result is that the to-be-verified circulation mechanism is the same as the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is qualified in the inspection;
and if the timestamp matching result indicates that the to-be-verified circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result indicates that the to-be-verified circulation mechanism is different from the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is unqualified for inspection.
Wherein, still include:
if the inspection result is that the inspection is qualified, sending inspection qualified information to the inspection node;
and if the inspection result is that the inspection is not qualified, sending abnormal prompt information to the inspection node, wherein the abnormal prompt information is used for indicating the inspection node to carry out failure processing on the target object.
Wherein, still include:
receiving an article transfer request sent by a transfer party node, wherein the article transfer request comprises the target article information, transfer party information and receiving party information;
generating a target commodity hash value corresponding to the target commodity information according to the commodity transfer request;
acquiring a first block which is associated with the target item information and has the largest block generation timestamp from the block chain, and acquiring a first item hash value of first item information in the first block;
if the target commodity hash value is the same as the first commodity hash value and the first receiving party information in the first block is the same as the transfer party information, transmitting target commodity legal information to the transfer party node; the target article legal information represents that the target article information belongs to legal information;
and generating an object block according to the object item information, the transfer party information and the receiving party information, and uploading the object block to the block chain.
An aspect of an embodiment of the present application provides an article inspection device based on a block chain, including:
the acquisition request module is used for acquiring an article inspection request sent by the inspection node and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
a route generation module, configured to generate a target circulation route corresponding to the target item information according to circulation records to which the target item information belongs, where the circulation records are included in the at least one target block;
and the result determining module is used for matching the circulation route to be verified with the target circulation route and determining the inspection result corresponding to the target article information according to the matching result.
Wherein the at least one target block comprises a first target block and a second target block, the first target block comprises a first transfer record, and the second target block comprises a second transfer record;
the route generation module includes:
a first obtaining unit, configured to obtain the first streaming record of the first target block, and obtain a second streaming record of the second target block;
a second obtaining unit, configured to obtain a first streaming timestamp and a first streaming mechanism in the first streaming record, and obtain a second streaming timestamp and a second streaming mechanism in the second streaming record;
and a route generation unit configured to generate the target circulation route corresponding to the target item information according to the first circulation time stamp, the first circulation unit, the second circulation time stamp, and the second circulation unit.
Wherein, the route generating unit includes:
an obtaining subunit, configured to obtain a first transferor and a first receiver in the first transfer mechanism, and obtain a second transferor and a second receiver in the second transfer mechanism; wherein the first diversion timestamp is a timestamp for the first transferor to transfer the target item to the first recipient, and the second diversion timestamp is a timestamp for the second transferor to transfer the target item to the second recipient;
and a route generation sub-unit configured to generate the target circulation route corresponding to the target item information based on the first circulation time stamp, the first transferrer, the second circulation time stamp, the second transferrer, and the second receiver, if the first receiver is the second transferrer.
Wherein, the above-mentioned definite result module includes:
the third acquisition unit is used for acquiring the circulation timestamp to be verified and the circulation mechanism to be verified of the circulation route to be verified, and acquiring the circulation timestamp and the circulation mechanism in the target circulation route;
the matching time unit is used for matching the to-be-verified circulation time stamp with the circulation time stamp in the target circulation route to obtain a time stamp matching result;
the matching mechanism unit is used for matching the circulation mechanism to be verified with the circulation mechanism in the target circulation route to obtain a mechanism matching result;
and a determination result unit configured to determine the inspection result corresponding to the target item information according to the timestamp matching result and the mechanism matching result.
Wherein, the above-mentioned determination result unit includes:
a determining result subunit, configured to determine that the inspection result of the target item information is the inspection pass if the timestamp matching result indicates that the to-be-authenticated circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result indicates that the to-be-authenticated circulation mechanism is the same as the circulation mechanism in the target circulation route;
the determination result subunit is further configured to determine that the inspection result of the target article information is that the inspection is not qualified if the timestamp matching result indicates that the to-be-authenticated circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result indicates that the to-be-authenticated circulation mechanism is different from the circulation mechanism in the target circulation route.
Wherein, the above-mentioned determination result unit further includes:
a sending information subunit, configured to send, if the inspection result is that the inspection is qualified, qualified inspection information to the inspection node;
the information sending subunit is further configured to send an exception prompting message to the inspection node if the inspection result is that the inspection is not qualified, where the exception prompting message is used to instruct the inspection node to perform the failure processing on the target item.
Wherein, still include:
a receiving request module, configured to receive an article transfer request sent by a transfer party node, where the article transfer request includes the target article information, transfer party information, and receiver information;
a generation target module, configured to generate a target item hash value corresponding to the target item information according to the item transfer request;
a first obtaining module, configured to obtain, from the block chain, a first block that is associated with the target item information and has a largest block generation timestamp, and obtain a first item hash value of first item information in the first block;
a message sending module, configured to send target article legitimacy information to the transferor node if the target article hash value is the same as the first article hash value and the first receiver information in the first block is the same as the transferor information; the target article legal information represents that the target article information belongs to legal information;
and the uploading block module is used for generating a target block according to the target article information, the transferor information and the receiver information and uploading the target block to the block chain.
An aspect of an embodiment of the present application provides a computer device, including: a processor and a memory; the processor is connected to the memory, wherein the memory is used for storing a computer program, and the processor is used for calling the computer program to execute the method in the embodiment of the present application.
An aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program, where the computer program includes program instructions, which, when executed by a processor, perform a method as in the embodiments of the present application.
The method comprises the steps that at least one target block related to an article checking request is obtained from a block chain by obtaining the article checking request sent by a checking node; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result. As can be seen from the above, after the block link point obtains the article checking request sent by the inspection node, a series of target blocks associated with the target article in the article checking request are obtained from the block chain, where each of the series of target blocks includes the target article information and the flow record to which the target article information belongs, so that a real flow path (i.e., a target flow path) of the target article can be generated through a series of flow records, and after comparing the real flow path with the flow path to be verified in the article checking request, the authenticity of the target article information can be identified.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a system architecture diagram according to an embodiment of the present application;
fig. 2 is a schematic view of a scenario of block chain-based article inspection provided in an embodiment of the present application;
fig. 3 is a schematic flowchart of an article inspection method based on a block chain according to an embodiment of the present application;
fig. 4a is a schematic diagram of an item inspection request according to an embodiment of the present application;
fig. 4b is a schematic flowchart of a target circulation route generation provided in an embodiment of the present application;
fig. 5 is a schematic flowchart of an article transfer method based on a block chain according to an embodiment of the present application;
fig. 6 is a schematic view of a scenario of an article transfer based on a block chain according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an article authentication device based on a block chain according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Please refer to fig. 1, which is a schematic diagram of a system architecture according to an embodiment of the present application. As shown in fig. 1, the service server 10 and the service server 20 correspond to a participating entity in an item supply chain, which may include a place of origin, a manufacturer, a distributor, a retailer, and a consumer, for convenience of description and understanding, the service server 10 is referred to as a transferor node 10, the service server 20 is referred to as a receiver node 20, that is, the transferor node 10 transfers a target item to the receiver node 20, for example, the producer node transfers the target item to a brand node, and the brand node may serve as a transferor node, so as to transfer the target item to an agent node, that is, the receiver node in a previous transfer relationship may serve as a transferor node in a next transfer relationship, and by recording the transfer relationship of the target item and the time corresponding to the transfer relationship (including the time when the transferor node 10 transfers the target item to the receiver node 20, or the time at which the recipient node 20 receives the target item from the transferor node 10) to form a supply chain of the target item, the present application interfaces the supply chain of items formed by the participating bodies of circulation of the items with the blockchain storage system so that the item data of the upper chain is not tampered with.
Referring again to fig. 1, the service server 30 is a block link point 30, which may include the following functions: 1) when a new supplier a wants to transfer a target item in a higher-level agent B, it needs to first send a request for entering into a supply chain to the blockchain node 30, where the request for entering into a supply chain may include the type of the supply chain (e.g., food supply chain, living goods supply chain, traffic supply chain) and basic information of the new supplier a, and the basic information may include: the identity, address, contact way and the like of the new supplier A, the block chain link point 30 audits the new supplier A after obtaining the application chain entering request, if the audit is passed, a pair of public and private key pairs (the public and private key pairs of different participating bodies in different supply chains are different, namely the public and private key pairs have uniqueness) is sent to the new supplier A, the public key is added to the block chain, and if the audit is failed, a failure prompt is sent to the new supplier A; 2) identifying the identity of the node sending the request, wherein different participating agents have different participating functions, and cannot open the item data of the block chain for all participating agents, or most participating agents cannot acquire the item data of the target item in the block chain, otherwise, a counterfeit merchant can acquire the item data of the target item through the block chain, so that counterfeiting and faking are performed; for example, for an inquiry request sent by a customer end node, the block link point 30 may return an inquiry result, but cannot return real article data of a target article, as shown in fig. 1, the transferor node 10 and the receiver node 20 may send article data to the block link point 30, or may send an inquiry request or a check request to the block link point 30, if a new supplier a wants to transfer a target article in an agent B at a previous stage, an article transfer request carrying information of the new supplier a is sent to the block link point 30, after the block link point 30 obtains the article transfer request, the public key of the new supply chain a in the block chain is obtained, and the hash value (which may be generated by information of the new supply chain a) carried in the request is checked by using the public key of the new supply chain a, if the check is successful, the block link point 30 determines that the article transfer request is sent by a true new supplier a, if the signature verification fails, the block link point 30 determines that the sending of the article transfer request is a counterfeit new supplier a; 3) when a new supplier A wants to transfer a target article in an agent B at the upper level, the electronic tag (article data) of the different article at different time stamps is received, an article transfer request is sent to a block link point 30, the block link point 30 generates a target article hash value corresponding to the target article information according to the article transfer request, a first block which is associated with the target article information and has the largest block generation time stamp is obtained from a block chain, and a first article hash value of the first article information in the first block is obtained; if the target item hash value is the same as the first item hash value and the first receiver information in the first block is the same as the agent B information, and the block link point 30 can determine that the first item information is the same as the target item information, the target item information is sent to the new provider node a as legal information, so that the new provider node a can transfer the target item from the agent node B, and the block link point 30 generates a target block according to the target item information, the new provider node a information, and the agent B information, and uploads the target block to the block chain.
Referring to fig. 1 again, the service server 40 is a checking node 40 in the present application, and may include a node corresponding to a National quality certification center, a node corresponding to a National acceptance service for compliance Assessment (CNAS), or a node corresponding to a provincial and municipal level quality certification center, and the checking node 40 is different from a participating subject in a target item supply chain and may acquire item data in a block chain.
It can be seen that, the transferor node 10 or the receiver node 20 may send an article transfer request to the blockchain node 30, and after verifying the article transfer request, the blockchain node 30 generates a target block according to the article transfer request (which may include target article information, transferor information, and receiver information), and adds the target block to the blockchain; when the target object is acquired by the inspection node 40 and the target object is to be inspected, the target object information and the circulation route to be authenticated can be acquired by scanning the identification code on the target object, the target object information and the circulation route to be authenticated are sent to the block chain node 30, a series of target blocks can be acquired by the block chain node 30 according to the target object information, then the target circulation route of the target object is generated based on the series of target blocks, and the inspection result of the target object can be determined by the block chain node 30 according to the target circulation route and the circulation route to be authenticated.
The transfer node 10, the receiving node 20, the block link Point 30, and the verification node 40 may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a smart audio, a Mobile Internet Device (MID), a POS (Point Of Sales) machine, a wearable device (e.g., a smart watch, a smart bracelet, etc.), and the like.
Further, please refer to fig. 2, which is a schematic view of a scenario of checking an item based on a block chain according to an embodiment of the present application. As shown in fig. 2, the inspection node 10 scans the identification code 20 of the target article through a scanning function to obtain an information set 30a corresponding to the target article, where the information set 30a may include target article information of the target article and a circulation route to be verified corresponding to the target article information, and if the inspection node 10 finds that the information set 30a has an obvious leak, such as missing manufacturer information, missing transfer party information, or the expiration date has passed, it may directly determine that the target article is unqualified for inspection; if the verifying node 10 does not find that there is an obvious error in the information set 30a, as shown in fig. 2, an article checking request is sent to the blockchain node 40, where the article checking request may include the information set 30a and the verifying node information 60, and the blockchain node 40 may determine the authenticity of the identity of the verifying node 10 according to the verifying node information 60 by the following specific process: according to the check node information 60, acquiring a public key of the check node 10 in the block chain, then checking a signature of a digital signature (which can be generated by the check node information 60) carried in the check node information 60 by using the public key of the check node 10, and if the signature fails to be checked, determining that the forged check node 10 is the check node which sends the article checking request by using the block chain link point 40; if the verification is successful, the block link point 40 determines that the checking node 10 sending the article checking request is a real checking node, in this scenario, the block link point 40 obtains at least one target block 50 from the block chain according to the target article information in the information set 30a, the at least one target block 50 is associated with the target article information, each target block includes a transfer relationship (transfer party-receiving party) of the target article and a transfer timestamp corresponding to the transfer relationship, the block link point 40 may generate a target transfer route 30b of the target article according to the at least one target block 50, compare the to-be-verified transfer route in the information set 30a with the target transfer route 30b, determine a checking result corresponding to the target article, if the to-be-verified transfer route in the information set 30a is the same as the target transfer route 30b, the inspection result of the target article information is determined to be qualified, if the circulation route to be authenticated and the target circulation route 30b in the information set 30a are different, the inspection result of the target article information is determined to be unqualified, and then the inspection result (the inspection result) of the article inspection request is returned to the inspection node 10.
Wherein the identification code may comprise an electronic label, a two-dimensional code or a bar code on the target item, in fig. 2 the identification code 20 is represented by a bar code.
Further, please refer to fig. 3, which is a flowchart illustrating an article authentication method based on a block chain according to an embodiment of the present application. As shown in fig. 3, the method may include:
step S101, an article checking request sent by a checking node is obtained, and at least one target block associated with the article checking request is obtained from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block includes the target item information and a circulation record to which the target item information belongs.
Specifically, please refer to fig. 2 and fig. 4a together, and fig. 4a is a schematic diagram of an article inspection request according to an embodiment of the present application. As shown in fig. 2, the inspection node 10 scans an article identification code 20 corresponding to the target article to obtain target article information and a circulation route to be verified corresponding to the target article information, as shown in fig. 4a, where the target article information may include information such as an article name, an article type, an article raw material, an article number, a production date, a storage time, and a product manufacturer, and the circulation route to be verified includes a transfer party node, a receiving party node, and a timestamp for transferring the target article to the receiving party node by the transfer party node, such as transferring the article XXX to a brand provider node by the original node at 10 am 45 of 2019, 4/21; optionally, the article inspection request may further include information of the inspection node 10, such as the inspection node information 60 in fig. 2, for action, see the corresponding description in fig. 2, which is not described herein again. The inspection node 10 sends the item ping request to the blockchain node 40, and the blockchain node 40 obtains at least one target block 50 from the blockchain according to the target item information.
Step S102, generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively included in the at least one target block belongs.
Specifically, the at least one target block includes a first target block and a second target block, the first target block includes a first skip record, and the second target block includes a second skip record; acquiring the first transfer record of the first target block, and acquiring the second transfer record of the second target block; acquiring a first streaming timestamp and a first streaming mechanism in the first streaming record, and acquiring a second streaming timestamp and a second streaming mechanism in the second streaming record; acquiring a first transfer party and a first receiving party in the first transfer mechanism, and acquiring a second transfer party and a second receiving party in the second transfer mechanism; wherein the first diversion timestamp is a timestamp for the first transferor to transfer the target item to the first recipient, and the second diversion timestamp is a timestamp for the second transferor to transfer the target item to the second recipient; if the first receiving party is the second transfer party, the target circulation route corresponding to the target article information is generated according to the first circulation time stamp, the first transfer party, the second circulation time stamp, the second transfer party and the second receiving party.
The at least one target block includes the target item information and a circulation record to which the target item information belongs, and a target circulation route corresponding to the target item information is described by taking two target blocks of the at least one target block as an example, please refer to fig. 4b together, which is a schematic flow diagram for generating a target circulation route according to an embodiment of the present application. As shown in fig. 4b, the target block 501 contains a first flow record, the first flow record may contain origin node information (first transferor node information), brand name node information (first receiver node information), and a transfer timestamp of the origin-source transfer target item to the brand name node (first flow timestamp), the target block 502 contains a second flow record, the second flow record may contain brand name node information (second transferor node information), total proxy node information (second receiver node information), and a transfer timestamp of the brand name node transfer target item to the total proxy node (second flow timestamp), and the transferor node of the target block 502 is the receiver node of the target block 501, the block link points generate a part of the flow route of the target flow route according to the target block 501 and the target block 502, as shown in fig. 4 b.
And step S103, matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result.
Specifically, referring to fig. 4a and 4b together, a to-be-verified circulation timestamp (e.g., 2019.04.2110: 45 and 2019.05.0110: 00 in fig. 4 a) and a to-be-verified circulation mechanism (e.g., the origin node, the brand provider node, and the total agent node in fig. 4 a) of the to-be-verified circulation route are obtained, and a circulation timestamp and a circulation mechanism in the target circulation route are obtained; matching the to-be-verified circulation timestamp with the circulation timestamp in the target circulation route to obtain a timestamp matching result; matching the circulation mechanism to be verified with the circulation mechanism in the target circulation route to obtain a mechanism matching result; if the timestamp matching result is that the to-be-verified circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result is that the to-be-verified circulation mechanism is the same as the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is qualified in the inspection; if the timestamp matching result is that the to-be-verified circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result is that the to-be-verified circulation mechanism is different from the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is that the inspection is unqualified; if the inspection result is that the inspection is qualified, sending inspection qualified information to the inspection node; and if the inspection result is that the inspection is not qualified, sending abnormal prompt information to the inspection node, wherein the abnormal prompt information is used for indicating the inspection node to carry out failure processing on the target object.
The method comprises the steps that at least one target block related to an article checking request is obtained from a block chain by obtaining the article checking request sent by a checking node; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result. As can be seen from the above, after the block link point acquires the article inspection request sent by the inspection node, a series of target blocks associated with the target article in the article inspection request are acquired from the block chain, where each of the series of target blocks includes the key transfer information of the target article, so that the real flow path (target flow path) of the target article can be generated through the series of key transfer information, and after comparing the real flow path with the flow path to be authenticated in the article inspection request, the authenticity of the target article information can be identified.
Further, please refer to fig. 5, which is a flowchart illustrating an article transfer method based on a block chain according to an embodiment of the present application. As shown in fig. 5, the method may include:
step S201, receiving an article transfer request sent by a transfer party node, where the article transfer request includes the target article information, transfer party information, and receiver information, and generating a target article hash value corresponding to the target article information according to the article transfer request.
Specifically, please refer to fig. 6, which is a schematic view of a scenario of article transfer based on a block chain according to an embodiment of the present application. As shown in fig. 6, when the agent node 3a wants to transfer the target article to the retailer B, it sends an article transfer request 30 to the block link point 40 according to the target article information, the transfer party information, and the receiving party information, where the article transfer request 30 includes the target article information such as the article number, the production date, and the storage time, the information of the agent a itself, and the information of the retailer B; after acquiring the article transfer request, the block chain node 40 generates a corresponding target article hash value according to the target article information, as shown in fig. 6, where the target article hash value corresponding to the target article information is 2158c9314adca40831da9240580-ec 600.
Step S202 is to acquire a first block associated with the target item information and having a maximum block generation timestamp from the block chain, and acquire a first item hash value of first item information in the first block.
Specifically, referring to fig. 6, the blockchain node 40 obtains the first block (block 400a in fig. 6) associated with the target item information and having the largest block generation timestamp from the blockchain, and obtains the first item hash value of the first item information in the block 400 a.
Step S203, if the hash value of the target article is the same as the hash value of the first article, and the first receiving party information in the first block is the same as the forwarding party information, transmitting the legal information of the target article to the forwarding party node; the target article legal information represents that the target article information belongs to legal information.
Specifically, referring to fig. 6 together, after the first article hash value and the target article hash value are obtained, the first article hash value and the target article hash value are compared, if the first article hash value and the target article hash value are the same (as shown in fig. 6, both of them are 2158c9314 aca 40831da9240580ec600), and the first receiving-side information in the first block 400a is the same as the transfer-side information in the article transfer request, the block link node 40 determines that the target article information is the first article information, so as to send the transfer-side node the target article legal information, and if the first article hash value and the target article hash value are not the same, the block link node 40 determines that the target article information is not the first article information, so as to send the transfer-side node the target article information illegal information.
Step S204, generating an object block according to the object item information, the transferor information, and the receiver information, and uploading the object block to the block chain.
Specifically, as described in step S203, after the blockchain link node 40 determines that the target item information is the first item information, the blockchain node 40 generates a target block by using the target item information, the transferor information, and the receiver information, and adds the target block to the blockchain for query or verification.
The method comprises the steps that at least one target block related to an article checking request is obtained from a block chain by obtaining the article checking request sent by a checking node; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result. As can be seen from the above, after the block link point obtains the article checking request sent by the inspection node, a series of target blocks associated with the target article in the article checking request are obtained from the block chain, where each of the series of target blocks includes the target article information and the flow record to which the target article information belongs, so that a real flow path (i.e., a target flow path) of the target article can be generated through a series of flow records, and after comparing the real flow path with the flow path to be verified in the article checking request, the authenticity of the target article information can be identified.
Fig. 7 is a schematic structural diagram of an article inspection device based on a block chain according to an embodiment of the present application. As shown in fig. 7, the article inspection device 1 may include: the system comprises an acquisition request module 11, a route generation module 12 and a determination result module 13.
An obtaining request module 11, configured to obtain an article inspection request sent by an inspection node, and obtain at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
a route generation module 12, configured to generate a target circulation route corresponding to the target item information according to circulation records to which the target item information belongs, where the target item information is included in each of the at least one target block;
and the result determining module 13 is configured to match the circulation route to be verified with the target circulation route, and determine a detection result corresponding to the target article information according to the matching result.
The specific functional implementation manners of the obtaining request module 11, the route generating module 12, and the result determining module 13 may refer to steps S101 to S103 in the embodiment corresponding to fig. 3, which are not described herein again.
Referring again to fig. 7, the generate route module 12 may include: a first acquisition unit 121, a second acquisition unit 122, and a route generation unit 123.
A first obtaining unit 121, configured to obtain the first offload record of the first target block, and obtain a second offload record of the second target block;
a second obtaining unit 122, configured to obtain a first streaming timestamp and a first streaming mechanism in the first streaming record, and obtain a second streaming timestamp and a second streaming mechanism in the second streaming record;
and a route generating unit 123, configured to generate the target circulation route corresponding to the target item information according to the first circulation timestamp, the first circulation mechanism, the second circulation timestamp, and the second circulation mechanism.
For specific functional implementation manners of the first obtaining unit 121, the second obtaining unit 122, and the route generating unit 123, reference may be made to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring again to fig. 7, the generating route unit 123 may include: an acquisition sub-unit 1231, a generation route sub-unit 1232.
An obtaining subunit 1231, configured to obtain a first transferor and a first receiver in the first transfer mechanism, and obtain a second transferor and a second receiver in the second transfer mechanism; wherein the first diversion timestamp is a timestamp of the first transferor transferring the target item to the first recipient, and the second diversion timestamp is a timestamp of the second transferor transferring the target item to the second recipient;
a route generating sub-unit 1232, configured to generate the target circulation route corresponding to the target item information according to the first circulation timestamp, the first transferor, the second circulation timestamp, the second transferor, and the second receiver if the first receiver is the second transferor.
The specific functional implementation manners of the obtaining subunit 1231 and the generating route subunit 1232 may refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring again to fig. 7, the determination module 13 may include: a third acquisition unit 131, a matching time unit 132, a matching mechanism unit 133, and a determination result unit 134.
A third obtaining unit 131, configured to obtain a to-be-verified circulation timestamp and a to-be-verified circulation mechanism of the to-be-verified circulation route, and obtain a circulation timestamp and a circulation mechanism in the target circulation route;
the matching time unit 132 is configured to match the to-be-verified circulation timestamp with the circulation timestamp in the target circulation route to obtain a timestamp matching result;
a matching mechanism unit 133, configured to match the circulation mechanism to be verified with the circulation mechanism in the target circulation route, so as to obtain a mechanism matching result;
and a determination result unit 134, configured to determine the inspection result corresponding to the target item information according to the timestamp matching result and the mechanism matching result.
For specific functional implementation manners of the third obtaining unit 131, the matching time unit 132, the matching mechanism unit 133, and the determination result unit 134, reference may be made to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring again to fig. 7, the determination result unit 134 may include: the result subunit 1341 is determined.
A determining result subunit 1341, configured to determine that the inspection result of the target item information is the inspection pass if the timestamp matching result is that the to-be-authenticated circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result is that the to-be-authenticated circulation mechanism is the same as the circulation mechanism in the target circulation route;
the above-mentioned determination result subunit 1341 is further configured to determine that the inspection result of the target article information is that the inspection is not qualified if the timestamp matching result indicates that the to-be-inspected circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result indicates that the to-be-inspected circulation mechanism is different from the circulation mechanism in the target circulation route.
The specific function implementation manner of the result determining subunit 1341 may refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring back to fig. 7, the determination result unit 134 may further include: a transmit information subunit 1342.
A sending information subunit 1342, configured to send, if the inspection result is that the inspection is qualified, inspection qualified information to the inspection node;
the information sending subunit 1342 is further configured to send an exception prompt message to the inspection node if the inspection result is that the inspection is not qualified, where the exception prompt message is used to instruct the inspection node to perform failure handling on the target item.
The specific functional implementation manner of the information sending subunit 1342 may refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
The article inspection device 1 may further include: a request receiving module 14, a target generating module 15, a first acquiring module 16, a message sending module 17 and a block generating module 18.
A receiving request module 14, configured to receive an item transfer request sent by a transferor node, where the item transfer request includes the target item information, transferor information, and receiver information;
a generation target module 15, configured to generate a target item hash value corresponding to the target item information according to the item transfer request;
a first obtaining module 16, configured to obtain, from the block chain, a first block that is associated with the target item information and has a largest block generation timestamp, and obtain a first item hash value of first item information in the first block;
a message sending module 17, configured to send target article legal information to the transferor node if the target article hash value is the same as the first article hash value and the first receiver information in the first block is the same as the transferor information;
a block generation module 18, configured to generate a target block according to the target item information, the transferor information, and the receiver information, and upload the target block to the block chain.
For specific functional implementation manners of the request receiving module 14, the target generating module 15, the first obtaining module 16, the message sending module 17, and the block generating module 18, reference may be made to steps S201 to S204 in the embodiment corresponding to fig. 5, which is not described herein again.
The method comprises the steps that at least one target block related to an article checking request is obtained from a block chain by obtaining the article checking request sent by a checking node; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result. As can be seen from the above, after the block link point obtains the article checking request sent by the inspection node, a series of target blocks associated with the target article in the article checking request are obtained from the block chain, where each of the series of target blocks includes the target article information and the flow record to which the target article information belongs, so that a real flow path (i.e., a target flow path) of the target article can be generated through a series of flow records, and after comparing the real flow path with the flow path to be verified in the article checking request, the authenticity of the target article information can be identified.
Please refer to fig. 8, which is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 8, the computer apparatus 1000 may include: the processor 1001, the network interface 1004, and the memory 1005, and the computer apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 8, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the computer device 1000 shown in fig. 8, the network interface 1004 may provide a network communication function; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
acquiring an article inspection request sent by an inspection node, and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs;
and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result.
In one embodiment, the at least one target block includes a first target block and a second target block, the first target block includes a first skip record, and the second target block includes a second skip record;
when the processor 1001 executes a circulation record to which the target item information belongs, the circulation record being included in each of the at least one target block, and generates a target circulation route corresponding to the target item information, the processor specifically executes the following steps:
acquiring the first transfer record of the first target block, and acquiring the second transfer record of the second target block;
acquiring a first streaming timestamp and a first streaming mechanism in the first streaming record, and acquiring a second streaming timestamp and a second streaming mechanism in the second streaming record;
and generating the target circulation route corresponding to the target article information according to the first circulation time stamp, the first circulation mechanism, the second circulation time stamp and the second circulation mechanism.
In one embodiment, when the processor 1001 executes the target circulation route corresponding to the target article information according to the first circulation time stamp, the second circulation time stamp, and the second circulation time stamp, the processor specifically executes the following steps:
acquiring a first transfer party and a first receiving party in the first transfer mechanism, and acquiring a second transfer party and a second receiving party in the second transfer mechanism; wherein the first diversion timestamp is a timestamp for the first transferor to transfer the target item to the first recipient, and the second diversion timestamp is a timestamp for the second transferor to transfer the target item to the second recipient;
if the first receiving party is the second transfer party, the target circulation route corresponding to the target article information is generated according to the first circulation time stamp, the first transfer party, the second circulation time stamp, the second transfer party and the second receiving party.
In an embodiment, when the processor 1001 performs matching on the circulation route to be verified and the target circulation route, and determines an inspection result corresponding to the target article information according to the matching result, the following steps are specifically performed:
acquiring a to-be-verified circulation timestamp and a to-be-verified circulation mechanism of the to-be-verified circulation route, and acquiring a circulation timestamp and a circulation mechanism in the target circulation route;
matching the to-be-verified circulation timestamp with the circulation timestamp in the target circulation route to obtain a timestamp matching result;
matching the circulation mechanism to be verified with the circulation mechanism in the target circulation route to obtain a mechanism matching result;
and determining the inspection result corresponding to the target article information according to the timestamp matching result and the mechanism matching result.
In one embodiment, when the processor 1001 determines the inspection result corresponding to the target item information according to the timestamp matching result and the mechanism matching result, the processor specifically performs the following steps:
if the timestamp matching result is that the to-be-verified circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result is that the to-be-verified circulation mechanism is the same as the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is qualified in the inspection;
and if the timestamp matching result indicates that the to-be-verified circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result indicates that the to-be-verified circulation mechanism is different from the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is unqualified for inspection.
In an embodiment, when the processor 1001 determines the inspection result corresponding to the target item information according to the timestamp matching result and the mechanism matching result, it further specifically performs the following steps:
if the inspection result is that the inspection is qualified, sending inspection qualified information to the inspection node;
and if the inspection result is that the inspection is not qualified, sending abnormal prompt information to the inspection node, wherein the abnormal prompt information is used for indicating the inspection node to carry out failure processing on the target object.
In one embodiment, the following steps are further specifically performed:
receiving an article transfer request sent by a transfer party node, wherein the article transfer request comprises the target article information, transfer party information and receiving party information;
generating a target commodity hash value corresponding to the target commodity information according to the commodity transfer request;
acquiring a first block which is associated with the target item information and has the largest block generation timestamp from the block chain, and acquiring a first item hash value of first item information in the first block;
if the target commodity hash value is the same as the first commodity hash value and the first receiving party information in the first block is the same as the transfer party information, transmitting target commodity legal information to the transfer party node;
and generating an object block according to the object item information, the transfer party information and the receiving party information, and uploading the object block to the block chain.
The method comprises the steps that at least one target block related to an article checking request is obtained from a block chain by obtaining the article checking request sent by a checking node; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs; generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs; and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result. As can be seen from the above, after the block link point obtains the article checking request sent by the inspection node, a series of target blocks associated with the target article in the article checking request are obtained from the block chain, where each of the series of target blocks includes the target article information and the flow record to which the target article information belongs, so that a real flow path (i.e., a target flow path) of the target article can be generated through a series of flow records, and after comparing the real flow path with the flow path to be verified in the article checking request, the authenticity of the target article information can be identified.
It should be understood that the computer device 1000 described in this embodiment of the present application may perform the description of the block chain-based article inspection method in the embodiment corresponding to fig. 3 and the description of the block chain-based article transfer method in the embodiment corresponding to fig. 5, and may also perform the description of the article inspection apparatus 1 in the embodiment corresponding to fig. 7, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program executed by the article inspection apparatus 1 mentioned above, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the article inspection method based on the block chain in the embodiment corresponding to fig. 3 and the description of the article transfer method based on the block chain in the embodiment corresponding to fig. 5 can be executed, and therefore, details will not be repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in embodiments of the computer-readable storage medium referred to in the present application, reference is made to the description of embodiments of the method of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A block chain based item inspection method, the method comprising:
acquiring an article inspection request sent by an inspection node, and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
generating a target circulation route corresponding to the target article information according to circulation records to which the target article information belongs, wherein the circulation records are respectively contained in the at least one target block;
and matching the circulation route to be verified with the target circulation route, and determining a detection result corresponding to the target article information according to the matching result.
2. The method of claim 1, wherein the at least one target block comprises a first target block and a second target block, the first target block comprising a first skip record, the second target block comprising a second skip record;
the generating a target circulation route corresponding to the target article information according to circulation records to which the target article information respectively contained in the at least one target block belongs includes:
acquiring the first streaming record of the first target block, and acquiring a second streaming record of the second target block;
acquiring a first flow-forwarding timestamp and a first flow-forwarding mechanism in the first flow-forwarding record, and acquiring a second flow-forwarding timestamp and a second flow-forwarding mechanism in the second flow-forwarding record;
and generating the target circulation route corresponding to the target article information according to the first circulation time stamp, the first circulation mechanism, the second circulation time stamp and the second circulation mechanism.
3. The method according to claim 2, wherein the generating the target circulation route corresponding to the target item information according to the first circulation timestamp, the first circulation mechanism, the second circulation timestamp, and the second circulation mechanism comprises:
acquiring a first transferor and a first receiver in the first transfer mechanism, and acquiring a second transferor and a second receiver in the second transfer mechanism; wherein the first diversion timestamp is a timestamp of the first transferor transferring the target item to the first recipient, and the second diversion timestamp is a timestamp of the second transferor transferring the target item to the second recipient;
and if the first receiver is the second transfer party, generating the target circulation route corresponding to the target article information according to the first circulation time stamp, the first transfer party, the second circulation time stamp, the second transfer party and the second receiver.
4. The method according to claim 1, wherein the matching the circulation route to be verified and the target circulation route, and determining the inspection result corresponding to the target article information according to the matching result comprises:
acquiring a to-be-verified circulation timestamp and a to-be-verified circulation mechanism of the to-be-verified circulation route, and acquiring a circulation timestamp and a circulation mechanism in the target circulation route;
matching the to-be-verified circulation timestamp with the circulation timestamp in the target circulation route to obtain a timestamp matching result;
matching the circulation mechanism to be verified with the circulation mechanism in the target circulation route to obtain a mechanism matching result;
and determining the inspection result corresponding to the target article information according to the timestamp matching result and the mechanism matching result.
5. The method according to claim 4, wherein the determining the verification result corresponding to the target item information according to the timestamp matching result and the institution matching result comprises:
if the timestamp matching result is that the to-be-verified circulation timestamp is the same as the circulation timestamp in the target circulation route, and the mechanism matching result is that the to-be-verified circulation mechanism is the same as the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is qualified for inspection;
and if the timestamp matching result is that the to-be-verified circulation timestamp is different from the circulation timestamp in the target circulation route, or the mechanism matching result is that the to-be-verified circulation mechanism is different from the circulation mechanism in the target circulation route, determining that the inspection result of the target article information is unqualified for inspection.
6. The method of claim 5, further comprising:
if the inspection result is that the inspection is qualified, sending inspection qualified information to the inspection node;
and if the inspection result is that the inspection is not qualified, sending abnormal prompt information to the inspection node, wherein the abnormal prompt information is used for indicating the inspection node to carry out failure processing on the target article.
7. The method of claim 1, further comprising:
receiving an article transfer request sent by a transfer party node, wherein the article transfer request comprises the target article information, transfer party information and receiver information;
generating a target commodity hash value corresponding to the target commodity information according to the commodity transfer request;
acquiring a first block which is associated with the target item information and has the largest block generation timestamp from the block chain, and acquiring a first item hash value of first item information in the first block;
if the target commodity hash value is the same as the first commodity hash value and the first receiver information in the first block is the same as the transferor information, transmitting target commodity legal information to the transferor node; the target article legal information represents that the target article information belongs to legal information;
and generating a target block according to the target article information, the transfer party information and the receiving party information, and uploading the target block to the block chain.
8. A block chain based item inspection device, the device comprising:
the acquisition request module is used for acquiring an article inspection request sent by the inspection node and acquiring at least one target block associated with the article inspection request from a block chain; the article checking request comprises target article information of a target article and a circulation route to be verified corresponding to the target article information; the target article information and the circulation route to be verified are obtained by scanning an article identification code corresponding to the target article by the inspection node; the at least one target block respectively comprises the target article information and a circulation record to which the target article information belongs;
a target generation module, configured to generate a target circulation route corresponding to the target item information according to circulation records to which the target item information belongs, where the circulation records are included in the at least one target block respectively;
and the result determining module is used for matching the circulation route to be verified with the target circulation route and determining the inspection result corresponding to the target article information according to the matching result.
9. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the steps of the method according to any one of claims 1 to 7.
CN201911207370.1A 2019-11-29 2019-11-29 Block chain-based article inspection method, device, equipment and readable storage medium Pending CN110991961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911207370.1A CN110991961A (en) 2019-11-29 2019-11-29 Block chain-based article inspection method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911207370.1A CN110991961A (en) 2019-11-29 2019-11-29 Block chain-based article inspection method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN110991961A true CN110991961A (en) 2020-04-10

Family

ID=70088813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911207370.1A Pending CN110991961A (en) 2019-11-29 2019-11-29 Block chain-based article inspection method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110991961A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837077A (en) * 2021-02-25 2021-05-25 中国科学院合肥物质科学研究院 Method and system for tracing health codes of food
CN114330849A (en) * 2021-12-17 2022-04-12 苏州浪潮智能科技有限公司 Circulation control method of product test workbench and related device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112837077A (en) * 2021-02-25 2021-05-25 中国科学院合肥物质科学研究院 Method and system for tracing health codes of food
CN114330849A (en) * 2021-12-17 2022-04-12 苏州浪潮智能科技有限公司 Circulation control method of product test workbench and related device

Similar Documents

Publication Publication Date Title
US20190244243A1 (en) Scalable decentralized digital and programmatic advertising analytics system
WO2020063185A1 (en) Blockchain-based anti-counterfeiting method and apparatus, and electronic device
US11893569B2 (en) Secure QR code based data transfers
CN110601856B (en) Data interaction method and device based on block chain network
CN109118219B (en) Transaction data processing method and device
CN109829726B (en) Block chain-based drug information management method and system
CN108769154B (en) Data storage method based on directed acyclic graph and distributed account book
US10019530B2 (en) ID tag authentication system and method
CN110839029B (en) Micro-service registration method and device
US20140252077A1 (en) Anti-counterfeiting system and method
US20200387859A1 (en) Methods, Application Server, Block Chain Node and Media For Logistics Tracking and Source Tracing
WO2020236560A1 (en) Method and system for generalized provenance solution for blockchain supply chain applications
CN104835045A (en) Method and system for merchandise anti-counterfeiting authentication based on internet of things identity service
US11516001B2 (en) Method and system for generalized provenance solution for blockchain supply chain applications
US20220414680A1 (en) Certified quick response codes associated with top-level domains verified by trusted product certificate authority
US20220158997A1 (en) End-to-End Product Authentication Technique
CN109146523B (en) Commodity anti-counterfeiting and authenticity-checking system and method based on block chain
CN110543787A (en) Storage and acquisition method, storage system and acquisition device for commodity traceability data
CN108932600A (en) A kind of cargo based on Beidou satellite system is anti-fake and positioning supervisory system and method
CN110991961A (en) Block chain-based article inspection method, device, equipment and readable storage medium
CN114331462A (en) Block chain-based product information processing method and computer-readable storage medium
CN105260900A (en) Product unique identification anti-counterfeiting method and device
JP2021524084A (en) Data storage methods, data validation methods, devices, equipment and computer programs
CN104715386B (en) WeChat ID-based anti-fake method for achieving authentication of all bar codes
US20140158754A1 (en) Item authenticity

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