A blockchain-based supply chain traceability method
By collecting cargo transportation data and extracting behavioral feature vectors, and combining dynamic behavioral fingerprint locks and smart contract verification, the problem of data distortion caused by the separation of physical objects and digital tags in existing blockchain traceability solutions has been solved, realizing low-cost automated traceability data verification and interception of mid-transit tampering.
Patent Information
- Application Number
- CN202611536042.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-24
AI Technical Summary
In existing blockchain supply chain traceability solutions, physical goods and digital tags are physically separated. Counterfeiters can switch out genuine products by tearing off the genuine product tags or opening the box midway to replace the physical goods inside. Existing blockchain technology cannot verify whether the off-chain scanned data corresponds to the physical goods, resulting in distorted traceability data.
By collecting cargo transportation data through the perception module and extracting behavioral feature vectors through the edge computing module, combined with dynamic behavior fingerprint locks and smart contract verification, the system can automatically identify unpacking and tampering during transit and intercept abnormal data. This can be achieved by utilizing existing sensor gateways in the logistics scenario without increasing hardware costs.
It enables continuous verification of physical goods and on-chain data, reduces system modification costs, and can automatically identify and intercept unpacking and tampering during transit, ensuring the authenticity and reliability of traceability data.
Smart Images

Figure CN123160193A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of supply chain traceability technology, specifically a blockchain-based supply chain traceability method. Background Technology
[0002] Blockchain is a distributed ledger technology maintained by multiple nodes and ensured by a cryptographic hash chain structure that data is difficult to tamper with once written. When blockchain technology is applied to supply chain traceability scenarios, the common practice is that at key nodes in the flow of goods, such as production, warehousing, outbound, transportation, and retail, operators use barcode scanning devices to read the unique code stored in the physical label affixed to the goods. This code is then packaged with the node time, geographical location, and operator information, and a hash value is calculated before being written into the blockchain. This allows consumers or regulators to query and verify the authenticity of the goods' flow path. In conjunction with this, smart contract technology enables the blockchain network to automatically execute predetermined business logic when preset conditions are met without relying on centralized third-party audits. In terms of IoT sensing technology, sensor gateways based on low-power wide-area network communication are widely used in logistics vehicles and reusable logistics boxes, which can collect environmental data such as vibration, acceleration, temperature, and humidity in real time and upload them to the cloud or edge nodes.
[0003] Currently, the most widely used solution in industry and academia is a blockchain traceability scheme that uses both physical and static digital tags for dual authentication. This scheme affixes or embeds a unique QR code or RFID tag to the goods when they leave the factory, and writes the unique code and the hash value of the goods' basic information into the blockchain genesis node. During the circulation of the goods, at each supply chain node, the operator uses a scanning device to read the unique code in the tag, packages the time, location, operator's signature, and other information of the handover, calculates the hash, and writes it as a new block on the chain, forming a chain association with the previous block. Consumers or regulators can scan the tag at the end node to trace all the nodes the goods have passed through since they left the factory. In this scheme, the binding relationship between the tag and the blockchain ledger is only established once when it is first generated. After that, each node only scans the same static tag repeatedly, and the tag itself does not change at all throughout its entire life cycle.
[0004] The existing solutions described above have the following drawbacks: Because static digital tags are physically independent of the actual product and can be torn off without damage, counterfeiters can completely remove genuine tags and re-attach them to counterfeit packaging. Furthermore, since the blockchain only verifies the cryptographic validity of the tag's code during each on-chain transaction, without verifying the physical existence or replacement of the product's physical attributes, counterfeiters can also open the box mid-transportation, replace the genuine goods with counterfeit ones, reseal the box, and use the original genuine tag to scan and upload the product to the next node. These two types of substitution behaviors can lead to counterfeiters being able to bypass the scanning process. Each step can generate cryptographically signed, fully legitimate on-chain data. Even if existing blockchain systems achieve immutability after data is uploaded to the chain, they cannot prevent data that is already false before being uploaded from being permanently fixed on the chain. This ultimately leads to the distortion of traceability verification conclusions made by consumers or regulators based on on-chain records, weakening the credibility of blockchain traceability technology. Therefore, how to achieve continuous verification of the true correspondence between physical goods and on-chain data without significantly increasing hardware costs is a technical problem that urgently needs to be solved in this field. To this end, we propose a blockchain-based supply chain traceability method. Summary of the Invention
[0005] The purpose of this invention is to provide a blockchain-based supply chain traceability method.
[0006] The technical problem this invention aims to solve is that in existing blockchain supply chain traceability solutions, because physical goods and digital tags are physically separated, counterfeiters can use methods such as tearing off genuine product tags and affixing them to counterfeit goods or unpacking and replacing the contents of boxes during transportation to carry out counterfeiting. Furthermore, existing blockchain technology itself cannot verify whether the off-chain scanned data corresponds to the physical goods, thus rendering the advantage of the blockchain's immutability after being uploaded to the chain meaningless and failing to guarantee the authenticity and reliability of traceability data from the source.
[0007] To address the aforementioned technical problems, this invention provides a blockchain-based supply chain traceability method, comprising: a sensing module collecting vibration frequency sequences, three-dimensional acceleration sequences, and temperature and humidity gradient curves set on a cargo transport and containment device to obtain raw multimodal time-series data; an edge computing module normalizing and segmenting the raw multimodal time-series data using a sliding window to obtain multiple time-series segment samples of equal length; inputting the time-series segment samples into a pre-trained encoder network; and outputting a behavioral feature vector representing the spatiotemporal trajectory characteristics of the current transportation stage of the batch of goods after multi-layer convolution and pooling processing; and the edge computing module acquiring the decentralized identifier of the batch of goods and the encrypted signature and operation timestamp of the node operator for this handover business information, and then combining the decentralized identifier and the action timetamp. The feature vector, encrypted signature, and operation timestamp are concatenated in a preset order and then input into a hash function to generate a dynamic behavior fingerprint lock. The dynamic behavior fingerprint lock, behavior feature vector, and encrypted signature are then packaged into a transaction data packet to be uploaded to the blockchain network. The smart contract deployed in the blockchain network receives the transaction data packet to be uploaded to the blockchain network, verifies the legality of the encrypted signature, and after the verification is passed, reads the behavior feature vector that has been uploaded and stored on the blockchain from the previous supply chain node, calculates the similarity between the behavior feature vector of the previous supply chain node and the behavior feature vector of the current supply chain node, and compares it with a preset continuity judgment threshold. Based on this, it automatically decides whether to write the transaction data into a new block, thereby realizing the automatic identification of physical environment feature changes caused by mid-term unpacking and replacement and the interception of abnormal data.
[0008] The present invention also provides a blockchain-based supply chain traceability system for implementing the above method. The system is modularly divided into a sensing module, an edge computing module, a blockchain network module, and an application query module. The modules are connected through communication to realize the hierarchical transmission of data and the hierarchical execution of control commands, so that the whole system has a clear modular structure and scalable control logic.
[0009] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:
[0010] 1. This invention does not require additional costs for dedicated physical anti-counterfeiting hardware; it can be deployed using sensor gateways that are already widely deployed in existing logistics scenarios, thus reducing system modification costs.
[0011] 2. When goods are unpacked and tampered with en route, their physical quantities such as vibration, acceleration, temperature and humidity will inevitably undergo irreversible abrupt changes and breaks, resulting in a significant reduction in the similarity of the behavioral feature vectors of adjacent supply chain nodes. This invention enables the identification and interception of such tampering behavior from the data source rather than just the on-chain storage link.
[0012] 3. The operations involved in the behavioral feature extraction and similarity comparison of this invention are all lightweight models and low-dimensional vector operations, which can be executed on edge devices and existing blockchain architectures without introducing a significant computing burden to the blockchain network. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of the overall traceability process in an embodiment of the present invention;
[0014] Figure 2 This is a schematic diagram of the edge computing processing flow in an embodiment of the present invention;
[0015] Figure 3 This is a schematic diagram of the system module flow in an embodiment of the present invention. Detailed Implementation
[0016] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0017] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0018] Example 1: Blockchain-based supply chain traceability method:
[0019] The blockchain-based supply chain traceability method provided in this embodiment is completed by the cooperation of a sensing module, an edge computing module, a blockchain network module, and an application query module.
[0020] In the data acquisition stage of the perception layer, the perception module is set up inside the logistics turnover box where the goods are located or on the transport vehicle. It integrates a six-axis inertial measurement unit, a temperature and humidity sensor and a low-power wide area network communication module. The six-axis inertial measurement unit is used to collect the vibration frequency sequence and three-dimensional acceleration sequence during the transportation of goods. The temperature and humidity sensor is used to collect the temperature and humidity gradient curve of the environment in which the goods are located. The low-power wide area network communication module adopts narrowband Internet of Things or long-distance low-power wireless communication to continuously send the above vibration frequency sequence, three-dimensional acceleration sequence and temperature and humidity gradient curve to the edge computing module at a preset sampling frequency to form raw multimodal time series data.
[0021] In the edge computing layer feature extraction stage, the edge computing module is deployed in handheld terminals or gateway devices at various supply chain nodes (production end, warehousing center, carrier vehicle terminal, retail terminal). The edge computing module first normalizes the received raw multimodal time series data to eliminate the dimensional differences between physical quantities of different sensors. Then, it slides the normalized data according to a fixed time window length to obtain multiple time series segment samples of the same length, which serve as the input to the subsequent encoder network. The encoder network is a pre-trained one-dimensional convolutional encoder network, which gradually extracts the local features of the time series segment samples and compresses the data dimension step by step through multiple one-dimensional convolution operations and pooling operations. Finally, it outputs a low-dimensional hidden layer feature vector, namely the behavioral feature vector, which can uniquely represent the spatiotemporal trajectory features of the batch of goods in the current transportation stage.
[0022] During the offline training phase, the encoder network is jointly trained with the decoder network: the decoder network receives the behavioral feature vector output by the encoder network, and reconstructs a reconstructed sample with the same dimension as the original temporal segment sample through several layers of deconvolution and upsampling operations. During the training process, the parameters of the encoder network and the decoder network are jointly adjusted to reduce the difference between the reconstructed sample and the original temporal segment sample until the difference converges to within a preset range. After training, only the encoder network is deployed to the edge computing module for real-time extraction of behavioral feature vectors during the inference phase. The decoder network does not participate in the online inference process, thereby reducing the computational load of the edge computing module.
[0023] In the dynamic behavior fingerprint lock generation process, the edge computing module includes a hash binding unit. When goods complete a handover scanning operation at a certain supply chain node, the hash binding unit reads the decentralized identifier of that batch of goods. This decentralized identifier is generated when the goods leave the factory and is used throughout the entire lifecycle of the goods, uniquely identifying that batch of goods without relying on a centralized registration institution. Simultaneously, the hash binding unit retrieves the behavior feature vector extracted by the aforementioned encoder network for the current node, and obtains the encrypted signature obtained by the node operator using their private key to encrypt the node number, geographical location, timestamp, and other business information for this handover, as well as the operation timestamp corresponding to this operation. The hash binding unit then... The hash identifier, behavioral feature vector, encrypted signature, and operation timestamp are concatenated in a preset order and then input into an anti-collision hash function for calculation to generate the dynamic behavioral fingerprint lock of this node. The dynamic behavioral fingerprint lock dynamically binds the digital identity of the goods, the current transportation environment characteristics, and the operation certificate information into one through hash operation, so that any change in any component will cause the value of the generated dynamic behavioral fingerprint lock to change unpredictably. Unlike the existing static label encoding and physical object binding technology, the hash binding unit then encapsulates the dynamic behavioral fingerprint lock, the original value of the behavioral feature vector, and the encrypted signature into a transaction data package to be uploaded to the blockchain and submitted to the blockchain network module for verification.
[0024] In the on-chain smart contract continuity verification stage, the blockchain network module includes multiple blockchain nodes jointly maintained by all participants in the supply chain. Each blockchain node deploys a smart contract. After receiving the transaction data packet to be uploaded to the chain from the edge computing module, the smart contract first verifies the validity of the cryptographic signature in the data packet. If the signature verification fails, the transaction is directly rejected from being uploaded to the chain, and an anomaly alarm is sent to the supply chain management platform, terminating the process. If the signature verification passes, the smart contract reads the behavioral feature vector of the previous supply chain node that has been uploaded and stored on the chain from the confirmed historical blocks on the chain, and automatically calculates the similarity between the behavioral feature vector of the previous supply chain node and the behavioral feature vector of the current supply chain node. This similarity is used to measure the degree of continuous change in the transportation environment characteristics of goods between two adjacent supply chain nodes. The smart contract compares the calculated similarity with the continuity judgment value pre-calibrated based on historical normal logistics data. A threshold comparison is used: when the similarity is not less than the continuity judgment threshold, the continuity verification is deemed to pass. The smart contract incorporates the transaction data (including dynamic behavior fingerprint lock and behavior feature vector) into the consensus process, confirms it with other verification nodes, and writes it into a new block to complete the trusted traceability and evidence storage of the supply chain node. When the similarity is less than the continuity judgment threshold, the continuity verification is deemed to fail. The smart contract directly rejects the transaction from being uploaded to the chain and sends an abnormal alarm message to the supply chain management platform, marking that there is a suspected swapping anomaly between the previous supply chain node and the current supply chain node for manual intervention and verification. Since the physical quantities such as vibration, acceleration, temperature and humidity in the turnover box or carrier where the goods are located will inevitably undergo irreversible sudden breakage when the goods are unpacked and swapped in the middle, the similarity of the behavior feature vectors of adjacent nodes will be significantly reduced. Therefore, the above continuity verification can automatically identify and intercept such swapping behavior.
[0025] In the application query stage, the application query module communicates and connects with the blockchain network module, allowing end users such as consumers and regulatory agencies to query the complete flow path of the batch of goods and the continuity verification results between each supply chain node through the decentralized identifier of the goods, thereby obtaining credible traceability information with physical continuity support.
[0026] The three stages of perception, edge computing, and on-chain verification mentioned above are executed cyclically throughout the complete flow of goods from the production end to the consumer end: when the goods leave the factory, a decentralized identifier is generated and the behavioral feature benchmark is initialized; when the goods pass through the first supply chain node, environmental data is collected and behavioral feature vectors are extracted, a dynamic behavioral fingerprint lock is generated and uploaded to the chain; when the goods pass through the second supply chain node, behavioral feature vectors are extracted in the same way; the smart contract verifies the continuity of behavioral feature vectors between the first and second supply chain nodes; if the verification passes, the goods continue to flow to the next node and the above process is repeated; if the verification fails, an anomaly is marked and an alarm is triggered. The above cyclical process can be adapted to multi-level supply chain scenarios with any number of nodes until the goods reach the retail terminal, where consumers can scan the code to obtain the complete and trustworthy traceability link in the application query module;
[0027] Example 2: Alternative implementation of encoder networks:
[0028] In this embodiment, the encoder network used in the edge computing module is replaced by the encoder part of a long short-term memory network, or by the encoder part of a gated recurrent unit network. Both long short-term memory networks and gated recurrent unit networks can perform sequence modeling on multimodal time-series data with temporal dependencies. Through their internal memory unit structures, they process the data of each time step in the time-series segment sample step by step, and output a fixed-length hidden state vector after processing all time steps. This hidden state vector is then passed as a behavioral feature vector to the subsequent dynamic behavior fingerprint lock generation stage. This alternative implementation can also effectively represent the spatiotemporal trajectory features of cargo transportation in scenarios with long time dependencies, and can be used as a supplementary implementation of the present invention. The processing of the remaining stages is the same as in Embodiment 1.
[0029] Example 3: Alternative implementation method for continuity verification:
[0030] In this embodiment, in addition to calculating the similarity between the behavioral feature vectors of adjacent supply chain nodes in the continuity verification stage, the smart contract can also use dynamic time bending distance or Euclidean distance as the continuity judgment index between the behavioral feature vectors of adjacent nodes. Furthermore, in order to protect the commercial privacy data of logistics nodes, the edge computing module may not directly upload the original value of the behavioral feature vector to the blockchain network module, but instead generate a zero-knowledge proof of the similarity calculation result based on the behavioral feature vector of the previous supply chain node and the behavioral feature vector of the current supply chain node. The smart contract determines whether the continuity verification result meets the preset conditions by verifying the zero-knowledge proof, without needing to obtain the original value of the behavioral feature vector itself. This further reduces the risk of leakage of the original transportation data of logistics nodes while realizing the function of identifying package swapping anomalies. The remaining processing steps of this alternative implementation method are the same as those in Embodiment 1.
[0031] Example 4: Blockchain-based supply chain traceability system:
[0032] This embodiment provides a blockchain-based supply chain traceability system for implementing the above method. The system is functionally divided into four interconnected modules: a sensing module, an edge computing module, a blockchain network module, and an application query module. The specific structure and processing logic of each module are consistent with the description of the corresponding link in Embodiment 1. The system adopts a modular structure design. Data interaction between the sensing module and the edge computing module, between the edge computing module and the blockchain network module, and between the blockchain network module and the application query module are all conducted through preset communication interfaces. This gives the system good scalability and allows for flexible adjustment of the deployment scale of the edge computing module and blockchain nodes according to the increase or decrease in the number of supply chain nodes, without changing the internal processing logic of each module and the control relationship between them.
[0033] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.
Claims
1. A blockchain-based supply chain traceability method, characterized in that, include: The sensing module collects vibration frequency sequences, three-dimensional acceleration sequences, and temperature and humidity gradient curves set on the cargo transport and containment device to obtain raw multimodal time series data. The edge computing module normalizes the original multimodal time-series data and performs sliding segmentation according to a fixed time window length to obtain multiple time-series segment samples of the same length. The time-series segment samples are then input into a pre-trained encoder network for multi-layer convolution and pooling processing to output a behavioral feature vector representing the spatiotemporal trajectory characteristics of the current transportation stage of the batch of goods. The edge computing module obtains the decentralized identifier of the batch of goods, obtains the encrypted signature and operation timestamp of the node operator for this handover business information, and concatenates the decentralized identifier, the behavior feature vector, the encrypted signature and the operation timestamp in a preset order and inputs them into a hash function for calculation to generate a dynamic behavior fingerprint lock. The edge computing module encapsulates the dynamic behavior fingerprint lock, the behavior feature vector, and the encrypted signature into a transaction data packet to be uploaded to the blockchain network; The smart contract deployed in the blockchain network receives the data packet of the transaction to be uploaded to the chain and verifies the legality of the cryptographic signature; When the verification is successful, the behavioral feature vector of the previous supply chain node that has been stored on the chain is read from the chain, the similarity between the behavioral feature vector of the previous supply chain node and the behavioral feature vector of the current supply chain node is calculated, and the similarity is compared with the preset continuity judgment threshold. When the similarity is not less than the continuity determination threshold, the continuity verification is deemed to have passed, and the transaction data is included in the consensus process and written into a new block. When the similarity is less than the continuity determination threshold, the continuity verification is deemed to have failed, the transaction is rejected from being uploaded to the blockchain, and an abnormal alarm is triggered. The edge computing module generates a zero-knowledge proof of similarity calculation results based on the behavioral feature vectors of the previous supply chain node and the current supply chain node. The smart contract determines the continuity verification result by verifying the zero-knowledge proof. The smart contract does not obtain the original value of the behavioral feature vector.
2. The supply chain traceability method based on blockchain according to claim 1, characterized in that, The encoder network is the encoder portion of a one-dimensional convolutional autoencoder; The one-dimensional convolutional autoencoder also includes a decoder network during the offline training phase. The decoder network reconstructs a reconstructed sample with the same dimension as the original input based on the behavioral feature vector output by the encoder network. The parameters of the encoder network and the decoder network are jointly trained by reducing the reconstruction error between the reconstructed sample and the original input. The decoder network does not participate in the extraction of the behavioral feature vectors during the inference phase.
3. The supply chain traceability method based on blockchain according to claim 1, characterized in that, The encoder network is the encoder part of a long short-term memory network. The long short-term memory network performs sequence modeling on the temporal segment samples and outputs a fixed-length hidden layer state vector as the behavioral feature vector.
4. The supply chain traceability method based on blockchain according to claim 1, characterized in that, The edge computing module concatenates the decentralized identifier, behavioral feature vector, encrypted signature, and operation timestamp in that order, and uses an anti-collision hash function to perform calculations on the concatenated data to generate the dynamic behavioral fingerprint lock.
5. The supply chain traceability method based on blockchain according to claim 1, characterized in that, The similarity is cosine similarity, which is obtained by calculating the inner product of the behavioral feature vector of the previous supply chain node and the behavioral feature vector of the current supply chain node, and then dividing by the product of the Euclidean norms of the two behavioral feature vectors.
6. The supply chain traceability method based on blockchain according to claim 1, characterized in that, When the continuity check fails, the smart contract sends an anomaly alarm to the supply chain management platform. The anomaly alarm indicates that there is a suspected swapping anomaly between the previous supply chain node and the current supply chain node.
7. A blockchain-based supply chain traceability system, characterized in that, It includes a sensing module, an edge computing module, a blockchain network module, and an application query module; The sensing module is installed inside the logistics turnover box or on the transport vehicle to collect the vibration frequency sequence, three-dimensional acceleration sequence and temperature and humidity gradient curve of the goods, and obtain the original multimodal time series data. The edge computing module is communicatively connected to the sensing module and is used to normalize the original multimodal time-series data and divide it into time-series segment samples by sliding window. The time-series segment samples are input into a pre-trained encoder network to obtain a behavior feature vector. The decentralized identifier of the batch of goods, the behavior feature vector, the encrypted signature of the node operator, and the operation timestamp are concatenated in a preset order and then input into a hash function to obtain a dynamic behavior fingerprint lock. The dynamic behavior fingerprint lock, the behavior feature vector, and the encrypted signature are encapsulated into a transaction data package to be uploaded to the blockchain. The blockchain network module is communicatively connected to the edge computing module and includes multiple blockchain nodes and smart contracts deployed on the blockchain nodes. The smart contracts are used to receive the transaction data packets to be uploaded to the chain, verify the legality of the cryptographic signature, read the behavioral feature vector of the previous supply chain node that has been uploaded to the chain after the verification is passed, calculate the similarity between the behavioral feature vector of the previous supply chain node and the behavioral feature vector of the current supply chain node, compare the similarity with a preset continuity judgment threshold, and determine whether to write the transaction data into a new block based on the comparison result. The application query module is communicatively connected to the blockchain network module and is used to query the flow path of goods and the continuity verification results of each supply chain node based on the decentralized identifier.
8. A blockchain-based supply chain traceability system according to claim 7, characterized in that, The sensing module includes a six-axis inertial measurement unit, a temperature and humidity sensor, and a low-power wide-area network (LPWAN) communication module. The LPWAN communication module is used to send the raw multimodal time-series data to the edge computing module.
9. A blockchain-based supply chain traceability system according to claim 7, characterized in that, The smart contract is also used to refuse to upload the transaction data packet to the blockchain when the similarity is less than the continuity determination threshold, and to send an abnormal alarm message to the supply chain management platform. The abnormal alarm message marks that there is a suspected packet swapping anomaly between the previous supply chain node and the current supply chain node.
