Blockchain-based cold-chain logistics cargo traceability method and system
By activating a unique physical identifier in cold chain logistics and binding environmental data on a decentralized blockchain, the problems of easy tampering and non-unique starting points in centralized systems are solved, achieving reliable traceability and data integrity throughout the entire process.
Patent Information
- Application Number
- CN202610663810.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-30
AI Technical Summary
In existing cold chain logistics traceability technologies, centralized systems are easily tampered with, the starting point of the traceability chain is not unique, and the identification code is separated from the environmental data, resulting in data misalignment and low traceability credibility. The integrity of records in intermediate links is difficult to verify.
When goods are loaded into the cold chain transport carrier, a unique physical identifier is activated, initial state information is collected to generate an initialization data packet, and the packet is verified and encapsulated into a genesis block through a decentralized blockchain network. Environmental data is bound to each monitoring node to generate a node traceability record, and final state confirmation is triggered at the destination to generate a termination record, ensuring a strong correlation between the data and the goods unit throughout the entire process.
It achieves the physical entity and data anchoring of the traceability starting point, ensuring that each piece of environmental data accurately corresponds to a specific cargo unit, avoiding data misalignment, and realizing the immutability and reliable traceability of the entire chain.
Smart Images

Figure CN122312007A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of blockchain logistics traceability technology, specifically a blockchain-based method and system for tracing cold chain logistics goods. Background Technology
[0002] Cold chain logistics cargo traceability requires ensuring the authenticity and traceability of data throughout the entire chain. Existing technologies mostly use centralized systems to register cargo information, relying on manual input or simple electronic tags to associate basic data. In conventional solutions, cargo identification codes often only serve as registration markers and are not deeply bound to the initial state. The starting point of the traceability chain is often a virtual record in the system, lacking a unique anchor between the physical entity and the data. Environmental monitoring data is mostly collected independently during transportation and recorded in stages with cargo identification codes, which is prone to data misalignment and unclear correlation. Furthermore, centralized storage is susceptible to tampering, making it difficult to verify the integrity of the entire chain.
[0003] The shortcomings of existing technologies are that data is easily modified under a centralized architecture, the non-unique starting point of the traceability chain leads to low traceability credibility, the identification code is separated from environmental data collection, making it impossible to ensure that each piece of environmental data accurately corresponds to a specific cargo unit, and intermediate records are not linked to the blockchain for dynamic verification, making it difficult to recover data after the chain breaks or data is lost. This invention addresses these problems by activating a unique physical identification code and collecting initial state data to generate an initialization data package when the cargo is loaded, uploading it to the blockchain for verification and encapsulation of a genesis block, establishing an immutable starting point; simultaneously, at each monitoring node, sensors read and bind the identification code and collected environmental data, generating a record which is then verified and linked to a new block via the blockchain. Upon final state confirmation, a termination record is generated and encapsulated in an end block, achieving strong correlation and evidence storage between the entire chain of data and the cargo unit. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a blockchain-based method for tracing the origin of goods in cold chain logistics, including: When a cargo unit is loaded into a cold chain transport carrier, its unique physical identifier is activated and initial status information is collected. An initialization data packet is generated, uploaded to a decentralized blockchain network for verification, and then encapsulated as the genesis block of the cargo unit traceability chain. At each pre-set monitoring node in the cold chain transportation, the unique physical identifier code is read by fixed or mobile sensing devices. At the same time as reading the unique physical identifier code, environmental monitoring data at the pre-set monitoring node is collected. The environmental monitoring data includes the geographical location of the current preset monitoring node, the collection timestamp, the real-time temperature, humidity, and vibration amplitude inside the warehouse; The environmental monitoring data of the current preset monitoring node is bound with the unique physical identifier read by the current preset monitoring node to generate a node tracing record; The node traceability record is sent to the decentralized blockchain network, which verifies and links the node traceability record with the historical records of the goods unit stored on the chain, forming a new block added to the traceability chain of the goods unit. When the cargo unit arrives at its destination and is signed for, a final state confirmation operation is triggered, which collects the cargo status image and final environmental data at the time of signing and generates a termination record. The termination record is uploaded to the decentralized blockchain network. After verifying the integrity of the cargo unit traceability chain, the decentralized blockchain network encapsulates the termination record as the end block of the traceability chain, thus completing the full-process blockchain traceability and evidence storage for the corresponding batch of goods.
[0005] Furthermore, the process of activating its unique physical identifier and collecting initial state information, generating an initialization data packet, uploading it to a decentralized blockchain network for verification, and then encapsulating it into the genesis block of the goods unit traceability chain includes: When a cargo unit is packaged and loaded into a cold chain transport carrier, a unique physical identifier code attached to the cargo unit is activated. The initial state information of the cargo unit during loading is collected, including the type of cargo, weight, initial temperature, packaging integrity image, and loading time. Generate an initialization data packet containing the unique physical identifier and the initial state information, and digitally sign the initialization data packet; The digitally signed initialization data packet is uploaded to a decentralized blockchain network. After the decentralized blockchain network verifies the validity of the digital signature, the initialization data packet is encapsulated into a genesis block, which serves as the starting point of the goods unit traceability chain.
[0006] Furthermore, the process of uploading the digitally signed initialization data packet to a decentralized blockchain network, whereby the decentralized blockchain network verifies the validity of the digital signature, and then encapsulates the initialization data packet into a genesis block, includes: The consensus nodes in the decentralized blockchain network receive the digitally signed initialization data packet; The consensus node uses the public key corresponding to the signing private key to decrypt and verify the digital signature of the initialization data packet, confirming the legality of the data source and the integrity of the data; After successful verification, the consensus node performs a hash operation on the key fields in the initialization data packet, including the unique physical identifier and the initial state information, to generate a unique data fingerprint of the initialization data packet. The unique data fingerprint is packaged with the hash value of the previous block and the current timestamp to form the block header of the new block; The complete initialization data packet is used as the block body and assembled together with the block header to form the genesis block; The genesis block is agreed upon through a consensus algorithm in the decentralized blockchain network and then appended to the traceability chain dedicated to the goods unit.
[0007] Furthermore, at each preset monitoring node in the cold chain transportation, the unique physical identifier is read using fixed or mobile sensing devices, including: Fixed readers are deployed at the loading and unloading points of cold chain warehouses, inside the cargo compartments of transport vehicles, and at the entrances and exits of transfer stations as fixed, pre-set monitoring nodes. Handheld reading and writing terminals are provided to inspection personnel in the transportation process as mobile pre-set monitoring nodes; When a cargo unit passes through the fixed preset monitoring node, the deployed fixed reader automatically scans and identifies the unique physical identifier code on the cargo unit. When performing manual inspections or random checks, the inspection personnel shall actively scan the unique physical identification code on the cargo unit using a handheld reading and writing terminal; After successfully reading the unique physical identifier, the fixed reader or handheld reader immediately triggers the integrated environmental sensor group to collect the environmental monitoring data of the current node.
[0008] Further, the step of binding the environmental monitoring data of the current preset monitoring node with the unique physical identifier read by the current preset monitoring node to generate a node tracing record includes: Create a structured data object, which includes an identifier field, an environment data field, and a node metadata field; Fill the original string of the read unique physical identifier into the identifier field; The collected environmental monitoring data, including geographic location coordinates, collection timestamp, real-time temperature, humidity and vibration amplitude, are formatted and then filled into the environmental data field. Fill the device number and node type information of the current monitoring node into the node metadata field; The complete data object containing all fields is serialized to generate a node tracing record in a standard format; The serialized node tracing record is digitally signed using the private key of the current monitoring node device to ensure the immutability and source credibility of the record.
[0009] Further, the node traceability record is sent to the decentralized blockchain network, which verifies and links the node traceability record with the historical records of the goods unit stored on the chain, including: The decentralized blockchain network receives the node traceability records and parses the unique physical identifier from the node traceability records; Based on the parsed unique physical identifier, the traceability chain corresponding to the cargo unit is queried and located on the blockchain, and the hash value of the latest block on the traceability chain is obtained. Calculate the hash value of the node tracing record and combine it with the hash value of the latest block obtained to generate the block header data of the new candidate block; Verify the logical continuity of environmental monitoring data in the node traceability record, including checking whether the timestamp is later than the timestamp of the previous node record, and whether the temperature change exceeds the preset reasonable threshold range; After the verification is passed, the node traceability record is used as the block body and packaged together with the block header data of the new candidate block to form a new block to be confirmed. The new block to be confirmed is broadcast to the decentralized blockchain network through a consensus mechanism. After other nodes verify that it is correct, it is linked to the end of the cargo unit traceability chain.
[0010] Furthermore, verifying the logical continuity of environmental monitoring data in the node traceability record includes checking whether the timestamp is later than the timestamp of the previous node record, and whether the temperature change exceeds a preset reasonable threshold range, including: Obtain the latest traceability record of the cargo unit traceability chain from the decentralized blockchain network, extract the timestamp as the timestamp of the previous node, and extract the real-time temperature as the temperature of the previous node. Extract the current timestamp and current real-time temperature from the current node traceability record to be verified; Calculate the time difference between the current timestamp and the previous node timestamp, and determine whether the time difference is greater than zero and less than the preset maximum allowable transportation interval; Calculate the absolute difference between the current real-time temperature and the temperature of the previous node to obtain the temperature change. Query the preset reasonable temperature threshold range corresponding to the type of goods to which the cargo unit belongs, and determine whether the temperature change is within the reasonable temperature threshold range; If both the time difference and the temperature change meet the conditions, the logical continuity check is deemed to have passed; otherwise, a continuity anomaly warning is generated, and the continuity anomaly warning and the node traceability record are packaged together into a new block.
[0011] Furthermore, when the cargo unit arrives at its destination and is signed for, a final state confirmation operation is triggered, which collects the cargo status image and final environmental data at the time of signing, and generates a termination record, including: The recipient enters the waybill number or scans the unique physical identifier at the delivery terminal to trigger the delivery confirmation process. The camera device built into or connected to the signing terminal captures images of the exterior of the goods packaging and the condition of the goods after opening the box, which are used as the goods condition images. The environmental sensors connected to the signing terminal collect real-time temperature and humidity data of the signing site as the final environmental data. Record the timestamp of receipt completion; The waybill number or unique physical identifier, the cargo status image, the final environmental data, and the signature completion timestamp are combined to generate a signature confirmation data package; The receipt confirmation data packet is hashed to obtain a digital digest of the receipt data, and the recipient's private key is used to sign the digital digest to generate the termination record.
[0012] Further, the termination record is uploaded to the decentralized blockchain network. After verifying the integrity of the cargo unit traceability chain, the decentralized blockchain network encapsulates the termination record into the end block of the traceability chain, including: The decentralized blockchain network receives the termination record and uses the recipient's public key to verify the validity of its digital signature; After verification, the waybill number or unique physical identifier is extracted from the termination record, and the corresponding complete traceability chain is retrieved accordingly. Starting from the genesis block, the hash linking relationship of each block on the complete traceability chain is verified sequentially to ensure that the chain has not been tampered with; Calculate the continuity of temperature values in all environmental monitoring data from the genesis block to the latest node block to ensure that there are no breaks in the chain or missing data throughout the process; After the integrity check passes, the termination record will be treated as a block body of a special termination block; The block header of the termination block is set to the hash value of the last node block on the tracing chain, and the block type of the termination block is marked as "termination". The termination block is added to the blockchain through a consensus process, and the traceability chain status of the cargo unit is updated to "completed".
[0013] Furthermore, the present invention also includes a blockchain-based cold chain logistics cargo traceability system, the system including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements the steps of the blockchain-based cold chain logistics cargo traceability method described above.
[0014] Compared with the prior art, the beneficial effects of the present invention are: When a cargo unit is loaded into a cold chain transport carrier, its unique physical identifier is activated and initial state information is collected. An initialization data packet is generated and uploaded to a decentralized blockchain network for verification, then encapsulated as the genesis block of the traceability chain. The activation of the physical identifier assigns the cargo unit a unique digital identity. The initial state information and the identifier are bound together in the data packet. Blockchain network verification ensures that the initial data has not been tampered with. As the first immutable block of the traceability chain, the genesis block provides the traceability starting point with dual anchoring of physical entity and data. This differs from conventional centralized systems that only register virtual information, which is easily tampered with and lacks a unique starting point, thus improving traceability credibility from the source.
[0015] At pre-set monitoring nodes in cold chain transportation, fixed or mobile sensors simultaneously read unique physical identifiers and collect environmental data, binding the two to generate node traceability records. After being uploaded to the blockchain network, these records are verified and linked with historical records to form a new block. Upon arrival of goods, final state confirmation is triggered, collecting status images and final environmental data to generate a termination record. After verification of integrity, this record is uploaded and encapsulated as an end block. Simultaneous data collection and binding ensure that each piece of environmental data accurately corresponds to a specific cargo unit, avoiding the misalignment risks of conventional phased data collection. The blockchain verification link forcibly verifies the consistency of physical identifiers and the continuity of timestamps, forming an inseparable chain between the new block and historical records. The final state record provides closed-loop confirmation of the entire process, unlike conventional traceability systems that do not bind all nodes or perform dynamic verification. This achieves a strong correlation and tamper-proof evidence storage between all stages of data and the cargo. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of the blockchain-based cold chain logistics cargo traceability method described in this invention. Figure 2 A flowchart for generating the genesis block; Figure 3 A flowchart for the encapsulation and consensus of the genesis block. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 When a cargo unit is loaded into a cold chain transport carrier, its unique physical identifier is immediately activated and initial state information is collected. An initialization data packet is generated and uploaded to a decentralized blockchain network for verification, then encapsulated as the genesis block of the cargo unit's traceability chain. At each pre-set monitoring node in the cold chain transport, the unique physical identifier is read using fixed or mobile sensors, and environmental monitoring data at that node is collected simultaneously. The environmental monitoring data of the current pre-set monitoring node is bound to the currently read unique physical identifier, generating a node traceability record. This node traceability record is sent to the decentralized blockchain network, which verifies and links the node traceability record with the historical records of the cargo unit stored on the chain, forming a new block added to the cargo unit's traceability chain. When the cargo unit arrives at its destination and is signed for, a final state confirmation operation is triggered, collecting the cargo status image and final environmental data at the time of signing, generating a termination record. The termination record is uploaded to a decentralized blockchain network. After the network verifies the integrity of the cargo unit traceability chain, it encapsulates the termination record as the end block of the traceability chain, thereby completing the full-process blockchain traceability and evidence storage for the corresponding batch of goods.
[0019] See Figure 2 In one embodiment of the present invention, when a cargo unit is packaged and loaded into a cold chain transport carrier, the system activates a unique physical identifier attached to the cargo unit. In a specific implementation, the unique physical identifier can be a high-strength radio frequency identification (RFID) tag, whose embedded chip stores a globally unique identification number. The RFID tag is affixed to a designated location on the packaging box when the cargo unit is packaged. The loading operator activates the RFID tag by touching it with a dedicated handheld activation terminal. The handheld activation terminal writes the initial state of "activated" to the chip of the RFID tag and binds the unique identification number of the RFID tag to the current waybill.
[0020] In specific implementation, the system collects the initial state information of the cargo unit when it is loaded. In some embodiments, the cargo unit is an insulated box containing fresh salmon. When the insulated box is loaded into the refrigerated truck compartment, the operator enters the cargo type as "fresh salmon" and the cargo weight as "25.5 kg" through a handheld data acquisition terminal. At the same time, the insertion temperature probe connected to the handheld data acquisition terminal measures the initial temperature inside the insulated box as "minus 2 degrees Celsius". The camera built into the handheld data acquisition terminal takes an image of the packaging integrity after the insulated box is sealed. The packaging integrity image can clearly show the state of the sealing tape and whether the box is damaged. The system automatically records the loading time as "June 15, 2025, 10:30:00".
[0021] In practice, the system generates an initialization data packet containing a unique physical identifier and initial state information. This initialization data packet is a structured data file conforming to a predefined protocol format, containing multiple fields. For example, the identifier field records the unique identification number of the RFID tag; the cargo type field records "fresh salmon"; the weight field records "25.5"; the temperature field records "-2"; the image field stores the binary data of the packaging integrity image or the hash value of that image; and the timestamp field records "2025-06-15 10:30:00". The system digitally signs the initialization data packet. The digital signing process involves encrypting the entire content of the initialization data packet using the private key of the loading point operator, generating a digest ciphertext. This digest ciphertext, together with the initialization data packet, constitutes the complete data to be uploaded.
[0022] In practice, the system uploads a digitally signed initialization data packet to a decentralized blockchain network. For example, a handheld data collection terminal sends a data stream containing the digital signature and initialization data packet to the blockchain network's access gateway via a mobile communication network. The decentralized blockchain network verifies the validity of the digital signature. The verification process involves decrypting the digest ciphertext using the operator's public key to obtain the original digest, and simultaneously calculating the hash value of the uploaded initialization data packet. The two are compared to confirm the data's integrity and credible origin. After successful verification, the blockchain network encapsulates the initialization data packet into a genesis block, which serves as the starting point of the traceability chain for this batch of chilled salmon goods. The genesis block header contains the hash value pointing to the previous block in the chain; since this is the starting point of the chain, this value is typically set to a specific initial value. The block body contains the complete initialization data packet. After the encapsulation process is complete, the blockchain network returns a transaction receipt containing the block height and hash value of the genesis block, serving as on-chain proof of the start of the traceability for this batch of goods.
[0023] In some embodiments, the initial state information also includes gas composition data inside the packaging, applicable to goods requiring specific packaging atmosphere. For example, when packaging boxes of fresh fruits and vegetables, the operator uses a miniature gas sensor connected to a handheld data acquisition terminal to collect oxygen and carbon dioxide concentrations inside the box. These concentrations, along with the weight of the goods and the initial temperature, are recorded in the initialization data packet. The digital signature algorithm for the initialization data packet employs an elliptic curve digital signature algorithm to ensure the efficiency and security of the signing process. The decentralized blockchain network is a permissioned blockchain network, where verification nodes are jointly operated and maintained by all parties involved in the cold chain logistics business, such as manufacturers, logistics carriers, warehousing providers, and retailers. The consensus mechanism of the permissioned blockchain network uses a practical Byzantine fault-tolerant algorithm to achieve rapid block generation and verification. During the generation of the initialization data packet, if numerical fields such as the weight of the goods and the initial temperature exceed a preset safety threshold, the handheld data acquisition terminal will issue a local warning, but will not interrupt the data generation and upload process. Data exceeding the threshold will be marked and uploaded normally, and processed or alerted by smart contracts on the blockchain in subsequent stages. Activating the unique physical identifier and collecting initial status information are consecutive steps that are closely linked in time, without inserting any other unnecessary business processes in between, to ensure the timeliness of data collection and the accuracy of the initial status.
[0024] See Figure 3 In one embodiment of the present invention, consensus nodes in a decentralized blockchain network receive an initialization data packet that has been digitally signed. In a specific implementation, the initialization data packet is uploaded to the blockchain network from the cold chain logistics provider's system via an application programming interface (API). Multiple consensus nodes in the network, such as server nodes belonging to logistics companies, manufacturers, and third-party auditing institutions, simultaneously receive this initialization data packet transmission request containing the digital signature. The consensus nodes parse the received data packet, separating the digital signature portion from the plaintext content of the initialization data packet, preparing for subsequent verification operations.
[0025] In a decentralized blockchain network, consensus nodes use the public key corresponding to the signing private key to decrypt and verify the digital signature of the initialization data packet, confirming the legitimacy of the data source and the integrity of the data. In some embodiments, the signing private key is an encryption key held by the cargo loading point operator, and the corresponding operator's public key has been pre-registered and filed in the blockchain network. The consensus node queries the operator's registered public key from the blockchain's permission management contract, uses this operator's public key to decrypt the digital signature portion, and obtains a decrypted digest value, denoted as H. decryptedMeanwhile, consensus nodes use the same hash function, such as SHA-256, to calculate a new hash value, denoted as H, on the plaintext content of the received initialization data packet. calculated The consensus nodes compare the decrypted digest H. decrypted The calculated hash value H calculated Are they completely identical? Formula H decrypted =H calculated This indicates that the verification passed, where H decrypted H represents the digest of the original message obtained after decrypting the digital signature using the operator's public key. calculated This represents the hash value calculated in real time by the consensus node based on the plaintext content of the received initialization data packet. The consistency check confirms that the initialization data packet has not been tampered with since it was signed by the loading point operator, and that it was indeed sent by the operator holding the corresponding signing private key.
[0026] After successful verification, the consensus node initializes key fields in the data packet, including the unique physical identifier and initial state information, and performs a hash operation to generate a unique data fingerprint for the initialized data packet. In practice, key fields refer to the core data items extracted from the initialized data packet that uniquely identify this cargo loading event. For example, the unique physical identifier field might be "RFID_7B3A9F01," and the initial state information might include cargo type "strawberry," weight "18.0kg," temperature "1.5°C," and loading time "2025-12-10 14:20:00." The consensus node concatenates these string representations into a long string according to a predefined order and separators. A hash operation is then performed on this concatenated string, for example, using the Keccak-256 algorithm. The resulting 256-bit hash value "0x5a2f…c89d" serves as the unique data fingerprint of the initialized data packet. This unique data fingerprint represents a digital digest of the core content of the initialized data packet.
[0027] Consensus nodes package a unique data fingerprint along with the hash of the previous block and the current timestamp to form the block header of the new block. It's understandable that since the current block being created is the genesis block of the tracing chain, there is no previous real block. When constructing the genesis block header, the "hash of the previous block" field is filled with a predefined genesis hash, such as a string of all zeros or a specific system constant. The current timestamp is the moment the consensus node's system clock recorded the receipt and successful verification of the initialization packet; the timestamp format is a Unix timestamp. The block header typically contains fields such as: version number, hash of the previous block, Merkle root, timestamp, difficulty target (if applicable), and random number. In this implementation, the unique data fingerprint is used to construct the Merkle root or directly as a commitment to the block body content.
[0028] In one embodiment of the invention, fixed readers are deployed at the loading and unloading points of cold chain warehouses, inside the cargo compartments of transport vehicles, and at the entrances and exits of transfer stations as fixed, pre-defined monitoring nodes. In specific implementations, the fixed reader is an industrial-grade device integrating an ultra-high frequency radio frequency identification (UHF) reading module and an environmental sensing module. The fixed reader connects to a local network via Ethernet or an industrial bus and is continuously powered. For example, at the loading and unloading points of large cold chain distribution centers, the fixed reader is installed above the door frame, with its RFID antenna covering the entire doorway area. Inside the cargo compartment of refrigerated transport vehicles, the fixed reader is installed on the compartment wall, and its connected temperature sensor probes, humidity sensor probes, and vibration sensors are arranged at multiple representative locations within the cargo compartment. Similar fixed readers are also installed at the entrances and exits of transfer stations, forming a fixed monitoring network for the flow of goods. The location information of the fixed reader, including its geographical coordinates and device number, is pre-registered in the system and associated with the monitoring node type "fixed".
[0029] Handheld reading and writing terminals are provided to inspection personnel during the transportation process, serving as mobile pre-set monitoring nodes. The handheld reading and writing terminal is a portable device equipped with RFID reading capabilities, an integrated environmental sensor module, a display screen, and a wireless communication unit. Inspection personnel carry the handheld reading and writing terminal while performing inspection tasks. In some embodiments, the handheld reading and writing terminal is equipped with a gun-type trigger button; when the inspection personnel press the button, the handheld reading and writing terminal activates the RFID reading module. In other embodiments, the handheld reading and writing terminal supports periodic automatic scanning. The location of the mobile pre-set monitoring node is acquired in real time by the GPS module built into the handheld reading and writing terminal, and the node type is marked as "mobile".
[0030] When a cargo unit passes through a fixed, pre-set monitoring node, a deployed fixed reader automatically scans and identifies the unique physical identifier on the cargo unit. For example, when a forklift carrying vaccine boxes drives past the platform door of a cold storage exit, the fixed reader above the door frame continuously emits radio frequency signals. The RFID tag affixed to the vaccine box is activated when it enters the electromagnetic field range of the reader's antenna. The RFID tag then backscatters its stored unique identifier, "EPC_12345678," back to the fixed reader. The fixed reader successfully receives the unique identifier from the RFID tag, and this identifier is recorded as the target identifier for this reading event.
[0031] When performing manual inspections or random checks, inspectors actively scan the unique physical identifier (PID) on each cargo unit using a handheld reader / writer. During transport, inspectors open the refrigerated truck door and enter the cargo hold, using the handheld reader / writer to randomly inspect the stacked goods. When an inspector brings the handheld reader / writer close to a cargo box labeled "Biosample - Number SMP-20250327-015," the reader / writer reads the unique PID "TID_89ABCDEF" stored in the RFID tag on the cargo box. This reading action is manually triggered by the inspector, and the handheld reader / writer's display immediately shows the successfully read identifier.
[0032] After successfully reading the unique physical identifier code, the fixed reader or handheld reader immediately triggers the integrated environmental sensor array to collect environmental monitoring data for the current node. In practice, the triggering logic is automatically executed. Once the RFID reading module successfully decodes the valid unique physical identifier code, the main control unit immediately sends a data acquisition command to the integrated sensor array. The environmental monitoring data includes the geographical location of the current preset monitoring node, the collection timestamp, and the real-time temperature, humidity, and vibration amplitude within the cargo warehouse. For example, at the moment the fixed reader at the platform door reads the identifier code "EPC_12345678", its integrated GPS module provides the geographical location "N39.9042,E116.4074", the system clock generates the collection timestamp "2025-08-19 15:30:25.500", the temperature sensor reading is "2.1°C", the humidity sensor reading is "65%RH", and the triaxial accelerometer records a peak vibration amplitude of "0.15g" in the most recent second. For handheld reader / writer terminals, the collected geographic location is the coordinates obtained by the terminal's built-in GPS module at the moment of triggering, while environmental data comes from miniature sensors built into the terminal. In some embodiments, the handheld reader / writer terminal also integrates a light sensor to collect ambient light intensity while reading the identification code; this light intensity data is also recorded as part of the environmental monitoring data. This "read-as-you-go" mechanism ensures a strong temporal and spatial correlation between environmental data and cargo identification, preventing data asynchrony.
[0033] In one embodiment of the present invention, a decentralized blockchain network receives node traceability records and parses out a unique physical identifier from these records. In a specific implementation, the node traceability record is encapsulated in a transaction request and sent to multiple consensus nodes in the blockchain network via peer-to-peer network broadcast or a gateway interface. Upon receiving the transaction data, the consensus nodes first perform basic verification on the attached digital signature to confirm the validity of the transaction request format. The consensus nodes then decode the serialized node traceability record byte stream, for example, by parsing a JSON string, locate the "identifier" field in the parsed data structure, and extract the string stored in that field. The extracted string, such as "EPC_ABC12345", is the unique physical identifier for the goods corresponding to the current node traceability record.
[0034] The system uses the parsed unique physical identifier to query and locate the traceability chain corresponding to the goods unit on the blockchain, and obtains the hash value of the latest block on the traceability chain. In practice, the blockchain network maintains a global on-chain index. The index structure uses the unique physical identifier of the goods as the key and stores the genesis block hash and the latest block hash of the corresponding traceability chain. Consensus nodes use the parsed unique physical identifier "EPC_ABC12345" to query this global index and obtain the hash value of the latest block associated with that identifier, for example, "0x4f8e…b9a2". The consensus node then obtains the complete data of this latest block from its local blockchain database or by querying peer nodes, confirms its validity, and extracts the block body and block header information. The hash value of this latest block, "0x4f8e…b9a2", will serve as the parent hash for linking to new blocks.
[0035] The system calculates the hash value of the node tracing record and combines it with the hash value of the latest obtained block to generate the block header data of a new candidate block. Consensus nodes perform hash operations on the parsed and verified node tracing record data body. For example, calculating the SHA-256 hash of the serialized node tracing record byte stream yields a 256-bit hash value R. h That is: R h =SHA256(R)
[0036] Where R represents the serialized node tracing record byte stream. The block header data contains several fields, including: the parent block hash field, whose value is the latest obtained block hash value "0x4f8e…b9a2"; and the Merkle root field, which, since there is only one node tracing record transaction at present, has R as its Merkle root. h The block header consists of the block itself; a timestamp field recording the time the current block was generated; a difficulty target field; and a random number field. The block header data forms the skeleton of the new block.
[0037] The system verifies the logical continuity of environmental monitoring data in the node traceability records. It retrieves the latest node traceability record from the decentralized blockchain network, extracts its timestamp as the previous node's timestamp, and extracts its real-time temperature as the previous node's temperature. The consensus node parses the node traceability record encapsulated in the latest block body. It extracts the values of the "timestamp" and "temperature_celsius" subfields from the environmental data fields of this record. For example, it extracts the previous node's timestamp as "2025-11-05T08:15:30Z" and the previous node's temperature as "5.2°C". In practice, if multiple historical node records exist on the traceability chain, the latest node record refers to the most recent valid record on the chain before the node to be added.
[0038] The system calculates the time difference between the current timestamp and the previous node's timestamp, determining if the time difference is greater than zero and less than the preset maximum allowable transport interval. The time difference ΔT is calculated by converting the timestamp string to a Unix timestamp and then subtracting the result. For example, if the current timestamp is converted to "1730794815" and the previous node's timestamp is converted to "1730787330", then ΔT = 1730794815 - 1730787330 = 7485 seconds. The system has a preset maximum allowable transport interval M, which is set according to the transport method and cargo type. For urban cold chain delivery, M might be set to 7200 seconds (2 hours); for long-distance trunk transport, M might be set to 21600 seconds (6 hours). Logical continuity verification requires 0 < ΔT. <M。
[0039] The system calculates the absolute difference between the current real-time temperature and the temperature of the previous node to obtain the temperature change. The formula for calculating the temperature change ΔC is: ΔC = |C| current -C previous │
[0040] Where: C current Represents the current real-time temperature, C previous This represents the temperature of the previous node. Substituting the example data, ΔC = |6.8 - 5.2| = 1.6℃. The temperature change ΔC reflects the absolute value of the temperature fluctuation from the previous monitoring point to the current monitoring point.
[0041] The system queries the preset reasonable temperature threshold range corresponding to the type of goods belonging to the cargo unit, and determines whether the temperature change is within the reasonable temperature threshold range. The correspondence between cargo types and reasonable temperature threshold ranges is pre-configured in the smart contract of the blockchain network or an off-chain database. The consensus node uses the unique physical identifier "EPC_ABC12345" to look up the cargo file and determine that its cargo type is "fresh dairy products". The system then queries the preset rules to obtain the reasonable temperature threshold range for "fresh dairy products" as [T]. lower T upper For example, setting the reasonable temperature threshold range as [0.0℃, 2.0℃] indicates that the maximum allowable temperature fluctuation is 2.0°C. The judgment condition is ΔC≤T. upper In the example, ΔC = 1.6℃, T upper =2.0℃, since 1.6 is less than or equal to 2.0, the condition is met. It can be understood that the reasonable temperature threshold range can be a static value or a dynamic range calculated based on factors such as the initial temperature and transportation time. Refer to Table 1, which demonstrates examples of preset temperature thresholds for different types of goods.
[0042] Table 1: Examples of Reasonable Temperature Threshold Ranges for Different Types of Goods
[0043] If both the time difference and temperature change meet the conditions, the logical continuity check is considered successful. In the example above, the time difference of 7485 seconds is greater than 0 and less than the preset 14400 seconds, and the temperature change of 1.6°C is less than or equal to the maximum allowed value of 2.0°C, therefore the logical continuity check is successful. Otherwise, a continuity anomaly warning is generated, and the continuity anomaly warning is packaged together with the node traceability record into a new block. In some embodiments, if the time difference ΔT is zero or negative, indicating that the current record time is not later than the previous record, the system will generate a "timestamp anomaly" warning. If ΔT is greater than M, the system generates a "transportation interval timeout" warning. If ΔC is greater than T... upper The system generates a "temperature fluctuation exceeds limit" warning. These warning messages, along with the original node traceability record, will be included in an extended field of the node traceability record data structure to be uploaded to the chain, or recorded as a smart contract event log. It's understandable that generating a warning does not necessarily prevent block generation, but it will leave an audit trail on the chain.
[0044] In one embodiment of the invention, the recipient enters the waybill number or scans the unique physical identifier code at the receiving terminal to trigger the signing process. In specific implementations, the signing terminal is a mobile smart terminal or a fixed workstation computer with a dedicated receiving application installed, such as a tablet computer used by receiving staff in a hospital pharmacy. The receiving staff manually enters the waybill number "LOG202503280015" for this delivery into the application interface, or uses the tablet's rear camera to scan the QR code affixed to the outer packaging of the goods. The QR code encodes the unique physical identifier code of the goods, "UID_FFEEDDCC". After the application parses the input information, it initiates a query to the backend system. The backend system confirms that the waybill status is "in transit" and that it is about to arrive at the current receiving point. Subsequently, the summary information of the waybill is loaded onto the signing terminal interface and enters the pending signing state, formally triggering the electronic signing process.
[0045] The receiving terminal uses a built-in or connected camera to capture images of the package's exterior and the condition of the goods after opening, serving as the cargo status image. Following the application's instructions, the receiver uses the tablet's camera to photograph the delivered insulated box. The photographs must include complete images of all six exterior surfaces of the box to check for shipping wear; for example, a frontal image should clearly show slight dents but no cracks. In some embodiments, for high-value or fragile goods, the application prompts for an unpacking inspection. The receiver opens the box and uses the camera to photograph the arrangement of the goods inside, the melting of ice packs, and the appearance of the test kits. These unpacked images are also captured as part of the cargo status image. All images are immediately cached locally after being captured, with a timestamp added at the time of capture.
[0046] Environmental sensors connected to the delivery terminal collect real-time temperature and humidity data of the delivery site, serving as the final environmental data. The delivery terminal connects via Bluetooth to a calibrated miniature temperature and humidity recorder, placed at a representative location within the delivery site. After capturing images of the goods, the application automatically reads the current data from the connected recorder, for example, a real-time temperature of "19.8°C" and a real-time humidity of "45%RH". This data is labeled "final environmental data" to record the parameters of the external environment in which the goods were located at the time of delivery. In essence, the final environmental data reflects the climatic conditions at the transition point from the transportation environment to the recipient's storage environment.
[0047] The system hashes the delivery confirmation data packet to obtain a digital digest of the data. The recipient then signs the digital digest with their private key to generate a termination record. The system performs a cryptographic hash operation on the JSON string of the delivery confirmation data packet, for example, using the SHA3-512 algorithm. The hash operation process is represented as: D = H(P). Where: D represents the calculated 512-bit digital digest, H represents the SHA3-512 hash function, and P represents the original byte sequence of the receipt confirmation data packet. The hospital pharmacy's private key is securely stored in the secure element or connected hardware token of the receipt terminal. The application uses this private key to perform a signature operation on the digital digest D, generating a digital signature S. The termination record ultimately contains three core parts: the original receipt confirmation data packet P, the calculated digital digest D, and the signature S generated using the recipient's private key. In some embodiments, to reduce the amount of data on-chain, the termination record only contains the digital digest D and the signature S, while the original receipt confirmation data packet P is stored off-chain in a distributed file system, and the hash value of its storage address is included within the calculation range of the digest D.
[0048] Starting with the genesis block, the hash linking relationships of each block on the complete traceability chain are verified sequentially. The consensus node reads the block header of the genesis block and obtains its block hash, Hash0. It then reads the block header of the next block (block 1) and checks if the "parent hash" field stored in block 1 is equal to Hash0. If they are equal, the overall hash of block 1 is calculated to obtain Hash1. Next, block 2 is read, and its "parent hash" is checked against Hash1, and so on, until the latest node block is verified. This process ensures that no block in the chain is replaced or tampered with, because any modification to historical block data will cause its hash value to change, thus breaking the linking relationship with subsequent blocks. The continuity of temperature values in all environmental monitoring data from the genesis block to the latest node block is calculated. The system sequentially traverses each node block containing environmental monitoring data on the complete traceability chain, extracting the timestamp and temperature value sequence from each node's record. After the integrity verification passes, the terminating record is used as the block body of a special terminating block. After verifying that the hash link relationship and temperature data continuity were both correct, the system determined that the integrity of the complete traceability chain met the requirements. Subsequently, the termination record was directly used as the block body content of the soon-to-be-generated termination block. This block body differs structurally from the node block bodies that previously recorded the transportation process; it primarily carries the receipt confirmation information.
[0049] The termination block's header points to the hash value of the last node block on the traceability chain, and its block type is marked as "Terminated." In the termination block's header, the "Parent Hash" field is set to the hash value of the last (i.e., latest) node block recording the transportation process on the traceability chain. The termination block is added to the blockchain through a consensus process, updating the traceability chain status of the cargo unit to "Completed." Consensus nodes broadcast the assembled termination block to the network for verification and confirmation via the network's consensus mechanism. Other nodes repeat the above verification steps, including signature verification and chain integrity verification. After consensus is reached, all nodes connect the termination blockchain to the end of the corresponding traceability chain.
[0050] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A blockchain-based cold chain logistics goods traceability method, characterized in that, include: When a cargo unit is loaded into a cold chain transport carrier, its unique physical identifier is activated and initial status information is collected. An initialization data packet is generated, uploaded to a decentralized blockchain network for verification, and then encapsulated as the genesis block of the cargo unit traceability chain. At each pre-set monitoring node in the cold chain transportation, the unique physical identifier code is read by fixed or mobile sensing devices. At the same time as reading the unique physical identifier code, environmental monitoring data at the pre-set monitoring node is collected. The environmental monitoring data includes the geographical location of the current preset monitoring node, the collection timestamp, the real-time temperature, humidity, and vibration amplitude inside the warehouse; The environmental monitoring data of the current preset monitoring node is bound with the unique physical identifier read by the current preset monitoring node to generate a node tracing record; The node traceability record is sent to the decentralized blockchain network, which verifies and links the node traceability record with the historical records of the goods unit stored on the chain, forming a new block added to the traceability chain of the goods unit. When the cargo unit arrives at its destination and is signed for, a final state confirmation operation is triggered, which collects the cargo status image and final environmental data at the time of signing and generates a termination record. The termination record is uploaded to the decentralized blockchain network. After verifying the integrity of the cargo unit traceability chain, the decentralized blockchain network encapsulates the termination record as the end block of the traceability chain, thus completing the full-process blockchain traceability and evidence storage for the corresponding batch of goods.
2. The blockchain-based cold chain logistics cargo traceability method as described in claim 1, characterized in that, The process of activating its unique physical identifier and collecting initial state information, generating an initialization data packet, uploading it to a decentralized blockchain network for verification, and then encapsulating it into the genesis block of the goods unit traceability chain includes: When a cargo unit is packaged and loaded into a cold chain transport carrier, a unique physical identifier code attached to the cargo unit is activated. The initial state information of the cargo unit during loading is collected, including the type of cargo, weight, initial temperature, packaging integrity image, and loading time. Generate an initialization data packet containing the unique physical identifier and the initial state information, and digitally sign the initialization data packet; The digitally signed initialization data packet is uploaded to a decentralized blockchain network. After the decentralized blockchain network verifies the validity of the digital signature, the initialization data packet is encapsulated into a genesis block, which serves as the starting point of the goods unit traceability chain.
3. The blockchain-based cold chain logistics cargo traceability method as described in claim 2, characterized in that, The process of uploading the digitally signed initialization data packet to a decentralized blockchain network, verifying the validity of the digital signature, and then encapsulating the initialization data packet into a genesis block includes: The consensus nodes in the decentralized blockchain network receive the digitally signed initialization data packet; The consensus node uses the public key corresponding to the signing private key to decrypt and verify the digital signature of the initialization data packet, confirming the legality of the data source and the integrity of the data; After successful verification, the consensus node performs a hash operation on the key fields in the initialization data packet, including the unique physical identifier and the initial state information, to generate a unique data fingerprint of the initialization data packet. The unique data fingerprint is packaged with the hash value of the previous block and the current timestamp to form the block header of the new block; The complete initialization data packet is used as the block body and assembled together with the block header to form the genesis block; The genesis block is agreed upon through a consensus algorithm in the decentralized blockchain network and then appended to the traceability chain dedicated to the goods unit.
4. The blockchain-based cold chain logistics cargo traceability method as described in claim 1, characterized in that, At each pre-set monitoring node in the cold chain transportation, the unique physical identifier is read using fixed or mobile sensing devices, including: Fixed readers are deployed at the loading and unloading points of cold chain warehouses, inside the cargo compartments of transport vehicles, and at the entrances and exits of transfer stations as fixed, pre-set monitoring nodes. Handheld reading and writing terminals are provided to inspection personnel in the transportation process as mobile pre-set monitoring nodes; When a cargo unit passes through the fixed preset monitoring node, the deployed fixed reader automatically scans and identifies the unique physical identifier code on the cargo unit. When performing manual inspections or random checks, the inspection personnel shall actively scan the unique physical identification code on the cargo unit using a handheld reading and writing terminal; After successfully reading the unique physical identifier, the fixed reader or handheld reader immediately triggers the integrated environmental sensor group to collect the environmental monitoring data of the current node.
5. The blockchain-based cold chain logistics cargo traceability method as described in claim 4, characterized in that, The step of binding the environmental monitoring data of the current preset monitoring node with the unique physical identifier read by the current preset monitoring node to generate a node tracing record includes: Create a structured data object, which includes an identifier field, an environment data field, and a node metadata field; Fill the original string of the read unique physical identifier into the identifier field; The collected environmental monitoring data, including geographic location coordinates, collection timestamp, real-time temperature, humidity and vibration amplitude, are formatted and then filled into the environmental data field. Fill the device number and node type information of the current monitoring node into the node metadata field; The complete data object containing all fields is serialized to generate a node tracing record in a standard format; The serialized node tracing record is digitally signed using the private key of the current monitoring node device to ensure the immutability and source credibility of the record.
6. The blockchain-based cold chain logistics cargo traceability method as described in claim 5, characterized in that, The node traceability record is sent to the decentralized blockchain network, which verifies and links the node traceability record with the historical records of the goods unit stored on the chain, including: The decentralized blockchain network receives the node traceability records and parses the unique physical identifier from the node traceability records; Based on the parsed unique physical identifier, the traceability chain corresponding to the cargo unit is queried and located on the blockchain, and the hash value of the latest block on the traceability chain is obtained. Calculate the hash value of the node tracing record and combine it with the hash value of the latest block obtained to generate the block header data of the new candidate block; Verify the logical continuity of environmental monitoring data in the node traceability record, including checking whether the timestamp is later than the timestamp of the previous node record, and whether the temperature change exceeds the preset reasonable threshold range; After the verification is passed, the node traceability record is used as the block body and packaged together with the block header data of the new candidate block to form a new block to be confirmed. The new block to be confirmed is broadcast to the decentralized blockchain network through a consensus mechanism. After other nodes verify that it is correct, it is linked to the end of the cargo unit traceability chain.
7. The blockchain-based cold chain logistics cargo traceability method as described in claim 6, characterized in that, Verifying the logical continuity of environmental monitoring data in the node traceability record includes checking whether the timestamp is later than the timestamp of the previous node record, and whether the temperature change exceeds a preset reasonable threshold range, including: Obtain the latest traceability record of the cargo unit traceability chain from the decentralized blockchain network, extract the timestamp as the timestamp of the previous node, and extract the real-time temperature as the temperature of the previous node. Extract the current timestamp and current real-time temperature from the current node traceability record to be verified; Calculate the time difference between the current timestamp and the previous node timestamp, and determine whether the time difference is greater than zero and less than the preset maximum allowable transportation interval; Calculate the absolute difference between the current real-time temperature and the temperature of the previous node to obtain the temperature change. Query the preset reasonable temperature threshold range corresponding to the type of goods to which the cargo unit belongs, and determine whether the temperature change is within the reasonable temperature threshold range; If both the time difference and the temperature change meet the conditions, the logical continuity check is deemed to have passed; otherwise, a continuity anomaly warning is generated, and the continuity anomaly warning and the node traceability record are packaged together into a new block.
8. The blockchain-based cold chain logistics cargo traceability method as described in claim 1, characterized in that, When the cargo unit arrives at its destination and is signed for, a final state confirmation operation is triggered, which collects the cargo status image and final environmental data at the time of signing, and generates a termination record, including: The recipient enters the waybill number or scans the unique physical identifier at the delivery terminal to trigger the delivery confirmation process. The camera device built into or connected to the signing terminal captures images of the exterior of the goods packaging and the condition of the goods after opening the box, which are used as the goods condition images. The environmental sensors connected to the signing terminal collect real-time temperature and humidity data of the signing site as the final environmental data. Record the timestamp of receipt completion; The waybill number or unique physical identifier, the cargo status image, the final environmental data, and the signature completion timestamp are combined to generate a signature confirmation data package; The receipt confirmation data packet is hashed to obtain a digital digest of the receipt data, and the recipient's private key is used to sign the digital digest to generate the termination record.
9. The blockchain-based cold chain logistics cargo traceability method as described in claim 8, characterized in that, The termination record is uploaded to the decentralized blockchain network. After verifying the integrity of the cargo unit traceability chain, the decentralized blockchain network encapsulates the termination record into the end block of the traceability chain, including: The decentralized blockchain network receives the termination record and uses the recipient's public key to verify the validity of its digital signature; After verification, the waybill number or unique physical identifier is extracted from the termination record, and the corresponding complete traceability chain is retrieved accordingly. Starting from the genesis block, the hash linking relationship of each block on the complete traceability chain is verified sequentially to ensure that the chain has not been tampered with; Calculate the continuity of temperature values in all environmental monitoring data from the genesis block to the latest node block to ensure that there are no breaks in the chain or missing data throughout the process; After the integrity check passes, the termination record will be treated as a block body of a special termination block; The block header of the termination block is set to the hash value of the last node block on the tracing chain, and the block type of the termination block is marked as "termination". The termination block is added to the blockchain through a consensus process, and the traceability chain status of the cargo unit is updated to "completed".
10. A blockchain-based cold chain logistics cargo traceability system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the blockchain-based cold chain logistics cargo traceability method as described in any one of claims 1 to 9.