Vehicle dispatching system based on consumer goods logistics
By using timing models and graph structure models in the consumer goods logistics scheduling system, combining dynamic demand and spatial distribution, and optimizing distribution paths, the problem that existing systems are difficult to achieve efficient distribution paths in multiple scenarios is solved, and the efficiency and flexibility of logistics scheduling are improved.
Patent Information
- Application Number
- CN202510025946.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-08
AI Technical Summary
When responding to dynamic changes in existing consumer goods logistics scheduling systems, it is difficult to comprehensively consider factors such as complex scenarios, weather impacts and traffic congestion at multiple distribution points, resulting in low efficiency and insufficient flexibility in distribution path optimization.
By introducing the current logistics parameter acquisition unit, demand prediction unit and vehicle distribution path scheduling unit into the vehicle scheduling system, demand prediction and path optimization are performed using the timing model and graph structure model. The timing model captures the timing laws of consumer product demand, while the graph structure model optimizes the distribution path based on the spatial distribution and dynamic demand changes of distribution points.
It realizes efficient distribution path optimization in multiple scenarios, improves the efficiency and flexibility of logistics scheduling, and ensures the overall efficiency and timeliness of distribution paths.
Smart Images

Figure CN119417002B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle dispatching, and in particular to a vehicle dispatching system based on consumer goods logistics. Background Art
[0002] With the rapid development of e-commerce and modern logistics industries, the diversity and complexity of consumer goods distribution needs have increased significantly. Traditional vehicle scheduling methods are usually based on static demand forecasts and fixed route planning, and cannot respond to dynamic changes in demand, weather impacts, traffic congestion and other issues in complex distribution scenarios in real time.
[0003] The patent document with patent publication number CN106022672A discloses a logistics system and a cargo distribution method. By constructing a new freight organization model, developing ecological logistics system facilities, innovating information networks, and establishing a logistics system based on equivalent exchange, we strive to make human material circulation activities conform to the living conditions of organisms in the world and form a unified whole with the environment. However, the consumer goods logistics scheduling system in the prior art still has many shortcomings in responding to dynamically changing needs. For example, for complex scenarios with multiple distribution points, there is still a lack of effective methods to comprehensively consider factors such as dynamic demand changes, weather effects, and traffic congestion. This makes it difficult for existing systems to achieve efficient distribution path optimization in multiple scenarios, limiting the efficiency and flexibility of logistics scheduling. Summary of the invention
[0004] In view of the deficiencies of the prior art, the present invention provides a vehicle dispatching system based on consumer goods logistics, which solves the technical problems raised in the background technology by generating an optimized distribution path according to path weight sorting.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0006] A vehicle dispatching system based on consumer goods logistics, the vehicle dispatching system comprising:
[0007] The current logistics parameter acquisition unit is used to obtain the real-time inventory level of consumer goods at the vehicle's starting delivery point, the last delivery demand at the delivery point, the current weather classification label and geographic coordinates of the delivery point, and input them into the demand forecasting model;
[0008] A demand forecasting unit, used to output the forecasted demand for the consumer goods at the delivery point;
[0009] A vehicle delivery route scheduling unit is used to input the predicted demand, as well as the current weather classification label and geographic coordinates of the delivery point into the scheduling model, and output an optimized delivery route;
[0010] The scheduling model is obtained through iterative training of the graph structure model, and the optimized delivery path is generated from a set of neighbor nodes of the to-be-delivered point according to the path weight sorting.
[0011] In some of the embodiments, the modeling method of the scheduling model includes:
[0012] S1. Obtain a consumer product demand training set; wherein the consumer product demand training set includes a number of demand training samples, each of which is a binary sample collected in a time series at equal intervals within a time window of a fixed length;
[0013] S2, input the consumer product demand training set into the time series model for iterative training;
[0014] S3, when the time series model converges, export it as a demand forecast model;
[0015] S4, inputting the consumer product demand training set into the demand forecasting model, generating forecasted demand quantities corresponding to N time windows, and assigning a unique time sequence number to each forecasted demand quantity according to the time series, so as to construct a forecasted demand quantity set sorted by time sequence number;
[0016] The expression of the predicted demand set is:
[0017] ;
[0018] TD represents the set of forecasted demand. Indicates the Nth time sequence number, Indicates the Nth predicted demand;
[0019] S5, calculating the weighted demand of the predicted demand set;
[0020] S6. define a graph structure of the graph structure model and input it into the graph structure model;
[0021] S7, defining a loss function of the graph structure model, and iteratively updating model parameters of the graph structure model based on the defined loss function until the graph structure model converges;
[0022] S8. Export the graph structure model at the time of convergence as the scheduling model.
[0023] In some embodiments, obtaining a consumer product demand training set includes:
[0024] S1-1. Obtaining a first demand and a second demand for a consumer product within a time window; wherein the first demand represents the demand for the consumer product at a first time point, and the second demand represents the demand for the consumer product at a second time point; the second time point is an offset time point of a fixed time length after the first time point;
[0025] S1-2, obtaining the weather classification label, the geographic coordinates of the delivery point, and the inventory level of consumer goods corresponding to the second time point within the time window;
[0026] S1-3, standardizing the demand for consumer goods at the first time point, the demand for consumer goods at the second time point, weather classification labels, geographic coordinates of the points to be delivered, and inventory levels of consumer goods;
[0027] S1-4, defining the demand for consumer goods at the first time point after standardization, the weather classification label corresponding to the second time point, the geographical coordinates of the delivery point, and the inventory level of consumer goods as input features of the demand training sample, and defining the demand for consumer goods at the second time point after standardization as a target label, so as to construct the demand training sample;
[0028] S1-5. Collect demand training samples within N time windows and combine them to obtain the consumer product demand training set.
[0029] In some embodiments, calculating the weighted demand of the set of predicted demands includes:
[0030] S5-1, obtaining the predicted demand and the corresponding time sequence number in each time window from the predicted demand set;
[0031] S5-2, calculating the time difference between each time window and the time window with time sequence number N-1;
[0032] The expression for the time difference is: ;
[0033] in, Indicates the time difference, represents the i-th time window, Indicates the N-1th time window;
[0034] S5-3, calculating the ratio of the time difference to the Nth time window, and defining it as the timing weight of each time window;
[0035] ;
[0036] in, The timing weight of each time window, represents the Nth time window;
[0037] S5-4, normalizing the timing weight to obtain a normalized timing weight;
[0038] The expression for normalizing the timing weight is:
[0039] ;
[0040] in, represents the normalized time series weight, represents the sum of the timing weights of all time windows, j represents the index of the time window, and is used to traverse the entire time window ;
[0041] S5-5, performing weighted averaging on the normalized time series weight and the corresponding predicted demand to obtain the weighted demand;
[0042] The weighted average expression is:
[0043] ;
[0044] in, represents the weighted demand, represents the i-th predicted demand.
[0045] In some of the embodiments, defining a graph structure of a graph structure model and inputting it into the graph structure model includes:
[0046] S6-1, defining the to-be-delivered point as a node in a graph structure, wherein the node includes several node features, including the weighted demand, the geographic coordinates of the to-be-delivered point, a weather classification label, and a consumer goods inventory level;
[0047] S6-2, obtaining the average transportation time and congestion coefficient between the delivery points;
[0048] S6-3, defining the physical connection between the points to be delivered as an edge in a graph structure; the edge includes several edge features, including the geographic distance calculated by the coordinates between the points to be delivered, the average transportation time, and the congestion coefficient;
[0049] S6-4. Construct the graph structure according to the node features of the defined several points to be delivered and the edge features between the several points to be delivered; wherein any target node of the graph structure is connected to several neighboring nodes through edges.
[0050] In some embodiments, a loss function of a graph structure model is defined, and model parameters of the graph structure model are iteratively updated based on the defined loss function until the graph structure model converges, including:
[0051] S7-1, receiving the graph structure;
[0052] S7-2, calculating the edge selection weight of each edge according to the node features of the target node and the neighboring nodes in the graph structure, and the edge features of the target node and the neighboring nodes;
[0053] S7-3, performing weighted feature aggregation on the target node according to the edge selection weight of each edge to generate an updated node feature of the target node at the next layer;
[0054] The expression for performing feature weighted aggregation on the target node according to the edge selection weight of each edge is:
[0055] ;
[0056] in, represents the edge selection weight of each edge; Represents the set of neighbor nodes of target node i; represents the node features of neighbor node j at layer k, Indicates weighted aggregation of node features of all neighboring nodes j of target node i; represents a nonlinear activation function; Represents the updated node features of target node i in the next layer;
[0057] S7-4, use edge selection weights to calculate the total path distance loss and the total path time loss;
[0058] The total path distance loss function is: ;
[0059] represents the total path distance loss, represents the geographical distance between the delivery point i and the delivery point j, and E represents the set of all edges in the graph structure;
[0060] The total time loss function of the path is: ;
[0061] represents the total time loss of the path, represents the average transportation time between the delivery point i and the delivery point j;
[0062] S7-5, performing weighted summation of the total path distance loss and the total path time loss to obtain the optimal scheduling loss;
[0063] The optimal scheduling loss function is: ;
[0064] represents the optimal scheduling loss, Represents the weight coefficient of the total path distance loss, which is used to adjust the impact of the total path distance on the optimal scheduling loss. The weight coefficient representing the total time loss of the path is used to adjust the influence of the total path time on the optimal scheduling loss;
[0065] S7-6, using an optimizer to perform gradient descent update on the optimal scheduling loss to obtain updated model parameters;
[0066] S7-7. When the updated model parameters reach the preset parameter threshold, the graph structure model is deemed to have converged.
[0067] In some of the embodiments, calculating the edge selection weight of each edge includes:
[0068] S7-2-1, extracting node features of the target node and neighbor nodes in the graph structure, as well as edge features of the target node and neighbor nodes;
[0069] S7-2-2, concatenating the node features of the target node and the neighboring nodes, and the edge features of the target node and the neighboring nodes to obtain a concatenated vector;
[0070] The expression of the concatenated vector is: ;
[0071] in, represents the concatenated vector, represents the node feature of target node i at layer k, Represents the edge features of the target node and neighbor nodes; Concat represents the concatenation function;
[0072] S7-2-3. In each feature aggregation of the graph structure model, the concatenated vector is input into the embedded MLP architecture, and after several linear and nonlinear transformations, an interaction score is generated;
[0073] The expression for generating the interaction score is:
[0074] ;
[0075] in, The table shows the interaction score of edge (i, j), are the weight matrices of the 1st layer, n-1th layer, and nth layer respectively, are the bias items of the 1st layer, n-1th layer and nth layer respectively, and ReLU is the nonlinear transformation function;
[0076] S7-2-4. Calculate the edge selection weight of each edge according to the interaction score; the edge selection weight is represented by the probability of path selection by the graph structure model;
[0077] The expression for calculating the edge selection weight of each edge is:
[0078] ;
[0079] in, represents the exponential operation of the interaction score, Represents the sum of the interaction score indexes of all neighbor nodes of target node i, so that the sum of all edge selection weights is 1.
[0080] In some of the embodiments, after calculating the edge selection weight of each edge, the method further includes:
[0081] The edge selection weight is defined as the path weight of the point to be delivered;
[0082] From the neighbor node set of the delivery point, select the neighbor node with the largest path weight, and assign a path number to the delivery point;
[0083] Iteratively select neighbor nodes with the largest path weight, sort them according to the path sequence number, and generate an optimized delivery path;
[0084] The generated optimized delivery path is expressed as:
[0085] ;
[0086] represents the optimized delivery path;
[0087] Represents the path number in the delivery path, where: is the path sequence number of the vehicle's starting delivery point in the delivery route. is the path number of the kth delivery point in the delivery path;
[0088] Indicates the next delivery point in the delivery route, which is from the current delivery point The set of neighbor nodes The node selected in
[0089] argmax represents the number of nodes from the neighboring node set Select the neighbor node with the largest path weight;
[0090] represents the edge selection weight between the node corresponding to the kth delivery point and its neighbor node j;
[0091] It means that it is true for every delivery point in the delivery path, and P is the set of delivery points.
[0092] The present invention provides a vehicle dispatching system based on consumer goods logistics, which has the following beneficial effects:
[0093] The present invention gradually completes consumer product demand prediction and distribution path optimization through a phased training method, predicts consumer product demand through a time series model, accurately captures the time series law between historical demand and future demand, and lays a reliable data foundation for path optimization; further, the distribution path is further optimized through a graph structure model, fully considering the spatial distribution of distribution points and dynamic demand changes.
[0094] After completing the demand forecast, we further integrate the optimization goals of path distance and time to provide a multi-dimensional decision basis for the final path planning. During the optimization process, the total path distance loss ensures the overall efficiency of the distribution path, while the total path time loss improves the timeliness of logistics response by quantifying factors such as traffic congestion.
[0095] After completing the graph structure model training, the edge selection weights are further generated through the interactive scoring calculation of nodes and edges, so as to dynamically determine the priority relationship between nodes in the distribution path. By iteratively selecting the neighbor node with the largest path weight, the reasonable allocation of the path number of the delivery point is achieved, and finally the optimized distribution path is generated. This step-by-step path planning method fully considers the dynamic characteristics of the logistics scene, so that the generated distribution path provides a more suitable scheduling solution for the vehicle scheduling of consumer goods logistics. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 It is a structural block diagram of the vehicle dispatching system based on consumer goods logistics of the present invention;
[0097] Figure 2 It is a dispatching flow chart of the vehicle dispatching system based on consumer goods logistics of the present invention;
[0098] Figure 3 The present invention is a flow chart of a modeling method for the scheduling model; DETAILED DESCRIPTION
[0099] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0100] First, the prior art and related concepts involved in the embodiments of the present invention are described:
[0101] MLP architecture (Multi-Layer Perceptron): is a basic neural network structure, usually composed of several fully connected layers. It can extract and combine complex features of input data through nonlinear transformation.
[0102] Example 1: Please refer to Figure 1 The present invention provides a vehicle dispatching system based on consumer goods logistics, comprising:
[0103] The current logistics parameter acquisition unit is used to obtain the real-time inventory level of consumer goods at the vehicle's starting delivery point, the last delivery demand at the delivery point, the current weather classification label and geographic coordinates of the delivery point, and input them into the demand forecasting model;
[0104] A demand forecasting unit, used to output the forecasted demand for the consumer goods at the delivery point;
[0105] A vehicle delivery route scheduling unit is used to input the predicted demand, as well as the current weather classification label and geographic coordinates of the delivery point into the scheduling model, and output an optimized delivery route;
[0106] The scheduling model is obtained through iterative training of the graph structure model, and the optimized delivery path is generated from a set of neighbor nodes of the to-be-delivered point according to the path weight sorting.
[0107] This embodiment can provide high-quality input data for the demand forecasting model by acquiring the inventory level of consumer goods at the vehicle's starting delivery point, the historical delivery demand of the delivery point, and the current external environment (weather classification labels and geographic coordinates) in real time, thereby ensuring the accuracy of demand forecasting. At the same time, the vehicle delivery of consumer goods logistics can be carried out according to the optimized delivery path generated based on the path weight sorting, which can improve the delivery efficiency of consumer goods logistics and reduce delivery time and cost.
[0108] Example 2: Participation Figures 1 to 3 The technical solution of this embodiment 2 is different from that of embodiment 1 in that a modeling method of the scheduling model described in embodiment 1 is disclosed, and the modeling method includes:
[0109] S1. Obtain a consumer product demand training set; wherein the consumer product demand training set includes a number of demand training samples, each of which is a binary sample collected in a time series at equal intervals within a time window of a fixed length;
[0110] S2, input the consumer product demand training set into the time series model for iterative training;
[0111] S3, when the time series model converges, export it as a demand forecast model;
[0112] S4, inputting the consumer product demand training set into the demand forecasting model, generating forecasted demand quantities corresponding to N time windows, and assigning a unique time sequence number to each forecasted demand quantity according to the time series, so as to construct a forecasted demand quantity set sorted by time sequence number;
[0113] The expression of the predicted demand set is:
[0114] ;
[0115] TD represents the set of forecasted demand. Indicates the Nth time sequence number, Indicates the Nth predicted demand;
[0116] S5, calculating the weighted demand of the predicted demand set;
[0117] S6. define a graph structure of the graph structure model and input it into the graph structure model;
[0118] S7, defining a loss function of the graph structure model, and iteratively updating model parameters of the graph structure model based on the defined loss function until the graph structure model converges;
[0119] S8. Export the graph structure model at the time of convergence as the scheduling model.
[0120] This embodiment uses the modeling method of the scheduling model to construct the entire process from obtaining the demand for consumer goods to the final generation of the scheduling model. It captures the dynamic changes in consumer demand through iterative training of the time series model and generates high-precision forecast demand; through the construction of the graph structure model and the optimization of the loss function, it considers the geographical relationship between the delivery points, time cost, traffic congestion and other factors to achieve accurate path planning. The two-stage modeling method can improve the adaptability of vehicle scheduling in complex logistics scenarios.
[0121] Furthermore, the S1 specifically includes:
[0122] S1-1. Obtaining a first demand and a second demand for a consumer product within a time window; wherein the first demand represents the demand for the consumer product at a first time point, and the second demand represents the demand for the consumer product at a second time point; the second time point is an offset time point of a fixed time length after the first time point;
[0123] S1-2, obtaining the weather classification label, the geographic coordinates of the delivery point, and the inventory level of consumer goods corresponding to the second time point within the time window;
[0124] S1-3, standardizing the demand for consumer goods at the first time point, the demand for consumer goods at the second time point, weather classification labels, geographic coordinates of the points to be delivered, and inventory levels of consumer goods;
[0125] S1-4, defining the demand for consumer goods at the first time point after standardization, the weather classification label corresponding to the second time point, the geographical coordinates of the delivery point, and the inventory level of consumer goods as input features of the demand training sample, and defining the demand for consumer goods at the second time point after standardization as a target label, so as to construct the demand training sample;
[0126] S1-5, collecting demand training samples within N time windows, and combining them to obtain the consumer product demand training set;
[0127] Specifically, the first demand and the second demand are the sales demand of consumer goods at the first time point and the second time point, respectively. If the samples collected in time series include the first demand and the second demand, it means that there is a continuous time series pattern between each first demand or each second demand. In addition, the continuous first demand and second demand also include the seasonal fluctuation demand and promotion demand of consumer goods. The weather classification label corresponding to the second time point, the geographical coordinates of the delivery point, and the inventory level of consumer goods are demand influencing factors that affect the second demand. They affect the "future time point" at the first time point, that is, the demand for consumer goods at the second time point, through the weather, the delivery distance, and the inventory level of consumer goods.
[0128] Exemplarily, weather classification labels refer to the classification of different weather conditions, and a label is assigned to each weather category. For example, the weather can be divided into categories such as "sunny", "rainy", "snowy", and "cloudy", and corresponding labels are assigned to these categories (such as digital codes: sunny = 1, rainy = 2, snowy = 3, cloudy = 4). The weather labels can help identify changes in demand under different weather conditions. For example, rainy days may affect the demand for outdoor activity products, while sunny days may increase the demand for certain products.
[0129] The geographic coordinates of the delivery point refer to the geographic coordinates of a warehouse, store, or customer location, usually expressed in the form of longitude and latitude (X, Y). For example, a delivery point may be located at a coordinate position such as (120.15, 30.28); the geographic coordinates of the delivery point help the model understand the location of each delivery point, so as to analyze the impact of geographic location on demand and consider the distance and relative position of different delivery points in route planning.
[0130] The inventory level of consumer goods itself is not a direct demand driver, because consumers usually cannot directly know the inventory status of the goods. However, inventory levels may indirectly affect demand, especially when there is insufficient or excessive inventory. For example, when inventory levels are low, the goods may have a sense of "scarcity", especially on e-commerce platforms. If the product shows "only a few pieces left", consumers may be more inclined to buy it to avoid missing out. This "scarcity effect" can stimulate consumers' purchasing motivation, prompting them to advance or accelerate their purchasing behavior, thereby increasing demand.
[0131] When inventory levels are too high, merchants usually choose to clear inventory through promotions or discounts. In this way, excessive inventory may drive more promotions, indirectly increasing demand for goods. In this case, consumers will be motivated to buy after seeing discounts or promotions, leading to an increase in demand.
[0132] This embodiment refines the collection and processing process of multi-dimensional data within the time window by constructing training samples of consumer product demand. Specifically, by acquiring and standardizing multi-dimensional features such as consumer product demand, weather classification labels, geographic coordinates of distribution points, and inventory levels, the temporal regularity and seasonal fluctuations of demand are effectively captured. At the same time, weather and inventory factors are introduced to improve the model's sensitivity to changes in the external environment. This combination of multi-dimensional features not only enhances the accuracy of demand forecasting, but also provides high-quality input data for subsequent scheduling models, laying the foundation for optimizing distribution routes.
[0133] Furthermore, the S5 specifically includes:
[0134] S5-1, obtaining the predicted demand and the corresponding time sequence number in each time window from the predicted demand set;
[0135] S5-2, calculating the time difference between each time window and the time window with time sequence number N-1;
[0136] The expression for the time difference is: ;
[0137] in, Indicates the time difference, represents the i-th time window, Represents the N-1th time window, that is, the second to last time window;
[0138] S5-3, calculating the ratio of the time difference to the Nth time window, and defining it as the timing weight of each time window;
[0139] ;
[0140] in, The timing weight of each time window, Indicates the Nth time window, that is, the last time window;
[0141] S5-4, normalizing the timing weights to obtain normalized timing weights; the normalized timing weights make the sum of all timing weights equal to 1;
[0142] The expression for normalizing the timing weight is:
[0143] ;
[0144] in, represents the normalized time series weight, represents the sum of the timing weights of all time windows, j represents the index of the time window, and is used to traverse the entire time window ;
[0145] S5-5, performing weighted averaging on the normalized time series weight and the corresponding predicted demand to obtain the weighted demand;
[0146] The weighted average expression is:
[0147] ;
[0148] in, represents the weighted demand, represents the i-th predicted demand.
[0149] This embodiment combines the predicted demand with the time weight through a weight calculation method based on time series, and calculates the weighted demand through weighted average. Specifically, by introducing the time difference and ratio of the time window, different weights are dynamically assigned to the predicted demands of different time series, especially giving higher attention to the demands of the recent time windows. This method can better reflect the impact of recent demand on overall demand and improve the accuracy of weighted demand.
[0150] Furthermore, the S6 specifically includes:
[0151] S6-1, defining the to-be-delivered point as a node in a graph structure, wherein the node includes several node features, including the weighted demand, the geographic coordinates of the to-be-delivered point, a weather classification label, and a consumer goods inventory level;
[0152] S6-2, obtaining the average transportation time and congestion coefficient between the delivery points;
[0153] S6-3, defining the physical connection between the points to be delivered as an edge in a graph structure; the edge includes several edge features, including the geographic distance calculated by the coordinates between the points to be delivered, the average transportation time, and the congestion coefficient;
[0154] Specifically, the geographical distance between the delivery points can be calculated using the Haversine formula, which determines the shortest spherical distance based on the longitude and latitude of two points on the earth's surface; the Haversine formula is:
[0155] ;
[0156] Where d represents the geographical distance between the delivery points, and r represents the radius of the earth (the value is approximately 6371 kilometers); and are the latitudes of the two delivery points (unit: radians); Indicates the latitude difference between the two delivery points; , which represents the longitude difference between the two delivery points.
[0157] The Haversine formula can accurately calculate the distance between two points on a sphere within any range, without the need for additional judgment of the usage scenario (such as "far or near"). Even if the delivery points are located in the same city, the Haversine formula is still applicable and accurate; and the conversion of longitude and latitude to radians is usually implemented directly using tool libraries such as Python and Java.
[0158] Furthermore, the congestion coefficient characterizes the degree of traffic congestion on the mainstream path between two delivery points, reflecting the traffic delay based on the normal delivery time. A higher congestion coefficient indicates that the congestion degree of the path is greater, which may cause delivery delays. The calculation of the congestion coefficient can be based on the ratio of the normal delivery time and the traffic delay time, and its expression is:
[0159] ;
[0160] C represents the congestion coefficient, Indicates the traffic delay time. Indicates normal delivery time.
[0161] S6-4. Construct the graph structure according to the node features of the defined several points to be delivered and the edge features between the several points to be delivered; wherein any target node of the graph structure is connected to several neighboring nodes through edges.
[0162] This embodiment constructs a complete graph structure model by defining the points to be delivered as nodes in the graph structure and comprehensively considering the characteristics of the nodes (including weighted demand, geographic coordinates, weather classification labels, and inventory levels) and the characteristics of the edges (including geographic distance, average transportation time, and congestion coefficient).
[0163] Furthermore, the S7 specifically includes:
[0164] S7-1, receiving the graph structure;
[0165] S7-2, calculating the edge selection weight of each edge according to the node features of the target node and the neighboring nodes in the graph structure, and the edge features of the target node and the neighboring nodes;
[0166] S7-3, performing weighted feature aggregation on the target node according to the edge selection weight of each edge to generate an updated node feature of the target node at the next layer;
[0167] The expression for performing feature weighted aggregation on the target node according to the edge selection weight of each edge is:
[0168] ;
[0169] in, The edge selection weight of each edge represents the importance of the path selection between the delivery points; represents the set of neighbor nodes of target node i, that is, all nodes connected to target node i. represents the node of neighbor node j in the kth layer, Indicates weighted aggregation of node features of all neighboring nodes j of target node i; represents a nonlinear activation function, such as ReLU or Sigmoid, Represents the updated node features of target node i in the next layer;
[0170] S7-4, use edge selection weights to calculate the total path distance loss and the total path time loss;
[0171] The total path distance loss function is: ;
[0172] represents the total path distance loss, represents the geographical distance between the delivery point i and the delivery point j, and E represents the set of all edges in the graph structure;
[0173] The total time loss function of the path is: ;
[0174] represents the total time loss of the path, represents the average transportation time between the delivery point i and the delivery point j;
[0175] S7-5, performing weighted summation of the total path distance loss and the total path time loss to obtain the optimal scheduling loss;
[0176] The optimal scheduling loss function is: ;
[0177] represents the optimal scheduling loss, Represents the weight coefficient of the total path distance loss, which is used to adjust the impact of the total path distance on the optimal scheduling loss. The weight coefficient representing the total time loss of the path is used to adjust the influence of the total path time on the optimal scheduling loss;
[0178] S7-6, using an optimizer to perform gradient descent update on the optimal scheduling loss to obtain updated model parameters;
[0179] Specifically, the optimizer is used to adjust the parameters of the model so that the loss value of the optimal scheduling loss function gradually decreases; and the gradient descent is to calculate the gradient of the optimal scheduling loss function to the model parameters through the back propagation algorithm; among them, the gradient descent algorithm is executed using common optimizers such as SGD, Adam or RMSProp.
[0180] S7-7. When the updated model parameters reach the preset parameter threshold, the graph structure model is deemed to have converged.
[0181] The convergence of the graph structure model indicates that the training of the graph structure model stops, and the graph structure model parameters at this time are the optimal parameters.
[0182] This embodiment constructs a scheduling model based on a graph structure and adopts a layer-by-layer iterative optimization method. By defining the characteristics of the target node and neighbor nodes in the graph structure and combining the edge characteristics of the path, the selection weight of each edge is calculated to characterize the importance of the path. By weighted aggregation of the characteristics of the target node according to the edge selection weight, the characteristics of the target node are updated layer by layer to ensure the high accuracy of the model in feature expression. By defining the total distance loss and the total time loss of the path, and generating the optimal scheduling loss function through weighted summation, the spatial and temporal efficiency of the distribution path is comprehensively optimized.
[0183] Furthermore, S7-2 specifically includes:
[0184] S7-2-1, extracting node features of the target node and neighbor nodes in the graph structure, as well as edge features of the target node and neighbor nodes;
[0185] S7-2-2, concatenating the node features of the target node and the neighboring nodes, and the edge features of the target node and the neighboring nodes to obtain a concatenated vector;
[0186] The expression of the concatenated vector is: ;
[0187] in, represents the concatenated vector, represents the node feature of target node i at layer k, Represents the edge features of the target node and neighbor nodes (such as geographical distance and average transportation time); Concat represents the concatenation function, which can be implemented by the corresponding library function, such as TensorFlow's tf.concat() function;
[0188] S7-2-3. In each feature aggregation of the graph structure model, the concatenated vector is input into the embedded MLP architecture, and after several linear and nonlinear transformations, an interaction score is generated;
[0189] The expression for generating the interaction score is:
[0190] ;
[0191] in, The table shows the interaction score of edge (i, j), are the weight matrices of the 1st layer, n-1th layer, and nth layer respectively, are the bias items of the 1st layer, n-1th layer and nth layer respectively, and ReLU is the nonlinear transformation function;
[0192] S7-2-4. Calculate the edge selection weight of each edge according to the interaction score; the edge selection weight is represented by the probability of path selection by the graph structure model;
[0193] The expression for calculating the edge selection weight of each edge is:
[0194] ;
[0195] in, Represents the exponential operation of the interaction score, which is used to convert the interaction score into a positive value to facilitate weight normalization. Represents the sum of the interaction score indexes of all neighbor nodes of target node i, so that the sum of all edge selection weights is 1.
[0196] This embodiment achieves accurate modeling of path selection probability by designing feature extraction and interactive scoring mechanisms in the graph structure model. Specifically:
[0197] By concatenating the features of the target node with those of the neighboring nodes and the edge features, a concatenated vector is generated to describe the interaction between the node and the edge. The concatenated vector is input into the embedded MLP architecture, and the interaction scores between the nodes are calculated through nonlinear and linear transformations to accurately characterize the importance of the path. Through the hierarchical structure, the model can capture deeper interaction features layer by layer. According to the interaction score, the selection weight of each edge is calculated to further quantify the selection probability of each path. This process ensures the stability and interpretability of the weights through exponentialization and normalization operations.
[0198] Among them, after calculating the edge selection weight of each edge, it also includes:
[0199] The edge selection weight is defined as the path weight of the point to be delivered;
[0200] From the neighbor node set of the delivery point, select the neighbor node with the largest path weight, and assign a path number to the delivery point;
[0201] Iteratively select neighbor nodes with the largest path weight, sort them according to the path sequence number, and generate an optimized delivery path;
[0202] The generated optimized delivery path is expressed as:
[0203] ;
[0204] It represents the optimized delivery path, which consists of the sequence of several delivery points;
[0205] Represents the path number in the delivery path, where: is the path sequence number of the vehicle's starting delivery point in the delivery route. is the path number of the kth delivery point in the delivery path;
[0206] Indicates the next delivery point in the delivery route, which is from the current delivery point The set of neighbor nodes The node selected in
[0207] argmax represents the number of nodes from the neighboring node set Select the neighbor node with the largest path weight;
[0208] represents the edge selection weight between the node corresponding to the kth delivery point and its neighbor node j;
[0209] It means that it is true for every delivery point in the delivery path, and P is the set of delivery points.
[0210] This embodiment iteratively generates an optimized delivery path based on edge selection weights. Specifically:
[0211] The edge selection weight is directly defined as the path weight, so that the importance of each path has an intuitive quantitative basis. Then, the distribution path sequence is dynamically constructed by selecting the node with the largest path weight from the neighbor node set. In the iterative process, the path sequence is assigned according to the principle of maximizing the path weight, and the final distribution path is sorted by sequence number as the optimization result.
[0212] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means.
[0213] The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., DVD ), or semiconductor media. The semiconductor media may be a solid state drive.
[0214] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division of a waterway underwater terrain change analysis system and method. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0215] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A vehicle dispatching system based on consumer goods logistics, characterized in that: The vehicle dispatching system comprises: The current logistics parameter acquisition unit is used to obtain the real-time inventory level of consumer goods at the vehicle's starting delivery point, the last delivery demand at the delivery point, the current weather classification label and geographic coordinates of the delivery point, and input them into the demand forecasting model; A demand forecasting unit, used to output the forecasted demand for the consumer goods at the delivery point; A vehicle delivery route scheduling unit is used to input the predicted demand, as well as the current weather classification label and geographic coordinates of the delivery point into the scheduling model, and output an optimized delivery route; The scheduling model is obtained through iterative training of the graph structure model, and the optimized delivery path is generated from the neighbor node set of the delivery point according to the path weight sorting; The modeling method of the scheduling model includes: S1. Obtain a consumer product demand training set; wherein the consumer product demand training set includes a number of demand training samples, each of which is a binary sample collected in a time series at equal intervals within a time window of a fixed length; S2, input the consumer product demand training set into the time series model for iterative training; S3, when the time series model converges, export it as a demand forecast model; S4, inputting the consumer product demand training set into the demand forecasting model, generating forecasted demand quantities corresponding to N time windows, and assigning a unique time sequence number to each forecasted demand quantity according to the time series, so as to construct a forecasted demand quantity set sorted by time sequence number; The expression of the predicted demand set is: ; TD represents the set of forecasted demand. Indicates the Nth time sequence number, Indicates the Nth predicted demand; S5, calculating the weighted demand of the predicted demand set; S6. define a graph structure of the graph structure model and input it into the graph structure model; S7, defining a loss function of the graph structure model, and iteratively updating model parameters of the graph structure model based on the defined loss function until the graph structure model converges; S8. Export the graph structure model at the time of convergence as the scheduling model.
2. A vehicle dispatching system based on consumer goods logistics according to claim 1, characterized in that: Obtain a consumer product demand training set, including: S1-1. Obtaining a first demand and a second demand for a consumer product within a time window; wherein the first demand represents the demand for the consumer product at a first time point, and the second demand represents the demand for the consumer product at a second time point; the second time point is an offset time point of a fixed time length after the first time point; S1-2, obtaining the weather classification label, the geographic coordinates of the delivery point, and the inventory level of consumer goods corresponding to the second time point within the time window; S1-3, standardizing the demand for consumer goods at the first time point, the demand for consumer goods at the second time point, the weather classification label, the geographical coordinates of the delivery point, and the inventory level of consumer goods; S1-4, defining the demand for consumer goods at the first time point after standardization, the weather classification label corresponding to the second time point, the geographical coordinates of the delivery point, and the inventory level of consumer goods as input features of the demand training sample, and defining the demand for consumer goods at the second time point after standardization as a target label, so as to construct the demand training sample; S1-5. Collect demand training samples within N time windows and combine them to obtain the consumer product demand training set.
3. A vehicle dispatching system based on consumer goods logistics according to claim 2, characterized in that: Calculating the weighted demand of the predicted demand set includes: S5-1, obtaining the predicted demand and the corresponding time sequence number in each time window from the predicted demand set; S5-2, calculating the time difference between each time window and the time window with time sequence number N-1; The expression for the time difference is: ; in, Indicates the time difference, represents the i-th time window, Indicates the N-1th time window; S5-3, calculating the ratio of the time difference to the Nth time window, and defining it as the timing weight of each time window; ; in, The timing weight of each time window, represents the Nth time window; S5-4, normalizing the timing weight to obtain a normalized timing weight; The expression for normalizing the timing weight is: ; in, represents the normalized time series weight, represents the sum of the timing weights of all time windows, j represents the index of the time window, and is used to traverse the entire time window ; S5-5, performing weighted averaging on the normalized time series weight and the corresponding predicted demand to obtain the weighted demand; The weighted average expression is: ; in, represents the weighted demand, represents the i-th predicted demand.
4. A vehicle dispatching system based on consumer goods logistics according to claim 3, characterized in that: Define the graph structure of the graph structure model and input it into the graph structure model, including: S6-1, defining the to-be-delivered point as a node in a graph structure, wherein the node includes several node features, including the weighted demand, the geographic coordinates of the to-be-delivered point, a weather classification label, and a consumer goods inventory level; S6-2, obtaining the average transportation time and congestion coefficient between the delivery points; S6-3, defining the physical connection between the points to be delivered as an edge in a graph structure; the edge includes several edge features, including the geographic distance calculated by the coordinates between the points to be delivered, the average transportation time, and the congestion coefficient; S6-4. Construct the graph structure according to the node features of the defined several points to be delivered and the edge features between the several points to be delivered; wherein any target node of the graph structure is connected to several neighboring nodes through edges.
5. A vehicle dispatching system based on consumer goods logistics according to claim 1, characterized in that: Defining a loss function of the graph structure model, and iteratively updating model parameters of the graph structure model based on the defined loss function until the graph structure model converges, including: S7-1, receiving the graph structure; S7-2, calculating the edge selection weight of each edge according to the node features of the target node and the neighboring nodes in the graph structure, and the edge features of the target node and the neighboring nodes; S7-3, performing weighted feature aggregation on the target node according to the edge selection weight of each edge to generate an updated node feature of the target node at the next layer; The expression for performing feature weighted aggregation on the target node according to the edge selection weight of each edge is: ; in, represents the edge selection weight of each edge; Represents the set of neighbor nodes of target node i; represents the node features of neighbor node j at layer k, Indicates weighted aggregation of node features of all neighboring nodes j of target node i; represents a nonlinear activation function; Represents the updated node features of target node i in the next layer; S7-4, use edge selection weights to calculate the total path distance loss and the total path time loss; The total path distance loss function is: ; represents the total path distance loss, represents the geographical distance between the delivery point i and the delivery point j, and E represents the set of all edges in the graph structure; The total time loss function of the path is: ; represents the total time loss of the path, represents the average transportation time between the delivery point i and the delivery point j; S7-5, performing weighted summation of the total path distance loss and the total path time loss to obtain the optimal scheduling loss function; The optimal scheduling loss function is: ; represents the optimal scheduling loss, Represents the weight coefficient of the total path distance loss, which is used to adjust the impact of the total path distance on the optimal scheduling loss. The weight coefficient representing the total time loss of the path is used to adjust the influence of the total path time on the optimal scheduling loss; S7-6, using an optimizer to perform gradient descent update on the optimal scheduling loss to obtain updated model parameters; S7-7. When the updated model parameters reach the preset parameter threshold, the graph structure model is deemed to have converged.
6. A vehicle dispatching system based on consumer goods logistics according to claim 5, characterized in that: Calculate the edge selection weight of each edge, including: S7-2-1, extracting node features of the target node and neighbor nodes in the graph structure, as well as edge features of the target node and neighbor nodes; S7-2-2, concatenating the node features of the target node and the neighboring nodes, and the edge features of the target node and the neighboring nodes to obtain a concatenated vector; The expression of the concatenated vector is: ; in, represents the concatenated vector, represents the node feature of target node i at layer k, Represents the edge features of the target node and neighbor nodes; Concat represents the concatenation function; S7-2-3. In each feature aggregation of the graph structure model, the concatenated vector is input into the embedded MLP architecture, and after several linear and nonlinear transformations, an interaction score is generated; The expression for generating the interaction score is: ; in, The table shows the interaction score of edge (i, j), are the weight matrices of the 1st layer, n-1th layer, and nth layer respectively, are the bias items of the 1st layer, n-1th layer and nth layer respectively, and ReLU is the nonlinear transformation function; S7-2-4. Calculate the edge selection weight of each edge according to the interaction score; the edge selection weight is represented by the probability of path selection by the graph structure model; The expression for calculating the edge selection weight of each edge is: ; in, represents the exponential operation of the interaction score, Represents the sum of the interaction score indices of the target node i’s neighbor node set, so that the sum of all edge selection weights is 1.
7. A vehicle dispatching system based on consumer goods logistics according to claim 5, characterized in that: After calculating the edge selection weight of each edge, it also includes: The edge selection weight is defined as the path weight of the point to be delivered; From the neighbor node set of the delivery point, select the neighbor node with the largest path weight, and assign a path number to the delivery point; Iteratively select neighbor nodes with the largest path weight, sort them according to the path sequence number, and generate an optimized delivery path; The generated optimized delivery path is expressed as: ; represents the optimized delivery path; Represents the path number in the delivery path, where: is the path sequence number of the vehicle's starting delivery point in the delivery route. is the path number of the kth delivery point in the delivery path; Indicates the next delivery point in the delivery route, which is from the current delivery point The set of neighbor nodes The node selected in argmax represents the number of nodes from the neighboring node set Select the neighbor node with the largest path weight; represents the edge selection weight between the node corresponding to the kth delivery point and its neighbor node j; It means that it is true for every delivery point in the delivery path, and P is the set of delivery points.
Citation Information
Patent Citations
Logistics system and cargo distributing method
CN106022672A
Vehicle scheduling optimization method and system suitable for rail transit and storage medium
CN116523267A
Inventory allocation optimization method and system based on genetic algorithm
CN119090408A