Intelligent tracing method for whole process of logistics package
By combining sensor networks and blockchain technology with multidimensional feature mapping and knowledge graphs, the problems of data consistency and anomaly identification in the whole process of logistics parcel traceability are solved, and an efficient and reliable logistics management solution is achieved.
Patent Information
- Application Number
- CN202610382493.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Filing Date
- 2026-03-26
- Publication Date
- 2026-07-17
AI Technical Summary
In existing logistics management technologies, there is a lack of continuous monitoring of the entire process of logistics parcel circulation information, low efficiency in locating abnormal events, difficulty in ensuring data security and consistency, and insufficient ability to integrate multi-source data, resulting in a time-consuming and inaccurate traceability process.
A sensor network is constructed to collect multi-source data. A structured state vector is generated using multi-dimensional feature mapping. A knowledge graph is established and written into the blockchain to achieve end-to-end consistency verification and abnormal state identification. Graph structure encoding and hash linking ensure that the data is tamper-proof. A weighted graph traversal algorithm is used to identify abnormal nodes.
It enables reliable, secure, and rapid traceability of the entire logistics parcel process, with accurate anomaly location, high data integrity and continuity, and supports intelligent decision-making and rapid response.
Smart Images

Figure CN122414970A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics information technology, and in particular to a method for intelligent traceability of the entire logistics parcel process. Background Technology
[0002] In existing logistics management technologies, the tracking of parcel flow information mainly relies on barcode scanning, RFID reading, and manual recording. These methods can only provide discrete node information and lack real-time monitoring of the continuous status of the entire process. Traditional logistics tracking methods are usually based on single-node data and lack unified modeling and effective correlation of the parcel's status evolution, operational behavior, and environmental changes at each stage, making it difficult to form a continuous flow path for the entire parcel. In existing technologies, data storage is mostly concentrated in a central database, with scattered data sources and inconsistent time sequences, resulting in incomplete or erroneous parcel flow paths in subsequent queries or analyses.
[0003] Furthermore, traditional methods rely on manual investigation when handling anomalies, resulting in low efficiency in locating package delays, losses, damage, or abnormal operations, and failing to provide accurate information on the responsible parties. Existing anomaly detection methods are typically based on single indicators or statistical rules, lacking sufficient analytical capabilities for multi-node and multi-dimensional state changes in complex processes. This leads to time-consuming and inaccurate anomaly tracing processes, failing to meet the demands of modern logistics scenarios for rapid response and intelligent decision-making.
[0004] Regarding data security and trustworthiness, existing technologies fail to provide an immutable record of information throughout the entire logistics parcel process. Centralized databases are susceptible to tampering or loss, making it difficult to guarantee the authenticity and verifiability of information throughout the process. In terms of multi-source data fusion, the lack of unified feature mapping and correlation modeling methods makes it difficult to effectively integrate data from different logistics nodes, operational behaviors, and environmental states, affecting the completeness and consistency of traceability results.
[0005] Therefore, how to provide a smart traceability method for the entire process of logistics parcels is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose an intelligent traceability method for the entire process of logistics parcels. This invention fully utilizes sensor networks, multi-source data analysis, knowledge graph construction, and blockchain immutability technology. It describes in detail an intelligent traceability algorithm from data acquisition, state vector generation, knowledge graph modeling, chain data unit generation, blockchain writing, end-to-end consistency verification to abnormal state node identification. It has the advantages of full-process traceability, high data reliability, accurate anomaly location, and fast traceability efficiency.
[0007] The intelligent traceability method for the entire process of logistics parcels according to embodiments of the present invention includes the following steps: S1. Based on the logistics scenario, a sensor network is constructed to synchronously collect the location information, operation information, and environmental status information generated in each stage of logistics parcel collection, sorting, transportation, transfer, and delivery. The collected data is time-aligned, numerically normalized, and bound with identifiers to form a set of time-consistent data units. S2. Perform multi-dimensional feature mapping processing on the data unit set, generate structured state vectors according to the dimensions of logistics nodes, operation behavior and state change, and construct a continuously evolving logistics parcel state sequence based on the state vectors; S3. Construct a process-oriented knowledge graph based on the state sequence of logistics parcels, establish directed relationships between logistics parcel entities, logistics node entities and operation behavior entities, and form a graph structure representation with time constraints and state constraints. S4. Perform graph structure encoding on the entity relationships in the knowledge graph, map each logistics status change to a unique chain data unit, and write it into the blockchain in the order of the status sequence to form an irreversible traceable ledger. S5. Based on the blockchain ledger, perform consistency and integrity checks on the state evolution path of logistics parcels to generate trusted circulation path data corresponding to the logistics parcel identifier; S6. Perform graph structure data analysis and processing on the trusted flow path data, and identify abnormal state nodes and locate the process location where the abnormality occurs based on the association strength and state offset features in the knowledge graph. S7. Output the traceability results of the entire logistics package process. The traceability results include the verified flow path, state evolution sequence, set of associated nodes and abnormal state location identifier.
[0008] Optionally, the synchronous acquisition process specifically includes: A unified time reference is assigned to each logistics node, and timestamps are added to the location information, operation information and environmental status information generated in the sensor network, and sorting is performed according to the timestamp order. For different types of data, fixed dimension mapping rules are set, and interval scaling is performed on numerical data and discrete encoding is performed on state data. A unique identifier is generated for each logistics package. The logistics package identifier is combined with the logistics node identifier and the timestamp and encoded. The combined code is written into the corresponding data record, so that each data record is associated with a unique logistics package and a unique time location, forming a set of data units arranged in chronological order.
[0009] Optionally, S2 specifically includes: S21. Perform multidimensional feature mapping processing on each data record in the data unit set: Extract node identifier codes and spatial location codes according to the logistics node dimension, specifically including: A unified coding rule mapping is performed on the logistics node identifier in each data record to convert the node number into a fixed-length node identifier code. Based on the node's physical coordinate information, the spatial location is subjected to grid-based discretization processing to generate a corresponding spatial location code. This enables the node identifier code and the spatial location code to form a one-to-one logistics node feature combination and write it into the data record. Extract operation type codes and processing order codes according to the job behavior dimension, specifically including: The operation behavior types in each data record are classified and labeled. The behaviors of pickup, sorting, transportation, transfer and delivery are mapped to discrete operation type codes respectively. The processing sequence code is generated according to the internal operation process of the logistics node. The operation type code and the processing sequence code are combined according to the preset bit width to form operation behavior characteristics that can distinguish different behavior stages. Extracting time interval codes and environment state codes according to the state change dimension, specifically including: Time difference calculation is performed on data records corresponding to adjacent timestamps to generate time interval codes that reflect the duration of the state. At the same time, interval division and level mapping processing are performed on the collected environmental state information to convert temperature, humidity and vibration state into discrete environmental state codes. The time interval codes and environmental state codes are then concatenated to construct state change dimension features that reflect changes in the state of logistics packages. S22. Concatenate the codes of each dimension in a preset order to form a fixed-length structured state vector; S23. Perform sequential arrangement processing on the structured state vectors corresponding to consecutive timestamps, and group and associate the structured state vectors according to the logistics package identifier; S24. Link the structured state vectors sequentially according to the time-incrementing relationship to construct a logistics parcel state sequence that reflects the continuous evolution process of logistics parcels among various logistics nodes.
[0010] Optionally, the knowledge graph construction process specifically includes: Based on the status sequence of logistics packages, generate corresponding logistics package entity nodes for each logistics package, encode the logistics node features to generate logistics node entity nodes, and encode the operation behavior features to generate operation behavior entity nodes. Based on the association information of each time step in the logistics parcel status sequence, directed edges are established between the parcel entity and the logistics node entity performing the operation in chronological order. Bidirectional directed edges are established between the operation behavior entity and the corresponding logistics parcel entity and logistics node entity, forming a triplet relationship that reflects the operation execution relationship and the flow order. While constructing directed relationships, time interval encoding is added as edge weight to directed edges to describe the time constraints of event occurrence, and state change feature encoding is added to node attributes to represent the state constraints of logistics packages at each stage. The graph structure storage is optimized by storing nodes and edges in a contiguous memory layout and generating adjacency lists and adjacency matrices to support subsequent graph traversal, anomaly detection, and full-process path reconstruction operations.
[0011] Optionally, the graph structure encoding process specifically includes: Traverse the state vectors in the state sequence of logistics packages, generate a chain of uniquely identified data units for each state change, and combine and encode the logistics package entity identifier, logistics node entity identifier, operation behavior entity identifier, and corresponding timestamp and state change feature code in a fixed format. A hash value is generated for each chained data unit, and the current hash value is linked with the hash value of the previous state to form a chain structure to ensure that the order cannot be tampered with. Specifically, this includes: The logistics parcel entity identifier, logistics node entity identifier, operation behavior entity identifier, timestamp, status change feature code, and graph topology information in the chained data unit are concatenated into a binary string according to a fixed byte order; Perform a hash algorithm on the binary string to calculate the hash value of the current linked data unit; Combine the current hash value with the hash value of the chained data unit from the previous state, and generate a new chained link value by executing the same hash algorithm again; The chain link value is stored in the chain pointer field of the current chain data unit, so that the hash value of each chain data unit depends on the previous unit, forming a continuous chain structure. While generating chain-like data units, graph topology information, including node in-degree, out-degree, and neighbor node indexes, is encoded and appended to the data units to maintain the structural constraints of the knowledge graph. Following the time-incremental sequence of the logistics parcel status, chained data units are written into the blockchain ledger one by one. Each block contains the current chained data unit, the hash of the previous block, a timestamp, and a digital signature, thus completing the construction of an irreversible traceable ledger.
[0012] Optionally, S5 specifically includes: S51. Extract all chain data units of the target logistics package from the blockchain ledger and construct a state evolution sequence based on timestamps and operation order; S52. Perform multi-level hash verification on each chain data unit, calculate the hash value of the state vector inside the chain data unit, combine the hash value with the topological hash between nodes to generate a secondary hash value, and compare it with the secondary hash value stored in the blockchain to achieve joint verification of the dimensional features of state changes and the relationship between nodes. S53. The sliding window algorithm is used to perform pattern consistency analysis on the time interval encoding and operation sequence of the chained data units of adjacent states, and the possible data missing or sequence misalignment is identified by dynamic threshold adjustment. S54. For abnormal time intervals or state shifts, use graph traversal algorithms to backtrack the corresponding logistics nodes and operational entities in the knowledge graph, mark the abnormal node locations, and calculate the abnormal probability score. S55. Recombine all verified chain data units according to time order and topological order to generate trusted flow path data. At the same time, generate a trust index for each node to form a complete trusted path record that can be directly used for intelligent traceability, anomaly location and decision analysis.
[0013] Optionally, the graph structure data analysis and processing process specifically includes: The trusted flow path data is populated into the knowledge graph. For each node, the association strength with the nodes before and after it is calculated. The association strength is calculated by comprehensively considering the similarity of node feature vectors, the matching degree of job behavior, and the consistency of time interval. For each node's state vector, a offset analysis is performed between it and its historical mean state vector, and a state offset score is calculated to reflect the degree of anomaly. A weighted graph traversal algorithm is employed to propagate the association strength and offset score layer by layer along the directed edges from the starting node of the package. A dynamic threshold strategy is used to mark nodes whose offset scores exceed a threshold as abnormal state nodes. Specifically, this includes: Starting from the starting node of the package, perform a breadth-first traversal. When traversing to a node, multiply the cumulative offset score of its parent node by the current edge weight and add it to the offset score of that node. At the same time, update the offset value between the node's state vector and the historical average state vector. During the traversal, a dynamic threshold is calculated in real time for the cumulative offset score of each node. The threshold is dynamically adjusted based on the mean and standard deviation of the offset scores of nodes in the same process path. When the cumulative offset score of a node exceeds the dynamic threshold, the node is marked as an abnormal state node, and the abnormal score, trigger timestamp, and information of all its direct parent nodes are recorded. After an abnormal node is marked, its dependent nodes and corresponding logistics node information are traced back through the reverse graph to determine the specific process location where the abnormality occurred, and an abnormal impact weight and abnormal time window are generated for each abnormal node.
[0014] The beneficial effects of this invention are: First, this invention constructs a sensor network covering the entire process of pickup, sorting, transportation, transfer and delivery, enabling synchronous collection and standardized processing of multi-source data for logistics parcels. By using multi-dimensional feature mapping to structure information on logistics nodes, operational behaviors and status changes, a continuous parcel status sequence is formed, thereby ensuring the integrity and continuity of data throughout the entire logistics parcel process and enabling accurate recording and tracking of the flow path of each parcel.
[0015] Secondly, this invention establishes directed relationships between packages, nodes, and operational entities based on a full-process knowledge graph, and maps each state change to a unique chained data unit written into the blockchain ledger. The graph structure encoding and chained hash links ensure that the data is tamper-proof. At the same time, consistency verification and integrity verification are used to verify the entire process path, thereby providing reliable full-process traceability data, significantly improving data security and reliability, and ensuring that abnormal states can be quickly identified and located.
[0016] Finally, this invention performs graph structure data analysis on trusted flow path data, and uses a weighted graph traversal algorithm to identify abnormal nodes and accurately locate the abnormal process location by combining correlation strength and state offset characteristics. This significantly improves the efficiency of abnormal source tracing, and can generate visualized and quantifiable abnormal impact indicators to achieve intelligent decision support. It provides a technical solution for logistics management that is traceable, reliable, safe and efficient throughout the entire process. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the intelligent traceability method for the entire logistics parcel process proposed in this invention; Figure 2 This is a schematic diagram illustrating the knowledge graph construction and blockchain writing of the intelligent traceability method for the entire logistics parcel process proposed in this invention; Figure 3 This is a flowchart of the abnormal node identification and full-process traceability method for the entire logistics parcel process proposed in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0019] refer to Figures 1-3 The intelligent traceability method for the entire process of logistics parcels includes the following steps: S1. Based on the logistics scenario, a sensor network is constructed to synchronously collect the location information, operation information, and environmental status information generated in each stage of logistics parcel collection, sorting, transportation, transfer, and delivery. The collected data is time-aligned, numerically normalized, and bound with identifiers to form a set of time-consistent data units. S2. Perform multi-dimensional feature mapping processing on the data unit set, generate structured state vectors according to the dimensions of logistics nodes, operation behavior and state change, and construct a continuously evolving logistics parcel state sequence based on the state vectors; S3. Construct a process-oriented knowledge graph based on the state sequence of logistics parcels, establish directed relationships between logistics parcel entities, logistics node entities and operation behavior entities, and form a graph structure representation with time constraints and state constraints. S4. Perform graph structure encoding on the entity relationships in the knowledge graph, map each logistics status change to a unique chain data unit, and write it into the blockchain in the order of the status sequence to form an irreversible traceable ledger. S5. Based on the blockchain ledger, perform consistency and integrity checks on the state evolution path of logistics parcels to generate trusted circulation path data corresponding to the logistics parcel identifier; S6. Perform graph structure data analysis and processing on the trusted flow path data, and identify abnormal state nodes and locate the process location where the abnormality occurs based on the association strength and state offset features in the knowledge graph. S7. Output the traceability results of the entire logistics package process. The traceability results include the verified flow path, state evolution sequence, set of associated nodes and abnormal state location identifier.
[0020] In this embodiment, the synchronous acquisition process specifically includes: A unified time reference is assigned to each logistics node, and timestamps are added to the location information, operation information and environmental status information generated in the sensor network, and sorting is performed according to the timestamp order. For different types of data, fixed dimension mapping rules are set, and interval scaling is performed on numerical data and discrete encoding is performed on state data. A unique identifier is generated for each logistics package. The logistics package identifier is combined with the logistics node identifier and the timestamp and encoded. The combined code is written into the corresponding data record, so that each data record is associated with a unique logistics package and a unique time location, forming a set of data units arranged in chronological order.
[0021] In this embodiment, S2 specifically includes: S21. Perform multidimensional feature mapping processing on each data record in the data unit set: Extract node identifier codes and spatial location codes according to the logistics node dimension, specifically including: A unified coding rule mapping is performed on the logistics node identifier in each data record to convert the node number into a fixed-length node identifier code. Based on the node's physical coordinate information, the spatial location is subjected to grid-based discretization processing to generate a corresponding spatial location code. This enables the node identifier code and the spatial location code to form a one-to-one logistics node feature combination and write it into the data record. Extract operation type codes and processing order codes according to the job behavior dimension, specifically including: The operation behavior types in each data record are classified and labeled. The behaviors of pickup, sorting, transportation, transfer and delivery are mapped to discrete operation type codes respectively. The processing sequence code is generated according to the internal operation process of the logistics node. The operation type code and the processing sequence code are combined according to the preset bit width to form operation behavior characteristics that can distinguish different behavior stages. Extracting time interval codes and environment state codes according to the state change dimension, specifically including: Time difference calculation is performed on data records corresponding to adjacent timestamps to generate time interval codes that reflect the duration of the state. At the same time, interval division and level mapping processing are performed on the collected environmental state information to convert temperature, humidity and vibration state into discrete environmental state codes. The time interval codes and environmental state codes are then concatenated to construct state change dimension features that reflect changes in the state of logistics packages. S22. Concatenate the codes of each dimension in a preset order to form a fixed-length structured state vector; S23. Perform sequential arrangement processing on the structured state vectors corresponding to consecutive timestamps, and group and associate the structured state vectors according to the logistics package identifier; S24. Link the structured state vectors sequentially according to the time-incrementing relationship to construct a logistics parcel state sequence that reflects the continuous evolution process of logistics parcels among various logistics nodes.
[0022] In this embodiment, the knowledge graph construction process specifically includes: Based on the status sequence of logistics packages, generate corresponding logistics package entity nodes for each logistics package, encode the logistics node features to generate logistics node entity nodes, and encode the operation behavior features to generate operation behavior entity nodes. Based on the association information of each time step in the logistics parcel status sequence, directed edges are established between the parcel entity and the logistics node entity performing the operation in chronological order. Bidirectional directed edges are established between the operation behavior entity and the corresponding logistics parcel entity and logistics node entity, forming a triplet relationship that reflects the operation execution relationship and the flow order. While constructing directed relationships, time interval encoding is added as edge weight to directed edges to describe the time constraints of event occurrence, and state change feature encoding is added to node attributes to represent the state constraints of logistics packages at each stage. The graph structure storage is optimized by storing nodes and edges in a contiguous memory layout and generating adjacency lists and adjacency matrices to support subsequent graph traversal, anomaly detection, and full-process path reconstruction operations.
[0023] In this embodiment, the graph structure encoding process specifically includes: Traverse the state vectors in the state sequence of logistics packages, generate a chain of uniquely identified data units for each state change, and combine and encode the logistics package entity identifier, logistics node entity identifier, operation behavior entity identifier, and corresponding timestamp and state change feature code in a fixed format. A hash value is generated for each chained data unit, and the current hash value is linked with the hash value of the previous state to form a chain structure to ensure that the order cannot be tampered with. Specifically, this includes: The logistics parcel entity identifier, logistics node entity identifier, operation behavior entity identifier, timestamp, status change feature code, and graph topology information in the chained data unit are concatenated into a binary string according to a fixed byte order; Perform a hash algorithm on the binary string to calculate the hash value of the current linked data unit; Combine the current hash value with the hash value of the chained data unit from the previous state, and generate a new chained link value by executing the same hash algorithm again; The chain link value is stored in the chain pointer field of the current chain data unit, so that the hash value of each chain data unit depends on the previous unit, forming a continuous chain structure. While generating chain-like data units, graph topology information, including node in-degree, out-degree, and neighbor node indexes, is encoded and appended to the data units to maintain the structural constraints of the knowledge graph. Following the time-incremental sequence of the logistics parcel status, chained data units are written into the blockchain ledger one by one. Each block contains the current chained data unit, the hash of the previous block, a timestamp, and a digital signature, thus completing the construction of an irreversible traceable ledger.
[0024] In this embodiment, S5 specifically includes: S51. Extract all chain data units of the target logistics package from the blockchain ledger and construct a state evolution sequence based on timestamps and operation order; S52. Perform multi-level hash verification on each chain data unit, calculate the hash value of the state vector inside the chain data unit, combine the hash value with the topological hash between nodes to generate a secondary hash value, and compare it with the secondary hash value stored in the blockchain to achieve joint verification of the dimensional features of state changes and the relationship between nodes. S53. A sliding window algorithm is used to perform pattern consistency analysis on the time interval encoding and operation sequence of chained data units in adjacent states. Dynamic threshold adjustment is used to identify potential data gaps or misalignments. Specifically, this includes: The state evolution sequence is divided into fixed-length sliding windows according to timestamps. Each window contains several consecutive state units, and an operation sequence vector and a time interval vector are generated for each window. For each window, perform pattern feature extraction, map the operation sequence vector into a high-dimensional embedding space, calculate the matching degree between the current window and the historical normal windows using cosine similarity, and combine the time interval vector to weight and adjust the similarity to obtain the window consistency score; A dynamic threshold adjustment algorithm is applied to continuous windows to dynamically determine the consistency threshold based on the density of logistics nodes and the complexity of operational behavior. Windows with scores below the threshold are marked as potential abnormal intervals. Adjacent potential anomaly windows are integrated into a continuous anomaly interval by a recursive merging algorithm, and their start and end times, involved nodes and operation behavior sequences are recorded. S54. For abnormal time intervals or state shifts, use graph traversal algorithms to backtrack the corresponding logistics nodes and operational entities in the knowledge graph, mark the abnormal node locations, and calculate the abnormal probability score. S55. Recombine all verified chain data units according to time order and topological order to generate trusted flow path data. At the same time, generate a trust index for each node to form a complete trusted path record that can be directly used for intelligent traceability, anomaly location and decision analysis.
[0025] In this embodiment, the graph structure data analysis and processing process specifically includes: The trusted flow path data is populated into the knowledge graph. For each node, the association strength with the nodes before and after it is calculated. The association strength is calculated by comprehensively considering the similarity of node feature vectors, the matching degree of job behavior, and the consistency of time interval. For each node's state vector, a offset analysis is performed between it and its historical mean state vector, and a state offset score is calculated to reflect the degree of anomaly. A weighted graph traversal algorithm is employed to propagate the association strength and offset score layer by layer along the directed edges from the starting node of the package. A dynamic threshold strategy is used to mark nodes whose offset scores exceed a threshold as abnormal state nodes. Specifically, this includes: Starting from the starting node of the package, perform a breadth-first traversal. When traversing to a node, multiply the cumulative offset score of its parent node by the current edge weight and add it to the offset score of that node. At the same time, update the offset value between the node's state vector and the historical average state vector. During the traversal, a dynamic threshold is calculated in real time for the cumulative offset score of each node. The threshold is dynamically adjusted based on the mean and standard deviation of the offset scores of nodes in the same process path. When the cumulative offset score of a node exceeds the dynamic threshold, the node is marked as an abnormal state node, and the abnormal score, trigger timestamp, and information of all its direct parent nodes are recorded. After an abnormal node is marked, its dependent nodes and corresponding logistics node information are traced back through the reverse graph to determine the specific process location where the abnormality occurred, and an abnormal impact weight and abnormal time window are generated for each abnormal node. Example 1:
[0026] To verify the feasibility of this invention in practice, it was applied to a full-process parcel management scenario in a logistics distribution center. In this scenario, logistics parcels, starting from pickup, pass through a sorting center, transportation, and transfer nodes before finally arriving at the delivery stage. Each stage involves a large amount of parcel flow, operational behavior, and environmental status information. In existing technologies, this information is scattered across different nodes, resulting in inconsistent data and incomplete flow paths, making it difficult to quickly locate the responsible node when parcel delays, losses, or abnormal events occur. To solve this problem, this invention deploys a sensor network in the logistics process to synchronously collect data on parcel location, operational status, environmental temperature and humidity, transportation status, and operational behavior at each logistics node. A standardized set of data units is generated using a unified time reference and identifier binding, ensuring that each data point has a complete temporal sequence and a unique parcel identifier.
[0027] After data collection, this invention performs multi-dimensional feature mapping on the data units, generating structured state vectors from logistics node identifiers, spatial location codes, operation behavior types, operation sequences, state change time intervals, and environmental state codes, thus constructing a continuous parcel state sequence. Subsequently, based on the state sequence, a knowledge graph of the entire logistics parcel process is constructed, mapping parcels, logistics nodes, and operation behaviors to entity nodes and establishing directed associations. Time intervals and state change feature codes are appended to node attributes to ensure the integrity of process constraints and state constraints.
[0028] After the knowledge graph is constructed, this invention maps each state change to a chain of data units, generates a unique hash value, links it to the hash of the previous state, and writes it into the blockchain ledger, ensuring that each state record is immutable and its order is traceable. Based on the blockchain ledger, this invention performs consistency and integrity checks on the entire package flow path, uses multi-level hash checks and sliding window offset analysis to identify missing data or order anomalies, and generates trusted flow path data. Based on the trusted flow path, a weighted graph traversal algorithm is used to calculate the association strength between nodes and the state offset score. Abnormal state nodes are marked by dynamic thresholds, and the location of the abnormal occurrence process is traced back, providing precise location and impact assessment for abnormal events.
[0029] In this application scenario, the test sample included 10,000 logistics packages. After full-process intelligent traceability processing, the data analysis in Table 1 shows that the average abnormal event location time was shortened from 25 minutes using traditional methods to 3.2 minutes, the anomaly identification accuracy reached 98.6%, the full-process path integrity verification rate reached 99.9%, the data loss rate in the package flow path was less than 0.2%, no errors were found in the chained data unit hash verification, and the package status continuity score averaged 95 points (out of 100), which can effectively support anomaly traceability and responsibility determination.
[0030] To more intuitively demonstrate the implementation effects of this invention, some test data has been compiled as follows: Table 1. Key Data Statistics for Full-Process Traceability of Logistics Parcels
[0031] As can be seen from Table 1, the method implemented by the present invention can achieve high integrity, high continuity and rapid identification of abnormal nodes in the state evolution path of the entire logistics parcel process, which verifies the feasibility and effectiveness of the present invention in intelligent traceability and anomaly management.
[0032] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for intelligent traceability of logistics parcels throughout the entire process, characterized in that: Includes the following steps: S1. Based on the logistics scenario, a sensor network is constructed to synchronously collect the location information, operation information, and environmental status information generated in each stage of logistics parcel collection, sorting, transportation, transfer, and delivery. The collected data is time-aligned, numerically normalized, and bound with identifiers to form a set of time-consistent data units. S2. Perform multi-dimensional feature mapping processing on the data unit set, generate structured state vectors according to the dimensions of logistics nodes, operation behavior and state change, and construct a continuously evolving logistics parcel state sequence based on the state vectors; S3. Construct a process-oriented knowledge graph based on the state sequence of logistics parcels, establish directed relationships between logistics parcel entities, logistics node entities and operation behavior entities, and form a graph structure representation with time constraints and state constraints. S4. Perform graph structure encoding on the entity relationships in the knowledge graph, map each logistics status change to a unique chain data unit, and write it into the blockchain in the order of the status sequence to form an irreversible traceable ledger. S5. Based on the blockchain ledger, perform consistency and integrity checks on the state evolution path of logistics parcels to generate trusted circulation path data corresponding to the logistics parcel identifier; S6. Perform graph structure data analysis and processing on the trusted flow path data, and identify abnormal state nodes and locate the process location where the abnormality occurs based on the association strength and state offset features in the knowledge graph. S7. Output the traceability results of the entire logistics package process. The traceability results include the verified flow path, state evolution sequence, set of associated nodes and abnormal state location identifier.
2. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, The synchronous acquisition process specifically includes: A unified time reference is assigned to each logistics node, and timestamps are added to the location information, operation information and environmental status information generated in the sensor network, and sorting is performed according to the timestamp order. For different types of data, fixed dimension mapping rules are set, and interval scaling is performed on numerical data and discrete encoding is performed on state data. A unique identifier is generated for each logistics package. The logistics package identifier is combined with the logistics node identifier and the timestamp and encoded. The combined code is written into the corresponding data record, so that each data record is associated with a unique logistics package and a unique time location, forming a set of data units arranged in chronological order.
3. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, S2 specifically includes: S21. Perform multidimensional feature mapping processing on each data record in the data unit set: Extract node identifier codes and spatial location codes according to the logistics node dimension, specifically including: A unified coding rule mapping is performed on the logistics node identifier in each data record to convert the node number into a fixed-length node identifier code. Based on the node's physical coordinate information, the spatial location is subjected to grid-based discretization processing to generate a corresponding spatial location code. This enables the node identifier code and the spatial location code to form a one-to-one logistics node feature combination and write it into the data record. Extract operation type codes and processing order codes according to the job behavior dimension, specifically including: The operation behavior types in each data record are classified and labeled. The behaviors of pickup, sorting, transportation, transfer and delivery are mapped to discrete operation type codes respectively. The processing sequence code is generated according to the internal operation process of the logistics node. The operation type code and the processing sequence code are combined according to the preset bit width to form operation behavior characteristics that can distinguish different behavior stages. Extracting time interval codes and environment state codes according to the state change dimension, specifically including: Time difference calculation is performed on data records corresponding to adjacent timestamps to generate time interval codes that reflect the duration of the state. At the same time, interval division and level mapping processing are performed on the collected environmental state information to convert temperature, humidity and vibration state into discrete environmental state codes. The time interval codes and environmental state codes are then concatenated to construct state change dimension features that reflect changes in the state of logistics packages. S22. Concatenate the codes of each dimension in a preset order to form a fixed-length structured state vector; S23. Perform sequential arrangement processing on the structured state vectors corresponding to consecutive timestamps, and group and associate the structured state vectors according to the logistics package identifier; S24. Link the structured state vectors sequentially according to the time-incrementing relationship to construct a logistics parcel state sequence that reflects the continuous evolution process of logistics parcels among various logistics nodes.
4. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, The construction process of the knowledge graph specifically includes: Based on the status sequence of logistics packages, generate corresponding logistics package entity nodes for each logistics package, encode the logistics node features to generate logistics node entity nodes, and encode the operation behavior features to generate operation behavior entity nodes. Based on the association information of each time step in the logistics parcel status sequence, directed edges are established between the parcel entity and the logistics node entity performing the operation in chronological order. Bidirectional directed edges are established between the operation behavior entity and the corresponding logistics parcel entity and logistics node entity, forming a triplet relationship that reflects the operation execution relationship and the flow order. While constructing directed relationships, time interval encoding is added as edge weight to directed edges to describe the time constraints of event occurrence, and state change feature encoding is added to node attributes to represent the state constraints of logistics packages at each stage. The graph structure storage is optimized by storing nodes and edges in a contiguous memory layout and generating adjacency lists and adjacency matrices to support subsequent graph traversal, anomaly detection, and full-process path reconstruction operations.
5. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, The graph structure encoding process specifically includes: Traverse the state vectors in the state sequence of logistics packages, generate a chain of uniquely identified data units for each state change, and combine and encode the logistics package entity identifier, logistics node entity identifier, operation behavior entity identifier, and corresponding timestamp and state change feature code in a fixed format. A hash value is generated for each chained data unit, and the current hash value is linked with the hash value of the previous state to form a chain structure to ensure that the order cannot be tampered with. Specifically, this includes: The logistics parcel entity identifier, logistics node entity identifier, operation behavior entity identifier, timestamp, status change feature code, and graph topology information in the chained data unit are concatenated into a binary string according to a fixed byte order; Perform a hash algorithm on the binary string to calculate the hash value of the current linked data unit; Combine the current hash value with the hash value of the chained data unit from the previous state, and generate a new chained link value by executing the same hash algorithm again; The chain link value is stored in the chain pointer field of the current chain data unit, so that the hash value of each chain data unit depends on the previous unit, forming a continuous chain structure. While generating chain-like data units, graph topology information, including node in-degree, out-degree, and neighbor node indexes, is encoded and appended to the data units to maintain the structural constraints of the knowledge graph. Following the time-incremental sequence of the logistics parcel status, chained data units are written into the blockchain ledger one by one. Each block contains the current chained data unit, the hash of the previous block, a timestamp, and a digital signature, thus completing the construction of an irreversible traceable ledger.
6. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, S5 specifically includes: S51. Extract all chain data units of the target logistics package from the blockchain ledger and construct a state evolution sequence based on timestamps and operation order; S52. Perform multi-level hash verification on each chain data unit, calculate the hash value of the state vector inside the chain data unit, combine the hash value with the topological hash between nodes to generate a secondary hash value, and compare it with the secondary hash value stored in the blockchain to achieve joint verification of the dimensional features of state changes and the relationship between nodes. S53. The sliding window algorithm is used to perform pattern consistency analysis on the time interval encoding and operation sequence of the chained data units of adjacent states, and the possible data missing or sequence misalignment is identified by dynamic threshold adjustment. S54. For abnormal time intervals or state shifts, use graph traversal algorithms to backtrack the corresponding logistics nodes and operational entities in the knowledge graph, mark the abnormal node locations, and calculate the abnormal probability score. S55. Recombine all verified chain data units according to time order and topological order to generate trusted flow path data. At the same time, generate a trust index for each node to form a complete trusted path record that can be directly used for intelligent traceability, anomaly location and decision analysis.
7. The intelligent traceability method for the entire process of logistics parcels according to claim 1, characterized in that, The graph structure data analysis and processing process specifically includes: The trusted flow path data is populated into the knowledge graph. For each node, the association strength with the nodes before and after it is calculated. The association strength is calculated by comprehensively considering the similarity of node feature vectors, the matching degree of job behavior, and the consistency of time interval. For each node's state vector, a offset analysis is performed between it and its historical mean state vector, and a state offset score is calculated to reflect the degree of anomaly. A weighted graph traversal algorithm is employed to propagate the association strength and offset score layer by layer along the directed edges from the starting node of the package. A dynamic threshold strategy is used to mark nodes whose offset scores exceed a threshold as abnormal state nodes. Specifically, this includes: Starting from the starting node of the package, perform a breadth-first traversal. When traversing to a node, multiply the cumulative offset score of its parent node by the current edge weight and add it to the offset score of that node. At the same time, update the offset value between the node's state vector and the historical average state vector. During the traversal, a dynamic threshold is calculated in real time for the cumulative offset score of each node. The threshold is dynamically adjusted based on the mean and standard deviation of the offset scores of nodes in the same process path. When the cumulative offset score of a node exceeds the dynamic threshold, the node is marked as an abnormal state node, and the abnormal score, trigger timestamp, and information of all its direct parent nodes are recorded. After an abnormal node is marked, its dependent nodes and corresponding logistics node information are traced back through the reverse graph to determine the specific process location where the abnormality occurred, and an abnormal impact weight and abnormal time window are generated for each abnormal node.