Supply chain tracing method and device based on block chain and medium

Through blockchain technology and smart contracts, the problems of data tampering and information silos in traditional supply chain traceability systems are solved, and the transparency and efficiency of the supply chain are improved, ensuring product traceability and anti-counterfeiting capabilities.

CN119228402APending Publication Date: 2024-12-31SHANDONG INSPUR AIGOU CLOUD CHAIN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411352154.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Traditional supply chain traceability systems rely on centralized databases, which have problems such as easy data tampering and information silos, making it difficult to prevent information distortion and counterfeit and shoddy products.

Method used

Adopt a blockchain-based supply chain traceability method, obtain production node information, perform preprocessing and blocking, use consensus mechanism to add to the blockchain network, build smart contracts for real-time processing and traceability, combining IoT devices and traceability Tags to achieve traceability and security of product information.

Benefits of technology

It enhances the transparency and efficiency of the supply chain, reduces the risks of data tampering and information silos, improves product traceability and anti-counterfeiting capabilities, reduces manual intervention, and improves the overall synergy efficiency of the supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228402A_ABST
    Figure CN119228402A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a supply chain tracing method and device based on a block chain, and a medium, is used for the technical field of information, and solves the problems of low reliability and low efficiency of traditional supply chain tracing. The method comprises the following steps: obtaining production information of each production node of a current supply chain, preprocessing the production information, and obtaining a production information block corresponding to each production node; and adding the production information block to a preset block chain network based on a preset consensus mechanism, and determining a digital identity corresponding to each piece of product information. And determining a test item of each block chain node in the preset block chain network based on the service information corresponding to the current supply chain. Constructing a smart contract corresponding to each test item, and deploying the corresponding smart contract to the corresponding block chain node; and performing real-time processing on each production information block based on the smart contract of each block chain node, and determining the product state of the current supply chain, so as to trace the product state corresponding to each piece of product information according to the digital identity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of information technology, and in particular to a supply chain tracing method, device and medium based on blockchain. Background Art

[0002] With the deepening development of globalization, the supply chain is no longer limited to a single region or country, but crosses national borders to form a complex global network. This trend of globalization has brought many challenges, including the increase in the length of the supply chain, the diversification of participants, and cultural and legal differences. In order to ensure the stability and efficiency of the supply chain, it is particularly important to trace the information of each link in the supply chain. However, due to the increasing complexity of the supply chain system, the complexity and risk of supply chain management involving many participants and links are increasing. This complexity not only increases the difficulty of management, but also brings higher risks. For example, the risk of data tampering may lead to information distortion and affect the accuracy of decision-making; the difficulty of anti-counterfeiting provides an opportunity for the circulation of counterfeit and shoddy products. Therefore, how to provide a safe and reliable supply chain traceability method has become an important part of the supply chain management process.

[0003] The traditional supply chain traceability system mainly relies on centralized databases and trust mechanisms. However, this mechanism has many inherent defects. The centralized storage of data makes it easy for information to be tampered with. Once the data is maliciously modified, it will directly lead to distortion of supply chain information and affect the accuracy of decision-making. At the same time, the information sharing between the various links of the supply chain is not smooth, forming information islands, hindering the circulation and integration of information, and thus affecting the overall collaborative efficiency of the supply chain. Even more serious is the problem of low trust in the traditional supply chain system. The lack of sufficient trust between the participants not only increases transaction costs, but also increases the risks of cooperation. In this environment, counterfeit and shoddy products are able to take advantage of the situation, and traditional anti-counterfeiting measures cannot effectively curb this problem due to their easy-to-crack or copy characteristics. Summary of the invention

[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a supply chain tracing method, device and medium based on blockchain.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of this specification provide a supply chain tracing method based on blockchain, the method comprising:

[0007] Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node;

[0008] Adding the production information blocks to a preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain a digital identity corresponding to each of the product information;

[0009] Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network;

[0010] Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node;

[0011] Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

[0012] Further, in one or more embodiments of the present specification, obtaining the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node specifically includes:

[0013] Based on the IoT devices at each production node in the current supply chain, obtain the production information of each production node in the current supply chain;

[0014] Based on the attribute data and identification data of the production information, sensitive data in the production information is identified, and based on the sensitive data, the production information is divided to obtain first production information that does not contain sensitive data and second production information that contains sensitive data;

[0015] Splitting the second production information based on a preset character length to obtain a plurality of second production sub-information, replacing each second production sub-information based on a preset mask to obtain replaced second production sub-information;

[0016] The first production information and the second production sub-information are packaged based on a preset data structure to obtain a production information block corresponding to each production node.

[0017] Further, in one or more embodiments of the present specification, adding the production information block to the preset blockchain network based on a preset consensus mechanism specifically includes:

[0018] Transmitting the production information block to a designated blockchain node of the preset blockchain network based on a preset network protocol;

[0019] Obtaining a preset consensus mechanism of the preset blockchain network to perform consensus verification on the production information block based on the preset consensus mechanism, and if the verification passes, adding the production information block to the blockchain end of the designated blockchain node;

[0020] If the verification fails, the verification result of the production information block is fed back.

[0021] Furthermore, in one or more embodiments of the present specification, based on the business information corresponding to the current supply chain, the test items of each blockchain node in the preset blockchain network are determined, specifically including:

[0022] Acquire the business information corresponding to the current supply chain, and determine the business information corresponding to each blockchain node based on the matching relationship between the business information and the blockchain node;

[0023] Identify the key blockchain nodes of the current supply chain based on the business information corresponding to each blockchain node and the business process corresponding to the business information;

[0024] Determine the executable test items of each blockchain node in each preset blockchain network according to the business execution conditions corresponding to each business information;

[0025] The executable test items are screened according to the weights corresponding to the key blockchain nodes to determine the test items for each blockchain node.

[0026] Further, in one or more embodiments of the present specification, based on the historical test data and current demand data of each test item, the execution logic and trigger conditions of each test item are determined to construct the smart contract corresponding to each test item, specifically including:

[0027] Collecting historical test data and current demand data of each test item to determine the execution logic of each test item based on the matching degree between the test result of each historical test data and the current demand data;

[0028] Acquire the to-be-triggered conditions included in the execution logic, and set each of the to-be-triggered conditions according to the current demand data to obtain the triggering conditions of each of the test items;

[0029] Constructing an initial smart contract corresponding to each of the test items based on the execution logic and trigger conditions of the test items, and deploying the initial smart contract to the preset blockchain network for testing;

[0030] If the test passes, it is determined that the initial smart contract is the smart contract corresponding to the test item.

[0031] Furthermore, in one or more embodiments of the present specification, each of the production information blocks is processed in real time based on the smart contract of each blockchain node to determine the product status of the current supply chain, specifically including:

[0032] Receive request information uploaded by the user to determine whether the request information meets the triggering conditions of the smart contract;

[0033] If not, feeding back request failure information to the user terminal;

[0034] If so, relevant production information of the production information block is extracted based on the smart contract for processing, and the product status of the current supply chain is updated based on the processed data.

[0035] Furthermore, in one or more embodiments of the present specification, after obtaining the digital identity corresponding to each of the product information, the method further includes:

[0036] Determine the corresponding traceability label based on the product characteristics of the current supply chain; wherein the traceability label includes: QR code, RFID label;

[0037] The digital identity corresponding to each of the product information is associated with the traceability label, so that the associated traceability label is marked on the corresponding product.

[0038] Furthermore, in one or more embodiments of the present specification, tracing the product status corresponding to each product information according to the digital identity specifically includes:

[0039] Identify the traceability label based on a scanning device to obtain the current digital identity of the product to be traced according to the association relationship between the traceability label and the digital identity;

[0040] Compare the current digital identity with the digital identity of the preset blockchain network to obtain a verification result of the current digital identity;

[0041] The product information corresponding to the current digital identity is called based on the verification result, so as to trace the product status based on the product information and the verification request information.

[0042] One or more embodiments of this specification provide a supply chain tracing device based on blockchain, the device comprising:

[0043] at least one processor; and,

[0044] a memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0046] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.

[0047] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0048] By collecting and recording detailed information of each production node in the supply chain and processing product information in a block-based manner, the problems caused by information asymmetry can be reduced and the traceability of products can be enhanced. For the second production information containing sensitive data, encryption methods such as splitting and replacement are used to further improve the security of the data and reduce the risk of illegal acquisition or abuse of data. The problem of information islands is avoided by uploading the information to the chain through the consensus mechanism. The corresponding test items are determined according to the business information, and smart contracts are constructed according to the execution logic and trigger conditions of the test items to automate the process based on smart contracts. The automated execution of blockchain functions and the traceability of the current product status of the supply chain are realized, which reduces manual intervention, improves the overall efficiency of the supply chain, and enhances the transparency of the supply chain. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0050] Figure 1 A flowchart of a supply chain tracing method based on blockchain provided in an embodiment of this specification;

[0051] Figure 2 A schematic diagram of the overall process of a supply chain traceability method based on blockchain provided in an embodiment of this specification;

[0052] Figure 3 A schematic diagram of a supply chain traceability device based on blockchain provided in an embodiment of this specification;

[0053] Figure 4 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION

[0054] The embodiments of this specification provide a supply chain tracing method, device and medium based on blockchain.

[0055] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0056] like Figure 1 As shown, the embodiment of this specification provides a flowchart of a supply chain tracing method based on blockchain. Figure 1 It can be seen that in one or more embodiments of this specification, a supply chain tracing method based on blockchain includes:

[0057] S101: Acquire production information of each production node of the current supply chain to pre-process the production information and obtain a production information block corresponding to each production node.

[0058] In order to be able to completely store and trace the information of each link of the product from raw material procurement, production and processing, quality inspection, packaging and warehousing, logistics and transportation to sales terminals, the embodiments of this specification will be based on Figure 2 The data layer and network layer shown in the figure obtain the production information of each production node in the current supply chain, so as to pre-process the production information and obtain the production information block corresponding to each production node. For example: the information of each link of the product from raw material procurement, production and processing, quality inspection, packaging and warehousing, logistics transportation to sales terminals is digitized, and sensitive data is protected by encryption technology. Then, this information is packaged into blocks according to the established data structure and format, so that it can be added to the blockchain network based on the consensus mechanism later. Through this process, the transparency of the supply chain can be greatly improved by collecting and recording detailed information of each production node in the supply chain. This enables all participants in the supply chain to have a clearer understanding of key information such as production progress, inventory status, logistics status, etc., which helps to reduce the problems caused by information asymmetry. The block-based production information helps to enhance the traceability of products. When quality problems occur or the source of the product needs to be tracked, the specific production nodes and batches can be quickly and accurately located, which greatly improves the efficiency and accuracy of problem solving. Among them, it should be noted that Figure 2The data layer includes the blockchain network and data storage module, which are responsible for storing and managing core data such as product information and transaction records. The network layer realizes information transmission and communication between nodes, adopts P2P network architecture, and ensures distributed storage and access of data.

[0059] Specifically, in one or more embodiments of the present specification, obtaining the production information of each production node in the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node specifically includes the following steps:

[0060] First, based on the IoT devices of each production node of the current supply chain, the production information of each production node of the current supply chain is obtained. Then, based on the attribute data and identification data of the production information, the sensitive data in the production information is identified, so that the production information is divided according to the location of the sensitive data, and the first production information that does not contain sensitive data and the second production information that contains sensitive data are obtained. Then, the second production information is split based on the preset character length to obtain multiple second production sub-information, and each second production sub-information is replaced based on the preset mask to obtain the replaced second production sub-information. In addition, it is also necessary to package the first production information and the second production sub-information according to the preset data structure, so as to obtain the production information block corresponding to each production node. In the above process, by identifying sensitive data such as customer information, financial data, etc. in the production information and separating it from non-sensitive data, the first production sub-information and the second production sub-information can be processed separately, which can effectively prevent the leakage of sensitive data. For the second production information containing sensitive data, encryption means such as splitting and replacement are used to further improve the security of the data and reduce the risk of illegal acquisition or abuse of the data. Then, by dividing the production information into the first production information and the replaced second production sub-information, and packaging them based on the preset data structure, a structured production information block is formed. This structured storage method not only optimizes the storage efficiency of data, but also facilitates data transmission and sharing, and improves the collaborative efficiency of the supply chain. Each production node corresponds to a production information block, which contains detailed production information of the node. This structured information recording method makes data traceability simple and clear, which helps to quickly locate the cause when a problem occurs and take corresponding measures.

[0061] S102: Adding the production information blocks to a preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain a digital identity corresponding to each of the product information.

[0062] After obtaining the production information block based on the above steps, the production information block will be added to the pre-set blockchain network according to the pre-set consensus mechanism, so as to determine the product information corresponding to each production information block and obtain the digital identity corresponding to each product information. It should be noted that each production block contains the hash value of the previous block, so as to form a chain structure to ensure the integrity and traceability of the data. This process corresponds to Figure 2 The consensus layer shown can ensure the consistency and immutability of data between nodes through consensus mechanisms such as proof of work and proof of stake.

[0063] Specifically, in one or more embodiments of the present specification, adding a production information block to a preset blockchain network based on a preset consensus mechanism specifically includes the following processes:

[0064] First, the production information block is transmitted to the designated blockchain node of the preset blockchain network based on the preset network protocol. Then, the preset consensus mechanism of the preset blockchain network is obtained, and the production information block is verified according to the preset consensus mechanism. If the verification passes, the production information block is added to the blockchain end of the designated blockchain node. If the verification fails, the verification result of the production information block is fed back. By verifying the production information block through the consensus mechanism, it can be ensured that only verified, authentic and valid data can be added to the blockchain network. This mechanism effectively prevents data tampering and forgery, and enhances the security and credibility of the data.

[0065] Furthermore, in one or more embodiments of the present specification, after obtaining the digital identity corresponding to each product information, in order to facilitate the subsequent traceability process and increase the speed of production chain traceability, the method further includes:

[0066] Determine the corresponding traceability label based on the product characteristics of the current supply chain; the traceability label includes: QR code, RFID tag. Then associate the digital identity corresponding to each product information with the traceability label to identify the associated traceability label on the corresponding product. For example: generate a unique anti-counterfeiting label such as a QR code or RFID tag for each product, and associate it with the digital identity on the blockchain. It is convenient for subsequent consumers to scan the QR code on the anti-counterfeiting label or use an RFID reader to query the detailed information of the product such as production batch, production date, logistics track, etc., and compare and verify with the data on the blockchain. If the information is consistent, it proves that the product is authentic; otherwise, it is a counterfeit or inferior product.

[0067] S103: Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network.

[0068] In order to automatically execute the required test items in the production chain, improve automation efficiency and save the problems of low efficiency and unstable reliability caused by human judgment of various restrictions and permissions, the embodiment of this specification will first determine the test items of each blockchain node in the preset blockchain network according to the business information corresponding to the current supply chain.

[0069] Specifically, in one or more embodiments of this specification, based on the business information corresponding to the current supply chain, the test items of each blockchain node in the preset blockchain network are determined, specifically including:

[0070] First, the business information corresponding to the current supply chain is obtained, and the business information corresponding to each blockchain node is determined based on the matching relationship between the business information and the blockchain node. Then, the key blockchain nodes of the current supply chain are identified according to the business information corresponding to each blockchain node and the business process corresponding to the business information. The executable test items of each blockchain node in each preset blockchain network are determined according to the business execution conditions corresponding to each business information. Then, the executable test items are screened according to the weights corresponding to each key blockchain node to determine the test items of each blockchain node. By directly obtaining the business information of the current supply chain and based on the matching relationship between this information and the blockchain node, the business content that each blockchain node needs to process can be accurately determined. This method ensures that the setting of the test items is highly relevant to the actual operation of the supply chain, thereby improving the pertinence and effectiveness of determining the functions corresponding to each production information block, such as the execution of contract terms, product quality inspection, logistics tracking, etc. The key blockchain nodes in the supply chain are identified, and the executable test items are screened based on the weights of these key nodes to avoid the waste of resources caused by the subsequent customization of smart contracts for unnecessary test items.

[0071] S104: Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to construct a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node.

[0072] In order to automatically execute contract terms, product quality inspection, logistics tracking and other functions, the embodiments of this specification will determine the execution logic and trigger conditions of each test item based on the historical test data and current demand data of each test item to construct the smart contract corresponding to each test item. And deploy the corresponding smart contract to the corresponding blockchain node. Once the smart contract is deployed to the blockchain, it will be automatically executed according to the preset logic without human intervention. When the product passes the quality inspection or arrives at the designated logistics node, the smart contract will automatically trigger the corresponding operations, such as updating the product status, sending notification messages, etc. Among them, it should be noted that, if Figure 2 The part shown corresponds to the process of the smart contract layer. After the smart contract is deployed, it can realize functions such as automatic execution of contract terms, product quality inspection, and logistics tracking.

[0073] Specifically, in one or more embodiments of the present specification, based on the historical test data and current demand data of each test item, the execution logic and trigger conditions of each test item are determined to construct the smart contract corresponding to each test item, specifically including:

[0074] Collect historical test data and current demand data of each test item, and determine the execution logic of each test item based on the matching degree between the test results of each historical test data and the current demand data. Then, obtain the trigger conditions contained in the execution logic, so as to set each of the trigger conditions according to the current demand data to obtain the trigger conditions of each test item. Construct the initial smart contract corresponding to each test item according to the execution logic and trigger conditions of the project, and deploy the initial smart contract to the preset blockchain network for testing. If the test passes, the initial smart contract is determined to be the smart contract corresponding to the test item. By collecting historical test data and current demand data, the execution logic and trigger conditions of the test item are automatically determined by data analysis technology, which greatly reduces manual intervention and improves the level of automation. And the execution logic and trigger conditions of the test item can be dynamically adjusted according to the changes in the current demand data, making the test process more flexible and adaptable. In addition, building smart contracts to automate the test process can optimize the test process and reduce test time and cost. At the same time, the deployment and testing of smart contracts can be carried out on the blockchain network without the need for additional test environment or resources, which improves resource utilization efficiency.

[0075] S105: Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

[0076] After the corresponding smart contract is deployed to the corresponding blockchain node according to the above step S104, each production information block can be processed in real time based on the smart contract of each blockchain node to determine the product status of the current supply chain, and the product status corresponding to each product information can be traced according to the digital identity. Production information, such as raw material warehousing, production and processing, quality inspection, finished product delivery, etc. Whenever new production information is generated and recorded on the blockchain, the smart contract will automatically execute the preset logic according to this information, update and maintain the product status. Through the real-time processing of the smart contract, the system can quickly determine the status of each product in the current supply chain, such as raw material inventory, work-in-progress quantity, finished product inventory, and product production progress and quality inspection results. This information is crucial for supply chain management and decision-making, and can help enterprises better understand the operation of the supply chain and discover and solve problems in a timely manner. In addition, based on the digital identity technology of the blockchain, the system can also trace the product status corresponding to each product information. Each product is given a unique digital identity, which is closely related to all its related information on the blockchain, including production information, logistics information, sales information, etc. By querying this digital identity, users can easily trace the entire life cycle of the product, including its raw material source, production process, quality inspection records, and logistics track. Figure 2 The application layer in the system is used to provide services such as user interface and API interface, and supports operations such as information query, verification and traceability.

[0077] Specifically, in one or more embodiments of the present specification, each of the production information blocks is processed in real time based on the smart contract of each blockchain node to determine the product status of the current supply chain, specifically including:

[0078] First, the request information uploaded by the user is received to determine whether the request information meets the triggering conditions of the smart contract. If not, the request failure information is fed back to the user. If it meets the conditions, the relevant production information of the production information block is extracted according to the smart contract for processing, and the product status of the current supply chain is updated based on the processed data. In this process, the smart contract can automatically respond to and process the request information uploaded by the user without manual intervention. This greatly improves the efficiency and accuracy of the processing, and also ensures the real-time update of the product status. In a fast-paced supply chain environment, this automation and real-time performance are crucial for timely response to market changes and customer needs. Smart contracts can automatically respond to and process the request information uploaded by the user without manual intervention. This greatly improves the efficiency and accuracy of the processing, and also ensures the real-time update of the product status. In a fast-paced supply chain environment, this automation and real-time performance are crucial for timely response to market changes and customer needs. In addition, the execution process and results of the smart contract are recorded on the blockchain and are transparent to all participants. This allows every link in the supply chain to clearly see the production, circulation and status change process of the product. At the same time, blockchain-based digital identity technology also realizes the traceability of product information, and users can easily query the entire life cycle information of the product.

[0079] Specifically, in one or more embodiments of this specification, the product status corresponding to each product information is traced according to the digital identity, specifically including:

[0080] First, the traceability label is identified based on the scanning device, so that the current digital identity of the product to be traced is obtained according to the association between the traceability label and the digital identity. Then, the current digital identity is compared with the digital identity of the preset blockchain network to obtain the verification result of the current digital identity. Based on the verification result, the product information corresponding to the current digital identity is called, so that the product status is traced according to the product information and the verification request information. That is, consumers can query the detailed information of the product by scanning the QR code on the anti-counterfeiting label or using an RFID reader and compare and verify it with the data on the blockchain. If the information is consistent, it proves that the product is authentic; otherwise, it is a counterfeit or inferior product.

[0081] like Figure 3 As shown, the embodiment of this specification provides a schematic diagram of the structure of a supply chain traceability device based on blockchain. Figure 3 It can be seen that in one or more embodiments of this specification, a supply chain tracing device based on blockchain includes:

[0082] at least one processor; and,

[0083] a memory communicatively connected to the at least one processor; wherein,

[0084] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0085] Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node;

[0086] Adding the production information blocks to a preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain a digital identity corresponding to each of the product information;

[0087] Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network;

[0088] Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node;

[0089] Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

[0090] like Figure 4 As shown, the present specification provides a schematic diagram of the structure of a non-volatile storage medium. Figure 4 It can be seen that in one or more embodiments of this specification, a non-volatile storage medium stores computer executable instructions 401, and the computer executable instructions 401 can:

[0091] Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node;

[0092] Adding the production information blocks to a preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain a digital identity corresponding to each of the product information;

[0093] Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network;

[0094] Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node;

[0095] Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

[0096] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0097] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0098] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.

Claims

1. A supply chain tracing method based on blockchain, characterized in that: The method comprises: Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node; Adding the production information blocks to the preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain the digital identity corresponding to each of the product information; Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network; Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node; Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

2. A supply chain tracing method based on blockchain according to claim 1, characterized in that: The obtaining of production information of each production node in the current supply chain to pre-process the production information and obtain a production information block corresponding to each production node specifically includes: Based on the IoT devices at each production node in the current supply chain, obtain the production information of each production node in the current supply chain; Based on the attribute data and identification data of the production information, sensitive data in the production information is identified, and based on the sensitive data, the production information is divided to obtain first production information that does not contain sensitive data and second production information that contains sensitive data; Splitting the second production information based on a preset character length to obtain a plurality of second production sub-information, replacing each second production sub-information based on a preset mask to obtain replaced second production sub-information; The first production information and the second production sub-information are packaged based on a preset data structure to obtain a production information block corresponding to each production node.

3. A supply chain tracing method based on blockchain according to claim 1, characterized in that: Adding the production information block to the preset blockchain network based on a preset consensus mechanism specifically includes: Transmitting the production information block to a designated blockchain node of the preset blockchain network based on a preset network protocol; Obtaining a preset consensus mechanism of the preset blockchain network to perform consensus verification on the production information block based on the preset consensus mechanism, and if the verification passes, adding the production information block to the blockchain end of the designated blockchain node; If the verification fails, the verification result of the production information block is fed back.

4. A supply chain tracing method based on blockchain according to claim 1, characterized in that: Based on the business information corresponding to the current supply chain, the test items of each blockchain node in the preset blockchain network are determined, specifically including: Acquire the business information corresponding to the current supply chain, and determine the business information corresponding to each blockchain node based on the matching relationship between the business information and the blockchain node; Identify key blockchain nodes of the current supply chain based on the business information corresponding to each blockchain node and the business process corresponding to the business information; Determine the executable test items of each blockchain node in each preset blockchain network according to the business execution conditions corresponding to each business information; The executable test items are screened according to the weights corresponding to the key blockchain nodes to determine the test items for each blockchain node.

5. The supply chain tracing method based on blockchain according to claim 1 is characterized in that: Based on the historical test data and current demand data of each test item, the execution logic and trigger conditions of each test item are determined to construct the smart contract corresponding to each test item, specifically including: Collecting historical test data and current demand data of each test item to determine the execution logic of each test item based on the matching degree between the test result of each historical test data and the current demand data; Acquire the to-be-triggered conditions included in the execution logic, and set each of the to-be-triggered conditions according to the current demand data to obtain the triggering conditions of each of the test items; Constructing an initial smart contract corresponding to each of the test items based on the execution logic and trigger conditions of the test items, and deploying the initial smart contract to the preset blockchain network for testing; If the test passes, it is determined that the initial smart contract is the smart contract corresponding to the test item.

6. A supply chain tracing method based on blockchain according to claim 1, characterized in that: The smart contract based on each blockchain node processes each production information block in real time to determine the product status of the current supply chain, specifically including: Receive request information uploaded by the user to determine whether the request information meets the triggering conditions of the smart contract; If not, feeding back request failure information to the user terminal; If so, relevant production information of the production information block is extracted based on the smart contract for processing, and the product status of the current supply chain is updated based on the processed data.

7. A supply chain tracing method based on blockchain according to claim 1, characterized in that: After obtaining the digital identity corresponding to each product information, the method further includes: Determine the corresponding traceability label based on the product characteristics of the current supply chain; wherein the traceability label includes: QR code, RFID label; The digital identity corresponding to each of the product information is associated with the traceability label, so that the associated traceability label is marked on the corresponding product.

8. A supply chain tracing method based on blockchain according to claim 7, characterized in that: The product status corresponding to each product information is traced according to the digital identity, specifically including: Identify the traceability label based on a scanning device to obtain the current digital identity of the product to be traced according to the association relationship between the traceability label and the digital identity; Compare the current digital identity with the digital identity of the preset blockchain network to obtain a verification result of the current digital identity; The product information corresponding to the current digital identity is called based on the verification result, so as to trace the product status based on the product information and the verification request information.

9. A supply chain tracing device based on blockchain, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node; Adding the production information blocks to the preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain the digital identity corresponding to each of the product information; Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network; Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node; Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.

10. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions are capable of: Acquire the production information of each production node of the current supply chain to pre-process the production information and obtain the production information block corresponding to each production node; Adding the production information blocks to the preset blockchain network based on a preset consensus mechanism, and determining the product information corresponding to each of the production information blocks to obtain the digital identity corresponding to each of the product information; Based on the business information corresponding to the current supply chain, determine the test items of each blockchain node in the preset blockchain network; Based on the historical test data and current demand data of each of the test items, determine the execution logic and trigger conditions of each of the test items to build a smart contract corresponding to each of the test items, and deploy the corresponding smart contract to the corresponding blockchain node; Based on the smart contract of each blockchain node, each production information block is processed in real time to determine the product status of the current supply chain, so as to trace the product status corresponding to each product information according to the digital identity.