An intelligent distribution trolley dynamic path planning method and system based on space-time demand prediction and rolling time domain optimization

By combining a spatiotemporal gridded model and adaptive kernel density estimation with rolling temporal optimization, the problems of insufficient demand forecasting and lack of foresight in path optimization in last-mile logistics delivery are solved, achieving efficient and adaptive dynamic path planning and improving the efficiency of last-mile logistics delivery.

CN123140804APending Publication Date: 2026-11-20SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611308096.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The current last-mile logistics delivery lacks refined modeling and prediction of the spatiotemporal distribution of demand, route optimization lacks forward-looking consideration of future orders, and lacks online adaptive learning capabilities, resulting in low efficiency of dynamic route planning.

Method used

Demand forecasting is performed using a spatiotemporal gridded model combined with adaptive kernel density estimation. Future opportunity benefit targets are introduced under the rolling temporal optimization framework. The path is optimized through a hybrid variable neighborhood local search algorithm, and online incremental learning capability is also provided to construct a closed-loop mechanism of "prediction-planning-execution-learning".

Benefits of technology

It significantly improves the quality of path optimization and the system's adaptability, enhances the ability to capture areas with high future demand, meets the computational efficiency requirements for real-time decision-making, and adapts to the time-varying characteristics of demand.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140804A_ABST
    Figure CN123140804A_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent distribution trolley dynamic path planning method and system based on space-time demand prediction and rolling time domain optimization.The distribution service area is modeled by space-time gridding;Based on the adaptive kernel density estimation method, the order generation probability density function of each grid unit in different time periods is extracted, and the expected order generation quantity of each space-time window in the future is predicted;An improved greedy insertion algorithm is used to construct an initial distribution path;At each rolling decision time, the opportunity return of the grid area around the path is evaluated based on the prediction model, a multi-objective optimization function is constructed, and a hybrid variable neighborhood local optimization algorithm is used to solve the optimal path of the current rolling window, which is executed by the distribution trolley.The application overcomes the limitations of traditional static vehicle path planning methods, such as difficulty in adapting to dynamic order arrival, high computational overhead of frequent global re-planning, and lack of proactive prediction ability for future demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent logistics and autonomous driving technology, specifically involving a dynamic path planning method and system for intelligent delivery vehicles based on spatiotemporal demand prediction and rolling time-domain optimization. It is applicable to real-time path optimization and scheduling decisions for dynamic order arrivals in last-mile logistics delivery scenarios. Background Technology

[0002] With the rapid development of e-commerce and on-demand delivery services, last-mile logistics delivery faces increasingly severe efficiency challenges. In typical last-mile delivery scenarios, intelligent delivery vehicles (such as unmanned delivery vehicles and autonomous delivery robots) need to continuously receive dynamically arriving order requests within their service area and adjust their routes in real time while meeting the constraints of each order's pickup and delivery time window, in order to minimize delivery costs and maximize service efficiency. This problem is essentially a Dynamic Vehicle Routing Problem (DVRP), and its core difficulty lies in the uncertainty of order arrival time, spatial location, and service time window, as well as the computational timeliness requirements for real-time decision-making in a dynamic environment.

[0003] Currently, methods for solving dynamic vehicle routing problems are mainly divided into three categories. The first category is periodic re-optimization methods, which treat all known unfinished orders as a static problem and perform global replanning within each decision cycle. The advantage of this type of method is that it can obtain a globally optimal or near-optimal solution based on the current information, but its computational cost increases sharply with the problem size, making it difficult to meet the real-time requirements of high-frequency dynamic decision-making. The second category is insertion-based heuristic methods, which find the insertion position with the minimum cost increment in the current path to complete local adjustments whenever a new order arrives. This type of method is computationally efficient, but lacks forward-looking consideration of future order arrivals, easily leading to suboptimal short-term optimal decisions in the long term—a "myopia" problem in path optimization. The third category is methods based on stochastic programming or robust optimization, which improve the forward-looking nature of decisions by explicitly modeling the uncertainty of future demand. However, these methods usually rely on prior assumptions about demand distribution, and the model solution complexity is high, making it difficult to adapt to real-world application scenarios with non-stationary demand distributions.

[0004] Furthermore, existing methods generally suffer from the following shortcomings: First, they lack the ability to finely model and predict the spatiotemporal distribution patterns of demand within the service area, making it difficult to effectively utilize the spatiotemporal demand patterns contained in historical order data. Second, the "serviceability of potential future orders" is not explicitly considered as an optimization objective during the route optimization process, resulting in optimized routes that, while highly efficient in serving current orders, may deviate from areas with high future demand, thus missing opportunities to capture future orders. Third, they lack online learning and adaptive model update mechanisms, failing to automatically adjust the demand forecasting model to adapt to the time-varying characteristics of demand based on the continuous accumulation of actual operational data. Therefore, there is an urgent need in this field for a dynamic route planning method that can proactively predict the spatiotemporal distribution of demand, proactively balance current service costs and future opportunity benefits in route optimization, and possess online adaptive learning capabilities. Summary of the Invention

[0005] This invention addresses the shortcomings of existing dynamic path planning methods for last-mile logistics delivery, such as insufficient demand forecasting capabilities, lack of forward-looking consideration for future orders in path optimization, and lack of online adaptive learning mechanisms. It provides a dynamic path planning method for intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling temporal domain optimization. This method constructs a spatiotemporal gridded model of the service area, achieves refined spatiotemporal forecasting of order demand based on adaptive kernel density estimation, and uses future opportunity gains as an explicit optimization objective within the rolling temporal domain optimization framework. It efficiently solves for the optimal dynamic path at each decision moment using a hybrid variable neighborhood local search algorithm, while also possessing online incremental learning capabilities to adapt to the time-varying characteristics of demand. This invention overcomes the limitations of traditional static replanning methods, such as high computational cost, lack of forward-looking consideration in insertion methods, and lack of demand forecasting and online learning capabilities, significantly improving the quality of path optimization and the system's adaptability in dynamic delivery scenarios.

[0006] The specific plan is as follows:

[0007] In a first aspect, the present invention provides a dynamic path planning method for intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization, comprising the following steps:

[0008] S1. The delivery service area is modeled in a spatiotemporal grid, and a spatiotemporal order dataset containing order generation time, pickup location, delivery location and time window requirements is collected and constructed. This spatiotemporal grid structure discretizes the continuous service area into regular spatial-temporal units, providing a unified quantitative analysis basis for demand forecasting and route optimization.

[0009] S2. Based on historical spatiotemporal order datasets, an adaptive kernel density estimation method is used to extract the order generation probability density function of each grid cell at different time periods, generating the order demand prediction distribution for each future spatiotemporal window. This method can adaptively adjust the kernel bandwidth to balance the prediction bias and variance, while incorporating a time periodic factor to capture the time-varying pattern of demand.

[0010] S3. At the current decision point, based on the set of received but not completed orders, an improved greedy insertion algorithm is used to construct an initial delivery path. The improved greedy insertion algorithm introduces a forward-looking evaluation mechanism, which comprehensively considers the marginal cost increment and the spatial accessibility impact on future potential orders when evaluating the insertion position, and generates an initial path that takes into account both current service efficiency and future opportunity capture capability.

[0011] S4. At each rolling decision moment, the opportunity benefits of the grid area surrounding the current path are evaluated based on the demand forecast distribution. A multi-objective rolling time-domain optimization function is constructed with the goal of minimizing the travel distance cost and time window violation penalty and maximizing future opportunity benefits. A hybrid variable neighborhood local search algorithm based on 2-opt, Or-opt neighborhood search and exploration insertion operation is used to solve for the optimal or near-optimal dynamic path within the current rolling window.

[0012] S5. The optimized route is issued to the delivery vehicle for execution, and new order data is continuously collected in actual operation. An incremental kernel density estimation update strategy is combined with the time forgetting factor to update the demand forecasting model online, forming a closed-loop optimization mechanism of "prediction-planning-execution-learning".

[0013] Further, in step S1, the spatiotemporal grid modeling divides the delivery service area spatially into equally spaced grid units (e.g., using 200m×200m as the basic spatial unit) and temporally into equal-length time periods (e.g., using 15 minutes as the basic time unit), forming a three-dimensional spatiotemporal grid structure. Each grid unit records the number of orders generated within that spatiotemporal window, the grid affiliation of the order's pickup and delivery locations, and the time window constraint parameters of the orders.

[0014] Further, in step S2, the adaptive kernel density estimation method uses a multidimensional Gaussian kernel function to model each spatiotemporal grid cell separately. For each grid cell... The probability density of order generation in time period k is expressed in the following form:

[0015] ;

[0016] in This represents the total number of orders for that grid cell in historical data within time period k. Let h be the Gaussian kernel function with bandwidth h. Let n be the time when the nth order is generated. For grid cells Adaptive kernel bandwidth.

[0017] nuclear bandwidth Adaptive adjustment based on the historical data volume of the grid cell:

[0018] ;

[0019] in Based on bandwidth, For adjustment coefficients, This represents the total historical order volume for this grid. A time periodicity factor is also introduced. , representing the membership degree of time t to different time patterns such as weekday / weekend, peak / off-peak, etc., and the final predicted distribution is as follows. .

[0020] Furthermore, in step S3, the prospective evaluation mechanism of the improved greedy insertion algorithm is specifically implemented as follows: For each order to be inserted... Iterate through all possible insertion positions in the current path. Calculate two evaluation metrics for each candidate insertion scheme: (a) Marginal cost increment (a) Additional driving distance and potential loss of time window slack due to inserting the order; (b) Spatial accessibility retention. , defined as the weighted number of high-demand prediction grids that the inserted path can cover in each time period. The insertion scheme with the highest overall score is ultimately selected.

[0021] ;

[0022] in, This refers to the marginal cost increment caused by inserting an order (including additional travel distance and time window slack loss). Spatial reachability retention of the inserted path (i.e., the weighted number of high-demand prediction grids that can be covered in each time period). This is a forward-looking weighting coefficient, controlling the degree of emphasis placed on future opportunities.

[0023] Furthermore, in step S4, the complete form of the multi-objective rolling temporal optimization function is:

[0024] ;

[0025] The first item is the total cost of the traveled distance ( For path edge set, The first term is the side length); the second term is the time window violation penalty ( For the set of nodes already served, This is the actual arrival time. For time window, The weighting factor for early arrival penalty. The third item is the opportunity benefit item (weighting coefficient for lateness penalty). The surrounding grid set that is reachable by the path. For grid The probability of predicting order generation. For the expected revenue of the order, Path to grid Distance from the center (This is the distance attenuation coefficient).

[0026] Further, in step S4, the specific search process of the hybrid variable neighborhood local search algorithm is as follows: (1) Using the initial path generated by the improved greedy insertion algorithm as the current solution Calculate its objective function value (2) In each iteration, a neighborhood operation is adaptively selected based on the historical improvement success rate of each neighborhood operation to perturb the current solution and generate candidate solutions. (3) If If the candidate solution is found to be correct, the current solution is updated; otherwise, the simulated annealing acceptance criterion is used to determine the probability. Accepting inferior solutions enhances search diversity, where (3) Set the current temperature parameter; (4) Update the improvement success rate statistics of the selected neighborhood operation; (5) Repeat steps (2)-(4) until the maximum number of iterations is reached or there is no improvement after several consecutive iterations, and output the optimal solution. The adaptive neighborhood selection probability is:

[0027] ;

[0028] in For neighborhood operations The number of successful improvements in the most recent W calls. To prevent small constants with zero probability.

[0029] Furthermore, in step S5, the incremental kernel density estimation update strategy is based on a Bayesian update framework: when new order data is batched... Upon arrival, the grid The kernel density estimate is updated as follows:

[0030] ;

[0031] in For the density estimate before the update, For new data batches Density estimation, The forgetting factor controls the relative weights of new and old data. This incremental update method avoids the computational overhead of recalculating all historical data each time, while the forgetting factor mechanism enables the model to adaptively track the gradual and abrupt changes in demand distribution.

[0032] Secondly, the present invention provides a dynamic path planning system for intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization, for implementing the above method, including:

[0033] The spatiotemporal data acquisition and gridding module is used to collect order data and build and maintain spatiotemporal order datasets;

[0034] The demand forecasting module has a built-in adaptive kernel density estimation model, which is used to generate the order demand forecast distribution for each spatiotemporal grid.

[0035] The rolling time-domain optimization module incorporates an improved greedy insertion algorithm and a hybrid variable neighborhood local search algorithm to solve for the optimal dynamic path at each rolling decision time.

[0036] The online learning and model update module is used to continuously collect actual order data and incrementally update the demand forecasting model; the route execution and communication module is used to distribute optimized routes to delivery vehicles and monitor the execution status.

[0037] Thirdly, for the provided dynamic path planning method for intelligent delivery vehicles based on spatiotemporal demand prediction and rolling time-domain optimization, between steps S2 and S4, an end-to-end alternative based on deep learning can also be adopted: modeling the spatiotemporal grid state of the service area, order distribution, and the vehicle's current location and path information into a spatiotemporal graph structure. , where the node set Includes all spatial grid nodes and delivery vehicle nodes, edge set The encoding focuses on spatial adjacency relationships (between grids) and distance reachability (between grids and vehicles). A spatiotemporal graph attention network is used to propagate and aggregate features of each node in multiple layers, extracting the spatiotemporal evolution features of demand distribution. The path planning problem is modeled as a Markov decision process, with the state being the current spatiotemporal graph representation and the vehicle state, and the action being path adjustment decisions (such as inserting a new order, rearranging service order, adjusting driving direction, etc.). The reward function is defined as a negative objective function value. A deep reinforcement learning algorithm based on proximal policy optimization is used to train the policy network, enabling it to directly output the optimal path adjustment decision in a dynamic environment, achieving integrated end-to-end optimization from demand perception to path decision-making.

[0038] In the aforementioned end-to-end solution, the spatiotemporal graph attention network automatically learns the demand propagation and transfer patterns between different spatiotemporal grid nodes through a multi-head attention mechanism. Specifically, for grid nodes... and Attention weights between The calculation method is as follows:

[0039] ;

[0040] in , For node feature vectors, For spatial distance, , For time identification, For historical orders from the grid To grid The transfer frequency, , , Let || be a learnable nonlinear mapping function, and || denote vector concatenation. and These are trainable parameters. This attention mechanism explicitly encodes three key relationships: spatial proximity, temporal similarity, and historical order transfer frequency, enabling the model to automatically uncover key spatiotemporal factors influencing future order distribution within a unified attention framework.

[0041] Furthermore, the delivery route output in step S4 includes the service order of each order, the estimated time to arrive at each pickup and delivery node, and the suggested driving route; the delivery vehicle mentioned in step S5 includes various types of unmanned delivery vehicles, autonomous driving delivery robots, or intelligent delivery vehicles assisted by human drivers.

[0042] Compared with the prior art, the present invention has the following significant advantages:

[0043] 1. High demand forecasting accuracy: By combining adaptive kernel density estimation with time periodicity factors, it can accurately capture the spatiotemporal distribution pattern of order generation probability in each spatiotemporal grid unit, providing reliable demand forecasting information for path optimization; at the same time, the online incremental update mechanism enables the forecasting model to continuously adapt to the time-varying characteristics of demand.

[0044] 2. Strong forward-looking route optimization: The "opportunity benefit" objective is explicitly introduced into the rolling time-domain optimization framework, which enables route planning to not only consider the service cost of current orders, but also to proactively tilt towards areas with high future demand, significantly improving long-term delivery efficiency.

[0045] 3. Balancing efficiency and quality: The improved greedy insertion algorithm provides high-quality initial solutions, while the hybrid variable neighborhood local search explores multiple neighborhood structures in an adaptive manner, ensuring solution quality while meeting the computational timeliness requirements of real-time decision-making.

[0046] 4. Strong online adaptive capability: The incremental kernel density estimation update strategy combined with the time forgetting factor enables the system to automatically adjust the prediction model based on actual operational data, without the need for offline batch retraining, and adapts to non-stationary changes in demand distribution.

[0047] 5. Flexible and complete technical path: The method provides a complete technical spectrum from the traditional two-stage "prediction + optimization" method to the integrated end-to-end method based on deep reinforcement learning, which can adapt to the needs of different data conditions, computing resources and application scenarios.

[0048] The method provided by this invention has refined demand forecasting capabilities, a forward-looking path optimization mechanism, and online adaptive learning capabilities. It can serve as the core scheduling engine of the last-mile intelligent delivery system, providing important technical support for the large-scale application of smart logistics and autonomous driving delivery. Attached Figure Description

[0049] Figure 1 This is an overall flowchart of the dynamic path planning method based on spatiotemporal demand prediction and rolling time-domain optimization of the present invention. Detailed Implementation

[0050] In the following description, specific parameter values ​​(such as grid size, time period length, algorithm hyperparameters, etc.) are proposed for illustrative purposes and not for limitation, in order to provide a thorough understanding of the invention. However, those skilled in the art will understand that the invention can also be implemented in other embodiments without these specific details.

[0051] Example 1:

[0052] This embodiment provides a dynamic path planning method for intelligent delivery vehicles based on spatiotemporal demand prediction and rolling time-domain optimization. Specifically, it is a rolling time-domain optimization method based on adaptive kernel density estimation and hybrid variable neighborhood search. The application scenario is urban last-mile delivery, with a service area of ​​a 5km × 5km urban block, and several intelligent delivery vehicles deployed. The system operation flow is as follows:

[0053] 1. Spatiotemporal gridded modeling and data acquisition;

[0054] The service area is spatially divided into 625 grid units of 25×25 meters (each grid is 200m×200m), and temporally, the day is divided into 96 time slots (each time slot is 15 minutes). Each grid unit... Maintain the following statistics: the number of historical orders within this time window. The system includes: grid distribution of order pickup and delivery locations; average time window width and preferred time window period for each order. Whenever a new order arrives, the system records its generation timestamp, pickup location coordinates and grid index, delivery location coordinates and grid index, and the time window constraints formed by the earliest pickup time and latest delivery time.

[0055] 2. Adaptive kernel density demand forecasting;

[0056] For each time period k of each grid cell (i,j), based on the past Heaven (as) A kernel density estimation model is constructed using historical order data from (days). Let the historical order set be denoted as . Each order Includes its generation time (Normalized to) (hours). The probability density function estimate for the order generation time is:

[0057] ;

[0058] in This is a standard Gaussian kernel function. Bandwidth. The adaptive calculation formula is:

[0059] ;

[0060] in Based on the minimum bandwidth (e.g., 0.25 hours). For maximum bandwidth (e.g., 2 hours). This represents the total historical order volume for this grid across all time periods. The attenuation constant (e.g.) This design ensures that sparse grids use a larger bandwidth (0.5-2 hours) (biased to a smooth, uniform distribution), while data-rich grids use a smaller bandwidth (0.1-0.5 hours) (to preserve fine temporal structure).

[0061] Time periodicity factor Extracted based on Fourier analysis of historical data:

[0062] ;

[0063] in The amplitude and phase of the daily periodic component. The amplitude and phase of the semi-daily (12-hour) component are determined from historical data through least-squares fitting. This factor captures the periodic fluctuations in order demand during weekdays / weekends and lunch / dinner peak periods. The final predicted distribution is:

[0064] .

[0065] 3. Improved the greedy insertion initial path construction;

[0066] At this moment of decision-making A known collection of orders that have been received but not yet completed. and the car's current location The improved greedy insertion algorithm is as follows:

[0067] Step 3.1: Initialize the path (Includes only the current location).

[0068] Step 3.2: For Each order is sorted in ascending order of urgency (the difference between the latest pickup time and the current time), with urgent orders being processed first.

[0069] Step 3.3: For the most urgent uninserted orders... Iterate through all feasible pickup insertion positions in R. (Satisfying the time window constraint of o) and the corresponding delivery insertion position (Within a delivery time window that is p and satisfies o), calculate the score for each candidate insertion scheme:

[0070] ;

[0071] The first term represents the marginal travel distance increment caused by inserting an order (negative values ​​indicate cost), and the second term represents the forward-looking benefit of the high-demand grid that path R can cover after insertion. This is the set of grids within the reachable range of the inserted path. Forward-looking weighting. Select the insertion position with the highest score to insert the order. Step 3.4: Repeat step 3.3 until all orders to be inserted have been processed, and output the initial path. .

[0072] 4. Hybrid variable neighborhood scrolling time-domain optimization;

[0073] Rolling time-domain optimization uses Δt (e.g., 5 minutes) as the decision period. At each decision time t_curr, the following optimization process is executed:

[0074] Step 4.1 (Constructing the current state): Obtain the current position of the car. List of orders that have not yet been served in the current path and the demand forecast distribution for the current time period. .

[0075] Step 4.2 (Define the scroll window): The scroll window covers the future starting from the current moment. Time period (e.g.) Orders within the window (i.e., within the next 3 hours) include Orders expected to be served within the service window will be prioritized. Orders placed outside the service window will not have their service order adjusted in this round of optimization.

[0076] Step 4.3 (Define the optimization objective function):

[0077] ;

[0078] Among them, violations of the time window are subject to secondary penalties to more strongly suppress larger violations; in the opportunity gain item... Let R be the shortest Euclidean distance from the path R to the center of grid g. This represents the average profit per order.

[0079] Step 4.4 (Solving the Hybrid Variable Neighborhood Search):

[0080] Initialization: Use the path generated by the improved greedy insertion algorithm as the initial solution. Set the initial temperature. Cooling coefficient Iteration: for iter = 1 to max_iter:

[0081] (a) Adaptive neighborhood selection operation: based on probability distribution Choose an operator (from 2-opt, Or-opt, and probe insertion);

[0082] (b) Apply the selected operator to Generate candidate solutions Ensure that candidate solutions satisfy the time window constraints of all orders;

[0083] (c) Calculation ;

[0084] (d) If ,accept ,renew ;

[0085] Otherwise, by probability accept (Simulated annealing criteria), updated if accepted. ;

[0086] (e) Update temperature Update the neighborhood success statistics window; Termination condition: Or no improvement after K consecutive iterations ( Output: Current optimal solution The optimal path for this round of rolling windows .

[0087] Step 4.5 (Path Execution): The path operations (such as the next access node and the expected route) to be executed in the next decision cycle (i.e., within the Δt time window) in R_opt are sent to the delivery vehicle for execution. Only the operations within Δt are executed; the path portion after Δt will be re-optimized at the next rolling decision time to respond to any new orders that may arise during the period.

[0088] 5. Online incremental model update;

[0089] At the end of each decision cycle, the system integrates the actual new order data that arrived during that cycle into a single data batch. For the affected mesh cells, perform incremental kernel density estimation updates:

[0090] ;

[0091] in This represents the subset of orders in batch B that belong to time period k in grid (i,j). Forgetting factor. Set as ,in The desired memory length (in days, e.g.) This design causes the model weights to decay exponentially towards recent data, effectively tracking seasonal changes and trend drift in demand distribution, while avoiding the computational overhead of retraining with all historical data.

[0092] Example 2:

[0093] In this embodiment, a deep learning method is used to replace the explicit demand prediction and step-by-step optimization process. Specifically, it is an end-to-end method based on spatiotemporal graph attention networks and deep reinforcement learning to achieve end-to-end dynamic path planning. The system consists of the following core components:

[0094] 1. Spatiotemporal graph construction and node feature representation;

[0095] Construct a spacetime graph at each decision time t. Node set ,in For all spatial grid nodes (the feature vector of each grid includes: the number of historical orders, the distribution of pickup and delivery grids for currently incomplete orders, and statistics on the urgency of orders, etc.), For all delivery vehicle nodes (each vehicle's feature vector includes: current location, remaining load capacity, number of remaining orders on the current route, time window slackness of each order, etc.), the edge set is defined. It includes three types of edges: spatial adjacency edges (connecting adjacent grid nodes, with weight based on spatial distance), reachability edges (connecting vehicle nodes with serviceable grid nodes, with weight based on travel time), and historical transfer edges (connecting grid node pairs with frequent order transfer relationships, with weight based on normalized transfer frequency).

[0096] 2. Spatiotemporal graph attention network layer;

[0097] A spatiotemporal graph attention network with L stacked layers is used for node feature propagation. For the l-th layer, node... The update process is as follows: First, for the node Each neighbor Calculate the multi-head attention weights (taking the m-th attention head as an example):

[0098] ;

[0099] Then, aggregate the neighbor features: Finally, the multi-head outputs are concatenated and fed forward through a feedforward network: After propagation through L layers, the final spatiotemporal representation of each node is obtained. This representation integrates spatial, temporal, and semantic association information within a multi-hop range.

[0100] 3. Decision network based on proximal policy optimization;

[0101] The dynamic path planning problem is modeled as a Markov decision process. At each decision time t, the policy network... In the current state (i.e., space-time graph) The global aggregation vector represented by all nodes in the vector. (Input) is the path adjustment action for the output. The probability distribution is given. The action space includes: keeping the current path unchanged; inserting a new order at a certain position in the path; swapping the service order of two orders in the path; adjusting the next target of the current path to a high-demand prediction grid direction, etc. The reward function is defined as: That is, the negative value of the objective function plus the positive incentive for completed service orders. The policy network is trained using the proximal policy optimization algorithm, with the optimization objective being:

[0102] ;

[0103] in Importance sampling ratio, For the estimation of the advantage function, These are the trimming parameters.

[0104] 4. Training and deployment;

[0105] Training Phase: A simulation environment is constructed using historical order datasets. Within this environment, a large number of training trajectories are generated through a self-play mechanism. The policy network, value network, and spatiotemporal graph attention network are jointly trained end-to-end until the policy converges to a preset performance threshold. Deployment Phase: The trained model is deployed to the actual delivery system. At each decision point, the system collects the current spatiotemporal grid state and vehicle state, inputting this data into the model to directly output a path adjustment decision. Simultaneously, the system continuously collects operational data for periodic fine-tuning and updates to the model, maintaining its adaptability to changes in demand distribution.

[0106] The above-described Embodiment 1 and Embodiment 2 represent two implementation paths of the present invention: Embodiment 1 adopts a two-stage "prediction-optimization" framework, which features strong model interpretability, relatively low data volume requirements, and moderate computational resource demands, making it suitable for deployment in the early stages of data accumulation or in scenarios with limited computational resources; Embodiment 2 adopts an end-to-end deep learning framework, which can automatically mine complex nonlinear patterns in high-dimensional spatiotemporal data, making it suitable for obtaining better decision quality in scenarios with abundant data and sufficient computational resources. The two implementation paths can be flexibly selected or combined according to the actual application scenario.

[0107] After model training or parameter configuration is completed, the entire system is deployed to the actual last-mile delivery operation environment. Within the service area, the delivery vehicles maintain a real-time connection with the central dispatch system via wireless communication modules. The system automatically executes a complete closed-loop process of "status acquisition—demand forecasting—route optimization—instruction issuance" once every rolling decision cycle (e.g., every 5 minutes). The delivery vehicles perform pickup and delivery tasks according to the optimized routes, while simultaneously transmitting real-time location, order completion status, and other feedback information back to the dispatch system, forming a closed-loop control system.

[0108] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A dynamic path planning method for intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization, characterized in that, Includes the following steps: S1. Model the delivery service area in a spatiotemporal grid to obtain several equally spaced grid cells, and collect and construct a historical spatiotemporal order dataset that includes order generation time, pickup location, delivery location and time window requirements; S2. Based on the historical spatiotemporal order dataset, the adaptive kernel density estimation method is used to extract the order generation probability density function of each grid cell at different time periods, and generate the order demand prediction distribution for each future spatiotemporal window. S3. At the current decision point, based on the set of received but not completed orders, construct the initial delivery route using an improved greedy insertion algorithm; S4. At each rolling decision moment, the opportunity benefits of the grid area surrounding the current path are evaluated based on the order demand forecast distribution. A multi-objective rolling time-domain optimization function is constructed with the goal of minimizing the travel distance cost and time window violation penalty and maximizing future opportunity benefits. The optimal dynamic path in the current rolling window is solved by a hybrid variable neighborhood local search algorithm. S5. Deploy the optimal dynamic path to the delivery vehicle for execution, and continuously collect newly generated order data during actual operation to update the kernel density estimation model and demand forecast distribution online.

2. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S1, the spatiotemporal gridding modeling specifically involves dividing the delivery service area into equally spaced grid units in space and into equal-length time periods in time, forming a three-dimensional spatiotemporal grid structure. ,in For spatial grid indexing, It serves as a time-period index; each grid cell records the number of orders generated within that spatiotemporal window, order characteristic parameters, and time window constraint information.

3. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S2, the adaptive kernel density estimation method uses a multidimensional Gaussian kernel function to estimate the probability density function of order generation time for each spatiotemporal grid cell. The kernel bandwidth parameter is adaptively adjusted according to the amount of historical order data in each grid cell. A bandwidth ranging from 0.5 to 2 hours is used in sparse data regions to enhance generalization ability, while a bandwidth of 0.1 to 0.5 hours is used in dense data regions to preserve local details. At the same time, a time periodicity factor is introduced to model weekdays / weekends and peak / off-peak periods to capture the time-varying distribution characteristics of order demand.

4. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S3, the improved greedy insertion algorithm introduces a forward-looking evaluation mechanism on the basis of greedy insertion: for each uninserted order, not only is its optimal insertion position and marginal cost increment in the current path calculated, but also the impact of the insertion position on the spatial accessibility of future potential orders is evaluated based on the order demand forecast distribution. The insertion scheme with the minimum marginal cost and the best retention of future order coverage capability under the time window constraint is selected first, thereby generating an initial path that takes into account both current service efficiency and future opportunity capture capability.

5. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S4, the multi-objective rolling temporal optimization function is defined as: ; in, The total cost of the delivery route's travel distance. Penalties for violations within the time window include penalties for arriving early and penalties for arriving late. For opportunity benefit items assessed based on demand forecast distribution, These are the weighting coefficients for each item; the opportunity benefit item... Defined as follows: For the surrounding grid area that the current path can cover in each time period, the expected revenue of potential orders is weighted and summed using the predicted order generation probability of that grid as the weight, and multiplied by the probability decay factor of the path being able to serve that grid. The greater the opportunity revenue, the smaller the objective function value.

6. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S4, the hybrid variable neighborhood local search algorithm employs a multi-neighborhood structure combination strategy, including: 2-opt neighborhood operation: swaps and reconnects any two edges in the path to eliminate path intersections and shorten the total travel distance; Or-opt neighborhood operation: migrates a continuous segment of nodes in a path to another location in the path to optimize the node service order; Exploratory insertion operation: Based on the demand forecast distribution, attempt to insert virtual orders in high-demand probability grid areas traversed by the path, and evaluate the expected service benefits to future real orders after insertion; An adaptive neighborhood selection strategy is adopted during the search process. The probability of each neighborhood operation being selected is dynamically adjusted based on the success rate of the improved neighborhood operations in recent iterations, so as to improve search efficiency.

7. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, In step S5, the online update of the kernel density estimation model and the demand forecast distribution adopts an incremental kernel density estimation update strategy: when new order data arrives, the kernel density estimation of all historical data is not recalculated, but the existing estimates are updated by Bayesian incremental update based on the new data; at the same time, a time forgetting factor λ∈(0,1] is introduced to exponentially decay the weight of historical data, so that the contribution weight of recent order data to demand forecast is higher than that of long-term data, in order to adapt to the non-stationary time-varying characteristics of delivery demand.

8. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 1, characterized in that, The optimal dynamic path in step S4 can also be obtained through an end-to-end deep learning method: the spatiotemporal grid state of the service area, order distribution, and the current location and path information of the vehicle are modeled as a spatiotemporal graph structure, with nodes being grid cells and delivery vehicles, and edges encoding spatial adjacency relationships and distance reachability; Based on the spatiotemporal graph attention network, the spatiotemporal evolution features of demand distribution are extracted, and the path planning problem is modeled as a sequential decision process. A deep reinforcement learning method based on proximal policy optimization is adopted to minimize long-term cumulative cost and directly output the optimal dynamic path at each decision moment.

9. The method for dynamic path planning of intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization according to claim 8, characterized in that, The spatiotemporal graph attention network automatically learns the demand propagation and transfer patterns between different spatiotemporal grid nodes through a multi-head attention mechanism; Its attention weight matrix explicitly encodes three types of relationships: spatial proximity, temporal similarity, and historical order transfer frequency. Without relying on an explicit demand forecasting model, it can automatically mine key spatiotemporal factors that affect future order distribution through end-to-end training, providing implicit demand forecasting information for path planning.

10. A dynamic path planning system for intelligent delivery vehicles based on spatiotemporal demand forecasting and rolling time-domain optimization, used to implement the method described in any one of claims 1-7, characterized in that, include: The spatiotemporal data acquisition and gridding module is used to collect order data and build and maintain spatiotemporal order datasets; The demand forecasting module has a built-in adaptive kernel density estimation model, which is used to generate the order demand forecast distribution for each spatiotemporal grid. The rolling time-domain optimization module incorporates an improved greedy insertion algorithm and a hybrid variable neighborhood local search algorithm to solve for the optimal dynamic path at each rolling decision time. The online learning and model update module is used to continuously collect actual order data and incrementally update the demand forecasting model; The route execution and communication module is used to distribute optimized routes to delivery vehicles and monitor their execution status.