Intelligent factory logistics path dynamic optimization method based on digital twin spatiotemporal trajectory clustering
By constructing a factory spatial topology map and decoupling trajectory constraints using graph neural networks, combined with improved spatiotemporal density clustering and multidimensional cost functions, the pseudo-clustering problem of logistics paths in highly spatially constrained regions was solved, achieving efficient optimization of logistics paths and improved equipment flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2026-04-14
AI Technical Summary
Existing logistics route optimization methods tend to form strong trajectory overlaps in areas with high spatial constraints. This leads to traditional clustering algorithms misjudging these as high-confidence pseudo-clusters, generating inefficient "follow-the-car" routes, limiting equipment flexibility, and polluting the route pattern library with pseudo-patterns, causing dynamic optimization to fail and reducing factory throughput.
A method based on spatiotemporal trajectory clustering using digital twins is adopted. By constructing a factory spatial topology map, calculating the spatial degree of freedom factor, using graph neural networks to decouple the spatial constraint components of the trajectory, and combining an improved spatiotemporal density clustering algorithm and an adaptive threshold mechanism, high-frequency path patterns are identified, and the path is optimized based on a multidimensional spatiotemporal cost function to form a closed-loop optimization mechanism.
It effectively reduces the pseudo-cluster generation rate, improves the accuracy of path pattern recognition, shortens the average driving distance of logistics equipment by 10% to 15%, reduces transportation time by 15% to 20%, significantly enhances the flexibility of equipment operation and the rationality of path planning, and increases factory throughput by 15% to 25%.
Smart Images

Figure CN120688714B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of logistics technology, specifically a method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins. Background Technology
[0002] With the rapid development of intelligent manufacturing, smart factories have become an important direction for the transformation and upgrading of the manufacturing industry. In smart factories, an efficient logistics system is one of the key factors in ensuring production continuity, improving production efficiency, and reducing costs. As a core link in the logistics system, the optimization of logistics routes directly affects the operational efficiency of the entire smart factory. The current general methods for logistics route optimization are as follows: Real-time collection of location, speed, and environmental data of logistics entities through a distributed sensor network is used, and the data is synchronously mapped to a digital twin platform at a preset cycle to generate a dynamic dataset. Based on the completion of logistics tasks or time window triggering conditions, structured spatiotemporal trajectories are reconstructed, and trajectory vectors containing spatial, temporal, and dynamic interaction features are extracted. Spatiotemporal density clustering algorithms are used to incrementally analyze trajectory vectors, identify high-frequency path patterns and abnormal trajectories, and construct a path pattern library containing core node sequences, spatiotemporal constraints, and confidence levels. In response to new tasks or pattern library update events, task requirements are matched with the pattern library, the optimal path is solved based on the spatiotemporal cost function, and the optimal path is distributed to logistics equipment. Finally, based on the deviation between the actual and planned paths, incremental updates to the pattern library and adjustments to the cost function parameters are triggered.
[0003] However, existing methods only focus on indicators such as inflection point density and regional coverage when extracting trajectory spatial features, and cannot distinguish the trajectory differences between the active path selection and passive spatial coupling of logistics entities. In areas with high spatial constraints (such as narrow passages), multiple AGVs form fixed queues due to space limitations. The strong overlap of trajectories causes traditional clustering algorithms to misjudge them as high-confidence pseudo-clusters. This not only generates inefficient "follow-the-vehicle" paths that limit the flexibility of equipment, but also pollutes the path pattern library with high-confidence pseudo-patterns, ultimately leading to the failure of dynamic optimization and a decrease in factory throughput. Summary of the Invention
[0004] The purpose of this invention is to provide a method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins in order to solve the problems mentioned above.
[0005] The technical solution adopted in this invention is as follows: a dynamic optimization method for logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins, the method comprising the following steps:
[0006] S1: First, perform data synchronization: The distributed sensor network collects the location, speed, and environmental data of logistics entities at a preset cycle, and maps them to the digital twin platform in real time to generate a dynamic twin dataset;
[0007] S2: Perform trajectory reconstruction: Respond to logistics task completion events or time window trigger conditions, reconstruct the structured spatiotemporal trajectory of the entity, and extract trajectory feature vectors containing spatial distribution features, dynamic interaction features, and correlation features.
[0008] S3: Decouple the trajectory: In response to the trajectory feature vector generation event in step S2, construct the factory space topology graph G=(V,E), where vertex V is the key node of the path and edge E is assigned attributes. ; Calculate spatial degree of freedom factor based on channel width Spatial constraint components of the trajectory are extracted using a graph neural network encoder, and then... Strip the coupling components to generate a decoupled trajectory;
[0009] S4: Perform cluster analysis: Input the decoupled trajectory into the improved spatiotemporal density clustering algorithm, using a composite density threshold. and adaptive threshold Identify high-frequency path patterns and construct a path pattern library containing core node sequences, spatiotemporal constraints, and confidence scores;
[0010] S5: Perform route optimization: In response to new logistics tasks or pattern library update events, match task requirements with the path pattern library, solve for the optimal path based on the spatiotemporal cost function, and send it to the logistics equipment.
[0011] S6: Perform the final dynamic adjustment step: based on the deviation entropy between the actual path and the planned path. Trigger incremental updates to the path pattern library and adjustment of cost function parameters.
[0012] In a preferred embodiment, step S2 involves extracting three types of information: spatial distribution features, dynamic interaction features, and correlation features, which respectively characterize the behavior patterns of logistics entities in the spatiotemporal process from different dimensions.
[0013] Spatial distribution characteristics are analyzed by observing the dwell behavior of trajectories in key bottleneck areas within the factory, quantifying the proportion of time spent within a specified spatial range to reflect potential operational congestion and path efficiency issues. At the same time, by calculating the ratio of the number of inflection points in the trajectory to the overall path length, an inflection point density index is formed. The higher the index, the more frequent the path changes, and the greater the potential mechanical wear and energy consumption, which helps to reduce complex motion trajectories during path optimization.
[0014] The dynamic interaction feature employs a neural network model based on time-series input to predict the velocity of the trajectory over continuous time periods, outputting its velocity change trend and generating a trajectory stability score. A high score indicates stable trajectory speed and minimal environmental interference, while a low score suggests frequent interference from dynamic events. This model adaptively extracts potential influencing factors by training on the relationship between historical trajectories and their velocity changes, thereby enhancing its ability to express the stability of dynamic behavior.
[0015] The association features focus on the spatial relationship between the trajectory and other surrounding logistics entities. Within the time window of a trajectory point, if the minimum Euclidean distance to other entities is lower than the safe distance threshold, the system records the interaction event and associates it with the corresponding entity identifier, constructing an interaction graph between trajectories to identify potential conflicts, collaborations, or resource competition behaviors. Combining these three types of features forms a multi-dimensional trajectory feature vector, which serves as the basic input for clustering analysis, improving the accuracy of characterizing the complexity and spatial organization patterns of logistics behavior.
[0016] In a preferred embodiment, in step S3, trajectory decoupling is achieved by introducing a spatial topology awareness mechanism to remove trajectory constraint components caused by factory structural limitations, thereby more accurately extracting the autonomous navigation behavior of logistics entities. First, in the spatial topology graph construction stage, the internal structure of the factory is abstracted as a graph G=(V,E), where vertices V represent intersection nodes and workstations, edges E represent logistics channels, and three types of attributes are bound to each edge: length l length Channel width w width With maximum capacity c capacity First, a navigation map structure with physical constraints is constructed. Second, in the degree-of-freedom factor calculation stage, to quantify the degree of spatial constraint on the trajectory by each channel, a spatial degree-of-freedom factor is defined:
[0017] ;
[0018] Among them, w width w is the current channel width. min This is the minimum reference value for the channel width in the system. The function's output value ranges from (0,1). When the channel width is close to the minimum value, A value approaching 0 indicates low channel degrees of freedom and strong constraints; when the channel width is significantly greater than the minimum value... A value close to 1 indicates that the path segment has a high degree of freedom and the trajectory has great variability.
[0019] In a preferred embodiment, in step S4, the improved spatiotemporal density clustering algorithm enhances its ability to identify high-frequency logistics paths and abnormal trajectories by introducing a composite density threshold and an adaptive trajectory number threshold mechanism. First, the composite density threshold is defined as follows:
[0020] ,
[0021] Where, εs pace This represents the basic spatial distance threshold, controlling the clustering range of trajectory points in the spatial dimension; W zone It is a spatial weighting factor, dynamically adjusted based on the real-time congestion index of the current region. The more congested the region, the higher the weighting factor. zone The value tends to increase, thus increasing the local spatial density threshold and reflecting the influence of the environment on clustering sensitivity; ε time This represents the time distance threshold, which limits the proximity of trajectory points in the time dimension, and is used to ensure the consistency of clustering over time.
[0022] Then, set the adaptive minimum trajectory number threshold:
[0023] ,
[0024] Where, N total This represents the total number of trajectories currently being processed. MinTrajs controls the minimum number of trajectories that must be included in each cluster. This strategy uses a fixed lower bound when the amount of trajectory data is small to prevent clustering instability due to too few samples, and increases the threshold to enhance clustering confidence when the amount of data is large.
[0025] Noisy trajectories identified during the initial clustering process will undergo secondary analysis. The system continuously monitors the spatiotemporal distance between these trajectories and the cluster centers. If a trajectory remains within a preset distance range for multiple consecutive periods, it indicates that its behavior exhibits a potential pattern. Based on this, the system constructs a temporary path pattern and incorporates it into the path pattern library. This mechanism enhances the identification of atypical repetitive behaviors, improves the completeness of the logistics path pattern library, and enhances the system's adaptive optimization capabilities.
[0026] In a preferred embodiment, in step S4, during the coupling component stripping stage, the original trajectory point sequence Ti and the topological graph G are simultaneously input into a graph neural network encoder, and the spatial deformation features induced by the structure in the trajectory are extracted using a three-layer graph convolution operation. The system dynamically adjusts the decoupling strength λ as follows: The lower the degree of freedom, The smaller the value, the larger the value of λ, thus enhancing the ability of the decoupling operation to correct for the influence of topological constraints. Trajectory decoupling is ultimately achieved through the following formula:
[0027] Among them, GNN Encoder (Ti,G) represents the spatial constraint components extracted by the graph neural network encoder. This operation removes path features caused by physical structure from the original trajectory, while preserving the active navigation intent of the logistics entity. This makes the generated decoupled trajectory more universal and recognizable in terms of structural diversity, which helps subsequent cluster analysis to accurately identify essentially similar high-frequency path patterns.
[0028] In a preferred embodiment, in step S4, cluster analysis further improves the accuracy and adaptability of path pattern recognition by introducing decoupled trajectory and spatial degree-of-freedom factor. Firstly, regarding distance measurement, to more effectively measure the spatial and structural similarity between trajectories, an improved composite distance metric formula is adopted:
[0029] ;
[0030] in, The Euclidean distance between the decoupled trajectories i and j represents the geometric difference in trajectory morphology. and , , represent the average spatial degrees of freedom factors of the path segments traversed by the trajectories, used to measure the difference in the degree of physical structural constraints between two trajectories; μ is the structural weight factor, used to adjust the proportion of the influence of structural differences on the overall distance. This distance metric integrates behavioral path similarity and spatial structural similarity, making clustering more sensitive to actual path patterns that recur in similar structures.
[0031] In a preferred embodiment, in step S4, the spatial weighting factor in the composite density threshold during density clustering is no longer based on the static congestion index, but directly uses the spatial degree-of-freedom factor calculated in the decoupling stage. ,Right now ,in A larger value for ε indicates a higher spatial tolerance to trajectory distribution during the clustering process. space With ε time As a basic distance threshold in both spatial and temporal dimensions, this setting reflects the greater morphological diversity allowed for trajectories in areas with less spatial constraint.
[0032] In a preferred embodiment, in step S4, trajectories not classified into any cluster in the clustering results are considered noise trajectories, and the system performs secondary analysis on these trajectories. The method involves calculating the distance distribution between these trajectories and the decoupled trajectories of each identified cluster center. If the distance between a noise trajectory and a certain cluster center consistently falls outside a preset interval over multiple time periods, and this deviation trend remains continuous within a certain period, then the trajectory is considered to potentially represent a new path behavior intention. After satisfying the continuous exceedance condition, the system generates a temporary path pattern for the trajectory and adds it to the pattern library, enhancing the sensitivity of path identification to heterogeneous path evolution and providing a basis for subsequent pattern library updates. This mechanism improves the responsiveness to marginal behaviors or early abnormal trends, ensuring that the path pattern library can dynamically adapt to micro-changes in the logistics environment.
[0033] In a preferred embodiment, step S5 focuses on a spatiotemporal cost function constructed based on multidimensional factors to quantify the comprehensive cost of candidate routes in terms of transportation efficiency, safety risk, and time deviation. The specific cost function takes the form of:
[0034] ,
[0035] Among them, T trave l represents the estimated travel time of the route, measuring the cost of the route in terms of transportation efficiency; d t d represents the spatial distance between a logistics entity and the nearest obstacle or other moving unit at time t. safe The first term represents the safe distance threshold, and k is the growth coefficient of the distance penalty, causing the risk term to increase exponentially as the safe distance approaches. The second term comprehensively reflects the level of potential safety hazards that may occur along the entire route. The last term |T actual -T expected | indicates the degree of deviation between the actual completion time and the expected time of the task, and evaluates the accuracy of the task's time achievement.
[0036] The three costs are dynamically adjusted by weighting coefficients α, β, and γ. Here, α represents the priority of efficiency, β represents the sensitivity to the safety distance, and γ controls the weight of the time deviation penalty.
[0037] During peak operating periods, the system increases β to 2.5 times the base value to enhance obstacle avoidance and congestion avoidance capabilities. In emergency situations, γ is increased to 3 times the base value to prioritize time-bound achievement. These weighting coefficient adjustment strategies are iteratively updated in step S6 based on real-time data feedback from path execution deviations, enabling the optimization objective to dynamically adapt to different business scenarios and operating environments, improving the accuracy and robustness of path allocation. Finally, based on this cost function, the system searches for the path with the minimum total cost in the candidate path set and issues it as the execution task to the logistics equipment, ensuring a balance between time efficiency, safety, and timeliness in the path planning results.
[0038] In a preferred embodiment, in step S6, the deviation entropy processing measures the randomness and uncertainty of path execution deviation to ensure the stability and adaptability of the path optimization system. First, the entropy index of the path deviation is calculated:
[0039] ;
[0040] Where, p i Let E represent the probability distribution within the i-th type of deviation interval. devThe system measures the dispersion and unpredictability of path execution deviation. When this entropy value exceeds a set threshold, it indicates that the path deviation has become highly unstable and difficult to predict using the existing pattern library. At this point, the system freezes the current path pattern library and stops adding new patterns to avoid contamination by erroneous information. Subsequently, the system activates the reinforcement learning module, which autonomously generates emergency path planning strategies based on real-time environmental feedback and historical experience. This module interacts with the sensor network, sending calibration commands to the sensors to adjust the sensor data acquisition accuracy and transmission frequency in real time, improving the accuracy and response speed of environmental perception. If the deviation persists and the difference between the decoupled trajectory and the planned path continues to exceed the tolerance range, the system will trigger the parameter retraining process of the graph neural network encoder. It will update the model weights using newly acquired trajectory data and spatial topology information, thereby optimizing the encoding ability for spatial constraints and path behavior. This mechanism ensures that the model can adapt to environmental changes and path behavior evolution, achieving closed-loop adaptive optimization of path planning and execution.
[0041] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0042] 1. This invention innovatively proposes a "trajectory decoupling" step by introducing graph neural networks and topology data analysis technology: First, a factory spatial topology map is constructed, and the "spatial degree of freedom factor" reflecting the degree of spatial constraints of the passage is calculated; then, the spatial constraint components of the trajectory are extracted through a graph neural network encoder, and combined with dynamically adjusted decoupling strength, the "instantaneous spatial coupling" component caused by physical structural constraints is stripped away, while retaining the "inherent path preference" of the logistics entity. By introducing graph neural networks and topology data analysis technology for trajectory decoupling, the "inherent path preference" and "instantaneous spatial coupling" components in the trajectory are effectively separated, fundamentally solving the problem of pseudo-cluster generation caused by trajectory spatial coupling. Actual testing shows that in areas with high spatial constraints, the pseudo-cluster generation rate has decreased from over 30% to below 5%, significantly improving the accuracy of path pattern recognition.
[0043] 2. This invention fundamentally improves the rationality of path planning by modifying the spatiotemporal density clustering algorithm and the path planning method based on an accurate pattern library. On one hand, the improved clustering algorithm introduces a "composite density threshold" and an "adaptive trajectory number threshold" mechanism: the composite density threshold is dynamically adjusted in conjunction with spatial degree-of-freedom factors, while the adaptive trajectory number threshold changes dynamically according to the amount of trajectory data, thus more accurately identifying high-frequency path patterns. On the other hand, the path optimization stage solves for the optimal path based on a multi-dimensional spatiotemporal cost function, where the weight coefficients of the cost function can be dynamically adjusted according to the business scenario. This allows new task AGVs to no longer be forcibly incorporated into existing queues, but rather to activate backup channels based on real-time environment and task requirements. Actual application data shows that the average travel distance of logistics equipment is reduced by 10%–15%, transportation time is reduced by 15%–20%, and the flexibility of equipment operation and the rationality of path planning are significantly enhanced.
[0044] 3. This invention fundamentally improves the operational efficiency of the logistics system by eliminating pseudo-clusters and enhancing the rationality of path planning. On the one hand, congestion and waiting time caused by unreasonable path planning are significantly reduced, resulting in a substantial improvement in the timeliness and accuracy of cargo transportation. On the other hand, the dynamic adjustment step monitors the deviation between the actual path and the planned path using the "deviation entropy" index, triggering incremental updates to the path pattern library and adjustments to the cost function parameters. This forms a closed-loop optimization mechanism of "data acquisition - trajectory decoupling - cluster analysis - path optimization - deviation feedback," ensuring the system can continuously adapt to environmental changes. In practical applications, factory throughput has increased by 15% to 25% compared to traditional methods, significantly improving the operational efficiency of logistics equipment, effectively ensuring the continuity of smart factory production, and providing strong support for the efficient operation of the manufacturing industry. Attached Figure Description
[0045] Figure 1 This is a logic diagram of the improved spatiotemporal density clustering algorithm of the present invention;
[0046] Figure 2 This is a schematic diagram of the trajectory decoupling process in this invention;
[0047] Figure 3 This is a schematic diagram of the spatial topology graph construction in this invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0049] Example:
[0050] Reference Figure 1-3A method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins, the method includes the following steps:
[0051] S1: First, perform data synchronization: The distributed sensor network collects the location, speed, and environmental data of logistics entities at a preset cycle, and maps them to the digital twin platform in real time to generate a dynamic twin dataset;
[0052] S2: Perform trajectory reconstruction: Respond to logistics task completion events or time window trigger conditions, reconstruct the structured spatiotemporal trajectory of the entity, and extract trajectory feature vectors containing spatial distribution features, dynamic interaction features, and correlation features.
[0053] S3: Decouple the trajectory: In response to the trajectory feature vector generation event in step S2, construct the factory space topology graph G=(V,E), where vertex V is the key node of the path and edge E is assigned attributes. ; Calculate spatial degree of freedom factor based on channel width Spatial constraint components of the trajectory are extracted using a graph neural network encoder, and then... Strip the coupling components to generate a decoupled trajectory;
[0054] S4: Perform cluster analysis: Input the decoupled trajectory into the improved spatiotemporal density clustering algorithm, using a composite density threshold. and adaptive threshold Identify high-frequency path patterns and construct a path pattern library containing core node sequences, spatiotemporal constraints, and confidence scores;
[0055] S5: Perform route optimization: In response to new logistics tasks or pattern library update events, match task requirements with the path pattern library, solve for the optimal path based on the spatiotemporal cost function, and send it to the logistics equipment.
[0056] S6: Perform the final dynamic adjustment step: based on the deviation entropy between the actual path and the planned path. Trigger incremental updates to the path pattern library and adjustment of cost function parameters.
[0057] In step S2, the extraction of trajectory feature vectors includes three types of information: spatial distribution features, dynamic interaction features, and correlation features, which respectively characterize the behavior patterns of logistics entities in the spatiotemporal process from different dimensions.
[0058] Spatial distribution characteristics are analyzed by observing the dwell behavior of trajectories in key bottleneck areas within the factory, quantifying the proportion of time spent within a specified spatial range to reflect potential operational congestion and path efficiency issues. At the same time, by calculating the ratio of the number of inflection points in the trajectory to the overall path length, an inflection point density index is formed. The higher the index, the more frequent the path changes, and the greater the potential mechanical wear and energy consumption, which helps to reduce complex motion trajectories during path optimization.
[0059] The dynamic interaction feature employs a neural network model based on time-series input to predict the velocity of the trajectory over continuous time periods, outputting its velocity change trend and generating a trajectory stability score. A high score indicates stable trajectory speed and minimal environmental interference, while a low score suggests frequent interference from dynamic events. This model adaptively extracts potential influencing factors by training on the relationship between historical trajectories and their velocity changes, thereby enhancing its ability to express the stability of dynamic behavior.
[0060] The association features focus on the spatial relationship between the trajectory and other surrounding logistics entities. Within the time window of a trajectory point, if the minimum Euclidean distance to other entities is lower than the safe distance threshold, the system records the interaction event and associates it with the corresponding entity identifier, constructing an interaction graph between trajectories to identify potential conflicts, collaborations, or resource competition behaviors. Combining these three types of features forms a multi-dimensional trajectory feature vector, which serves as the basic input for clustering analysis, improving the accuracy of characterizing the complexity and spatial organization patterns of logistics behavior.
[0061] In step S3, trajectory decoupling is achieved by introducing a spatial topology-aware mechanism to remove trajectory constraint components caused by factory structural limitations, thereby more accurately extracting the autonomous navigation behavior of logistics entities. First, in the spatial topology graph construction phase, the internal structure of the factory is abstracted as a graph G=(V,E), where vertices V represent intersection nodes and workstations, edges E represent logistics channels, and three types of attributes are bound to each edge: length l length Channel width w width With maximum capacity c capacity First, a navigation map structure with physical constraints is constructed. Second, in the degree-of-freedom factor calculation stage, to quantify the degree of spatial constraint on the trajectory by each channel, a spatial degree-of-freedom factor is defined:
[0062] ;
[0063] Among them, w width w is the current channel width. min This is the minimum reference value for the channel width in the system. The function's output value ranges from (0,1). When the channel width is close to the minimum value, A value approaching 0 indicates low channel degrees of freedom and strong constraints; when the channel width is significantly greater than the minimum value... A value close to 1 indicates that the path segment has a high degree of freedom and the trajectory has great variability.
[0064] In step S4, the improved spatiotemporal density clustering algorithm enhances its ability to identify high-frequency logistics paths and abnormal trajectories by introducing a composite density threshold and an adaptive trajectory number threshold mechanism. First, the composite density threshold is defined:
[0065] ,
[0066] Where, εs pace This represents the basic spatial distance threshold, controlling the clustering range of trajectory points in the spatial dimension; W zone It is a spatial weighting factor, dynamically adjusted based on the real-time congestion index of the current region. The more congested the region, the higher the weighting factor. zone The value tends to increase, thus increasing the local spatial density threshold and reflecting the influence of the environment on clustering sensitivity; ε time This represents the time distance threshold, which limits the proximity of trajectory points in the time dimension, and is used to ensure the consistency of clustering over time.
[0067] Then, set the adaptive minimum trajectory number threshold:
[0068] ,
[0069] Where, N total This represents the total number of trajectories currently being processed. MinTrajs controls the minimum number of trajectories that must be included in each cluster. This strategy uses a fixed lower bound when the amount of trajectory data is small to prevent clustering instability due to too few samples, and increases the threshold to enhance clustering confidence when the amount of data is large.
[0070] Noisy trajectories identified during the initial clustering process will undergo secondary analysis. The system continuously monitors the spatiotemporal distance between these trajectories and the cluster centers. If a trajectory remains within a preset distance range for multiple consecutive periods, it indicates that its behavior exhibits a potential pattern. Based on this, the system constructs a temporary path pattern and incorporates it into the path pattern library. This mechanism enhances the identification of atypical repetitive behaviors, improves the completeness of the logistics path pattern library, and enhances the system's adaptive optimization capabilities.
[0071] In step S4, during the coupling component stripping stage, the original trajectory point sequence Ti and the topological graph G are simultaneously input into the graph neural network encoder. A three-layer graph convolution operation is used to extract the spatial deformation features induced by the structure in the trajectory. The system dynamically adjusts the decoupling strength λ as follows: The lower the degree of freedom, The smaller the value, the larger the value of λ, thus enhancing the ability of the decoupling operation to correct for the influence of topological constraints. Trajectory decoupling is ultimately achieved through the following formula:
[0072] ,
[0073] Among them, GNN Encoder (Ti,G) represents the spatial constraint components extracted by the graph neural network encoder. This operation removes path features caused by physical structure from the original trajectory, while preserving the active navigation intent of the logistics entity. This makes the generated decoupled trajectory more universal and recognizable in terms of structural diversity, which helps subsequent cluster analysis to accurately identify essentially similar high-frequency path patterns.
[0074] In step S4, cluster analysis further improves the accuracy and adaptability of path pattern recognition by introducing decoupled trajectory and spatial degree-of-freedom factor. Firstly, regarding distance measurement, an improved composite distance metric formula is adopted to more effectively measure the spatial and structural similarity between trajectories:
[0075] ;
[0076] in, The Euclidean distance between the decoupled trajectories i and j represents the geometric difference in trajectory morphology. and , , represent the average spatial degrees of freedom factors of the path segments traversed by the trajectories, used to measure the difference in the degree of physical structural constraints between two trajectories; μ is the structural weight factor, used to adjust the proportion of the influence of structural differences on the overall distance. This distance metric integrates behavioral path similarity and spatial structural similarity, making clustering more sensitive to actual path patterns that recur in similar structures.
[0077] In step S4, during density clustering, the spatial weighting factor in the composite density threshold is no longer based on the static congestion index, but directly uses the spatial degree-of-freedom factor calculated in the decoupling stage. ,Right now ,in A larger value for ε indicates a higher spatial tolerance to trajectory distribution during the clustering process. space With ε time As a basic distance threshold in both spatial and temporal dimensions, this setting reflects the greater morphological diversity allowed for trajectories in areas with less spatial constraint.
[0078] In step S4, trajectories not assigned to any cluster in the clustering results are considered noise trajectories, and the system performs secondary analysis on these trajectories. The method involves calculating the distance distribution between these trajectories and the decoupled trajectories of each identified cluster center. If the distance between a noise trajectory and a certain cluster center consistently falls outside a preset interval over multiple time periods, and this deviation trend remains continuous within a certain period, then the trajectory is considered to potentially represent a new path behavior intention. After meeting the continuous exceedance condition, the system generates a temporary path pattern for this trajectory and adds it to the pattern library, enhancing the sensitivity of path identification to heterogeneous path evolution and providing a basis for subsequent pattern library updates. This mechanism improves the responsiveness to marginal behaviors or early abnormal trends, ensuring that the path pattern library can dynamically adapt to micro-changes in the logistics environment.
[0079] In step S5, the core of route optimization is the spatiotemporal cost function constructed based on multi-dimensional factors, which quantifies the comprehensive cost of candidate routes in terms of transportation efficiency, safety risk, and time deviation. The specific cost function form is as follows:
[0080] ,
[0081] Among them, T trave l represents the estimated travel time of the route, measuring the cost of the route in terms of transportation efficiency; d t d represents the spatial distance between a logistics entity and the nearest obstacle or other moving unit at time t. safe The first term represents the safe distance threshold, and k is the growth coefficient of the distance penalty, causing the risk term to increase exponentially as the safe distance approaches. The second term comprehensively reflects the level of potential safety hazards that may occur along the entire route. The last term |T actual -T expected | indicates the degree of deviation between the actual completion time and the expected time of the task, and evaluates the accuracy of the task's time achievement.
[0082] The three costs are dynamically adjusted by weighting coefficients α, β, and γ. Here, α represents the priority of efficiency, β represents the sensitivity to the safety distance, and γ controls the weight of the time deviation penalty.
[0083] During peak operating periods, the system increases β to 2.5 times the base value to enhance obstacle avoidance and congestion avoidance capabilities. In emergency situations, γ is increased to 3 times the base value to prioritize time-bound achievement. These weighting coefficient adjustment strategies are iteratively updated in step S6 based on real-time data feedback from path execution deviations, enabling the optimization objective to dynamically adapt to different business scenarios and operating environments, improving the accuracy and robustness of path allocation. Finally, based on this cost function, the system searches for the path with the minimum total cost in the candidate path set and issues it as the execution task to the logistics equipment, ensuring a balance between time efficiency, safety, and timeliness in the path planning results.
[0084] In step S6, deviation entropy processing measures the randomness and uncertainty of path execution deviation to ensure the stability and adaptability of the path optimization system. First, the entropy index of path deviation is calculated:
[0085] ;
[0086] Where, p i Let E represent the probability distribution within the i-th type of deviation interval. devThe system measures the dispersion and unpredictability of path execution deviation. When this entropy value exceeds a set threshold, it indicates that the path deviation has become highly unstable and difficult to predict using the existing pattern library. At this point, the system freezes the current path pattern library and stops adding new patterns to avoid contamination by erroneous information. Subsequently, the system activates the reinforcement learning module, which autonomously generates emergency path planning strategies based on real-time environmental feedback and historical experience. This module interacts with the sensor network, sending calibration commands to the sensors to adjust the sensor data acquisition accuracy and transmission frequency in real time, improving the accuracy and response speed of environmental perception. If the deviation persists and the difference between the decoupled trajectory and the planned path continues to exceed the tolerance range, the system will trigger the parameter retraining process of the graph neural network encoder. It will update the model weights using newly acquired trajectory data and spatial topology information, thereby optimizing the encoding ability for spatial constraints and path behavior. This mechanism ensures that the model can adapt to environmental changes and path behavior evolution, achieving closed-loop adaptive optimization of path planning and execution.
[0087] From the above, we can conclude that:
[0088] This invention innovatively proposes a "trajectory decoupling" step by introducing graph neural networks and topology data analysis technology: First, a factory spatial topology map is constructed, and the "spatial degree of freedom factor" reflecting the degree of spatial constraints of the passage is calculated. Then, the spatial constraint components of the trajectory are extracted through a graph neural network encoder. Combined with dynamically adjusted decoupling strength, the "instantaneous spatial coupling" component caused by physical structural constraints is stripped away, while retaining the "inherent path preference" of the logistics entity. By introducing graph neural networks and topology data analysis technology for trajectory decoupling, the "inherent path preference" and "instantaneous spatial coupling" components in the trajectory are effectively separated, fundamentally solving the problem of pseudo-cluster generation caused by trajectory spatial coupling. Actual testing shows that in areas with high spatial constraints, the pseudo-cluster generation rate has decreased from over 30% to below 5%, significantly improving the accuracy of path pattern recognition.
[0089] This invention fundamentally improves the rationality of path planning by enhancing the spatiotemporal density clustering algorithm and the path planning method based on an accurate pattern library. On one hand, the improved clustering algorithm introduces a "composite density threshold" and an "adaptive trajectory number threshold" mechanism: the composite density threshold is dynamically adjusted based on the spatial degree-of-freedom factor (the smaller the spatial constraint, the higher the tolerance for trajectory morphology diversity), while the adaptive trajectory number threshold changes dynamically according to the amount of trajectory data (a fixed lower limit is set when the data volume is small to prevent clustering instability, and the threshold is increased to enhance confidence when the data volume is large), thus more accurately identifying high-frequency path patterns. On the other hand, the path optimization stage solves for the optimal path based on a multi-dimensional spatiotemporal cost function (comprehensive transportation time, safety risk, and time deviation), where the weight coefficients of the cost function (efficiency, safety, and time priority) can be dynamically adjusted according to the business scenario (e.g., increasing safety weight by 2.5 times during peak hours and increasing time weight by 3 times for urgent tasks). This allows new task AGVs to no longer be forcibly incorporated into existing queues, but instead to activate backup channels based on the real-time environment and task requirements. Practical application data shows that the average driving distance of logistics equipment has been shortened by 10% to 15%, transportation time has been reduced by 15% to 20%, and the flexibility of equipment operation and the rationality of route planning have been significantly enhanced.
[0090] This invention fundamentally improves the operational efficiency of logistics systems by eliminating spurious clusters and enhancing the rationality of path planning. On the one hand, congestion and waiting times caused by unreasonable path planning are significantly reduced, resulting in a substantial improvement in the timeliness and accuracy of cargo transportation. On the other hand, the dynamic adjustment step monitors the deviation between the actual and planned paths using the "deviation entropy" index (the higher the entropy value, the more unstable the deviation), triggering incremental updates to the path pattern library and adjustments to the cost function parameters. This forms a closed-loop optimization mechanism of "data acquisition - trajectory decoupling - cluster analysis - path optimization - deviation feedback," ensuring the system can continuously adapt to environmental changes. In practical applications, factory throughput has increased by 15%–25% compared to traditional methods, significantly improving the operational efficiency of logistics equipment, effectively ensuring the continuity of smart factory production, and providing strong support for the efficient operation of the manufacturing industry.
[0091] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variations thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0092] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins, characterized by: The method includes the following steps: S1: First, perform data synchronization: The distributed sensor network collects the location, speed, and environmental data of logistics entities at a preset cycle, and maps them to the digital twin platform in real time to generate a dynamic twin dataset; S2: Perform trajectory reconstruction: Respond to logistics task completion events or time window trigger conditions, reconstruct the structured spatiotemporal trajectory of the entity, and extract trajectory feature vectors containing spatial distribution features, dynamic interaction features, and correlation features. S3: Decouple the trajectory: In response to the trajectory feature vector generation event in step S2, construct the factory space topology graph G=(V,E), where vertex V is the key node of the path and edge E is assigned attributes. ; Calculate spatial degree of freedom factor based on channel width w width w is the current channel width. min The function is the minimum reference value for the channel width in the system. The output value range is (0,1), when the channel width... Approaching the minimum value At that time, spatial degree of freedom factor A decreasing value indicates low channel freedom and strong constraints; when the channel width... Significantly greater than hour, An increase in the value indicates a higher degree of freedom for the path segment; the spatial constraint components of the trajectory are extracted by a graph neural network encoder, and then... Strip the coupling components to generate a decoupled trajectory; S4: Perform cluster analysis: Input the decoupled trajectory into the improved spatiotemporal density clustering algorithm, using a composite density threshold. and adaptive threshold Identify high-frequency path patterns and construct a path pattern library containing core node sequences, spatiotemporal constraints, and confidence scores, εs pace ε represents the basic spatial distance threshold. time This represents the time distance threshold, limiting the proximity of trajectory points in the time dimension to ensure the consistency of clustering over time; N total This represents the total number of trajectories currently being processed. MinTrajs controls the minimum number of trajectories that must be included in each cluster. S5: Perform route optimization: In response to new logistics tasks or pattern library update events, match task requirements with the path pattern library, solve for the optimal path based on the spatiotemporal cost function, and send it to the logistics equipment. S6: Perform the final dynamic adjustment step: based on the deviation entropy between the actual path and the planned path. Trigger incremental updates to the path pattern library and adjustment of cost function parameters; In step S3, during the coupling component stripping stage, the original trajectory point sequence Ti and the topological graph G are simultaneously input into the graph neural network encoder. A three-layer graph convolution operation is used to extract the spatial deformation features induced by the structure in the trajectory. The system dynamically adjusts the decoupling strength λ as follows: The lower the degree of freedom, the smaller ϕ and the larger λ, thus enhancing the ability of the decoupling operation to correct the influence of topological constraints; finally, trajectory decoupling is achieved through the following formula: Among them, GNN Encoder (Ti,G) represents the spatial constraint component extracted by the graph neural network encoder.
2. The method for dynamic optimization of intelligent factory logistics paths based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S2, the extraction of trajectory feature vectors includes three types of information: spatial distribution features, dynamic interaction features, and association features, which respectively characterize the behavior patterns of logistics entities in the spatiotemporal process from different dimensions.
3. The method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S3, trajectory decoupling is achieved by introducing a spatial topology awareness mechanism to remove trajectory constraint components caused by factory structure limitations, thereby more accurately extracting the autonomous navigation behavior of logistics entities. Firstly, in the spatial topology graph construction stage, the internal structure of the factory is abstracted as a graph G=(V,E), where vertices V represent intersection nodes and workstations, and edges E represent logistics channels. Three types of attributes are bound to each edge: length l length Channel width w width With maximum capacity c capacity Construct a navigation graph structure with physical constraints.
4. The method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S4, the improved spatiotemporal density clustering algorithm enhances its ability to identify high-frequency logistics paths and abnormal trajectories by introducing a composite density threshold and an adaptive trajectory number threshold mechanism. First, the composite density threshold is defined as follows: Where, εs pace This represents the basic spatial distance threshold, controlling the clustering range of trajectory points in the spatial dimension; W zone It is a spatial weighting factor, dynamically adjusted based on the real-time congestion index of the current region. The more congested the region, the higher the weighting factor. zone The value tends to increase, thus increasing the local spatial density threshold and reflecting the influence of the environment on clustering sensitivity; ε time This represents the time distance threshold, which limits the proximity of trajectory points in the time dimension to ensure the consistency of clustering over time. Then, set the adaptive minimum trajectory number threshold: Where, N total This represents the total number of trajectories currently being processed. MinTrajs controls the minimum number of trajectories that must be included in each cluster. In step S4, during density clustering, the spatial weighting factor in the composite density threshold is no longer based on the static congestion index, but directly uses the spatial degree-of-freedom factor ϕ calculated in the decoupling stage, i.e. Where the larger ϕ is, the higher the spatial tolerance of trajectory distribution during the clustering process, and ε space With ε time This serves as the basic distance threshold for both spatial and temporal dimensions.
5. The method for dynamic optimization of intelligent factory logistics paths based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S4, the cluster analysis introduces decoupling trajectories and spatial degree-of-freedom factors, and adopts an improved composite distance metric formula for distance measurement: ; in, ϕ represents the Euclidean distance between the decoupled trajectories i and j, used to reflect the geometric differences in trajectory morphology. i With ϕ j , respectively, are the average spatial degrees of freedom factors of the path segments traversed by the trajectories, used to measure the difference in the degree of physical structural constraints between the two trajectories, and μ is the structural weight factor.
6. The method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S4, trajectories that are not classified into any cluster in the clustering results are considered noise trajectories. The system performs secondary analysis on these trajectories. The method is as follows: calculate the distance distribution between the trajectories and the decoupled trajectories of each identified cluster center. If the distance between a noise trajectory and a certain cluster center continuously falls outside the preset interval in multiple time periods, and the deviation trend remains continuous within a certain period, then the trajectory is considered to represent a new path behavior intention. After the continuous exceedance condition is met, the system generates a temporary path pattern for the trajectory and adds it to the pattern library.
7. The method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S5, the core of path optimization is a spatiotemporal cost function constructed based on multidimensional factors to quantify the comprehensive cost of candidate paths in terms of transportation efficiency, safety risk, and time deviation; the specific cost function form is as follows: Among them, T travel Estimating travel time for a route measures its cost in terms of transportation efficiency; d t d represents the spatial distance between a logistics entity and the nearest obstacle or other moving unit at time t. safe The first term represents the safe distance threshold, and k is the growth coefficient of the distance penalty, causing the risk term to increase exponentially as the safe distance approaches. The second term comprehensively reflects the level of potential safety hazards that may occur along the entire route. The last term |T actual -T expected | indicates the degree of deviation between the actual completion time and the expected time of the task, and evaluates the accuracy of the task's time achievement; The three costs are dynamically adjusted by weighting coefficients α, β, and γ; where α represents the priority of efficiency, β represents the sensitivity to the safety distance, and γ controls the weight of the time deviation penalty.
8. The method for dynamic optimization of logistics paths in smart factories based on spatiotemporal trajectory clustering of digital twins as described in claim 1, characterized in that: In step S6, the deviation entropy processing measures the randomness and uncertainty of path execution deviation to ensure the stability and adaptability of the path optimization system. First, the entropy index of path deviation is calculated: ; Where, p m Let E represent the probability distribution within the m-th type of deviation interval. dev The system measures the dispersion and unpredictability of path execution deviations. When the entropy value exceeds a set threshold, it indicates that the path deviation has become highly unstable and difficult to predict using the existing pattern library. At this point, the system freezes the current path pattern library and stops adding new patterns to avoid contamination by erroneous information.
Citation Information
Patent Citations
Intelligent target distribution method and system based on deep reinforcement learning
CN119849894A
Dynamic cooperative control method and system for digital twin-driven warehousing equipment
CN120181362A