Three-dimensional warehouse path planning method based on ant colony optimization and neural network
By building a multidimensional tensor cargo model based on ant colony optimization and neural networks and combining it with graph neural networks and adaptive attention mechanisms, the low efficiency of traditional AGV path planning in 3D warehouses is solved, efficient path optimization and dynamic adjustment are achieved, and the operating efficiency of AGVs is improved.
Patent Information
- Application Number
- CN202510847322.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-03
AI Technical Summary
Traditional AGV path planning methods cannot effectively integrate multi-dimensional cargo characteristics and dynamic environmental information in 3D warehouses, resulting in low path planning efficiency and long calculation time, making it difficult to meet real-time scheduling requirements.
A method based on ant colony optimization and neural networks is adopted. By constructing a multidimensional tensor cargo model and combining it with a graph neural network to extract the spatiotemporal characteristics of warehouse nodes and edges, an adaptive attention mechanism and a congestion-aware reinforcement loss function are introduced to dynamically adjust the path selection probability to optimize the path cost.
It significantly improves the path planning efficiency of AGV in 3D warehouses, shortens calculation time and path costs, and improves the operational efficiency of warehousing and logistics.
Smart Images

Figure CN120746437A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent warehousing and logistics technology, and in particular to a three-dimensional warehouse path planning method based on ant colony optimization and neural network. Background Art
[0002] With the rapid development of e-commerce and the increasing demand for three-dimensional warehousing, 3D warehouses are becoming widely used due to their high-density storage capabilities. These warehouses' core equipment, automated guided vehicles (AGVs), must achieve efficient path planning within the constraints of multi-layered racks, dynamic traffic flows, and diverse cargo. Traditional AGV path planning methods rely on static 2D maps and expert-preset heuristic rules. These methods struggle to cope with multi-dimensional constraints such as cargo size, weight, and special attributes like fragility and refrigeration in 3D environments. Furthermore, they lack the ability to adapt to dynamic factors such as real-time congestion and changes in route capacity.
[0003] Ant Colony Optimization (ACO) exhibits a certain degree of adaptability in path planning because it simulates the intelligence of biological swarms. However, the heuristic information used in its traditional model, such as the inverse distance, is fixed and single, making it unable to integrate the complex relationship between cargo attributes and environmental conditions. While existing ACO-deep learning combinations attempt to introduce neural networks to optimize heuristic parameters, they suffer from problems such as incomplete spatial feature extraction and a lack of congestion perception mechanisms, resulting in high path costs and low computational efficiency.
[0004] In 3D warehouse scenarios, the multidimensional attributes of goods, including coordinates, dimensions, weight, and special handling requirements, combined with the dynamic congestion conditions of lanes, such as traffic flow and path capacity, create complex constraints. Traditional methods, due to insufficient modeling dimensions and delayed dynamic response, can easily lead to detours and increased congestion, severely impacting warehouse logistics efficiency. Furthermore, existing technologies experience exponentially increased computation time when processing large-scale nodes, such as those with more than 500 items, making it difficult to meet real-time scheduling requirements.
[0005] To address the above challenges, there is an urgent need for a path planning method that can integrate multi-dimensional cargo characteristics, dynamic environmental information, and implement heuristic rule adaptive optimization to improve the operating efficiency of AGVs in complex 3D warehouses. Summary of the Invention
[0006] The purpose of the present invention is to overcome the defect that the traditional AGV path planning method is insufficiently adaptable to multi-dimensional cargo attributes and dynamic environments in 3D warehouses, and to provide a three-dimensional warehouse path planning method based on ant colony optimization and neural network.
[0007] The object of the present invention is achieved through the following technical solution: a three-dimensional warehouse path planning method based on ant colony optimization and neural network, comprising the following steps:
[0008] Construct a multi-dimensional tensor cargo model, encoding the cargo's three-dimensional coordinates, dimensions, weight, special attributes, and congestion level into feature tensors;
[0009] Modeling an ant colony algorithm heuristic matrix according to the feature tensor;
[0010] We extract the spatiotemporal features of warehouse nodes and edges based on graph neural networks, and generate enhanced node and edge embeddings through multi-layer neighbor aggregation and batch normalization.
[0011] An adaptive attention mechanism is used to integrate the static spatial structure of the warehouse with dynamic congestion information to generate multi-scale spatiotemporal dependency features.
[0012] Inputting the features into a multi-layer perceptron and converting them into dynamic heuristic values;
[0013] Calculating the path selection probability based on the dynamic heuristic value and the pheromone concentration of the ant colony algorithm to minimize the path cost;
[0014] The congestion-aware enhancement loss function is introduced, and the network parameters are dynamically adjusted in combination with the path cost and the selection probability to achieve the path cost and congestion optimization of the ant colony algorithm.
[0015] Furthermore, the constructing of the multidimensional tensor cargo model includes: the multidimensional tensor cargo model is expressed as:
[0016] Cargo i =[x i ,y i , z i , size i , weight i , special i ];
[0017] Among them, x i ,y i , z i is the three-dimensional coordinate of the goods, size i The size and weight of the goods i For the weight of the goods, special i is the one-hot encoding vector of the special attributes of the goods.
[0018] Furthermore, modeling the ant colony algorithm heuristic matrix according to the feature tensor includes:
[0019]
[0020] Among them, H i,j is the heuristic matrix, d i,j For goods v i and v j The Manhattan distance between i,j is the node attribute compatibility score, α, β, γ are the adaptive weight factors output by the multilayer perceptron, size i,j For goods v i and v j Size, wt i,j For goods v i and v j weight.
[0021] Furthermore, the extraction of spatiotemporal features of warehouse nodes and edges based on graph neural networks and the generation of enhanced node embeddings and edge embeddings through multi-layer neighbor aggregation and batch normalization include:
[0022] Calculation of initial node features: Process the cargo tensor through linear transformation and Silu activation function to generate initial node features:
[0023]
[0024] in, represents the feature embedding of the initial node i, node i Represents the cargo tensor of node i, W v Represents the weight matrix of the node;
[0025] Initial edge feature embedding: Edge attributes are processed through linear transformation and Silu activation function to generate initial edge embedding. The edge attributes include distance and capacity:
[0026]
[0027] in, represents the edge embedding connecting nodes i and j, W e represents the weight matrix of edge embedding, a ij Represents the edge attribute connecting nodes i and j;
[0028] Multi-layer neighbor aggregation: Adjacent node information is fused through the mean aggregation function, and residual connections and batch normalization are combined to iteratively optimize node and edge representations.
[0029] Furthermore, the adaptive attention mechanism is used to integrate the static spatial structure of the warehouse with the dynamic congestion information to generate multi-scale spatiotemporal dependency features, including extracting static spatial features and dynamic temporal features from the warehouse, and constructing a static feature matrix SFM. s With the dynamic feature matrix SFM d , and mapped into the same common subspace:
[0030] Q s =SFM s W s , Q d =SFM d W d ;
[0031] Among them, W s and W d represents the learned weight matrix, which is used to project spatiotemporal features into the corresponding subspace; Q s Used to capture static properties, Q d Used to capture dynamic properties;
[0032] Extract warehouse fixed layout and real-time congestion data respectively; calculate cross-modal similarity score using radial basis function kernel:
[0033]
[0034] Among them, e i,j represents the cross-modal similarity score between nodes i and j, They represent the eigenvectors of the i-th and j-th nodes in the static feature matrix, σ represents the bandwidth parameter of the radial basis function, T i,j represents the dynamic feature correlation term between nodes i and j, N(i) represents the neighbor set of node i; the original score e i,j Normalize on the neighborhood N(i) to get the attention weight:
[0035]
[0036] Among them, A i,j is the attention weight of node i to neighbor node j, e i,j represents the cross-modal similarity score between nodes i and j;
[0037] e i,j Normalized generated attention weight A i,j ; Fusion output node representation:
[0038]
[0039] Among them, O i represents the output of the enhancement node, Respectively represent the eigenvector of the i-th node in the static feature matrix, They represent the eigenvector of the jth node in the dynamic feature matrix, N(i) represents the neighbor set of node i, and A i,j represents the attention weight;
[0040] Attention pooling is used to map high-dimensional features back to the original dimension, generating enhanced node representations that contain spatiotemporal dependencies.
[0041] Furthermore, the collaborative calculation of the path selection probability based on the dynamic heuristic value and the pheromone concentration of the ant colony algorithm includes:
[0042] The path selection probability is calculated based on the following formula:
[0043]
[0044] in, represents the probability of selecting edge i, j from node i at time t, represents the pheromone concentration of edge i, j at time t, α, β represent the parameters for adjusting pheromone and heuristic weights, represents the heuristic weight of edge i, j at time t.
[0045] Furthermore, the path cost includes heuristic cost and congestion cost:
[0046]
[0047] Among them, Con i,j Cost is the congestion cost. total (P) is the heuristic cost, t i,j is the free circulation time, tc i,j For real-time traffic flow, cap i,j is the path capacity, and δ=0.5 is the adjustment parameter.
[0048] Furthermore, the introduction of the congestion perception enhancement loss function includes:
[0049] The loss function is defined as:
[0050]
[0051] Among them, Cost i Cost is the cost of a single ant path. avg is the average cost, p i is the path selection probability, n ants is the number of ants.
[0052] Furthermore, the node branches of the graph neural network adopt 4 parallel linear layers and 12 layers of iterative refinement, the edge branches fuse node endpoint features to update edge embedding, the activation function is Silu, and batch normalization BN improves training stability.
[0053] Furthermore, the hidden layer of the multilayer perceptron adopts Silu activation function, and the final layer Sigmoid activation outputs a heuristic value in the range of 0-1. The output dimension matches the number of edges in the graph, and dynamically generates path heuristic information that adapts to the warehouse environment.
[0054] The beneficial effects of the present invention are:
[0055] 1. An innovative heuristic algorithm for modeling 3D warehouse cargo using multi-dimensional tensors solves the challenge of achieving high-precision heuristic information.
[0056] 2. Integrate the congestion-aware loss function CARL into the ant colony optimization framework, dynamically adjust the path cost based on traffic flow and capacity constraints, and realize dynamic heuristic calibration of ant colony optimization-based path planning.
[0057] 3. Introducing an adaptive attention mechanism that captures multi-scale spatial features to further optimize ant colony-based path planning and dynamic heuristic calibration of AGV navigation. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a schematic diagram of the NAHACO framework of the present invention; DETAILED DESCRIPTION
[0059] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.
[0060] The terms used in this invention are for the purpose of describing specific embodiments only and are not intended to limit the invention. The singular forms "a," "the," and "the" used in this invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0061] The present invention will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the features of the following embodiments and implementations may be combined with each other.
[0062] like Figure 1 As shown, an embodiment of the present invention provides a three-dimensional warehouse path planning method based on ant colony optimization and neural network, comprising the following steps:
[0063] (1) Multidimensional tensor cargo modeling and spatial feature extraction
[0064] This paper introduces a multidimensional tensor-based cargo modeling approach that captures multiple characteristics of cargo in a three-dimensional warehouse. These dimensions include coordinates, height, size, weight, special handling requirements, and congestion levels. Cargo attributes are represented as tensors, with each entry encapsulating a specific aspect of the warehouse's operational status. This modeling approach enables a better understanding of the spatial and functional relationships between different cargo items, thereby improving the accuracy of AGV path planning.
[0065] Cargo i A multidimensional tensor representing item i, where:
[0066] Cargo i =[x i ,y i , z i , size i , weight i , special i ].
[0067] Among them, x i ,y i , z i is the spatial coordinate of the cargo in three-dimensional space, size i Is the physical size of the goods, weight i Is the quality of the goods, special i Indicates special characteristics of the goods, such as fragility, perishability or hazardous nature.
[0068] Special attributes are encoded using one-hot encoding (e.g., fragile items are [1, 0, 0], dangerous goods are [0, 0, 1], etc.) and expanded into the tensor.
[0069] Modeling the warehouse graph, abstracting the warehouse layout into a graph G = (V, E), where the node V represents the cargo location or path intersection, and the edge E represents the passable path. Each edge is initialized with basic attributes: free flow travel time t i,j , path capacity cap i,j .
[0070] (2) Ant Colony Algorithm (ACO) Heuristic Matrix Modeling
[0071] The heuristic function for 3D warehouse cargo in the ACO framework is designed to guide the optimization process based on cargo and environmental factors. The heuristic matrix H provides guidance by evaluating the suitability of each potential AGV movement. This heuristic algorithm is derived based on cargo characteristics and congestion factors. The heuristic matrix H of the present invention is calculated as follows:
[0072]
[0073] Among them, Hi,j is the heuristic value, d i,j For goods v i and v j The Manhattan distance between i,j is the node attribute compatibility score, α, β, γ are the adaptive weight factors output by the multilayer perceptron, size i,j For goods v i and v j Size, wt i,j For goods v i and v j The weight, d i,j It is cargo v i and v j Manhattan distance between locations:
[0074]
[0075] Wherein, D is the dimension of the space, which is 3 in the present invention.
[0076] (3) Dynamic heuristic ant colony optimization framework NAHACO
[0077] ACO is used to explore and exploit the search space of possible AGV paths. The main goal of the ACO framework is to minimize the path cost. This paper proposes an innovative 3D warehouse cargo path cost algorithm that introduces the properties of the cargo itself and the congestion cost. This paper defines the total cost of the 3D warehouse pickup path P as Cost total (P) are as follows:
[0078]
[0079] Among them, Con i,j Cost is the congestion cost. total (P) is the heuristic cost, H i,j is the heuristic matrix, and the calculation method is the same as the formula in (2) above. i,j From the goods v i to v j Free flow travel time. tc i,j is the current traffic volume. i,j is the edge capacity. δ is a tuning parameter, which is set to 0.5 in this paper. After several iterations, the ACO algorithm moves ants in the warehouse map based on the pheromone value and heuristic information. The pheromone update equation is shown below:
[0080]
[0081] Where ρ is the pheromone volatilization rate, 0<ρ<1. is deposited on edge e at time t i,jThe pheromones on are usually calculated as follows:
[0082]
[0083] Where m is the number of ants, is the ant’s pheromone contribution, based on the quality of the solution it finds. If ant k traverses edge e in its solution i,j , then the pheromone update is proportional to the inverse of the path cost Cost(k) of ant k:
[0084]
[0085] Wherein, Q is a constant, which is taken as 1 in the present invention, and Cost(k) is the path cost.
[0086] (4) Adaptive heuristic modeling for enhanced path optimization in 3D warehouse logistics
[0087] To enhance the ACO-based path planning process, this paper integrates a neural network to dynamically generate heuristic information. Traditional path planning systems typically rely on expert-defined heuristics, which are static and difficult to adapt to real-time environmental changes. In contrast, the proposed method utilizes a deep learning model to learn heuristic information from warehouse operational data, enabling the system to adapt and generate more effective heuristics.
[0088] The core of the proposed model is a deep learning module that leverages multiple graph neural network components to extract and refine spatial relationships from the warehouse layout. This module comprises distinct pipelines for node and edge feature processing, followed by iterative refinement layers that incorporate neighborhood information, including product attributes, the spatial distribution of nodes in the warehouse, and edge features, through a mean aggregation mechanism.
[0089] (4.1) Spatial feature extraction module
[0090] The initial work of the model is to use linear transformation to transform the original node feature x i and edge attribute a i Projected into high-dimensional space, it is then activated by the nonlinear activation function Silu. The Silu activation function can alleviate the problem of dead neurons and ensure that the network can capture the complex spatial relationships inherent in the warehouse layout. It is defined as:
[0091]
[0092] in, represents the feature embedding of the initial node i, node i Represents the cargo tensor of node i, W v represents the weight matrix of the node, represents the edge embedding connecting nodes i and j, W e represents the weight matrix of edge embedding, a ij Represents the edge attribute connecting nodes i and j.
[0093] Node features and edge embeddings are iteratively optimized over multiple neural network layers (l=1,…,12). For a node branch, four parallel linear mappings are applied to the previous node representation:
[0094]
[0095] in, and represents the output of the first linear mapping of the lth and l-1th layers, and represents the output of the second linear mapping of the lth and l-1th layers, and represents the output of the third linear mapping of the lth and l-1th layers, and represents the output of the 4th linear mapping of the l-1th layer, Represents the weight matrix of the 1st, 2nd, 3rd, and 4th linear mappings in the lth layer.
[0096] The neighbor aggregation function integrates information from neighboring nodes. A dedicated neighbor aggregation function uses the transformed edge features to perform weighted aggregation on the contribution of each neighbor node, thereby collecting information from neighboring nodes:
[0097]
[0098] in, Represents the result of the neighbor aggregation function, N(i) and |N(i)| represent the set of all neighbor nodes of node i and the cardinality of the set, represents the edge feature between the l-1th layer node i and its neighbor node j, Represents the feature representation of node i in layer l. Then, the aggregate message is merged with the intermediate node representation and normalized:
[0099]
[0100] in, and Represents the features of node i in the lth and l-1th layers, Silu is the activation function, is the transformation feature of node i in the lth layer, For neighbor aggregation results, BN is batch normalization. The edge branch updates the embedded vector of each edge in parallel by merging the information of its endpoint nodes. The update formula is as follows:
[0101]
[0102] in, and represents the updated feature between nodes i and j in the lth and l-1th layers, Silu is the activation function, and BN represents the batch normalization operation. is the weight matrix of the l-th layer edge feature, and are the weight matrices of nodes i and j respectively, and are the feature representations of nodes i and j in the l-1th layer respectively.
[0103] Overall, the feature extraction module of the present invention systematically extracts spatial features by iteratively refining node and edge representations through linear transformation, neighbor aggregation, and batch normalization, thereby capturing the subtle spatial topology of the warehouse environment.
[0104] (4.2) Static-Dynamic Feature Fusion Module with Attribute-Aware Attention
[0105] To fully capture the dynamic nature of warehouse operations, our model incorporates an attention mechanism into its temporal dependency modeling component. First, a series of spatiotemporal features are extracted from warehouse data. These features include both static spatial features (representing the warehouse's inherent layout and connectivity) and dynamic temporal features (such as congestion data and real-time location).
[0106] These extracted features are combined into two unified spatiotemporal feature matrices SFM s and SFM d In order for the attention mechanism to effectively model temporal dependencies, a linear transformation is used to map these features into a common subspace:
[0107] Q s =SFM s W s , Q d =SFM d W d .
[0108] Among them, W s and W d is the learned weight matrix used to project spatiotemporal features into the corresponding subspace. s Capture static properties, Q d To capture the dynamic properties, a Gaussian radial basis function (RBF) kernel is used to measure Q in order to model the time dependency between the two modes. s and Q d For the target of the i-th product, the similarity score is calculated as follows:
[0109]
[0110] Among them, e i,j represents the cross-modal similarity score between nodes i and j, They represent the eigenvectors of the i-th and j-th nodes in the static feature matrix, σ represents the bandwidth parameter of the radial basis function, T i,j represents the dynamic feature correlation term between nodes i and j, which is used to capture the multi-scale temporal context. n(i) is the set of nodes that consider the aggregate node i. The original score e i,j Normalize on the neighborhood N(i) to get the attention weight:
[0111]
[0112] Among them, A i,j represents the attention weight of node i to neighbor node j, e i,j represents the cross-modal similarity score between nodes i and j.
[0113] The output representation of each node is calculated only from static features. Specifically, the final output is as follows:
[0114]
[0115] Among them, O i Represents the final output, represents the dynamic feature vector of node i, represents the static feature vector of neighbor node j, A i,j represents the attention weight of node i to its neighbor node j.
[0116] In fact, this module uses the dynamic feature matrix Q d Integrate time dynamic information and pass the static feature matrix Q s The incorporation of complementary spatial contextual information enables the model to more effectively capture multi-scale spatiotemporal dependencies. Subsequently, compression is applied to restore the representation to the original input dimensionality. Ultimately, the enhanced feature representation encapsulates a comprehensive fusion of the warehouse's static spatial structure and dynamic operational changes, including congestion data, while maintaining the required dimensionality consistency through compression.
[0117] (4.3) Heuristic decoding for path optimization
[0118] The embedded features processed by the temporal modeling module are input into a decoding multi-layer perceptron, which acts as a fully connected network to convert the intermediate representation into heuristic values for path optimization. This decoding multi-layer perceptron consists of multiple layers, with each hidden layer performing a linear transformation followed by a Silu activation function. The final layer uses a Sigmoid activation function to ensure that the output values are appropriately scaled, making it easier to integrate into the ant colony algorithm.
[0119] Let h (i) represents the input embedding, which is calculated as follows:
[0120] h (i) =Silu(W decede (i) h (i-1) +b (i) )i=1,…,L-1。
[0121] Among them, h (i) represents the hidden layer output feature of the i-th layer, W decede (i) represents the weight matrix of the i-th layer, h (i-1) represents the input features of the previous layer, b (i) represents the bias vector of the i-th layer, and L represents the total number of layers.
[0122]
[0123] in, Represents the output vector of the final layer, each element corresponds to the heuristic value of an edge in the graph, W final (L) represents the weight matrix of the final layer, h (L-1) represents the output feature of the last hidden layer, b (L) Represents the bias vector for the final layer. The hidden layer uses the Silu activation function, whose self-gating properties allow for adaptive scaling of inputs. This is particularly helpful for capturing subtle patterns in the embeddings processed by the temporal module. The final layer uses a Sigmoid activation function to constrain output values to the range [0, 1]. The output dimension is designed to match the number of heuristic predictions for each edge in the graph. This generates heuristic information that adapts to warehouse dynamics and improves the efficiency of AGV navigation in complex environments.
[0124] (5) CARL loss function
[0125] The training goal of this invention is to adjust network parameters to reduce path costs and congestion, thereby improving the performance of AGVs in warehouse operations. The CARL loss function, as the training loss, is derived from the interaction between the heuristic information generated by the neural network and the path cost calculation of the ant colony algorithm. The loss function is defined as follows:
[0126]
[0127] Among them, Cost i is the path cost of the i-th ant, Cost avg is the average path cost of all ants; p i The probability of the path chosen by the i-th ant calculated by the ACO algorithm; n ants is the number of ant colonies in the system. Logarithmic scaling factor The bias is adjusted based on the path selection probability. This logarithmic term is used to stabilize the influence of ants with low selection probabilities, ensuring that each ant's contribution to the total loss remains bounded. The core training goal is to minimize path costs by adjusting network parameters, thereby improving the overall operational performance of AGVs in the warehouse.
[0128] The experiment was conducted in a real warehouse environment. A 3D warehouse model was constructed, including shelves, aisles, and AGV paths. Transport tasks were randomly selected for 100, 200, and 500 items. The experimental setup was as follows: The algorithm framework was built using Python 3.8, and the neural network was implemented using PyTorch. A comparison was made with the traditional ant colony algorithm, taking into account path cost and task completion time. The experimental results are shown in the table below:
[0129]
[0130] Experimental results show that the proposed method exhibits significant advantages across different cargo sizes: when the number of cargoes is 100, the time required for the algorithm is reduced by 43.4% and the cost is reduced by 71.3% compared to the traditional ant colony algorithm; when the number of cargoes is 200, the time required for the algorithm is reduced by 58.9% and the cost is reduced by 60.7%; and when the number of cargoes is 500, the time required for the algorithm is reduced by 52.0% and the cost is reduced by 68.3%. These experimental data fully demonstrate the efficiency of the proposed method in resource scheduling for large-scale tasks.
[0131] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A three-dimensional warehouse path planning method based on ant colony optimization and neural network, characterized in that: The following steps are involved: Construct a multi-dimensional tensor cargo model, encoding the cargo's three-dimensional coordinates, dimensions, weight, special attributes, and congestion level into feature tensors; Modeling an ant colony algorithm heuristic matrix according to the feature tensor; We extract the spatiotemporal features of warehouse nodes and edges based on graph neural networks, and generate enhanced node and edge embeddings through multi-layer neighbor aggregation and batch normalization. An adaptive attention mechanism is used to integrate the static spatial structure of the warehouse with dynamic congestion information to generate multi-scale spatiotemporal dependency features. Inputting the features into a multi-layer perceptron and converting them into dynamic heuristic values; Calculating the path selection probability based on the dynamic heuristic value and the pheromone concentration of the ant colony algorithm to minimize the path cost; The congestion-aware enhancement loss function is introduced, and the network parameters are dynamically adjusted in combination with the path cost and the selection probability to achieve the path cost and congestion optimization of the ant colony algorithm.
2. The method according to claim 1, characterized in that The constructing of the multidimensional tensor cargo model includes: the multidimensional tensor cargo model is expressed as: Cargo i =[x i ,y i ,z i ,size i ,weight i ,special i ]; Among them, x i ,y i , z i is the three-dimensional coordinate of the goods, size i The size and weight of the goods i For the weight of the goods, special i is the one-hot encoding vector of the special attributes of the goods.
3. The method according to claim 1, characterized in that The modeling of the ant colony algorithm heuristic matrix according to the characteristic tensor includes: Among them, H i,j is the heuristic matrix, d i,j For goods v u and v j The Manhattan distance between i,j is the node attribute compatibility score, α, β, γ are the adaptive weight factors output by the multilayer perceptron, size i,j For goods v i and v j Size, wt i,j For goods v i and v j weight.
4. The method according to claim 1, wherein The method of extracting spatiotemporal features of warehouse nodes and edges based on graph neural networks and generating enhanced node embeddings and edge embeddings through multi-layer neighbor aggregation and batch normalization includes: Calculation of initial node features: Process the cargo tensor through linear transformation and Silu activation function to generate initial node features: in, represents the feature embedding of the initial node i, node i Represents the cargo tensor of node i, W v Represents the weight matrix of the node; Initial edge feature embedding: Edge attributes are processed through linear transformation and Silu activation function to generate initial edge embedding. The edge attributes include distance and capacity: in, represents the edge embedding connecting nodes i and j, W e represents the weight matrix of edge embedding, a ij Represents the edge attribute connecting nodes i and j; Multi-layer neighbor aggregation: Adjacent node information is fused through the mean aggregation function, and residual connections and batch normalization are combined to iteratively optimize node and edge representations.
5. The method according to claim 1, wherein The adaptive attention mechanism is used to integrate the static spatial structure of the warehouse with the dynamic congestion information to generate multi-scale spatiotemporal dependency features, including extracting static spatial features and dynamic temporal features from the warehouse, and constructing a static feature matrix SFM. s With the dynamic feature matrix SFM d , and mapped into the same common subspace: Q s =SFM s ·W s ,Q d =SFM d ·W d ; Among them, W s and W d represents the learned weight matrix, which is used to project spatiotemporal features into the corresponding subspace; Q s Used to capture static properties, Q d Used to capture dynamic properties; Extract warehouse fixed layout and real-time congestion data respectively; calculate cross-modal similarity score using radial basis function kernel: Among them, e i,j represents the cross-modal similarity score between nodes i and j, They represent the eigenvectors of the i-th and j-th nodes in the static feature matrix, σ represents the bandwidth parameter of the radial basis function, and R i,j represents the dynamic feature correlation term between nodes i and j, N(i) represents the neighbor set of node i; the original score e i,j Normalize on the neighborhood N(i) to get the attention weight: Among them, A i,j is the attention weight of node i to neighbor node j, e i,j represents the cross-modal similarity score between nodes i and j; e i,j Normalized generated attention weight A i,j ; Fusion output node representation: Among them, O i represents the output of the enhancement node, Respectively represent the eigenvector of the i-th node in the static feature matrix, They represent the eigenvector of the jth node in the dynamic feature matrix, N(i) represents the neighbor set of node i, and A i,j represents the attention weight; Attention pooling is used to map high-dimensional features back to the original dimension, generating enhanced node representations that contain spatiotemporal dependencies.
6. The method according to claim 1, characterized in that The collaborative calculation of the path selection probability based on the dynamic heuristic value and the pheromone concentration of the ant colony algorithm includes: The path selection probability is calculated based on the following formula: in, represents the probability of selecting edge i, j from node i at time t, represents the pheromone concentration of edge i, j at time t, α, β represent the parameters for adjusting pheromone and heuristic weights, represents the heuristic weight of edge i, j at time t.
7. The method according to claim 1, characterized in that The path cost includes heuristic cost and congestion cost: Among them, Con i,j Cost is the congestion cost. total (P) is the heuristic cost, t i,j is the free circulation time, tc i,j For real-time traffic flow, cap i,j is the path capacity, and δ=0.5 is the adjustment parameter.
8. The method according to claim 1, characterized in that The introduction of the congestion perception enhancement loss function includes: The loss function is defined as: Among them, Cost i Cost is the cost of a single ant path. avg is the average cost, p i is the path selection probability, n ants is the number of ants.
9. The method according to claim 1, characterized in that The node branches of the graph neural network are refined using 4 parallel linear layers and 12 layers of iterative refinement. The edge branches fuse node endpoint features to update edge embedding. The activation function is Silu, and batch normalization (BN) improves training stability.
10. The method according to claim 1, characterized in that The hidden layer of the multi-layer perceptron adopts Silu activation function, and the final layer Sigmoid activation outputs a heuristic value in the range of 0-1. The output dimension matches the number of edges in the graph, and dynamically generates path heuristic information that adapts to the warehouse environment.