Logistics demand prediction method and device based on multi-scale spatiotemporal graph convolutional network

By adopting a multi-scale spatiotemporal graph convolution network in logistics demand prediction, combining the ARIMA model and Grad-CAM gradient positioning network layer, the subjectivity and data dependence problems of traditional prediction methods are solved, and higher prediction accuracy and stability.

CN118917627BActive Publication Date: 2025-02-18HUNAN MODERN LOGISTICS VOCATIONAL & TECH COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411272381.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-02-18
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

Traditional logistics demand forecasting methods are highly subjective and have high data dependence, making it difficult to obtain complete historical data, resulting in unstable prediction results and low accuracy.

Method used

Using a multi-scale spatiotemporal graph convolution network method, the multi-scale spatiotemporal graph convolution network layer, ARIMA model, spatiotemporal embedding layer and Grad-CAM gradient positioning network layer are introduced to capture the spatial dependencies and temporal trends of different scales in the logistics network. , combine historical data and spatial location information to optimize the weight of the prediction model.

Benefits of technology

It improves the accuracy and stability of logistics demand forecasting, can more accurately capture the dynamic changes in logistics demand in time and space, and enhances the prediction ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917627B_ABST
    Figure CN118917627B_ABST
Patent Text Reader

Abstract

The present invention discloses a logistics demand prediction method and device based on a multi-scale spatiotemporal graph convolutional network, wherein the method includes: obtaining historical logistics information of the logistics network; establishing an ARIMA model according to the time series data of each logistics network node, and obtaining the ARIMA prediction value of each logistics network node through the ARIMA model; constructing a spatiotemporal graph according to the logistics network node, and adding the ARIMA prediction value as a new feature to the node attribute of the spatiotemporal graph; inputting the target logistics network node and the spatiotemporal graph into the multi-scale spatiotemporal graph convolutional network, and predicting the logistics demand of the target logistics network node; calculating the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and summarizing the gradient of each node to update the weight of the multi-scale spatiotemporal graph convolutional network. The present invention utilizes the ARIMA model in combination with the time trend and spatial distribution characteristics of logistics demand to enhance the prediction accuracy, and updates the network weight through the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and further optimizes the prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of logistics and artificial intelligence technology, and specifically to a logistics demand prediction method and device, and computing equipment based on a multi-scale spatiotemporal graph convolutional network. Background Art

[0002] With the rapid development of e-commerce, the logistics industry has become an indispensable and important part of the modern economy. The complexity and dynamics of the logistics network require accurate forecasting of its demand in order to achieve optimal allocation of resources and efficient scheduling. The accuracy of logistics demand forecasting directly affects the operational efficiency, cost control and customer satisfaction of logistics companies.

[0003] Traditional logistics demand forecasting methods include qualitative forecasting methods, time series models, and regression analysis methods. Among them, qualitative forecasting methods (such as the Delphi method) forecast logistics demand through expert consultation and opinions. This method relies on the experience and judgment of experts and is suitable for situations where data is insufficient or difficult to quantify. Time series models such as exponential smoothing give different weights to data at different time points on the basis of moving average to adapt to the changing trend of data. However, the selection of weights often depends on experience. The regression analysis method analyzes the relationship between various factors affecting logistics demand and logistics demand, and establishes a regression model for forecasting, but the accuracy of this method is affected by data quality and variable selection. In summary, traditional logistics demand forecasting methods are highly subjective, easily affected by subjective factors, and the forecast results are unstable. The data dependence is high and a large amount of historical data is required as support. However, in actual operation, it is often difficult to obtain complete data.

[0004] To solve the above problems, the present invention proposes a logistics demand forecasting method based on a multi-scale spatiotemporal graph convolutional network. By introducing a multi-scale graph convolutional network layer, the spatial dependencies of different scales in the logistics network can be captured. The time series data is modeled using the ARIMA model, and the obtained predicted values ​​are used as new features of the spatiotemporal graph, which effectively combines the time trend and spatial distribution characteristics of logistics demand. It not only considers the time evolution law of historical logistics demand, but also incorporates the impact of spatial location on demand, thereby enhancing the prediction ability of the model. The spatiotemporal embedding layer combined with the Grad-CAM gradient positioning network layer can more accurately capture the dynamic changes of logistics demand in time and space. The network weights are updated through the gradients of each node in the multi-scale spatiotemporal graph convolutional network, further optimizing the prediction accuracy. Summary of the invention

[0005] In view of the above problems, the present invention is proposed to provide a logistics demand prediction method, device and computing equipment based on a multi-scale spatiotemporal graph convolutional network to overcome the problem of low accuracy of logistics demand prediction.

[0006] According to one aspect of the present invention, a logistics demand forecasting method based on a multi-scale spatiotemporal graph convolutional network is provided, comprising:

[0007] Acquire historical logistics information of the logistics network, wherein the historical logistics information includes logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node;

[0008] Extracting time series data from the logistics demand of each logistics network node, establishing an ARIMA model based on the time series data, and obtaining the ARIMA forecast value of each logistics network node through the ARIMA model;

[0009] Constructing a space-time graph according to the logistics network nodes, and adding the ARIMA prediction value as a new feature to the node attribute of the space-time graph; wherein each logistics network node is a vertex of the space-time graph, and the logistics relationship of each logistics network node is an edge of the space-time graph;

[0010] Input the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates a Grad-CAM gradient positioning network layer;

[0011] The gradient of each node in the multi-scale spatiotemporal graph convolutional network is calculated, and the gradient of each node is summarized to update the weight of the multi-scale spatiotemporal graph convolutional network.

[0012] In an optional manner, the method further includes:

[0013] A heat map is generated according to the gradient of each node, and the allocation of logistics resources is optimized according to the heat map, wherein for heat map nodes with high contribution, the investment in logistics resources is increased; and for heat map nodes with low contribution, the investment in logistics resources is reduced.

[0014] In an optional manner, the logistics network nodes include, but are not limited to: logistics centers, warehouses, distribution stations, and retailers;

[0015] The logistics flow includes but is not limited to: logistics transportation cost, logistics transportation time and logistics transportation capacity.

[0016] In an optional manner, after inputting the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network, the method further includes:

[0017] Obtaining the ARIMA prediction value of the target logistics network node through the ARIMA model;

[0018] The logistics information of the target logistics network node and the ARIMA prediction value increment of the target logistics network node are added to the space-time diagram.

[0019] In an optional manner, establishing the ARIMA model according to the time series data further includes:

[0020] The model parameter range of the ARIMA model is determined by the autocorrelation function and the partial autocorrelation function of the time series data, wherein the model parameters include the order of the autoregressive term, the number of differences, and the order of the moving average term.

[0021] The model parameters are estimated according to a maximum likelihood estimation algorithm.

[0022] In an optional manner, the multi-scale graph convolutional network layer includes multiple parallel graph convolutional sublayers, each of which uses convolution kernels of different sizes;

[0023] The spatiotemporal embedding layer includes a temporal encoder, a spatial encoder and a Grad-CAM gradient positioning network layer;

[0024] The unsupervised task layer includes multiple layers of temporal convolutional layers, a decoder, and a loss function, which are used to generate positive sample pairs and negative sample pairs from the spatiotemporal graph, wherein the positive sample pairs are feature representations of the same logistics node at different time points, and the negative sample pairs are feature representations of different logistics nodes;

[0025] The freezing layer is used to freeze the unsupervised task layer.

[0026] In an optional manner, calculating the gradient of each node in the multi-scale spatiotemporal graph convolutional network further includes:

[0027] Define a loss function to measure the difference between network output and actual logistics demand;

[0028] Starting from the output layer of the multi-scale spatiotemporal graph convolutional network, the gradient of each node in the network is calculated layer by layer through a back-propagation algorithm, wherein the frozen layer does not participate in the gradient calculation.

[0029] In an optional manner, the gradient calculation formula of the multi-head attention layer is:

[0030]

[0031]

[0032]

[0033] in, is the loss function for the query vector The gradient of is the loss function for the key vector The gradient of is the loss function value vector The gradient of is the loss function; is the gradient of the loss function with respect to the output of the multi-head attention layer; is the dimension of the key vector k; is the query vector of the i-th node; is the key vector of the jth node; is the value vector of the jth node; Q, K, and V are the query vector, key vector, and value vector of the node in the space-time graph respectively; is the output of the multi-head attention layer.

[0034] According to another aspect of the present invention, a logistics demand prediction device based on a multi-scale spatiotemporal graph convolutional network is provided, comprising:

[0035] A historical logistics information acquisition module is used to acquire historical logistics information of the logistics network, wherein the historical logistics information includes logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node;

[0036] An ARIMA forecasting model building module is used to extract time series data from the logistics demand of each logistics network node, establish an ARIMA model based on the time series data, and obtain the ARIMA forecast value of each logistics network node through the ARIMA model;

[0037] A space-time graph construction and feature enhancement module, used to construct a space-time graph according to the logistics network nodes, and add the ARIMA prediction value as a new feature to the node attribute of the space-time graph; wherein each logistics network node is used as a vertex of the space-time graph, and the logistics relationship of each logistics network node is used as an edge of the space-time graph;

[0038] A multi-scale spatiotemporal graph convolutional network prediction module is used to input the target logistics network node and the spatiotemporal graph into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates a Grad-CAM gradient positioning network layer;

[0039] The network weight optimization module is used to calculate the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and summarize the gradient of each node to update the weight of the multi-scale spatiotemporal graph convolutional network.

[0040] According to another aspect of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus.

[0041] According to the solution provided by the present invention, historical logistics information of the logistics network is obtained, wherein the historical logistics information includes the logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node; time series data is extracted from the logistics demand of each logistics network node, an ARIMA model is established according to the time series data, and the ARIMA prediction value of each logistics network node is obtained through the ARIMA model; a spatiotemporal graph is constructed according to the logistics network nodes, and the ARIMA prediction value is added as a new feature to the node attribute of the spatiotemporal graph; wherein each logistics network node The target logistics network node and the spatiotemporal graph are input into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates the Grad-CAM gradient positioning network layer; the gradient of each node in the multi-scale spatiotemporal graph convolutional network is calculated, and the gradient of each node is summarized to update the weight of the multi-scale spatiotemporal graph convolutional network. The present invention can capture the spatial dependencies of different scales in the logistics network by introducing a multi-scale graph convolutional network layer. The ARIMA model is used to model the time series data, and the predicted value obtained is used as a new feature of the spatiotemporal graph, which effectively combines the time trend and spatial distribution characteristics of logistics demand, not only considering the time evolution law of historical logistics demand, but also integrating the influence of spatial position on demand, and enhancing the prediction ability of the model. The spatiotemporal embedding layer combined with the Grad-CAM gradient positioning network layer can more accurately capture the dynamic changes in logistics demand in time and space. The network weights are updated by the gradient of each node in the multi-scale spatiotemporal graph convolutional network, further optimizing the prediction accuracy.

[0042] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0044] Figure 1 A schematic diagram of the flow of a logistics demand prediction method based on a multi-scale spatiotemporal graph convolutional network according to an embodiment of the present invention is shown;

[0045] Figure 2 A schematic diagram of the structure of a multi-scale spatiotemporal graph convolutional network according to an embodiment of the present invention is shown;

[0046] Figure 3 A schematic diagram of a framework of a logistics demand prediction device based on a multi-scale spatiotemporal graph convolutional network according to an embodiment of the present invention is shown;

[0047] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0049] Figure 1 The flowchart of the logistics demand forecasting method based on the multi-scale spatiotemporal graph convolutional network in the embodiment of the present invention is shown. Figure 1 As shown, the following steps are included:

[0050] Step S101, obtaining historical logistics information of the logistics network, wherein the historical logistics information includes logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node.

[0051] In this embodiment, logistics demand refers to the amount of goods or transportation service requests processed by a logistics node within a certain period of time, which is an important indicator for evaluating node processing capacity, resource allocation, and market demand. The timestamp records the time when the logistics activity occurs. The geographical location includes longitude and latitude, city, region, etc. The processing capacity refers to the maximum amount of goods or transportation service processed by a logistics node within a specific period of time. Logistics flow includes information such as the source, destination, transportation method, and transportation time of the goods.

[0052] In an optional manner, the logistics network nodes include, but are not limited to: logistics centers, warehouses, distribution stations, and retailers;

[0053] The logistics flow includes but is not limited to: logistics transportation cost, logistics transportation time and logistics transportation capacity.

[0054] In this embodiment, the logistics center is the core node of the logistics network and is responsible for the collection, distribution, sorting, packaging, processing and distribution of goods. The distribution station is the site that transports goods from the logistics center or warehouse to the final customer or retailer. The logistics transportation cost refers to the total cost required to transport goods from the starting point to the end point, including transportation costs, insurance costs, tariffs, etc. The logistics transportation time refers to the time required for the goods to travel from the starting point to the end point, including loading time, transportation time and unloading time. The logistics transportation capacity refers to the amount of goods that the logistics network can transport or the amount of transportation services provided within a certain period of time.

[0055] Step S102, extracting time series data from the logistics demand of each logistics network node, establishing an ARIMA model according to the time series data, and obtaining the ARIMA prediction value of each logistics network node through the ARIMA model.

[0056] The ARIMA model can adapt to time series data of different forms by adjusting the order of the autoregressive term (p), the difference order (d), and the order of the moving average term (q), and has high flexibility.

[0057] In an optional manner, establishing the ARIMA model according to the time series data further includes:

[0058] The model parameter range of the ARIMA model is determined by the autocorrelation function and the partial autocorrelation function of the time series data, wherein the model parameters include the order of the autoregressive term, the number of differences, and the order of the moving average term.

[0059] The model parameters are estimated according to a maximum likelihood estimation algorithm.

[0060] In this embodiment, the autocorrelation function (ACF) and partial autocorrelation function (PACF) of the time series data can objectively reflect the dynamic characteristics of the time series data. By determining the parameter range of the model through these two functions, the reliability of the prediction can be further improved. The ARIMA model parameters are estimated by the maximum likelihood estimation algorithm, which reduces the interference of human factors compared to the subjective selection of model parameters.

[0061] Specifically, the autocorrelation function (ACF) and partial autocorrelation function (PACF) are calculated from the time series data.

[0062] For example, for the time series { }, and the value of its autocorrelation function at lag k is:

[0063]

[0064] Where n is the length of the time series, is the mean of the time series.

[0065] The partial autocorrelation function (PACF) calculation process is:

[0066] For k=1, PACF(1) is equal to ACF(1).

[0067] For k>1, the Yule-Walker equation is used to solve PACF(k) and the values ​​of PACF at different lags k are obtained.

[0068] The model parameter range of the ARIMA model is determined according to the autocorrelation function and the partial autocorrelation function, wherein the model parameters include the order of the autoregressive term, the number of differences, and the order of the moving average term.

[0069] For example, if the original time series is non-stationary, try to perform one-order or multi-order differences until the time series becomes stationary, and the number of stable differences d is the number of differences required to make the time series stationary. Among them, if ACF or PACF suddenly tends to 0 or close to 0 after a certain order, and remains at a low level in the subsequent orders, it means that the correlation after this order is very weak; if ACF or PACF gradually decreases but does not tend to 0, or fluctuates around zero, there is no clear truncation point.

[0070] If the PACF is truncated after a certain number of orders, the order p of the autoregressive term is the range of these orders (i.e., the candidate p value); if the ACF is truncated after a certain number of orders, the order q of the moving average term is the range of these orders (i.e., the candidate q value). Then, based on p, q, and d, a series of candidate ARIMA models are selected, such as ARIMA(2,1,1), ARIMA(2,1,2), etc.

[0071] The model parameters were estimated according to the maximum likelihood estimation algorithm.

[0072] For each candidate model, construct its corresponding likelihood function. The likelihood function is a function of the model parameters (including the autoregressive coefficient, the moving average coefficient, and the variance of the error term), which represents the probability of observing the data set under given model parameters. In the ARIMA model, it is assumed that the error term follows a normal distribution, so the likelihood function is related to the probability density function of the normal distribution. Use the Newton method or the quasi-Newton method to maximize the likelihood function, and iteratively adjust the model parameters until the parameter combination that maximizes the likelihood function is reached. These parameters are the estimated values ​​of the model parameters.

[0073] Step S103, constructing a space-time graph according to the logistics network nodes, and adding the ARIMA prediction value as a new feature to the node attribute of the space-time graph; wherein each logistics network node serves as a vertex of the space-time graph, and the logistics relationship of each logistics network node serves as an edge of the space-time graph.

[0074] In this embodiment, the establishment of a spatiotemporal graph can simultaneously capture the temporal evolution trend and spatial dependency relationship (such as logistics flow and distance between nodes) in the logistics network, making the prediction more comprehensive. By integrating the predicted value of the ARIMA model as a node attribute in the spatiotemporal graph, the historical time series data and spatial relationship can be combined to improve the prediction accuracy of future logistics status.

[0075] Specifically, each logistics network node (such as warehouse, distribution center, etc.) is used as the vertex of the space-time graph, the logistics relationship is used as the edge of the space-time graph, and the node attributes (including geographic location, capacity, etc.) are initialized. The historical time series data of each node is predicted through the ARIMA model to obtain the predicted value for a period of time in the future, and these predicted values ​​are added as new features to the attributes of the corresponding nodes.

[0076] Step S104, input the target logistics network node and the spatiotemporal graph into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates the Grad-CAM gradient positioning network layer.

[0077] In this embodiment, the multi-scale graph convolution network layer captures the spatial dependencies of different scales in the logistics network. The nodes in the logistics network influence each other at different scales due to factors such as geographical location and functional role. Multi-scale graph convolution can capture complex spatial relationships more comprehensively by aggregating node information from different neighborhood ranges. The multi-head attention layer automatically focuses on the part that has the greatest impact on the result during prediction, and can capture richer dependencies between nodes. The spatiotemporal embedding layer embeds temporal and spatial information into node features. The spatiotemporal embedding layer integrates the Grad-CAM gradient positioning network layer (Gradient-weighted Class Activation Mapping) to provide the spatiotemporal features that contribute most to the prediction results during the prediction process, thereby providing interpretability. The unsupervised task layer learns a general feature representation from historical data, for example, by introducing an unsupervised loss function to achieve unsupervised learning. The freezing layer is used to freeze the unsupervised task layer.

[0078] In an optional manner, the multi-scale graph convolutional network layer includes multiple parallel graph convolutional sublayers, each of which uses convolution kernels of different sizes;

[0079] The spatiotemporal embedding layer includes a temporal encoder, a spatial encoder and a Grad-CAM gradient positioning network layer;

[0080] The unsupervised task layer includes multiple layers of temporal convolutional layers, a decoder, and a loss function, which are used to generate positive sample pairs and negative sample pairs from the spatiotemporal graph, wherein the positive sample pairs are feature representations of the same logistics node at different time points, and the negative sample pairs are feature representations of different logistics nodes;

[0081] The freezing layer is used to freeze the unsupervised task layer.

[0082] like Figure 2 As shown in the figure, the multi-scale graph convolution network layer includes three parallel graph convolution sublayers, each using convolution kernels of different sizes. Sublayer 1 uses smaller convolution kernels (such as 1x1 or 3x3), focusing on the relationship between each node and its immediate neighboring nodes, and can capture local spatial dependencies. Sublayer 2 uses medium convolution kernels (such as 5x5 or 7x7), which can cover a wider range of neighboring nodes. Sublayer 3 uses larger convolution kernels (such as 9x9 or larger) to capture long-distance dependencies between nodes.

[0083] In the spatiotemporal embedding layer, the time encoder can use LSTM to encode time series data into an embedding vector to convert the logistics demand at each time point into a vector of fixed length. For each node, in addition to the logistics demand, there are other spatial features such as geographic location (latitude and longitude), warehouse capacity, etc. The spatial encoder encodes the spatial features into an embedding vector through a graph embedding method (such as Node2Vec) or a fully connected layer.

[0084] The Grad-CAM gradient positioning network layer analyzes which time points and spatial features contribute most to the predicted logistics demand. For example, through the heat map generated by Grad-CAM, you can intuitively see which time periods or geographical locations have the greatest impact on the prediction results.

[0085] In the unsupervised task layer, the multi-layer temporal convolution layer extracts temporal features from the embedding vector obtained by the spatiotemporal embedding layer to reflect the seasonal fluctuations in logistics demand. The decoder decodes the output of the temporal convolution layer into the feature representation of the node, which is used to generate positive sample pairs and negative sample pairs. The unsupervised task layer is trained using a contrastive loss function (such as Triplet Loss), where for each node, its feature representation at different time points is selected as a positive sample pair, and the feature representation of other nodes is selected as a negative sample pair. The network is trained by minimizing the distance between positive sample pairs and maximizing the distance between negative sample pairs.

[0086] The freezing layer is used to freeze the weights of the unsupervised task layer and only update the parameters related to the prediction task. This is to keep the feature representation learned in the unsupervised learning stage unchanged and avoid being destroyed during the supervised fine-tuning process. For example, for the historical data of 1,000 nodes, since there is no direct logistics demand data, the temporal convolutional network (TCN) autoencoder is first trained with these data to learn the feature representation of the nodes. Then, a data set containing 100 nodes and their corresponding logistics demand is obtained. The network is fine-tuned on this data set, using the feature representation generated by the TCN autoencoder as input and outputting the predicted logistics demand. By freezing the weights of the TCN autoencoder, it is ensured that the useful information learned in the unsupervised learning stage will not be forgotten during the fine-tuning process.

[0087] In an optional manner, after inputting the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network, the method further includes:

[0088] Obtaining the ARIMA prediction value of the target logistics network node through the ARIMA model;

[0089] The logistics information of the target logistics network node and the ARIMA prediction value increment of the target logistics network node are added to the space-time diagram.

[0090] In this embodiment, the predicted value obtained by the ARIMA model is used as incremental information, and the ARIMA predicted value is added to the space-time graph as an additional feature to combine it with the current logistics information of the target logistics network node. By utilizing the incremental information of the ARIMA predicted value, the accuracy of the prediction is further improved.

[0091] In an optional manner, the gradient calculation formula of the multi-head attention layer is:

[0092]

[0093]

[0094]

[0095] in, is the loss function for the query vector The gradient of is the loss function for the key vector The gradient of is the loss function value vector The gradient of is the loss function; is the gradient of the loss function with respect to the output of the multi-head attention layer; is the dimension of the key vector k; is the query vector of the i-th node; is the key vector of the jth node; is the value vector of the jth node; Q, K, and V are the query vector, key vector, and value vector of the node in the space-time graph respectively; is the output of the multi-head attention layer.

[0096] In this embodiment, by capturing different features of the input data through multiple attention heads, it is possible to understand the data more comprehensively and show higher accuracy when processing complex tasks. In the above gradient calculation formula, it is ensured that each attention head can independently contribute its gradient to the final optimization process, which reflects the ability of multi-view feature extraction.

[0097] Step S105, calculating the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and summarizing the gradient of each node to update the weight of the multi-scale spatiotemporal graph convolutional network.

[0098] Specifically, a loss function is defined to measure the difference between the network output and the actual logistics demand. The gradient of each node in the network is calculated layer by layer starting from the output layer of the multi-scale spatiotemporal graph convolutional network through a back propagation algorithm, wherein the frozen layer does not participate in the gradient calculation.

[0099] For example, calculate the gradient of the loss function L with respect to the network output Y, that is, ∂L / ∂Y, and back-propagate the gradient of the loss function to each layer of the network. For each spatiotemporal graph convolution layer, calculate the gradient of its input feature X and weight W (including spatial weight and temporal weight), that is, ∂Z / ∂X and ∂Z / ∂W. Use the chain rule to multiply the gradient ∂L / ∂Z of the previous layer by ∂Z / ∂X to obtain ∂L / ∂X, and continue to propagate to the next layer. At the same time, calculate ∂L / ∂W to update the weight of the current layer. For the multi-head attention layer, calculate the gradient of the query vector Q, key vector K, and value vector V. Then, summarize the gradients of each node to update the weights of the multi-scale spatiotemporal graph convolution network. For example, the weights of the network can be updated by gradient descent algorithms (such as Adam, RMSprop, etc.). ,in, is the weight, is the learning rate, is the gradient of the loss function with respect to the weights.

[0100] In an optional manner, a heat map is generated according to the gradient of each node, and the allocation of logistics resources is optimized according to the heat map, wherein for heat map nodes with high contribution, the investment in logistics resources is increased; and for heat map nodes with low contribution, the investment in logistics resources is reduced.

[0101] For example, the gradient of each node in the network is calculated through the back-propagation algorithm. The above gradient reflects the sensitivity of the network to the changes in the characteristics of each node in the input data. The calculated gradient value is mapped to the heat map. Nodes with larger absolute values ​​of gradient can be represented by warmer tones (such as red) in the heat map, indicating that these nodes contribute more to the final prediction results; while nodes with smaller absolute values ​​of gradient are represented by cooler tones (such as blue), indicating lower contributions. Use the heat map to identify which nodes have higher contributions. For nodes with high contributions in the heat map, increase the input of logistics resources, such as increasing transportation vehicles, storage capacity, human resources, etc., to ensure that these key nodes can meet the predicted logistics needs. For nodes with lower contributions, reduce the input of logistics resources to avoid waste of resources, including adjusting transportation routes, optimizing inventory management, etc.

[0102] According to the solution provided by the present invention, historical logistics information of the logistics network is obtained, wherein the historical logistics information includes the logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node; time series data is extracted from the logistics demand of each logistics network node, an ARIMA model is established according to the time series data, and the ARIMA prediction value of each logistics network node is obtained through the ARIMA model; a spatiotemporal graph is constructed according to the logistics network nodes, and the ARIMA prediction value is added as a new feature to the node attribute of the spatiotemporal graph; wherein each logistics network node The target logistics network node and the spatiotemporal graph are input into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates the Grad-CAM gradient positioning network layer; the gradient of each node in the multi-scale spatiotemporal graph convolutional network is calculated, and the gradient of each node is summarized to update the weight of the multi-scale spatiotemporal graph convolutional network. The present invention can capture the spatial dependencies of different scales in the logistics network by introducing a multi-scale graph convolutional network layer. The ARIMA model is used to model the time series data, and the predicted value obtained is used as a new feature of the spatiotemporal graph, which effectively combines the time trend and spatial distribution characteristics of logistics demand, not only considering the time evolution law of historical logistics demand, but also integrating the influence of spatial position on demand, and enhancing the prediction ability of the model. The spatiotemporal embedding layer combined with the Grad-CAM gradient positioning network layer can more accurately capture the dynamic changes in logistics demand in time and space. The network weights are updated by the gradient of each node in the multi-scale spatiotemporal graph convolutional network, further optimizing the prediction accuracy.

[0103] Figure 3The schematic diagram of the structure of the logistics demand prediction device based on the multi-scale spatiotemporal graph convolutional network of the embodiment of the present invention is shown. The logistics demand prediction device based on the multi-scale spatiotemporal graph convolutional network includes: a historical logistics information acquisition module 310, an ARIMA prediction model construction module 320, a spatiotemporal graph construction and feature enhancement module 330, a multi-scale spatiotemporal graph convolutional network prediction module 340 and a network weight optimization module 350.

[0104] The historical logistics information acquisition module 310 is used to acquire the historical logistics information of the logistics network, wherein the historical logistics information includes the logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node;

[0105] The ARIMA forecasting model building module 320 is used to extract time series data from the logistics demand of each logistics network node, establish an ARIMA model according to the time series data, and obtain the ARIMA forecast value of each logistics network node through the ARIMA model;

[0106] The spatiotemporal graph construction and feature enhancement module 330 is used to construct a spatiotemporal graph according to the logistics network nodes, and add the ARIMA prediction value as a new feature to the node attribute of the spatiotemporal graph; wherein each logistics network node is used as a vertex of the spatiotemporal graph, and the logistics relationship of each logistics network node is used as an edge of the spatiotemporal graph;

[0107] The multi-scale spatiotemporal graph convolutional network prediction module 340 is used to input the target logistics network node and the spatiotemporal graph into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates a Grad-CAM gradient positioning network layer;

[0108] The network weight optimization module 350 is used to calculate the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and summarize the gradient of each node to update the weight of the multi-scale spatiotemporal graph convolutional network.

[0109] In an optional manner, the method further includes:

[0110] A heat map is generated according to the gradient of each node, and the allocation of logistics resources is optimized according to the heat map, wherein for heat map nodes with high contribution, the investment in logistics resources is increased; and for heat map nodes with low contribution, the investment in logistics resources is reduced.

[0111] In an optional manner, the logistics network nodes include, but are not limited to: logistics centers, warehouses, distribution stations, and retailers;

[0112] The logistics flow includes but is not limited to: logistics transportation cost, logistics transportation time and logistics transportation capacity.

[0113] In an optional manner, after inputting the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network, the method further includes:

[0114] Obtaining the ARIMA prediction value of the target logistics network node through the ARIMA model;

[0115] The logistics information of the target logistics network node and the ARIMA prediction value increment of the target logistics network node are added to the space-time diagram.

[0116] In an optional manner, establishing the ARIMA model according to the time series data further includes:

[0117] The model parameter range of the ARIMA model is determined by the autocorrelation function and the partial autocorrelation function of the time series data, wherein the model parameters include the order of the autoregressive term, the number of differences, and the order of the moving average term.

[0118] The model parameters are estimated according to a maximum likelihood estimation algorithm.

[0119] In an optional manner, the multi-scale graph convolutional network layer includes multiple parallel graph convolutional sublayers, each of which uses convolution kernels of different sizes;

[0120] The spatiotemporal embedding layer includes a temporal encoder, a spatial encoder and a Grad-CAM gradient positioning network layer;

[0121] The unsupervised task layer includes multiple layers of temporal convolutional layers, a decoder, and a loss function, which are used to generate positive sample pairs and negative sample pairs from the spatiotemporal graph, wherein the positive sample pairs are feature representations of the same logistics node at different time points, and the negative sample pairs are feature representations of different logistics nodes;

[0122] The freezing layer is used to freeze the unsupervised task layer.

[0123] In an optional manner, calculating the gradient of each node in the multi-scale spatiotemporal graph convolutional network further includes:

[0124] Define a loss function to measure the difference between network output and actual logistics demand;

[0125] Starting from the output layer of the multi-scale spatiotemporal graph convolutional network, the gradient of each node in the network is calculated layer by layer through a back-propagation algorithm, wherein the frozen layer does not participate in the gradient calculation.

[0126] In an optional manner, the gradient calculation formula of the multi-head attention layer is:

[0127]

[0128]

[0129]

[0130] in, is the loss function for the query vector The gradient of is the loss function for the key vector The gradient of is the loss function value vector The gradient of is the loss function; is the gradient of the loss function with respect to the output of the multi-head attention layer; is the dimension of the key vector k; is the query vector of the i-th node; is the key vector of the jth node; is the value vector of the jth node; Q, K, and V are the query vector, key vector, and value vector of the node in the space-time graph respectively; is the output of the multi-head attention layer.

[0131] Figure 4 The schematic diagram of the structure of the computing device embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0132] like Figure 4 As shown, the computing device may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0133] Wherein: the processor 402, the communication interface 404, and the memory 406 communicate with each other through the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the logistics demand prediction method based on the multi-scale spatiotemporal graph convolution network.

[0134] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0135] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0136] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0137] According to the solution provided by the present invention, historical logistics information of the logistics network is obtained, wherein the historical logistics information includes the logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node; time series data is extracted from the logistics demand of each logistics network node, an ARIMA model is established according to the time series data, and the ARIMA prediction value of each logistics network node is obtained through the ARIMA model; a spatiotemporal graph is constructed according to the logistics network nodes, and the ARIMA prediction value is added as a new feature to the node attribute of the spatiotemporal graph; wherein each logistics network node The target logistics network node and the spatiotemporal graph are input into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates the Grad-CAM gradient positioning network layer; the gradient of each node in the multi-scale spatiotemporal graph convolutional network is calculated, and the gradient of each node is summarized to update the weight of the multi-scale spatiotemporal graph convolutional network. The present invention can capture the spatial dependencies of different scales in the logistics network by introducing a multi-scale graph convolutional network layer. The ARIMA model is used to model the time series data, and the predicted value obtained is used as a new feature of the spatiotemporal graph, which effectively combines the time trend and spatial distribution characteristics of logistics demand, not only considering the time evolution law of historical logistics demand, but also integrating the influence of spatial position on demand, and enhancing the prediction ability of the model. The spatiotemporal embedding layer combined with the Grad-CAM gradient positioning network layer can more accurately capture the dynamic changes in logistics demand in time and space. The network weights are updated by the gradient of each node in the multi-scale spatiotemporal graph convolutional network, further optimizing the prediction accuracy.

[0138] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose. In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and to form different embodiments. For example, in the following claims, any one of the claimed embodiments may be used in any combination. The present invention may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several means, several of these means may be embodied by the same hardware item. The steps in the above embodiments should not be understood as limiting the execution order unless otherwise specified.

Claims

1. A logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network, characterized in that: include: Acquire historical logistics information of the logistics network, wherein the historical logistics information includes logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node; Extracting time series data from the logistics demand of each logistics network node, establishing an ARIMA model based on the time series data, and obtaining the ARIMA forecast value of each logistics network node through the ARIMA model; Constructing a space-time graph according to the logistics network nodes, and adding the ARIMA prediction value as a new feature to the node attribute of the space-time graph; wherein each logistics network node is a vertex of the space-time graph, and the logistics relationship of each logistics network node is an edge of the space-time graph; Input the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates a Grad-CAM gradient positioning network layer; The gradient of each node in the multi-scale spatiotemporal graph convolutional network is calculated, and the gradient of each node is summarized to update the weight of the multi-scale spatiotemporal graph convolutional network.

2. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 is characterized in that: The method further comprises: A heat map is generated according to the gradient of each node, and the allocation of logistics resources is optimized according to the heat map, wherein for heat map nodes with high contribution, the investment in logistics resources is increased; and for heat map nodes with low contribution, the investment in logistics resources is reduced.

3. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 or 2 is characterized in that: The logistics network nodes include but are not limited to: logistics centers, warehouses, distribution stations and retailers; The logistics flow includes but is not limited to: logistics transportation cost, logistics transportation time and logistics transportation capacity.

4. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 or 2 is characterized in that: After inputting the target logistics network node and the spatiotemporal graph into a multi-scale spatiotemporal graph convolutional network, the method further includes: Obtaining the ARIMA prediction value of the target logistics network node through the ARIMA model; The logistics information of the target logistics network node and the ARIMA prediction value increment of the target logistics network node are added to the space-time diagram.

5. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 or 2 is characterized in that: The establishing of the ARIMA model according to the time series data further comprises: Determining the model parameter range of the ARIMA model through the autocorrelation function and partial autocorrelation function of the time series data, wherein the model parameters include the order of the autoregressive term, the number of differences, and the order of the moving average term; The model parameters are estimated according to a maximum likelihood estimation algorithm.

6. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 is characterized in that: The multi-scale graph convolution network layer includes multiple parallel graph convolution sub-layers, each of which uses convolution kernels of different sizes; The spatiotemporal embedding layer includes a temporal encoder, a spatial encoder and a Grad-CAM gradient positioning network layer; The unsupervised task layer includes multiple layers of temporal convolutional layers, a decoder, and a loss function, which are used to generate positive sample pairs and negative sample pairs from the spatiotemporal graph, wherein the positive sample pairs are feature representations of the same logistics node at different time points, and the negative sample pairs are feature representations of different logistics nodes; The freezing layer is used to freeze the unsupervised task layer.

7. The logistics demand forecasting method based on multi-scale spatiotemporal graph convolutional network according to claim 1 is characterized in that: The step of calculating the gradient of each node in the multi-scale spatiotemporal graph convolutional network further includes: Define a loss function to measure the difference between network output and actual logistics demand; Starting from the output layer of the multi-scale spatiotemporal graph convolutional network, the gradient of each node in the network is calculated layer by layer through a back-propagation algorithm, wherein the frozen layer does not participate in the gradient calculation.

8. The method for predicting logistics demand based on multi-scale spatiotemporal graph convolutional network according to claim 7 is characterized in that: The gradient calculation formula of the multi-head attention layer is: in, is the loss function for the query vector The gradient of is the loss function for the key vector The gradient of is the loss function value vector The gradient of is the loss function; is the gradient of the loss function with respect to the output of the multi-head attention layer; is the dimension of the key vector k; is the query vector of the i-th node; is the key vector of the jth node; is the value vector of the jth node; Q, K, and V are the query vector, key vector, and value vector of the node in the space-time graph respectively; is the output of the multi-head attention layer.

9. A logistics demand forecasting device based on a multi-scale spatiotemporal graph convolutional network, characterized in that: Implementing the logistics demand forecasting method based on a multi-scale spatiotemporal graph convolutional network as described in any one of claims 1 to 8, comprising: A historical logistics information acquisition module is used to acquire historical logistics information of the logistics network, wherein the historical logistics information includes logistics demand, timestamp, geographic location, processing capacity and logistics flow of each logistics network node; An ARIMA forecasting model building module is used to extract time series data from the logistics demand of each logistics network node, establish an ARIMA model based on the time series data, and obtain the ARIMA forecast value of each logistics network node through the ARIMA model; A space-time graph construction and feature enhancement module, used to construct a space-time graph according to the logistics network nodes, and add the ARIMA prediction value as a new feature to the node attribute of the space-time graph; wherein each logistics network node is used as a vertex of the space-time graph, and the logistics relationship of each logistics network node is used as an edge of the space-time graph; A multi-scale spatiotemporal graph convolutional network prediction module is used to input the target logistics network node and the spatiotemporal graph into the multi-scale spatiotemporal graph convolutional network to predict the logistics demand of the target logistics network node; wherein the multi-scale spatiotemporal graph convolutional network includes a multi-scale graph convolutional network layer, a multi-head attention layer, a spatiotemporal embedding layer, an unsupervised task layer and a freezing layer, and the spatiotemporal embedding layer integrates a Grad-CAM gradient positioning network layer; The network weight optimization module is used to calculate the gradient of each node in the multi-scale spatiotemporal graph convolutional network, and summarize the gradient of each node to update the weight of the multi-scale spatiotemporal graph convolutional network.

Citation Information

Patent Citations

  • Optimized traffic flow prediction model based on space-time diagram convolutional network

    CN113505536A

  • Traffic flow prediction method based on Transform space-time diagram convolutional network

    CN114330671A