Logistics prediction method and device, computer device, storage medium and program product
Patent Information
- Application Number
- CN202510519333.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]有鉴于此,本发明提供了一种物流预测方法、装置、计算机设备、存储介质及程序产品,以解决物流行业中多个独立模型部署导致的资源过度占用和效率低下的问题
[0012]本发明实施例提供的物流预测方法,采用分层的两阶段聚合策略(初始聚合与跨层再聚合),在首层通过注意力权重筛选关键邻域信息形成初始隐变量,后续层则基于上层输出进行高阶特征提炼,这种渐进式抽象过程既保留了局部拓扑的细粒度交互,又逐步捕获全局网络的长程依赖。通过注意力权重动态调节邻接节点贡献度,使节点隐变量能够自适应反映物流网络中的实时状态变化,相比固定聚合规则更具环境感知能力。此外,逐层递进的特征传播结构有效平衡了计算效率与模型深度,通过重用中间表示减少重复计算,使得多层图卷积网络在大型物流网络中仍保持可行的推理速度,为实时预测提供了架构保障。
Smart Images

Figure CN122966121A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics and transportation technology, specifically to a logistics forecasting method, apparatus, computer equipment, storage medium, and program product. Background Technology
[0002] In the logistics industry, the flow of parcels involves multiple stages, such as receiving points, transit hubs, and final delivery points. Each stage generates a large amount of data, which provides rich material for training and predicting machine learning models. Logistics forecasting tasks are diverse, such as accurately predicting the daily arrival or delivery volume at the point of origin. Therefore, flexible models that are adaptable to different business scenarios are required.
[0003] Currently, to address these needs, the industry commonly employs the approach of independently training and deploying a large number of models. However, this practice leads to excessive resource consumption and reduced efficiency. For example, more than 80 models may be running simultaneously online. This resource dispersion not only limits the improvement of individual model performance but also reduces the optimization space, making it difficult to achieve efficient resource utilization and maximize model performance. Summary of the Invention
[0004] In view of this, the present invention provides a logistics forecasting method, apparatus, computer equipment, storage medium and program product to solve the problems of excessive resource consumption and low efficiency caused by the deployment of multiple independent models in the logistics industry.
[0005] In a first aspect, the present invention provides a logistics prediction method, comprising: acquiring original feature data of multiple logistics nodes and original logistics relationship data between multiple logistics nodes; based on the original feature data and original logistics relationship data, generating node latent variables of logistics nodes and relational latent variables of logistics relationships under each graph convolutional layer using a pre-constructed graph convolutional network; concatenating the original feature data with multiple node latent variables to obtain target node features of each logistics node, and concatenating the original logistics relationship data with multiple relational latent variables to obtain target relational features of each logistics relationship; and using a pre-trained data prediction model to perform data prediction on the target node features and target relational features, generating logistics parameter prediction results corresponding to each logistics node and transportation parameter prediction results corresponding to each logistics relationship.
[0006] The logistics forecasting method provided in this invention utilizes graph convolutional networks to dynamically capture the complex topological relationships between logistics nodes, overcoming the limitations of traditional methods in analyzing isolated nodes. By splicing the original data of nodes and relationships across layers with latent variables at each layer, it preserves the interpretability of the original features while integrating higher-order association information at different levels of abstraction, enhancing the model's ability to characterize the multi-layered dynamics of the logistics network. Simultaneously outputting dual predictions of node parameters and transportation parameters enables full-dimensional optimization from micro-nodes to the macro-network, providing more comprehensive decision support for logistics resource allocation and route planning.
[0007] In one optional implementation, based on the original feature data and original logistics relationship data, a pre-constructed graph convolutional network is used to generate node latent variables of logistics nodes and relational latent variables of logistics relationships at each graph convolutional layer. This includes: determining node weight parameters corresponding to the node type of each logistics node; generating intermediate representations of each logistics node based on the original feature data and node weight parameters; extracting intermediate representations of the logistics node pair from the intermediate representations of each logistics node for any logistics node pair under any logistics relationship; obtaining query parameters corresponding to the logistics relationship, and determining attention weight parameters for the logistics node pair based on the query parameters and the intermediate representations of the node pairs; processing the intermediate representations and attention weight parameters of each logistics node to obtain the node latent variables of any logistics node at each graph convolutional layer; and processing the intermediate representations of each node and the original logistics relationship data for any logistics relationship to obtain the relational latent variables of any logistics relationship at each graph convolutional layer.
[0008] The logistics prediction method provided in this invention dynamically adjusts weight parameters based on node type, avoiding the drawbacks of homogeneous processing in traditional graph convolutional networks. This makes feature extraction more closely reflect the functional differences between different nodes such as warehouses and transit stations in actual business operations. By coupling the calculation of query parameters and attention weights, it can adaptively capture the dynamic correlation strength between logistics nodes, overcoming the limitations of static relationship modeling. Furthermore, when generating latent variables, it simultaneously fuses the intermediate representations of nodes with the original relationship data. This not only preserves the physical meaning of the original features through the intermediate representations but also achieves deep fusion of low-order attributes and high-order topological information through cross-layer parameter passing. This achieves a balance between multi-scale feature representation and prediction stability in complex logistics networks, significantly improving the model's generalization ability to dynamic changes and heterogeneous relationships.
[0009] In one optional implementation, the query parameters include a query matrix and a key-value matrix; the logistics node pair includes a first logistics node and a second logistics node, and the intermediate representation of the node pair includes a first intermediate representation corresponding to the first logistics node and a second intermediate representation corresponding to the second logistics node; based on the query parameters and the intermediate representation of the node pair, the attention weight parameters of the logistics node pair are determined, including: determining a query vector based on the product between the first intermediate representation and the query matrix; determining a key vector based on the product between the second intermediate representation and the key-value matrix; determining the attention score of the logistics node pair based on the dot product between the query vector and the key vector; and normalizing the attention score to obtain the attention weight parameters.
[0010] The logistics prediction method provided in this invention employs a bidirectional parameterized design of query and key-value matrices, decomposing the interaction between node pairs into two interpretable dimensions: active query and passive response, effectively distinguishing directional functional differences in logistics relationships. Attention score calculation based on dot product operations significantly reduces the computational complexity of traditional softmax attention in large-scale logistics networks while preserving semantic similarity measurement. Furthermore, by separating the intermediate representations of the first and second nodes, it accommodates the asymmetry of transportation relationships and ensures the comparability of attention weights between different node pairs through normalization, enabling the model to adaptively capture key transportation routes that change over time, providing fine-grained relationship quantification support for dynamic route optimization.
[0011] In one optional implementation, for any logistics node, data processing is performed on the intermediate representations and attention weight parameters of each node to obtain the node latent variables of any logistics node under each graph convolutional layer. This includes: for any logistics node, obtaining multiple target logistics nodes adjacent to the logistics node; aggregating the intermediate representations and attention weight parameters corresponding to each target logistics node to obtain the initial node latent variables of any logistics node under the first graph convolutional layer; re-aggregating the initial node latent variables to obtain the intermediate node latent variables of any logistics node under the remaining graph convolutional layers; the node latent variables include the initial node latent variables and the intermediate node latent variables.
[0012] The logistics prediction method provided in this invention employs a hierarchical two-stage aggregation strategy (initial aggregation and cross-layer re-aggregation). In the first layer, key neighborhood information is filtered through attention weights to form initial latent variables. Subsequent layers refine higher-order features based on the output of the upper layers. This progressive abstraction process preserves the fine-grained interactions of the local topology while gradually capturing the long-range dependencies of the global network. By dynamically adjusting the contribution of adjacent nodes through attention weights, the latent variables of nodes can adaptively reflect real-time state changes in the logistics network, demonstrating greater environmental awareness compared to fixed aggregation rules. Furthermore, the layer-by-layer progressive feature propagation structure effectively balances computational efficiency and model depth. By reusing intermediate representations and reducing redundant computation, the multi-layer graph convolutional network maintains feasible inference speed in large-scale logistics networks, providing architectural assurance for real-time prediction.
[0013] In one optional implementation, for any logistics relationship, data processing is performed on the intermediate representations of each node and the original logistics relationship data to obtain the relational latent variables of any logistics relationship under each graph convolutional layer. This includes: for any logistics relationship, obtaining the intermediate representations of the two end nodes corresponding to the logistics relationship; based on the intermediate representations of the two end nodes and the original logistics relationship data, determining the initial relational latent variables of any logistics relationship under the first graph convolutional layer; and re-aggregating the initial relational latent variables based on the node latent variables to sequentially obtain the intermediate relational latent variables of any logistics relationship under the remaining graph convolutional layers. The relational latent variables include the initial relational latent variables and the intermediate relational latent variables.
[0014] The logistics prediction method provided in this invention directly couples the intermediate representations of the two endpoint nodes with the original relational data at the initial layer. This preserves the inherent attributes of the transportation link itself and enhances the sensitivity of the relationship to changes in endpoint states through the injection of node features. At the higher level, the latent variables of the relationship are re-aggregated through the latent variables of the nodes, establishing a closed-loop feedback of "node state update, relational representation adjustment, and node feature re-optimization," enabling the transportation relationship to evolve dynamically and in real time with the network. Furthermore, the hierarchical and progressive relational encoding structure allows the lower level to capture specific transportation constraints and the higher level to abstract network-level patterns. This multi-granularity expression significantly improves the model's reasoning ability for latent relationships in complex logistics systems, providing more robust feature support for dynamic path adjustments under unforeseen circumstances.
[0015] In one optional implementation, a pre-trained data prediction model is used to predict the features of a target node and generate prediction results for logistics parameters corresponding to each logistics node. This includes: inputting the target node features into a pre-trained first data prediction model to obtain first gating weights for each logistics dimension data in the target node features under each gating prediction layer; the first data prediction model includes multiple gating prediction layers; inputting the target node features into a pre-trained second data prediction model to obtain first feature activation values for each logistics dimension data under each gating prediction layer; the second data prediction model includes multiple gating prediction layers; dynamically modulating the first gating weights and first feature activation values to generate first dynamic feature modulation results corresponding to each gating prediction layer; and accumulating the first dynamic feature modulation results to obtain prediction results for logistics parameters corresponding to each logistics node. The data prediction model includes both the first and second data prediction models.
[0016] The logistics forecasting method provided in this invention employs a dual-prediction model parallel architecture (the first data prediction model learns the gating weights, and the second data prediction model extracts activation values), achieving decoupled training for feature importance discrimination and feature representation optimization. This dynamically focuses on key logistics dimensions through gating weights while retaining the nonlinear correlations of multi-dimensional data through activation values. Secondly, a cross-layer dynamic modulation mechanism is introduced to weightedly accumulate the outputs of different gating prediction layers, enabling the prediction results to simultaneously integrate shallow local patterns and deep global regularities, enhancing the multi-scale modeling capability for complex logistics scenarios. Furthermore, the adaptive calculation of gating weights can dynamically adjust the contribution of each dimension based on real-time features. Compared to a fixed weight allocation mechanism, it exhibits stronger generalization ability when dealing with sudden fluctuations or seasonal differences, providing a unified and flexible solution for predicting differentiated parameters of various types of logistics nodes.
[0017] In one optional implementation, a pre-trained data prediction model is used to predict the target relationship features and generate transportation parameter prediction results corresponding to each logistics relationship. This includes: inputting the target relationship features into a pre-trained third data prediction model to obtain the second gating weights of each transportation dimension data in the target relationship features under each gating prediction layer; inputting the target edge features into a pre-trained fourth data prediction model to obtain the second feature activation values of each transportation dimension data in the target relationship features under each gating prediction layer; dynamically modulating the second gating weights and second feature activation values to generate the second dynamic feature modulation results corresponding to each gating prediction layer; and accumulating the second dynamic feature modulation results to obtain the transportation parameter prediction results corresponding to each logistics relationship. The data prediction model includes the third data prediction model and the fourth data prediction model.
[0018] The logistics forecasting method provided in this invention employs a dual-parallel architecture of a third data forecasting model and a fourth data forecasting model, decoupling gating weight learning from feature activation calculation. It dynamically filters key transportation dimensions through second gating weights while retaining the nonlinear correlations of multi-dimensional data through activation values. Secondly, by accumulating cross-layer modulation results, it organically integrates shallow basic transportation patterns with deep complex coupling features, forming complementary multi-granularity prediction signals. Furthermore, the synergistic effect of the gating mechanism and dynamic modulation enables the model to automatically amplify the decision-making influence weights of relevant dimensions based on real-time relationship characteristics, exhibiting stronger robustness in responding to dynamic disturbances in the transportation network and providing refined predictive support for the elastic optimization of complex logistics relationships.
[0019] Secondly, the present invention provides a logistics prediction device, comprising: an acquisition module for acquiring original feature data of multiple logistics nodes and original logistics relationship data between multiple logistics nodes; a generation module for generating, based on the original feature data and original logistics relationship data, node latent variables of logistics nodes and relational latent variables of logistics relationships under each graph convolutional layer using a pre-constructed graph convolutional network; a splicing module for splicing the original feature data with multiple node latent variables to obtain target node features of each logistics node, and splicing the original logistics relationship data with multiple relational latent variables to obtain target relationship features of each logistics relationship; and a prediction module for using a pre-trained data prediction model to perform data prediction on the target node features and target relationship features, generating logistics parameter prediction results corresponding to each logistics node and transportation parameter prediction results corresponding to each logistics relationship.
[0020] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the logistics prediction method of the first aspect or any corresponding embodiment described above.
[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the logistics forecasting method of the first aspect or any corresponding embodiment described above.
[0022] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the logistics forecasting method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0023] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating the logistics forecasting method according to an embodiment of the present invention;
[0025] Figure 2 This is a flowchart illustrating another logistics forecasting method according to an embodiment of the present invention;
[0026] Figure 3 This is a flowchart illustrating another logistics forecasting method according to an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of the process of logistics forecasting through a gated forecasting layer according to an embodiment of the present invention;
[0028] Figure 5 This is a structural block diagram of a logistics forecasting device according to an embodiment of the present invention;
[0029] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] In the logistics industry, the entire process of a package's flow from the receiving point, transit hub, to the final destination generates massive amounts of data at each stage. This rich data provides a solid foundation for training and predicting machine learning models. At the same time, logistics forecasting tasks are diverse, such as predicting daily arrivals or deliveries at the point-of-delivery level. This necessitates a highly flexible model to meet different forecasting needs.
[0032] However, the current industry practice for addressing these needs is to independently train and deploy a large number of models. For example, more than 80 models often run simultaneously online. While this approach satisfies diverse needs to some extent, it also brings serious drawbacks. On the one hand, a large number of models consume massive amounts of resources, leading to resource waste; on the other hand, the distributed deployment of models limits the resources available to individual models, greatly compressing the performance improvement and optimization potential of individual models, resulting in extremely low efficiency. Furthermore, current model systems have shortcomings in technology application. For short-term predictions, these models mainly rely on traditional tree models, while for long-term predictions they rely on time-series models. These traditional models fail to fully explore and utilize cutting-edge neural network technologies, making it difficult to achieve breakthrough improvements in model performance.
[0033] In view of this, the technical solution of this invention constructs a graph structure representation of the logistics network by collecting attribute data of logistics nodes and logistics relationship data between nodes. A multi-layer graph convolutional network is used to simultaneously extract dynamic latent variables of nodes and transportation relationships, where the lower layers capture local topological features and the higher layers abstract global dependencies. The original data and latent variables from each layer are concatenated across layers to form enhanced features that integrate original business attributes and multi-level network semantics, preserving the physical meaning of the data while strengthening feature expression capabilities. Finally, a data prediction model is used to jointly infer the enhanced node and relationship features, simultaneously outputting node-level parameters and relationship-level parameters, achieving full-dimensional prediction from micro-facilities to the macro-transportation network. Therefore, this method innovatively combines hierarchical feature learning of graph neural networks with multi-layer fusion of business data, providing decision support for the dynamic optimization of logistics systems that combines interpretability and predictive accuracy.
[0034] According to an embodiment of the present invention, a logistics forecasting method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] This embodiment provides a logistics forecasting method that can be used with computer equipment, such as laptops and desktop computers. Figure 1 This is a flowchart of a logistics forecasting method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0036] Step S101: Obtain the original feature data of multiple logistics nodes and the original logistics relationship data between multiple logistics nodes.
[0037] Logistics nodes refer to physical units within a logistics network, including outlets (such as receiving points and delivery points) and transit hubs (cargo transfer hubs). These nodes form the vertices in a graph structure, carrying key functions in logistics operations. Raw characteristic data refers to the static attributes and dynamic business data of logistics nodes, including node characteristics (such as inventory capacity, throughput efficiency, geographical location, historical parcel volume (receipts / deliveries / arrivals)) and node type (outlet or transit hub). Specifically, for acquiring static attributes, inherent attributes of logistics nodes can be collected through logistics management systems (such as ERP and WMS), including the physical capacity of outlets / transit hubs (such as warehouse area), geographical location (latitude and longitude), and equipment configuration (such as the number of sorting lines). For acquiring dynamic business data, real-time or historical operational indicators can be extracted from the business database, such as: the number of parcels received, delivered, and arrived at outlets (statistics by hour / day), and the cargo throughput, retention rate, and sorting efficiency of transit hubs. For node types, node type labels can be set to clearly indicate the node type (network point or transit site), supporting subsequent heterogeneous graph modeling.
[0038] Raw logistics relationship data refers to the relationship data of transportation links between logistics nodes, including logistics characteristics (such as fixed costs of transportation routes, historical order volume, transportation timeliness, etc.) and logistics relationship types (network point → transit center, transit center → transit center, transit center → network point). Specifically, logistics characteristic information can be obtained from the Transportation Management System (TMS), such as route mileage, fixed transportation costs, historical average timeliness, vehicle type restrictions, order volume of a certain route within a specific time period, and distribution of cargo types. Regarding logistics relationship types, three types of relationships can be defined based on the logistics network topology:
[0039] Outlet → Transit Center (e.g., Outlet A delivers goods to regional transit center B);
[0040] Transit hub → Transit hub (such as trunk line transportation between transit hubs across regions);
[0041] Transit point → Outlet (e.g., transit point C distributes goods to end outlet D).
[0042] The original feature data and the original logistics relationship data are stored in a graph structure (such as an adjacency list or matrix). The logistics node feature matrix is N×D (N is the number of logistics nodes and D is the node feature dimension), and the logistics relationship feature matrix is E×M (E is the number of logistics relationships (also known as the number of edges) and M is the logistics relationship feature dimension).
[0043] Step S102: Based on the original feature data and the original logistics relationship data, use a pre-constructed graph convolutional network to generate the node latent variables of logistics nodes under each graph convolutional layer and the relationship latent variables of logistics relationships under each graph convolutional layer.
[0044] Graph convolutional networks are a type of deep learning model based on graph structure data, used to extract implicit features of logistics nodes and logistics relationships. They include relational graph attention (RGAT) and feedforward neural networks (FFN). Relational graph attention is used to dynamically calculate attention weights for different edge types to capture differentiated interactions between nodes, while feedforward neural networks are used to extract higher-order features layer by layer to generate latent variables of nodes and relationships.
[0045] Node latent variables refer to the implicit features of logistics nodes output by each layer of a graph convolutional network. Each layer of latent variables captures neighborhood information of a different range (such as shallow layers focusing on direct neighbors and deep layers capturing the global topology) to comprehensively characterize the node state.
[0046] Relational latent variables refer to the implicit features extracted layer by layer from logistics relationships in a graph convolutional network. They are used to characterize the complex patterns of interaction between logistics nodes (such as changes in transportation efficiency over time, the potential impact of unforeseen events, etc.).
[0047] Specifically, relational graph attention (RGAT) is used to dynamically calculate attention weights for different edge types to capture differentiated interactions between logistics nodes. The calculated attention weights are then integrated into a feedforward neural network (FFN), allowing the FFN to extract higher-order features layer by layer. Finally, after processing by each layer of the graph convolutional network, the latent variables of the logistics nodes and the latent variables of the logistics relationships are output. Each layer of node latent variables captures neighborhood information within different ranges, and each layer of relationship latent variables can represent the complex patterns of interactions between logistics nodes.
[0048] Step S103: Concatenate the original feature data with multiple node latent variables to obtain the target node features of each logistics node, and concatenate the original logistics relationship data with multiple relationship latent variables to obtain the target relationship features of each logistics relationship.
[0049] Target node features refer to the fused features obtained by concatenating the original node features with the latent variables of each layer of nodes along the feature dimension. Specifically, concatenating the original node features with the latent variables of each layer of nodes along the feature dimension to form target node features can incorporate network topology information (such as neighborhood load trends) while preserving the original business attributes (such as inventory levels).
[0050] Target relationship features refer to the enhanced features obtained by concatenating the original logistics relationship data with the latent variables of each layer of relationships. Specifically, by concatenating the original logistics relationship data with the latent variables of each layer of relationships, the target relationship features are obtained, thereby integrating the static attributes (such as fixed costs) and dynamic evolution patterns (such as capacity fluctuation patterns) of transportation routes.
[0051] Step S104: Using a pre-trained data prediction model, perform data prediction on the target node features and target relationship features to generate prediction results for logistics parameters corresponding to each logistics node and prediction results for transportation parameters corresponding to each logistics relationship.
[0052] Data prediction models refer to machine learning models trained on historical data, used to predict future logistics parameters. Examples include prediction modules based on gated multilayer perceptrons (Gated MLPs). Logistics parameter prediction results refer to predicted business indicators for logistics nodes, such as the number of packages received, delivered, and dispatched for a network point in a future period, and the expected arrival volume and inventory pressure index for a transit hub. Transportation parameter prediction results refer to predicted indicators for the transportation links in logistics relationships, such as route timeliness (e.g., the estimated transportation time for a certain route), capacity demand (e.g., the number of vehicles or manpower required for a specific period), and cost estimates (e.g., dynamic costs such as fuel and toll fees). Specifically, the target node features and target relationship features are input into a data prediction model that is pre-trained based on historical data, such as a prediction module based on a gated multilayer perceptron. This model independently models different logistics nodes and logistics relationships, focuses on key feature dimensions through weight allocation, and finally outputs the predicted values of business indicators for each logistics node (such as the number of packages received at the network point, the number of packages received at the transit point, and other logistics parameter prediction results) and the predicted values of transportation link indicators for each logistics relationship (such as the prediction results of transportation parameters such as route timeliness, capacity demand, and cost estimation).
[0053] The logistics forecasting method provided in this invention utilizes graph convolutional networks to dynamically capture the complex topological relationships between logistics nodes, overcoming the limitations of traditional methods in analyzing isolated nodes. By splicing the original data of nodes and relationships across layers with latent variables at each layer, it preserves the interpretability of the original features while integrating higher-order association information at different levels of abstraction, enhancing the model's ability to characterize the multi-layered dynamics of the logistics network. Simultaneously outputting dual predictions of node parameters and transportation parameters enables full-dimensional optimization from micro-nodes to the macro-network, providing more comprehensive decision support for logistics resource allocation and route planning.
[0054] This embodiment provides a logistics forecasting method that can be used with computer equipment, such as laptops and desktop computers. Figure 2 This is a flowchart of a logistics forecasting method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0055] Step S201: Obtain the original feature data of multiple logistics nodes and the original logistics relationship data between the multiple logistics nodes. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0056] Step S202: Based on the original feature data and the original logistics relationship data, use a pre-constructed graph convolutional network to generate the node latent variables of logistics nodes under each graph convolutional layer and the relationship latent variables of logistics relationships under each graph convolutional layer.
[0057] Specifically, step S202 includes:
[0058] Step S2021: Based on the node type of each logistics node, determine the node weight parameters corresponding to the node type.
[0059] Node type refers to the classification label of a logistics node, used to distinguish physical units with different functions, including outlets and transit points. Node weight parameters refer to the differentiated weight matrix assigned based on node type, used for feature transformation; for example, the weight matrix W corresponds to the outlet type. 网点 The weight matrix W corresponding to the transit site type 中转场 Specifically, when determining the weight parameters corresponding to the node type, a corresponding submatrix is selected from a predefined three-dimensional weight parameter matrix (2×n×k×d') based on the type of logistics node (outlet or transit point), where n is the number of nodes, k is the number of attention heads, and d' is the number of features output by each attention head. This matrix contains two independent n×k×d' matrices, corresponding to outlets and transit points respectively. Specifically, the first submatrix is used when the node type is an outlet, and the second submatrix is used when the type is a transit point. In this way, different types of nodes apply differentiated weight parameters when calculating intermediate representations, thereby capturing the feature differences between node types.
[0060] Step S2022: Based on the original feature data and node weight parameters corresponding to each logistics node, generate the intermediate representation of each logistics node.
[0061] The intermediate node representation refers to the intermediate feature vector of a logistics node in a graph convolutional network (RGAT layer). Specifically, the original two-dimensional node feature data (n×d) is expanded to four dimensions (n×1×1×d), where d represents the number of features per node. This is then multiplied by a three-dimensional weight parameter matrix (2×n×k×d', containing parameters for both network points and transit points) to obtain a three-dimensional intermediate result (n×2×k×d'). By selecting the feature vector of the corresponding dimension (network point or transit point) based on the node type, the dimensionality is compressed to obtain the three-dimensional intermediate representation (n×1×k×d') of each logistics node, which is ultimately used as the input for the subsequent attention mechanism.
[0062] Step S2023: For any logistics node pair under any logistics relationship, extract the node pair intermediate representation of the logistics node pair from the node intermediate representation of each logistics node.
[0063] A logistics node pair refers to two nodes connected by an edge in a logistics relationship, representing the two ends of a transportation link. The intermediate representation of a node pair refers to the intermediate feature vector of the two ends of the node pair. Specifically, based on the type of logistics relationship (e.g., from a point of sale to a transit point), the type of the two nodes in the logistics node pair (point of sale or transit point) is determined. From the three-dimensional intermediate representation (n×1×k×d') of each node, the feature vectors of the corresponding type are extracted (e.g., the intermediate representation of point of sale A and the intermediate representation of transit point B). Finally, the feature vectors of the two nodes are concatenated along the feature dimension (e.g., merged along the last dimension) to form the intermediate representation (n×1×2k×d') of the node pair, which serves as the input for subsequent attention weight calculation.
[0064] Step S2024: Obtain the query parameters corresponding to the logistics relationship, and determine the attention weight parameters of the logistics node pair based on the query parameters and the intermediate representation of the node pair.
[0065] Query parameters refer to the learnable parameter matrix in the attention mechanism, used to generate query vectors. Attention weight parameters are used to dynamically reflect the importance of logistics nodes in the interaction. Specifically, query parameters are pre-defined for each type of logistics relationship. In practical applications, the appropriate query parameters are selected according to the type of logistics relationship, and they are matched and calculated with the intermediate representation of the node pair to determine the attention weight parameters of the logistics node pair.
[0066] In some optional implementations, the query parameters include a query matrix and a key-value matrix; the logistics node pair includes a first logistics node and a second logistics node, and the intermediate representation of the node pair includes a first intermediate representation corresponding to the first logistics node and a second intermediate representation corresponding to the second logistics node; the above step S2024 includes:
[0067] Step a1: Determine the query vector based on the product between the first intermediate representation and the query matrix.
[0068] Specifically, let the intermediate node of the first logistics node be represented as... (belonging to logistics relationship type r), the query matrix is r. (r) Query vector We obtain this through matrix multiplication:
[0069]
[0070] Each logistics relationship type r corresponds to an independent query matrix Q. (r) This is used to extract the "query" features of the current node under a specific relationship. This operation maps the intermediate representation to the query space and is used to measure the correlation between nodes.
[0071] Step a2: Determine the key vector based on the product between the second intermediate representation and the key value matrix.
[0072] Specifically, let the intermediate node of the second logistics node be represented as... The key matrix is K (r) Key vector The calculation is as follows:
[0073]
[0074] Key matrix K (r) With query matrix Q (r) Each parameter is a one-to-one correspondence and can be learned. The key vector is used to represent the "key" features of adjacent nodes in a relationship, and is used in conjunction with the query vector to calculate the attention score.
[0075] Step a3: Determine the attention score of the logistics node pair based on the dot product between the query vector and the key vector.
[0076] For query vector and key vector Perform a dot product operation to obtain the attention score.
[0077]
[0078] The a(·,·) function is the dot product between vectors, outputting a single value, namely attention logits. The dot product result reflects the intensity of attention a node pays to another node under a relation. A higher score indicates a greater contribution of a node to the prediction of another node.
[0079] Step a4: Normalize the attention score to obtain the attention weight parameters.
[0080] The Softmax function is used to normalize the scores of all neighboring nodes under the same relation r to generate attention scores. These scores are used to determine the relative contribution of each neighboring node to the current node, and these contributions are integrated through a weighted summation. Finally, a non-linear activation function is applied to transform the aggregation results for each edge type, and the result is the final representation of the relation graph attention network's processing of individual node feature information.
[0081] Specifically, two different methods were used in calculating the attention score: within-relation and across-relation. The within-relation method is based on the prior assumption that the type of logistics relationship can be regarded as a global attribute. Therefore, when calculating the attention score for a specific logistics relationship type, all edges of that type are treated equally. The calculation formula is as follows:
[0082]
[0083] The inter-relationship approach treats the type of logistics relationship as a local variable, comprehensively considering the influence of all logistics relationship types when calculating the attention score. This method can fully capture the complex relationships between nodes, hence the name inter-relationship attention calculation. The calculation formula is shown below:
[0084]
[0085] After normalization, attention weight parameters This represents the attention weight of node i on node j.
[0086] In the above implementation, a bidirectional parameterized design using query and key-value matrices is employed to decompose the interaction between node pairs into two interpretable dimensions: active query and passive response, effectively distinguishing directional functional differences in logistics relationships. Attention score calculation based on dot product operations significantly reduces the computational complexity of traditional softmax attention in large-scale logistics networks while preserving semantic similarity measurement. Furthermore, by separating the intermediate representation processing of the first and second nodes, the asymmetry of transportation relationships is accommodated, and normalization ensures the comparability of attention weights between different node pairs. This enables the model to adaptively capture key transportation paths that change over time, providing fine-grained relationship quantification support for dynamic route optimization.
[0087] Step S2025: For any logistics node, perform data processing on the intermediate representation and attention weight parameters of each node to obtain the node latent variables of any logistics node under each graph convolutional layer.
[0088] The intermediate representations of all nodes related to any given logistics node are associated with their corresponding attention weight parameters. For each related intermediate representation, a weight is applied based on the attention weight parameters to reflect the importance of different nodes in the interaction. An aggregation operation, such as summation or averaging, is then performed on all weighted intermediate representations. Finally, the aggregation result is nonlinearly transformed using an activation function (such as ReLU) to obtain the node latent variables of that logistics node in each graph convolutional layer.
[0089] In some optional implementations, step S2025 above includes:
[0090] Step b1: For any given logistics node, obtain multiple target logistics nodes adjacent to that logistics node.
[0091] For any logistics node, based on its type (network point or transit point), traverse all logistics relationship types to find the logistics relationships connected to that node. Extract the endpoint (or origin) of the logistics relationship as adjacent nodes. For example, if the current logistics node is a network point, traverse all edges from network point to transit point to obtain the corresponding transit point node; if the current node is a transit point, traverse all edges from transit point to network point or from transit point to transit point to obtain the corresponding network point or transit point node. All the adjacent nodes obtained are the target logistics node.
[0092] Step b2 involves aggregating the intermediate representations of each target logistics node and the attention weight parameters to obtain the initial latent variables of any logistics node in the first graph convolutional layer.
[0093] The Relational Graph Attention (RGAT) aggregation mechanism is used to perform a weighted summation of the intermediate representations of adjacent nodes, incorporating attention weights. Specifically, the intermediate representation of each target logistics node is multiplied by its corresponding attention weight. Then sum over all target nodes. Apply a nonlinear activation function (such as LeakyReLU) to the aggregation result to obtain the initial node latent variables.
[0094] Step b3 involves re-aggregating the initial node latent variables to obtain the intermediate node latent variables of any logistics node in each of the remaining graph convolutional layers.
[0095] Among them, the node hidden variables include the initial node hidden variables and the intermediate node hidden variables.
[0096] The input to subsequent graph convolutional layers is the latent variables of the nodes in the previous layer, rather than the original features. The latent variables are updated progressively through multiple stacked RGAT layers. Specifically, the input to the l-th layer is the latent variables of the (l-1)-th layer. For each layer, the attention weights (based on the latent variables of the current layer) are recalculated, and the latent variables of adjacent nodes are weighted and aggregated. The aggregated latent variables are then input into the FFN to generate the intermediate latent variables of the current layer.
[0097] In the above implementation, a hierarchical two-stage aggregation strategy (initial aggregation and cross-layer re-aggregation) is adopted. In the first layer, key neighborhood information is selected through attention weights to form initial latent variables. Subsequent layers refine higher-order features based on the output of the upper layer. This progressive abstraction process preserves the fine-grained interactions of the local topology while gradually capturing the long-range dependencies of the global network. By dynamically adjusting the contribution of neighboring nodes through attention weights, the latent variables of nodes can adaptively reflect the real-time state changes in the logistics network, which is more environmentally aware than fixed aggregation rules. In addition, the layer-by-layer progressive feature propagation structure effectively balances computational efficiency and model depth. By reusing intermediate representations to reduce redundant computation, the multi-layer graph convolutional network maintains a feasible inference speed in large-scale logistics networks, providing architectural assurance for real-time prediction.
[0098] Step S2026: For any logistics relationship, perform data processing on the intermediate representations of each node and the original logistics relationship data to obtain the latent variables of any logistics relationship under each graph convolutional layer.
[0099] Based on the logistics relationship type, the types of the two nodes in a logistics node pair are determined. Corresponding type feature vectors are extracted from the three-dimensional intermediate representation (n×1×k×d') of each node, and concatenated along the feature dimensions to form the intermediate representation (n×1×2k×d') of the node pair. Simultaneously, combined with the original logistics relationship data, specific fusion functions (such as concatenation, weighted summation, etc.) can be used to fuse the intermediate representations of each node with the original logistics relationship data along appropriate dimensions. Then, a nonlinear transformation is performed using an activation function (such as ReLU) to finally obtain the latent variables of any logistics relationship at each graph convolutional layer.
[0100] In some optional implementations, step S2026 above includes:
[0101] Step c1: For any logistics relationship, obtain the intermediate representation of the two ends of the logistics nodes corresponding to any logistics relationship.
[0102] Logistics relationships are represented by edges, each containing a starting logistics node u and an ending logistics node v (e.g., an edge from a point of sale to a transit point, where u is the point of sale and v is the transit point). For an edge (u, v), the intermediate representations of u and v are directly indexed from the intermediate representation matrix of the nodes to obtain the intermediate representations of the two endpoints.
[0103] Step c2, based on the intermediate representations of the two end nodes and the original logistics relationship data, determines the initial latent variable of any logistics relationship under the first graph convolutional layer.
[0104] The intermediate representations of the two endpoints and the original logistics relationship data are aggregated, and initial latent relationship variables are generated using a feedforward neural network (FFN). Specifically, the intermediate representations of the two endpoints and the original logistics relationship data are concatenated along the feature dimension to obtain the concatenated features. The concatenated features are then input into the FFN, and the initial latent relationship variables are output.
[0105] Step c3: Based on the node latent variables, the initial relation latent variables are re-aggregated to obtain the intermediate relation latent variables of any logistics relation under each of the other graph convolutional layers.
[0106] Among them, the latent variables of the relations include the initial relation latent variables and the intermediate relation latent variables.
[0107] The update of latent variables in subsequent layers depends on the latent variables of the nodes in the current layer and the logistic relationship features, and is gradually refined through the stacking of multiple RGAT layers. Specifically, the input of the l-th layer is the latent variables of the (l-1)-th layer. For each edge (u, v), the latent variables of the nodes in the current layer are concatenated with the latent variables of the previous layer, and the result is input into FFN to generate new latent variables of the relationships. The above steps are repeated until the preset number of layers is reached, and the final latent variables of the relationships contain information from multiple layers of aggregation.
[0108] In the above implementation, the intermediate representations of the two endpoints are directly coupled with the original relational data at the initial layer. This preserves the inherent attributes of the transportation link itself and enhances the sensitivity of the relationship to changes in endpoint states through the injection of node features. At the higher layer, the relational latent variables are re-aggregated through node latent variables, establishing a closed-loop feedback loop of "node state update → relational representation adjustment → node feature re-optimization," enabling the transportation relationship to evolve dynamically and in real time with the network. Furthermore, the hierarchical and progressive relational encoding structure allows the lower layer to capture specific transportation constraints and the higher layer to abstract network-level patterns. This multi-granularity expression significantly improves the model's reasoning ability for latent relationships in complex logistics systems, providing more robust feature support for dynamic path adjustments under unforeseen circumstances.
[0109] Step S203 involves concatenating the original feature data with multiple node latent variables to obtain the target node features of each logistics node, and concatenating the original logistics relationship data with multiple relationship latent variables to obtain the target relationship features of each logistics relationship. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0110] Step S204: Using a pre-trained data prediction model, data prediction is performed on the target node features and target relationship features to generate prediction results for logistics parameters corresponding to each logistics node and prediction results for transportation parameters corresponding to each logistics relationship. For details, please refer to [link to details]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0111] The logistics prediction method provided in this invention dynamically adjusts weight parameters based on node type, avoiding the drawbacks of homogeneous processing in traditional graph convolutional networks. This makes feature extraction more closely reflect the functional differences between different nodes such as warehouses and transit stations in actual business operations. By coupling the calculation of query parameters and attention weights, it can adaptively capture the dynamic correlation strength between logistics nodes, overcoming the limitations of static relationship modeling. Furthermore, when generating latent variables, it simultaneously fuses the intermediate representations of nodes with the original relationship data. This not only preserves the physical meaning of the original features through the intermediate representations but also achieves deep fusion of low-order attributes and high-order topological information through cross-layer parameter passing. This achieves a balance between multi-scale feature representation and prediction stability in complex logistics networks, significantly improving the model's generalization ability to dynamic changes and heterogeneous relationships.
[0112] This embodiment provides a logistics forecasting method that can be used with computer equipment, such as laptops and desktop computers. Figure 3 This is a flowchart of a logistics forecasting method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0113] Step S301: Obtain the original feature data of multiple logistics nodes and the original logistics relationship data between the multiple logistics nodes. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0114] Step S302: Based on the original feature data and original logistics relationship data, a pre-constructed graph convolutional network is used to generate latent node variables for logistics nodes at each graph convolutional layer, and latent relationship variables for logistics relationships at each graph convolutional layer. For details, please refer to [link to details]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0115] Step S303 involves concatenating the original feature data with multiple node latent variables to obtain the target node features of each logistics node, and concatenating the original logistics relationship data with multiple relationship latent variables to obtain the target relationship features of each logistics relationship. For details, please refer to [link to details]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0116] Step S304: Using a pre-trained data prediction model, perform data prediction on the target node features and target relationship features to generate prediction results for logistics parameters corresponding to each logistics node and prediction results for transportation parameters corresponding to each logistics relationship.
[0117] Specifically, step S304 includes:
[0118] Step S3041: Input the target node features into the pre-trained first data prediction model to obtain the first gate weights of each logistics dimension data in the target node features under each gate prediction layer. The first data prediction model includes multiple gate prediction layers.
[0119] The first data prediction model is a neural network model used to process the features of target nodes, containing multiple gated prediction layers. Logistics dimension data refers to the feature dimensions of logistics nodes, such as specific parameters like received volume, arrival volume, and dispatch volume. The gated prediction layer is a neural network layer integrating a gated mechanism; its core structure consists of two MLPs, such as... Figure 4 As shown, the output of MLP1 generates gating weights (such as the first gating weight) through Softmax, reflecting the importance of the feature dimensions; the output of MLP2 is the feature activation value (such as the first feature activation value). The first gating weight is generated by the first data prediction model and represents the weight coefficients of different dimensions in the logistics node features (such as the weight of the received quantity dimension being 0.8 and the weight of the arrived quantity being 0.2). Specifically, the first MLP (i.e., the first data prediction model MLP1) of each gating prediction layer processes the input features, and the output dimension is the same as the input. The Softmax function is applied to the output of MLP1 to calculate the weight coefficients (i.e., the first gating weight) along the column direction (i.e., the feature dimension), as expressed by the formula:
[0120] First gating weight = Softmax(MLP1(target node features)).
[0121] The first gating weight reflects the importance of each feature dimension of the target node in the current gating prediction layer.
[0122] Step S3042: Input the target node features into the pre-trained second data prediction model to obtain the first feature activation values of each logistics dimension data under each gated prediction layer. The second data prediction model includes multiple gated prediction layers.
[0123] The second data prediction model has the same structure as the first data prediction model, but is trained independently. It is used to generate the first feature activation values for each logistics dimension in the logistics node features. The first feature activation value is the feature representation output by the second data prediction model, reflecting the nonlinear mapping results of each logistics dimension (such as the number of received items and the number of items received) in different gating prediction layers. Specifically, the second data prediction model uses the same input data (target node features) as the first data prediction model. The second MLP (i.e., the second data prediction model MLP2) processes the input features, and the output dimension is the same as the input. A nonlinear activation function (such as ReLU) is applied to the output of MLP2 to generate the first feature activation value. The formula is expressed as:
[0124] First feature activation value = ReLU(MLP2(target node features)).
[0125] Among them, the first feature activation value retains the nonlinear transformation information of the input feature (target node feature).
[0126] Step S3043: Dynamic modulation is performed using the first gate weight and the first feature activation value to generate the first dynamic feature modulation result corresponding to each gate prediction layer.
[0127] The first dynamic feature modulation result is an intermediate feature generated by weighted fusion (element-wise multiplication) of the first gating weight and the first feature activation value. For example, if the weight of the received quantity is 0.8 and the activation value is 1.2, the modulation result is 0.8 × 1.2 = 0.96, strengthening important features. Specifically, ensure that the dimensions of the gating weight and the feature activation value are consistent (both are the number of samples × the number of features). For each feature dimension, multiply the first gating weight by the corresponding first feature activation value, as expressed by the formula:
[0128] First dynamic feature modulation result = First gating weight ⊙ First feature activation value.
[0129] Here, ⊙ represents element-wise multiplication.
[0130] The first dynamic feature modulation result reflects the contribution of each feature dimension after adjustment according to the gating weights.
[0131] Step S3044: The modulation results of each first dynamic feature are accumulated to obtain the logistics parameter prediction results corresponding to each logistics node.
[0132] The data prediction model includes a first data prediction model and a second data prediction model.
[0133] The logistics parameter prediction results are the final predicted values for logistics nodes, such as the number of packages received, received, and dispatched at a network point. Specifically, the dynamic features of all gated prediction layers are accumulated at the element level and finally mapped to the prediction result through a linear layer. Assuming there are L gated layers in total, each layer outputs a first dynamic feature modulation result D^{(l)} (l=1,2,...,L). The first dynamic feature modulation result is accumulated, and the total accumulated feature is input into the linear layer to output the logistics parameter prediction result. For example, for a network point node, the output is three values: received, received, and dispatched; other node types output a single value (such as the number of packages received at a transit center).
[0134] The logistics forecasting method provided in this invention employs a dual-prediction model parallel architecture (the first data prediction model learns the gating weights, and the second data prediction model extracts activation values), achieving decoupled training for feature importance discrimination and feature representation optimization. This dynamically focuses on key logistics dimensions through gating weights while retaining the nonlinear correlations of multi-dimensional data through activation values. Secondly, a cross-layer dynamic modulation mechanism is introduced to weightedly accumulate the outputs of different gating prediction layers, enabling the prediction results to simultaneously integrate shallow local patterns and deep global regularities, enhancing the multi-scale modeling capability for complex logistics scenarios. Furthermore, the adaptive calculation of gating weights can dynamically adjust the contribution of each dimension based on real-time features. Compared to a fixed weight allocation mechanism, it exhibits stronger generalization ability when dealing with sudden fluctuations or seasonal differences, providing a unified and flexible solution for predicting differentiated parameters of various types of logistics nodes.
[0135] Step S3045: Input the target relationship features into the pre-trained third data prediction model to obtain the second gating weights of each transportation dimension data in the target relationship features under each gating prediction layer.
[0136] The third data prediction model is a neural network model used to process the target relationship features, and its structure is similar to that of the first data prediction model. Transportation dimension data refers to the feature dimensions of logistics relationships (edges), such as parameters like transportation volume, transportation timeliness, and cost. The second gating weight is generated by the third data prediction model and represents the weight coefficients of different parameters in the transportation dimension data (e.g., transportation volume weight is 0.7, and timeliness weight is 0.3). Specifically, the target relationship features are input into the third data prediction model, and the Softmax function is applied to the output of the third data prediction model to calculate the second gating weight along the column direction (i.e., the feature dimension).
[0137] Step S3046: Input the target edge features into the pre-trained fourth data prediction model to obtain the second feature activation values of each transportation dimension data in the target relationship features under each gated prediction layer.
[0138] The fourth data prediction model has the same structure as the third data prediction model and is trained independently. It is used to generate the second feature activation values for the transportation dimension data. Specifically, the target relationship features are input into the fourth data prediction model, and a nonlinear activation function (such as ReLU) is applied to the output of the fourth data prediction model to generate the second feature activation values.
[0139] Step S3047: Dynamic modulation is performed using the second gating weight and the second feature activation value to generate the second dynamic feature modulation result corresponding to each gating prediction layer.
[0140] The second dynamic feature modulation result refers to the intermediate feature generated by the weighted fusion of the second gating weight and the second feature activation value, which is used to optimize transportation parameter prediction. Specifically, it is ensured that the dimensions of the second gating weight and the second feature activation value are consistent (both are the number of samples × the number of features). For each feature dimension, the second gating weight is multiplied by the corresponding second feature activation value to obtain the second dynamic feature modulation result.
[0141] Step S3048: The modulation results of each second dynamic feature are accumulated to obtain the transportation parameter prediction results corresponding to each logistics relationship.
[0142] The data prediction models include the third data prediction model and the fourth data prediction model.
[0143] The transportation parameter prediction results are the final predicted values of logistics relationships, such as the transportation volume from the transit hub to the network point and the transportation time between transit hubs. Specifically, the second dynamic feature modulation results of all gated prediction layers are accumulated at the element level, and the accumulated total features are input into the linear layer to output the transportation parameter prediction results (such as the number of pieces from the network point to the transit hub).
[0144] The logistics forecasting method provided in this invention employs a dual-parallel architecture of a third data forecasting model and a fourth data forecasting model, decoupling gating weight learning from feature activation calculation. It dynamically filters key transportation dimensions through second gating weights while retaining the nonlinear correlations of multi-dimensional data through activation values. Secondly, by accumulating cross-layer modulation results, it organically integrates shallow basic transportation patterns with deep complex coupling features, forming complementary multi-granularity prediction signals. Furthermore, the synergistic effect of the gating mechanism and dynamic modulation enables the model to automatically amplify the decision-making influence weights of relevant dimensions based on real-time relationship characteristics, exhibiting stronger robustness in responding to dynamic disturbances in the transportation network and providing refined predictive support for the elastic optimization of complex logistics relationships.
[0145] This embodiment also provides a logistics testing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0146] This embodiment provides a logistics testing device, such as... Figure 5 As shown, it includes:
[0147] The acquisition module 401 is used to acquire the original feature data of multiple logistics nodes and the original logistics relationship data between multiple logistics nodes;
[0148] The generation module 402 is used to generate the node latent variables of logistics nodes and the relation latent variables of logistics relationships under each graph convolutional layer based on the original feature data and the original logistics relationship data, using a pre-built graph convolutional network.
[0149] The splicing module 403 is used to splice the original feature data with multiple node latent variables to obtain the target node features of each logistics node, and to splice the original logistics relationship data with multiple relationship latent variables to obtain the target relationship features of each logistics relationship.
[0150] The prediction module 404 is used to use a pre-trained data prediction model to predict the features of target nodes and the features of target relationships, and to generate prediction results of logistics parameters for each logistics node and prediction results of transportation parameters for each logistics relationship.
[0151] In some alternative implementations, the generation module 402 includes:
[0152] The first determination submodule is used to determine the node weight parameters corresponding to the node type based on the node type of each logistics node.
[0153] The generation submodule is used to generate intermediate node representations for each logistics node based on the original feature data and node weight parameters corresponding to each logistics node.
[0154] The extraction submodule is used to extract the intermediate representation of the logistics node pair from the intermediate representation of each logistics node for any logistics node pair under any logistics relationship.
[0155] The second determination submodule is used to obtain query parameters corresponding to logistics relationships, and determine the attention weight parameters of logistics node pairs based on the query parameters and the intermediate representation of node pairs.
[0156] The first processing submodule is used to process the intermediate representations and attention weight parameters of each logistics node for any given logistics node, and obtain the node latent variables of any logistics node under each graph convolutional layer.
[0157] The second processing submodule is used to process the intermediate representations of each node and the original logistics relationship data for any logistics relationship, so as to obtain the latent variables of the relationship of any logistics relationship under each graph convolutional layer.
[0158] In some optional implementations, the second determining submodule includes:
[0159] The first determining unit is used to determine the query vector based on the product between the first intermediate representation and the query matrix;
[0160] The second determining unit is used to determine the key vector based on the product between the second intermediate representation and the key value matrix;
[0161] The third determining unit is used to determine the attention score of logistics node pairs based on the dot product between the query vector and the key vector;
[0162] The processing unit is used to normalize the attention score to obtain the attention weight parameters.
[0163] In some alternative implementations, the first processing submodule includes:
[0164] The first acquisition unit is used to acquire multiple target logistics nodes adjacent to any given logistics node.
[0165] The first aggregation unit is used to aggregate the intermediate representations of nodes and attention weight parameters corresponding to each target logistics node to obtain the initial node latent variables of any logistics node under the first graph convolutional layer.
[0166] The second aggregation unit is used to re-aggregate the initial node latent variables to obtain the intermediate node latent variables of any logistics node in each of the remaining graph convolutional layers; the node latent variables include the initial node latent variables and the intermediate node latent variables.
[0167] In some optional implementations, the second processing submodule includes:
[0168] The second acquisition unit is used to acquire the intermediate representation of the two end nodes of any logistics relationship for any logistics relationship.
[0169] The fourth determining unit is used to determine the initial latent variable of any logistics relationship under the first graph convolutional layer based on the intermediate representation of the two end nodes and the original logistics relationship data.
[0170] The third aggregation unit is used to re-aggregate the initial relational latent variables based on the node latent variables, and sequentially obtain the intermediate relational latent variables of any logistics relation under each of the remaining graph convolutional layers; the relational latent variables include the initial relational latent variables and the intermediate relational latent variables.
[0171] In some alternative implementations, the prediction module 404 includes:
[0172] The first weight determination submodule is used to input the target node features into the pre-trained first data prediction model to obtain the first gate weights of each logistics dimension data in the target node features under each gate prediction layer. The first data prediction model includes multiple gate prediction layers.
[0173] The first activation value determination submodule is used to input the target node features into the pre-trained second data prediction model to obtain the first feature activation values of each logistics dimension data under each gated prediction layer. The second data prediction model includes multiple gated prediction layers.
[0174] The first modulation submodule is used to perform dynamic modulation using the first gate weight and the first feature activation value to generate the first dynamic feature modulation result corresponding to each gate prediction layer.
[0175] The first prediction submodule is used to accumulate the modulation results of each first dynamic feature to obtain the logistics parameter prediction results corresponding to each logistics node; the data prediction model includes a first data prediction model and a second data prediction model.
[0176] In some optional implementations, the prediction module 404 further includes:
[0177] The second weight determination submodule is used to input the target relationship features into the pre-trained third data prediction model to obtain the second gating weights of each transportation dimension data in the target relationship features under each gating prediction layer.
[0178] The second activation value determination submodule is used to input the target edge features into the pre-trained fourth data prediction model to obtain the second feature activation values of each transportation dimension data in the target relationship features under each gated prediction layer.
[0179] The second modulation submodule is used to perform dynamic modulation using the second gate weight and the second feature activation value to generate the second dynamic feature modulation result corresponding to each gate prediction layer.
[0180] The second prediction submodule is used to accumulate the modulation results of each second dynamic feature to obtain the prediction results of the transportation parameters corresponding to each logistics relationship; the data prediction model includes the third data prediction model and the fourth data prediction model.
[0181] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0182] In this embodiment, the logistics forecasting device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0183] The logistics forecasting device provided in this invention utilizes graph convolutional networks to dynamically capture the complex topological relationships between logistics nodes, overcoming the limitations of traditional methods in analyzing isolated nodes. By splicing the original data of nodes and relationships across layers with latent variables at each layer, it preserves the interpretability of the original features while integrating higher-order association information at different levels of abstraction, enhancing the model's ability to characterize the multi-layered dynamics of the logistics network. Simultaneously outputting dual predictions of node parameters and transportation parameters, it achieves full-dimensional optimization from micro-nodes to the macro-network, providing more comprehensive decision support for logistics resource allocation and route planning.
[0184] This invention also provides a computer device having the above-described features. Figure 5 The logistics forecasting device shown.
[0185] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0186] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0187] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0188] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0189] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0190] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0191] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0192] The computer device also includes a communication interface for communicating with other devices or communication networks.
[0193] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0194] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0195] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A logistics forecasting method, characterized in that, The method includes: Obtain the original feature data of multiple logistics nodes and the original logistics relationship data between the multiple logistics nodes; Based on the original feature data and the original logistics relationship data, the node latent variables of the logistics nodes and the relationship latent variables of the logistics relationships under each graph convolutional layer are generated using a pre-constructed graph convolutional network. The original feature data is concatenated with multiple node latent variables to obtain the target node features of each logistics node, and the original logistics relationship data is concatenated with multiple relationship latent variables to obtain the target relationship features of each logistics relationship. Using a pre-trained data prediction model, data prediction is performed on the target node features and the target relationship features to generate logistics parameter prediction results for each logistics node and transportation parameter prediction results for each logistics relationship.
2. The method according to claim 1, characterized in that, The process of generating latent node variables for logistics nodes and latent relation variables for logistics relationships at each graph convolutional layer using a pre-constructed graph convolutional network, based on the original feature data and the original logistics relationship data, includes: Based on the node type of each logistics node, determine the node weight parameter corresponding to the node type; Based on the original feature data and node weight parameters corresponding to each logistics node, an intermediate node representation of each logistics node is generated; For any logistics node pair under any logistics relationship, extract the node pair intermediate representation of the logistics node pair from the node intermediate representation of each of the logistics nodes. Obtain the query parameters corresponding to the logistics relationship, and determine the attention weight parameters of the logistics node pair based on the query parameters and the intermediate representation of the node pair; For any logistics node, data processing is performed on the intermediate representations of each node and the attention weight parameters to obtain the node latent variables of the any logistics node under each graph convolutional layer. For any logistics relationship, data processing is performed on the intermediate representations of each node and the original logistics relationship data to obtain the latent variables of the relationship of any logistics relationship under each graph convolutional layer.
3. The method according to claim 2, characterized in that, The query parameters include a query matrix and a key-value matrix; the logistics node pair includes a first logistics node and a second logistics node, and the intermediate representation of the node pair includes a first intermediate representation corresponding to the first logistics node and a second intermediate representation corresponding to the second logistics node; Based on the query parameters and the intermediate representation of the node pair, the attention weight parameters of the logistics node pair are determined, including: The query vector is determined based on the product between the first intermediate representation and the query matrix; The key vector is determined based on the product between the second intermediate representation and the key value matrix; The attention score of the logistics node pair is determined based on the dot product between the query vector and the key vector. The attention score is normalized to obtain the attention weight parameters.
4. The method according to claim 2, characterized in that, For any logistics node, data processing is performed on the intermediate representations of each node and the attention weight parameters to obtain the node latent variables of the any logistics node under each graph convolutional layer, including: For any given logistics node, obtain multiple target logistics nodes adjacent to that logistics node; The intermediate node representations and attention weight parameters corresponding to each target logistics node are aggregated to obtain the initial node latent variables of any logistics node under the first graph convolutional layer. The initial node latent variables are re-aggregated to obtain the intermediate node latent variables of any logistics node under each of the remaining graph convolutional layers. The node hidden variables include the initial node hidden variables and the intermediate node hidden variables.
5. The method according to claim 4, characterized in that, For any logistics relationship, data processing is performed on the intermediate representations of each node and the original logistics relationship data to obtain the latent variables of the relationship under each graph convolutional layer, including: For any logistics relationship, obtain the intermediate representation of the two end nodes of the logistics nodes corresponding to the given logistics relationship; Based on the intermediate representation of the two end nodes and the original logistics relationship data, determine the initial relationship hidden variable of any logistics relationship under the first graph convolutional layer; Based on the node latent variables, the initial relation latent variables are re-aggregated to obtain the intermediate relation latent variables of any logistics relation under each of the remaining graph convolutional layers. The relational latent variables include the initial relational latent variables and the intermediate relational latent variables.
6. The method according to claim 1, characterized in that, Using a pre-trained data prediction model, data prediction is performed on the features of the target nodes to generate logistics parameter prediction results for each logistics node, including: The target node features are input into a pre-trained first data prediction model to obtain the first gate weights of each logistics dimension data in the target node features under each gate prediction layer. The first data prediction model includes multiple gate prediction layers. The target node features are input into a pre-trained second data prediction model to obtain the first feature activation values of each logistics dimension data under each gated prediction layer. The second data prediction model includes multiple gated prediction layers. The first dynamic feature modulation result corresponding to each gated prediction layer is generated by dynamically modulating the first gate weight and the first feature activation value. The modulation results of each of the first dynamic features are accumulated to obtain the logistics parameter prediction results corresponding to each logistics node; The data prediction model includes the first data prediction model and the second data prediction model.
7. The method according to claim 6, characterized in that, Using a pre-trained data prediction model, data prediction is performed on the target relationship features to generate transportation parameter prediction results corresponding to each of the logistics relationships, including: The target relationship features are input into a pre-trained third data prediction model to obtain the second gating weights of each transportation dimension data in the target relationship features under each gating prediction layer. The target edge features are input into the pre-trained fourth data prediction model to obtain the second feature activation values of each transportation dimension data in the target relationship features under each gated prediction layer. The second dynamic feature modulation result corresponding to each gated prediction layer is generated by dynamically modulating the second gate weight and the second feature activation value. The modulation results of each of the second dynamic features are accumulated to obtain the transportation parameter prediction results corresponding to each of the logistics relationships; The data prediction model includes the third data prediction model and the fourth data prediction model.
8. A logistics forecasting device, characterized in that, The device includes: The acquisition module is used to acquire the original feature data of multiple logistics nodes and the original logistics relationship data between the multiple logistics nodes; The generation module is used to generate, based on the original feature data and the original logistics relationship data, the node latent variables of the logistics nodes and the relationship latent variables of the logistics relationships under each graph convolutional layer using a pre-constructed graph convolutional network. The splicing module is used to splice the original feature data with multiple node latent variables to obtain the target node features of each logistics node, and to splice the original logistics relationship data with multiple relationship latent variables to obtain the target relationship features of each logistics relationship; The prediction module is used to use a pre-trained data prediction model to perform data prediction on the target node features and the target relationship features, and generate logistics parameter prediction results for each logistics node and transportation parameter prediction results for each logistics relationship.
9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the logistics forecasting method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the logistics forecasting method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the logistics forecasting method according to any one of claims 1 to 7.
