Intelligent overseas warehouse allocation method based on digital twinning
By combining digital twins and Granger causal AGCN models with an improved QMix algorithm based on hierarchical reinforcement learning, the problems of insufficient causal correlation capture and low decision transparency in intelligent allocation of overseas warehouses have been solved. This has enabled accurate prediction and globally optimal decision-making, thereby improving the credibility and robustness of the allocation system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent allocation algorithms struggle to capture the deep causal relationships between warehouses, logistics hubs, and market events in overseas warehouse scenarios. This results in a lack of foresight in future demand forecasting, allocation strategies that ignore inventory risks and order fulfillment rates, opaque decision-making processes, and difficulty in adapting to network evolution, thus affecting the practical value and stability of the models.
We employ a digital twin to construct an AGCN model based on Granger causality for causal inference, and introduce an improved QMix algorithm with a hierarchical reinforcement learning mechanism. Through real-time data synchronization, dynamic perception of causal impact, and self-explanatory report generation, we achieve globally optimal decision-making and reliable execution.
It significantly improves the accuracy of future state prediction, the global optimality of allocation strategies, and the credibility of decision-making. It enhances the accuracy of demand forecasting and the robustness of the allocation system, and solves the problems of lack of causal logic, difficulty in large-scale collaborative decision-making, and lack of transparency in the decision-making process.
Smart Images

Figure CN121745808A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of digital twinning and spatiotemporal data mining, and particularly relates to an overseas warehouse intelligent allocation method based on digital twinning. BACKGROUND
[0002] The intelligent allocation algorithm has the ability to handle complex supply chain optimization problems and has been widely used in e-commerce logistics, production and manufacturing, retail distribution and other fields in recent years, and has become a core technology for realizing fine operation. However, in practical applications, the overseas warehouse intelligent allocation scene faces many challenges such as complex network structure, variable market demand, uncertain logistics state, and the deployment effect of the existing intelligent allocation algorithm is still restricted by many factors.
[0003] Most current intelligent allocation methods rely on statistical extrapolation of historical data, which is difficult to capture the deep causal relationship between warehouses, logistics hubs and market events, resulting in a lack of foresight in predicting future demand; some systems only use a single dimension of cost indicators to evaluate allocation strategies, ignoring the balance between inventory risk, order satisfaction rate and turnover efficiency, limiting the global optimality of the strategy. At the same time, the allocation decision-making process is like a black box, lacking transparent explanation paths, making it difficult to provide clear decision-making basis for operators or managers, affecting the credibility and usability of the allocation instructions.
[0004] In addition, the decision-making model of the existing intelligent allocation algorithm is mostly statically designed, and the weights of each target cannot be dynamically adjusted according to the evolution of the network, resulting in long-term poor performance of some key indicators that cannot be effectively corrected, making it difficult to adapt to the changing and evolving environment of overseas warehouse operations, and seriously affecting the practical value and stability of the model in real scenarios.
[0005] Therefore, how to provide an overseas warehouse intelligent allocation method based on digital twinning is a problem that those skilled in the art need to solve. SUMMARY
[0006] An object of the present application is to provide an overseas warehouse intelligent allocation method based on digital twinning. The present application fully integrates key steps such as digital twinning body construction, Granger causality-based AGCN model causal reasoning, improved QMix algorithm with hierarchical reinforcement learning mechanism, backtracking verification and self-explaining report generation, constructs an intelligent allocation process with real-time data synchronization, dynamic causal impact perception, macro and micro collaborative decision-making, and verifiable strategy effect, and realizes accurate prediction of future state, global optimal decision-making and credible execution in a complex network environment. The present application has the advantages of strong forward-looking causal modeling, high decision-making solving efficiency, closed-loop strategy verification, and logically traceable results, which can significantly improve the demand prediction accuracy of the overseas warehouse network, the global optimality of the allocation strategy, and the credibility of the model decision-making, thereby effectively solving the problems of lack of causal logic in prediction, difficulty in large-scale collaborative decision-making, lack of strategy verification, and opaque decision-making process in existing methods.
[0007] According to an overseas warehouse intelligent allocation method based on digital twinning according to an embodiment of the present application, the following steps are included:
[0008] S1, synchronously collecting multi-source core operation data of the overseas warehouse network to construct an overseas warehouse digital twinning body;
[0009] S2, pre-processing the multi-source core operation data in the overseas warehouse digital twinning body to form a twinning data set;
[0010] S3, taking each warehouse and logistics hub in the twinning data set as a node, analyzing the time series data prediction relationship of each node through a Granger causality-based AGCN model, constructing a causal impact graph, capturing the propagation path of causal impact, and generating twinning evolution data;
[0011] S4, taking the twinning evolution data as a virtual environment, running an improved QMix algorithm, introducing a hierarchical reinforcement learning mechanism to divide all warehouses into multiple subgroups according to regions or functions, setting a high-level policy maker and multiple bottom-level executors for collaborative decision-making, taking the global cost optimization as the target, and outputting an optimal allocation strategy set;
[0012] S5, backtracking the optimal allocation strategy set in the overseas warehouse digital twinning body to generate evolution trajectory data, verifying by comparing and calculating key performance indicators, generating a self-explaining report according to the decision causal chain, and converting the optimal allocation strategy set into standardized allocation instructions;
[0013] S6, issuing the standardized allocation instructions to the physical world's warehouse management and logistics platform for execution, displaying the real-time logistics trajectory and self-explaining report after execution on the client.
[0014] Optionally, the S1 specifically includes:
[0015] S11, synchronously collecting real-time inventory data of the physical overseas warehouse network, order information data reflecting immediate market demand, logistics state data representing network connectivity capability, and sales prediction data for guiding future planning through data interfaces deployed at each node of the overseas warehouse network;
[0016] S12, constructing an overseas warehouse digital twin through three-dimensional modeling and data binding technology based on the collected multi-source core operation data.
[0017] Optionally, the S2 specifically includes:
[0018] S21, reading the timestamps of each data source in the multi-source core operation data, aligning the time series of all data sources with the highest precision timestamp as the reference through interpolation or resampling methods;
[0019] S22, assigning a unique identifier to each item of data in the multi-source core operation data after timestamp alignment, integrating real-time inventory data, order information data, logistics state data, and sales prediction data through the association of unique identifiers to generate a twin data set;
[0020] S23, writing the data items in the twin data set into the corresponding warehouse or commodity state attributes in the overseas warehouse digital twin in real time according to the unique identifier for state synchronization.
[0021] Optionally, the S3 specifically includes:
[0022] S31, instantiating each warehouse and each logistics hub as an independent node in the graph structure from the twin data set, extracting multi-dimensional time series data within a preset historical time window as node attributes for each node, performing Granger causality test for any two nodes in the graph structure, and constructing a causal influence graph:
[0023] S32, inputting the initial causal influence graph and the time series data of each node into the AGCN model based on Granger causality, before each layer of graph convolution operation, identifying all incoming edges for each target node in the causal influence graph, and recording the starting node of each incoming edge as a source node to form a source node list;
[0024] S33, performing an online Granger causality test for each source node in the source node list, extracting data segments of the target node and the current source node within a set length time window before the current time step from the time series data, using the two data segments to calculate a real-time F statistic as the message passing weight from the current source node to the target node in the current convolution operation;
[0025] S34, obtain a one-dimensional array as a feature vector through a convolution operation of the current source node by the current preset convolution kernel size, number and step of the graph convolution layer, multiply each element in the feature vector by the corresponding message passing weight to obtain a weighted source node feature vector;
[0026] S35, create an aggregation feature vector with the same dimension as the feature vector and all elements with a value of zero, and perform element-wise addition of the weighted source node feature vector and the aggregation feature vector, update the value of the aggregation feature vector once for each source node addition, until all source nodes are traversed, to obtain the final aggregation feature vector;
[0027] S36, obtain the feature vector of the target node in the current preset graph convolution layer, and concatenate it with the aggregation feature vector at the beginning and end to form a concatenated vector with doubled dimensions, and input it into a multi-layer perception, map the concatenated vector to a preset dimension hidden vector through a preset linear transformation layer, and apply a ReLU activation function to each element, then map the output vector back to the same dimension as the original feature vector through another preset linear transformation layer, to generate the updated feature vector of the target node in the next layer;
[0028] S37, stack the graph convolution operation for a preset number of layers, and obtain the final feature vector of each node that learns to fuse the global causal structure and spatio-temporal dependence of the network in the last layer, and construct a feature time series matrix from the final feature vectors of all nodes to input into a long short-term memory network for encoding, to obtain a context vector for each node, and obtain a multi-scenario prediction of warehouse demand and inventory risk in a future set period through a preset dimension fully connected output layer, i.e. twin evolution data.
[0029] Optionally, the Granger causality test specifically includes:
[0030] A restrictive autoregressive model is constructed, which only predicts the current value according to the historical data of the current node itself, i.e. a linear equation is established to set the value of the current node at the current time point as a constant term and add the sum of the values of the current node at a plurality of preset consecutive time points multiplied by the respective corresponding preset weight coefficients, to obtain the current predicted value;
[0031] By least squares method, the preset weight coefficients are constantly adjusted, the total error sum of squares between the calculated current predicted value and the true value after substituting the historical data into the equation is minimized, the optimal weight coefficient is determined, and the minimum total error sum of squares is recorded as the residual sum of squares of the restrictive model;
[0032] A non-restricted autoregressive model is constructed to predict the current value of the current node according to the historical data of the current node itself and another node, a new linear equation is established, the value of the current node at the current time point is set as a new constant term plus the sum of the values of the current node at a preset number of continuous time points in the past multiplied by a respective preset weight coefficient, and the sum of the values of another node at the same number of continuous time points in the past multiplied by a respective another preset weight coefficient, to obtain a new current prediction value;
[0033] Similarly, by adjusting all preset weight coefficients by the least square method, the total error sum of squares between the current prediction value calculated by substituting the historical data of the current node and another node into the new linear equation and the true value of the current node is minimized to determine the optimal new weight coefficient, and the new minimum total error sum of squares is recorded as the residual sum of squares of the non-restricted model;
[0034] The residual sum of squares of the restricted model is subtracted from the residual sum of squares of the non-restricted model to obtain an error reduction amount, and divided by a preset lag order to obtain a numerator, and the residual sum of squares of the non-restricted model is divided by the total sample size minus twice the lag order and minus one to obtain a denominator, and the numerator is divided by the denominator to calculate the specific value of the F statistic;
[0035] The calculated F statistic is compared with a preset critical value, if the F statistic is greater than the critical value, it is determined that another node is the Granger cause of the current node, a directed causal edge from another node to the current node is established, and the normalized value of the F statistic is recorded as the initial weight of the directed causal edge, and all node pairs are traversed to repeat the step to construct a causal influence graph.
[0036] Optionally, the S4 specifically comprises:
[0037] S41, all warehouses are divided into a preset number of subgroups, a high-level policy maker and a bottom layer executor with the same number of subgroups are set, and a state vector of the high-level policy maker is composed of total inventory, total demand and total logistics cost of all subgroups;
[0038] S42, the action of the high-level policy maker is defined as a macro allocation vector allocated to the corresponding subgroup, the local state matrix of each bottom layer executor is defined as a matrix with the row and column corresponding to the warehouse number and the dimension of the twin evolution data in the responsible subgroup, respectively, and the action of each bottom layer executor is defined as a three-dimensional tensor representing the source warehouse number, the target warehouse number and the specific goods allocation quantity;
[0039] S43, the high-level policy input the state vector into a multi-layer perception containing three preset linear layers and an activation function, output a real number vector as the global state value function evaluation value, the high-level policy runs the policy gradient algorithm to minimize the preset global cost function, updates the internal parameters of the policy network through gradient descent method and generates a macro adjustment vector, each scalar element in the macro adjustment vector represents the adjustment amount allocated to the corresponding sub-group;
[0040] S44, the bottom-layer executor performs hybrid value calculation under macro constraints, for each sub-group corresponding bottom-layer executor, the corresponding scalar element of the macro adjustment vector issued by the high-level is data-spliced with the local state matrix of itself to form an extended state tensor and input a double-layer convolutional neural network with a preset number, size and step size of convolutional kernels, for each warehouse in the sub-group, a one-dimensional local action value vector is calculated;
[0041] S45, the local action value vector is input into an independent hypernetwork composed of two preset linear layers, the output is a non-negative weight vector with the same dimension as the number of warehouses, the weight vector is weighted and summed with the vector spliced from the extended state tensor and the macro adjustment vector after being processed by another linear layer, and the value of the joint action value function is calculated;
[0042] S46, each bottom-layer executor solves the maximum joint action value function with equality constraints, the constraint condition is that the algebraic sum of all adjustment amounts recorded in the action tensor must be equal to the corresponding scalar of the macro adjustment vector, a Lagrange function is constructed by the joint action value function minus the product of a preset Lagrange multiplier and a constraint term, the constraint term is the difference between the algebraic sum of all adjustment amounts in the action tensor and the corresponding scalar of the macro adjustment vector, the action tensor and the Lagrange multiplier are updated alternately by gradient descent method until the Lagrange function value converges, and the optimal refined adjustment vector satisfying the macro constraint is obtained;
[0043] S47, the gradient of the global value network parameters is calculated based on the hierarchical parameter update of the back propagation, the optimal refined adjustment vector output by all bottom-layer executors is simulated in the overseas warehouse digital twin and an executed global cost is generated, the time difference error is calculated by adding the preset discount factor to the product of the executed global state value function evaluation value and subtracting the evaluation value of the pre-executed global state value function, and the parameters are updated by Adam optimizer;
[0044] S48, each bottom-layer executor uses the weighted sum of the preset impact factor within the subgroup and the global cost plus the product of the preset discount factor and the maximum value of the joint action value function, subtracts the value of the current joint action value function to obtain its own time difference error, calculates the parameter gradient of the internal convolutional neural network and the hypernetwork using its own time difference error, and updates the parameters through the Adam optimizer;
[0045] S49, repeat the complete cycle from macroscopic adjustment vector generation to refined adjustment vector selection to hierarchical parameter update, and perform policy iteration in the virtual environment composed of twin evolution data, when the average value change of the global cost in a continuous preset number of iterations is less than the convergence threshold, it is determined that the convergence has been reached, and the complete policy set composed of the optimal macroscopic adjustment vector and the optimal refined adjustment vector output after convergence is spliced by dimension, which is the optimal adjustment policy set.
[0046] Optionally, the global cost function specifically includes:
[0047] The global cost function is obtained by adding the transportation cost, the inventory holding cost and the shortage penalty cost, the transportation cost is to traverse all warehouses that have executed the macroscopic adjustment vector and the refined adjustment vector, multiply the number of adjusted goods between each pair of source warehouse and target warehouse by the transportation distance and unit transportation fee between them, and add up the fees of all single adjustments to obtain the transportation cost;
[0048] The inventory holding cost is the inventory state of all warehouses after the adjustment is completed, the calculation method is to obtain the latest inventory of each warehouse after the adjustment is executed and multiply it by the daily average warehouse management fee of unit goods held by the warehouse, and add up the daily average warehouse management fees of all warehouses to obtain the inventory holding cost;
[0049] The shortage penalty cost is obtained by subtracting the actual inventory after adjustment from the predicted demand, if the result is positive, it means that there is a shortage, multiply this shortage quantity by the preset unit shortage penalty coefficient, and add up the penalty amounts of all warehouses that have occurred shortage to obtain the shortage penalty cost.
[0050] Optionally, the S5 specifically includes:
[0051] S51, in the overseas warehouse digital twin, record the initial state snapshot of the real-time inventory data of all warehouses, the logistics state data of all in-transit orders and the twin evolution data of each warehouse before executing the optimal adjustment policy set;
[0052] S52, input the optimal allocation strategy set into the overseas warehouse digital twin, according to the macro allocation vector and the refined allocation vector contained in the optimal allocation strategy set, use the improved QMix algorithm to simulate the execution of the cargo allocation operation in the virtual environment, and according to the preset time step and the allocation cost ratio, deduce the inventory changes, logistics state changes and cost changes caused by the allocation operation, and generate the evolution trajectory data after simulation execution;
[0053] S53, compare the evolution trajectory data after simulation execution with the initial state snapshot and the twin evolution data of the unexecuted strategy, calculate the key performance indicators of the total allocation cost, the order satisfaction rate and the out-of-stock risk value of the lowest inventory threshold, if the total allocation cost and the out-of-stock risk value are less than the cost threshold and the out-of-stock threshold and the order satisfaction rate is greater than the preset acceptance threshold, then it is determined that the verification is passed;
[0054] S54, when the verification is passed, extract the causal edges related to the optimal allocation strategy set from the causal influence diagram, trace back to the high-level policy generator that generates the macro allocation vector, and record the decision path of the refined allocation scheme generated by each bottom-level executor to satisfy the macro allocation vector, and build a decision causal chain;
[0055] S55, structure the decision causal chain, the initial state snapshot, the evolution trajectory data and the four key performance indicators according to the preset template, generate a self-explanatory report, read the macro allocation vector and the refined allocation vector in the optimal allocation strategy set, and convert them into standardized allocation instructions containing source warehouse number, target warehouse number, cargo inventory, allocation quantity and estimated delivery time one by one.
[0056] Optionally, the S6 specifically comprises: issuing the standardized allocation instructions to the warehouse management system and the logistics system in the physical world through the application programming interface for automatic execution, and synchronously updating the real-time logistics track after execution and the self-explanatory report to the visual board of the client for display.
[0057] The beneficial effects of the present application are:
[0058] Firstly, by synchronously collecting multi-source operation data of the overseas warehouse network and constructing a digital twin, the real-time mapping and high-precision synchronization of the physical warehouse network state are realized, which provides a dynamic and reliable virtual test environment for subsequent intelligent prediction and decision-making.
[0059] Secondly, based on the Granger causality-based AGCN model, spatio-temporal feature learning and causal inference are performed on the twin data set, the message passing weight is dynamically calculated through online Granger causality test, the model's ability to capture the cascading influence path between nodes in the network is strengthened, and the demand and inventory risk of each warehouse in the future can be more accurately predicted. The model significantly improves the forward-looking and interpretability of the prediction, effectively deals with the problem of prediction accuracy degradation caused by uncertain events such as market demand mutation and logistics interruption, and further improves the risk perception and prediction ability of the entire allocation system.
[0060] In addition, in the strategy generation stage, an improved QMix algorithm introducing a hierarchical reinforcement learning mechanism is adopted, the synergistic decision of the macro allocation vector formulated by the high-level policy maker and the fine allocation vector calculated by the bottom-level executor is made, and the "dimension disaster" problem of large-scale warehouse network collaborative allocation is effectively solved. In the training process, the hierarchical parameter update is carried out through the weighted feedback of global cost reward and local reward, ensuring the global optimality and execution feasibility of the strategy. The mechanism significantly improves the solution efficiency and strategy quality of the decision, effectively adapts to complex and variable business scenarios, and enhances the adaptability and robustness of the allocation strategy.
[0061] In summary, by fusing digital twin, causal graph neural network inference and hierarchical reinforcement learning decision, the prediction accuracy, global decision and process interpretability of overseas warehouse allocation can be improved, and the intelligent operation level and cost benefit of overseas warehouse network can be significantly improved. BRIEF DESCRIPTION OF DRAWINGS
[0062] The accompanying drawings are included to provide a further understanding of the application, and constitute a part of the specification, together with the embodiments of the application, to explain the application, and do not constitute a limitation on the application. In the drawings:
[0063] Figure 1 A flowchart of an overseas warehouse intelligent allocation method based on digital twin is provided for the application;
[0064] Figure 2 A dynamic influence graph construction and multi-scenario prediction flowchart of the Granger causality-based AGCN model is provided for the application;
[0065] Figure 3 A strategy synergistic decision and optimization flowchart of the improved QMix algorithm based on the hierarchical reinforcement learning mechanism is provided for the application. DETAILED DESCRIPTION
[0066] The application will now be described in further detail with reference to the drawings. These drawings are simplified schematic diagrams, and only illustrate the basic structure of the application in a schematic manner, and therefore only show the components related to the application.
[0067] ReferenceFigures 1-3 An overseas warehouse intelligent allocation method based on digital twinning, comprising the following steps:
[0068] S1, synchronously collecting multi-source core operation data of the overseas warehouse network, including real-time inventory data, order information data reflecting immediate market demand, logistics state data representing network connectivity capability, and sales forecast data for guiding future planning, to construct an overseas warehouse digital twin that is real-time mapped with the physical overseas warehouse network and interacts with the physical world;
[0069] S2, within the overseas warehouse digital twin, performing spatio-temporal alignment and data fusion on the multi-source core operation data to ensure that the state of each warehouse and each item of goods in the digital twin is highly accurately synchronized with the physical world, forming a twin data set reflecting the current overall situation;
[0070] S3, taking each warehouse and logistics hub in the twin data set as a node, analyzing the time series data prediction relationship of each node through a Granger causality-based AGCN model, constructing a dynamic, directed causal influence graph, learning spatio-temporal features on the causal influence graph, capturing the propagation path of causal influence through a message passing mechanism, deducing how a change in any node state cascades to the entire network along the causal edges, and performing multi-scenario prediction on the demand and inventory risk of each warehouse in a future set period, to generate evolved twin data;
[0071] S4, taking the evolved twin data as a virtual environment, running an improved QMix algorithm, introducing a hierarchical reinforcement learning mechanism to divide all warehouses into multiple subgroups according to region or function, and setting a high-level policy maker and multiple bottom-level executors for collaborative decision-making, the high-level policy maker is responsible for formulating a macro allocation vector across groups, and each bottom-level executor calculates a refined allocation vector within its own subgroup based on the macro allocation vector, aiming to optimize the global cost, searches and outputs an optimal allocation strategy set;
[0072] S5, backtracking the optimal allocation strategy set in the overseas warehouse digital twin to generate evolved trajectory data, verifying by comparing and calculating key performance indicators, generating a self-explanatory report according to the decision causal chain, and converting the optimal allocation strategy set into standardized allocation instructions;
[0073] S6, issuing the standardized allocation instructions to the physical world's warehouse management and logistics platform for execution, displaying the real-time logistics trajectory and self-explanatory report after execution on the client.
[0074] The embodiment can significantly improve the allocation efficiency and cost-effectiveness of the overseas warehouse network. By constructing a digital twin that is real-time mapped with the physical world, precise synchronization and fusion of multi-source operation data are achieved, providing a high-fidelity environment for decision-making. Using the AGCN model based on Granger causality, the cascading influence between nodes can be deeply mined and predicted, generating twin evolution data to proactively identify inventory risks and demand changes. On this basis, the improved QMix algorithm with a hierarchical reinforcement learning mechanism is used to coordinate macro and micro decision-making, with the goal of optimizing the global cost and outputting the optimal allocation strategy. After backtracking verification by the twin and generating a self-explanatory report, the strategy is converted into instructions for execution. This approach realizes the transition from passive response to proactive prediction, from local optimization to global coordination, greatly improving the accuracy and economy of decision-making, significantly reducing operating costs and enhancing the robustness of the supply chain.
[0075] In the embodiment, S1 specifically includes:
[0076] S11, through the data interface deployed at each node of the overseas warehouse network, synchronously collecting real-time inventory data of the physical overseas warehouse network, order information data reflecting immediate market demand, logistics state data representing network connectivity capability, and sales forecast data for guiding future planning;
[0077] S12, according to the collected multi-source core operation data, constructing an overseas warehouse digital twin that is real-time mapped with the physical overseas warehouse network and interacts between virtual and real through three-dimensional modeling and data binding technology.
[0078] In the embodiment, S2 specifically includes:
[0079] S21, reading the time stamps of each data source in the multi-source core operation data, and aligning the time series of all data sources with the highest precision time stamp as the reference through interpolation or resampling methods;
[0080] S22, assigning a unique identifier to each data in the multi-source core operation data after time stamp alignment, and integrating real-time inventory data, order information data, logistics state data, and sales forecast data through the association of unique identifiers to generate a unified format of twin data set;
[0081] S23, writing the data items in the twin data set into the corresponding warehouse or commodity state attributes in the overseas warehouse digital twin in real time according to the unique identifier for state synchronization.
[0082] In the embodiment, S3 specifically includes:
[0083] S31, instantiate each warehouse and each logistics hub as an independent node in a graph structure from the twin data set, and extract multi-dimensional time series data within a preset historical time window as node attributes for each node, perform Granger causality test for any two nodes in the graph structure, and construct a dynamic, directed causal influence graph:
[0084] S32, input the initial causal influence graph and the time series data of each node into the AGCN model based on Granger causality, before each layer of graph convolution operation, for each target node in the causal influence graph, identify all incoming edges, and record the starting node of each incoming edge as the source node to form a source node list;
[0085] S33, for each source node in the source node list, perform an online Granger causality test, and from the time series data, extract data segments of the target node and the current source node within a set length of time window before the current time step, and use the two data segments to calculate a real-time F statistic as the message passing weight from the current source node to the target node in the current convolution operation;
[0086] S34, convolve the current source node through the graph convolution layer with the current preset convolution kernel size, number and step to obtain a one-dimensional array as a feature vector, multiply each element in the feature vector by the corresponding message passing weight to obtain a weighted source node feature vector;
[0087] S35, create an aggregated feature vector with the same dimension as the feature vector and all elements with a value of zero, and add the weighted source node feature vector and the aggregated feature vector element by element, update the value of the aggregated feature vector after each source node addition, until all source nodes are traversed, and obtain the final aggregated feature vector;
[0088] S36, obtain the feature vector of the target node at the current preset graph convolution layer, and concatenate it with the aggregated feature vector at the beginning and end to form a concatenated vector with doubled dimensions, and input it into a multi-layer perceptron, map the concatenated vector to a hidden vector of a preset dimension through a preset linear transformation layer, and apply a ReLU activation function to each element. After another preset linear transformation layer, map the output vector back to the same dimension as the original feature vector to generate the updated feature vector of the target node at the next layer;
[0089] S37, stack the graph convolution operation for a preset number of layers, and obtain, at the last layer, a final feature vector learned by each node and fusing a global causal structure and a spatio-temporal dependency relationship of the network, and construct a final feature vector of all nodes into a feature time sequence matrix and input into a long short-term memory network for encoding to obtain a context vector of each node, and through a fully connected output layer of a preset dimension, obtain a multi-scenario prediction of the warehouse demand and inventory risk in a future set period, i.e., twin evolution data of a future state.
[0090] The embodiment realizes accurate capture and evolution prediction of the dynamic causal relationship of the overseas warehouse network by introducing the AGCN model based on Granger causality. Each warehouse and hub is instantiated as a graph node, and the message passing weight is dynamically calculated through online Granger causality test, so that the graph convolution operation can adapt to the change of the influence strength between nodes. When aggregating neighborhood information, the model can strengthen the real causal relationship and suppress non-causal noise interference, so as to learn deep features fusing the global causal structure and the spatio-temporal dependency. Finally, combined with the long short-term memory network, a multi-scenario prediction of the future demand and inventory risk is realized, and high-fidelity twin evolution data is generated. The method significantly improves the accuracy and interpretability of the prediction, provides a prospective and reliable virtual environment basis for subsequent reinforcement learning decision-making, and effectively overcomes the defect of the traditional method that the complex correlation is not well described.
[0091] In the embodiment, the Granger causality test specifically includes:
[0092] A restrictive autoregressive model is constructed, and the current value of the current node is predicted only according to the historical data of the current node itself, that is, a linear equation is established to set the value of the current node at the current time point as a constant term and add the sum of the values of the current node at the past preset number of consecutive time points multiplied by the respective corresponding preset weight coefficients, to obtain the current prediction value;
[0093] By least squares method, the preset weight coefficients are continuously adjusted, and after the historical data is substituted into the equation, the total error sum of squares between the calculated current prediction value and the true value reaches the minimum, the optimal weight coefficient is determined, and the minimum total error sum of squares is recorded as the residual sum of squares of the restrictive model;
[0094] A non-restrictive autoregressive model is constructed, and the current value of the current node is predicted according to the historical data of the current node itself and another node, a new linear equation is established to set the value of the current node at the current time point as a new constant term plus the sum of the values of the current node at the past preset number of consecutive time points multiplied by the respective corresponding preset weight coefficients, and plus the sum of the values of another node at the past same number of consecutive time points multiplied by the respective corresponding another group of preset weight coefficients, to obtain a new current prediction value;
[0095] Similarly, by using the least squares method, all preset weight coefficients are adjusted so that the sum of squared errors between the current predicted value and the actual value of the current node is minimized after substituting the historical data of the current node and another node into the new linear equation. The optimal new weight coefficients are determined and this new minimum sum of squared errors is recorded as the residual sum of squared errors of the unrestricted model.
[0096] Subtracting the sum of squared residuals of the unrestricted model from the sum of squared residuals of the restricted model yields a reduction in error. Dividing this by the preset lag order gives the numerator. Dividing the sum of squared residuals of the unrestricted model by the total sample size minus twice the lag order and minus one gives the denominator. Dividing the numerator by the denominator gives the specific value of the F-statistic.
[0097] The calculated F-statistic is compared with a preset critical value. If the F-statistic is greater than the critical value, the other node is determined to be the Granger cause of the current node. A directed causal edge is established from the other node to the current node, and the normalized value of the F-statistic is recorded as the initial weight of the directed causal edge. The steps are repeated for all node pairs to construct a dynamic, directed causal influence graph.
[0098] In this embodiment, S4 specifically includes:
[0099] S41. Divide all warehouses into a preset number of subgroups, set up a high-level strategist and a number of low-level executors equal to the number of subgroups. The state vector of the preset high-level strategist consists of the total inventory, total demand and total logistics cost of all subgroups.
[0100] S42. Define the action of the high-level strategist as a macro-allocation vector assigned to the corresponding subgroup. Define the local state matrix of each low-level executor as a matrix whose rows and columns correspond to the warehouse number and twin evolution data of the subgroup, respectively. Define the action of each low-level executor as a three-dimensional tensor representing the source warehouse number, the target warehouse number, and the specific quantity of goods to be allocated.
[0101] S43. The high-level policyr inputs the state vector into a multilayer perceptron containing three preset linear layers and activation functions, and outputs a real vector as the global state value function evaluation value. The high-level policyr runs the policy gradient algorithm to minimize the preset global cost function. It updates the internal parameters of the policy network and generates a macro-allocation vector through gradient descent. Each scalar element in the macro-allocation vector represents the allocation amount allocated to the corresponding subgroup.
[0102] S44. The underlying actuator performs hybrid value calculation under macro constraints. For each subgroup, the underlying actuator concatenates the corresponding scalar elements of the macro allocation vector issued by the upper layer with its own local state matrix to form an extended state tensor. This tensor is then input into a shared two-layer convolutional neural network with a preset number, size, and stride of convolutional kernels to calculate a one-dimensional local action value vector for each warehouse in the subgroup.
[0103] S45. Input the local action value vector into an independent supernetwork. The supernetwork consists of two preset linear layers and outputs a non-negative weight vector with the same dimension as the number of warehouses. Pass the weight vector through the ReLU activation function and perform a weighted summation on the vector processed by the other linear layer, which is a concatenation of the extended state tensor and the macro-allocation vector, to calculate the value of the joint action value function.
[0104] S46. Each underlying actuator solves for the maximum joint action value function with equality constraints. The constraint is that the algebraic sum of all transfer quantities recorded in the action tensor must be equal to the corresponding scalar of the macroscopic transfer vector. A Lagrangian function is constructed by subtracting the product of the preset Lagrange multiplier and the constraint term from the joint action value function. The constraint term is the difference between the algebraic sum of all transfer quantities in the action tensor and the corresponding scalar of the macroscopic transfer vector. The action tensor and the Lagrange multiplier are iteratively updated alternately by gradient descent until the Lagrangian function value converges, thus obtaining the optimal refined transfer vector that satisfies the macroscopic constraints.
[0105] S47. Backpropagation for hierarchical parameter updates based on global cost: Simulate the execution of the optimal fine-tuned allocation vectors output by all bottom-level executors in the overseas warehouse digital twin and generate a global cost after execution. Add the product of the global cost and the global state value function evaluation value after execution to the preset discount factor, and subtract the global state value function evaluation value before execution to obtain the time-series difference error. Calculate the gradient of the global value network parameters and update the parameters through the Adam optimizer.
[0106] S48. Each underlying executor uses the weighted sum of the preset influence factor within the subgroup and the global cost, plus the product of the preset discount factor and the maximum value of the joint action value function, and subtracts the value of the current joint action value function to obtain its own temporal difference error. It uses its own temporal difference error to calculate the parameter gradients of the internal convolutional neural network and the super network, and updates the parameters through the Adam optimizer.
[0107] S49, repeat the complete cycle from macroscopic allocation vector generation to refined allocation vector selection to hierarchical parameter update, perform policy iteration in the virtual environment composed of twin evolution data, when the average value change of global cost in continuous preset number of iterations is less than the convergence threshold, it is determined that convergence has been reached, and the optimal macroscopic allocation vector and the optimal refined allocation vector output after convergence are spliced according to the dimension to form a complete strategy set, which is the optimal allocation strategy set.
[0108] The embodiment introduces an improved QMix algorithm of hierarchical reinforcement learning mechanism, realizes global cooperation and refined management of overseas warehouse network allocation decision. The high-level policy maker generates a macroscopic allocation vector according to the global state, and sets an allocation total amount target for each sub-group; the bottom layer executor solves the optimal refined allocation scheme that meets the total amount through the mixed value network and Lagrange optimization under the macroscopic constraint. The hierarchical architecture effectively solves the dimension disaster problem of large-scale decision, and ensures the unity of global optimization and local execution. Policy iteration takes minimizing the global cost including transportation, inventory and stockout penalty as the goal, and realizes the cooperative evolution of high-level and bottom layer networks through the back propagation of time difference error. The method significantly improves the economy and feasibility of allocation decision, effectively reduces the total operation cost, and enhances the agility in response to complex market changes.
[0109] In the embodiment, the global cost function specifically includes:
[0110] The global cost function is obtained by adding the transportation cost, the inventory holding cost and the stockout penalty cost, the transportation cost is obtained by multiplying the number of allocated goods between each pair of source warehouse and target warehouse by the transportation distance and unit transportation fee between them, and then adding the fees of all single allocations;
[0111] The inventory holding cost is the inventory state of all warehouses after allocation, and the calculation method is to obtain the latest inventory of each warehouse after allocation and multiply it by the daily average warehouse management fee per unit of goods, and then add the daily average warehouse management fees of all warehouses to obtain the inventory holding cost;
[0112] The stockout penalty cost is obtained by subtracting the actual inventory after allocation from the predicted demand, if the result is positive, it means that there is a stockout, multiplying the stockout quantity by the preset unit stockout penalty coefficient, and then adding the penalty amounts of all warehouses with stockout to obtain the stockout penalty cost.
[0113] In the embodiment, S5 specifically includes:
[0114] S51, record the initial state snapshot of the real-time inventory data of all warehouses, the logistics state data of all in-transit orders, and the twin evolution data of each warehouse before executing the optimal allocation strategy set in the overseas warehouse digital twin;
[0115] S52, input the optimal allocation strategy set into the overseas warehouse digital twin, use the improved QMix algorithm to simulate the execution of the cargo allocation operation in the virtual environment according to the macro allocation vector and the refined allocation vector contained in the optimal allocation strategy set, and deduce the inventory changes, logistics state changes and cost changes caused by the allocation operation according to the preset time step and the allocation cost ratio, to generate the evolution trajectory data after simulation execution;
[0116] S53, compare the evolution trajectory data after simulation execution with the initial state snapshot and the twin evolution data without executing the strategy, calculate the key performance indicators of total allocation cost, order satisfaction rate and out-of-stock risk value of the lowest inventory threshold, if the total allocation cost and the out-of-stock risk value are less than the cost threshold and the out-of-stock threshold and the order satisfaction rate is greater than the preset acceptance threshold, then the verification is passed;
[0117] S54, when the verification is passed, extract the causal edges related to the optimal allocation strategy set this time from the causal influence diagram, trace back to the high-level policy generator that generates the macro allocation vector, and record the decision path of the refined allocation scheme generated by each bottom-level executor to meet the macro allocation vector, to build a decision causal chain;
[0118] S55, structure the decision causal chain, the initial state snapshot, the evolution trajectory data and the four key performance indicators according to the preset template to generate a self-explanatory report, read the macro allocation vector and the refined allocation vector in the optimal allocation strategy set, and convert them one by one into standardized allocation instructions containing source warehouse number, target warehouse number, cargo inventory, allocation quantity and estimated delivery time.
[0119] In the embodiment, the S6 specifically includes: issuing the standardized allocation instructions to the warehouse management system and the logistics system in the physical world through the application programming interface for automatic execution, and synchronously updating the real-time logistics trajectory after execution and the self-explanatory report to the visual board of the client for display.
[0120] Example 1:
[0121] To verify the feasibility of the application in implementation, the application is applied to the Asia-Pacific region intelligent warehouse management platform of a certain multinational logistics enterprise. The platform covers 36 core warehouse centers in 12 countries and regions such as China, Japan, South Korea, Southeast Asia, manages more than 5 million SKUs of goods, and processes more than 1.2 million orders per day, involving fresh food, electronics, clothing, daily necessities and other categories. The warehouse network faces severe challenges such as inaccurate demand forecasting, unreasonable inventory allocation, high allocation cost, etc. Especially during the promotion season and holiday period, there are often situations of out-of-stock in some areas and inventory accumulation in other areas, leading to a decline in customer satisfaction and a surge in operating costs. The platform generates a large amount of operational data every day, including real-time order information, inventory levels, logistics transportation status, market promotion activities, weather influences, holiday arrangements, etc., with a data volume of 3.5 TB. The traditional warehouse allocation system mainly relies on manual experience and simple statistical models, which cannot effectively handle complex decision-making problems with multiple dimensions and multiple time points, often leading to delayed allocation decisions and untimely responses, making it difficult to make optimal adjustments when market demand changes rapidly.
[0122] In actual deployment, the method of the application converts the above-mentioned multi-source heterogeneous data into structured input, first constructs a virtual mapping of the entire Asia-Pacific region warehouse network through digital twinning technology. Each warehouse center is modeled as a network node, and the node attributes include real-time inventory, order processing capacity, transportation cost, historical demand pattern, etc. The AGCN model based on Granger causality dynamically analyzes the causal relationships and influence paths between nodes, such as identifying how a promotion activity in a certain area affects demand changes in surrounding areas, or how weather factors have a chain reaction on logistics timeliness. The discovery of these causal relationships lays the foundation for accurate demand forecasting.
[0123] At the decision-making level, the improved QMix algorithm realizes macro and micro collaborative decision-making through a hierarchical reinforcement learning mechanism. The high-level policy maker is responsible for formulating the global allocation strategy and determining the inventory allocation targets of each warehouse center; the low-level executor formulates fine-grained allocation schemes for each specific warehouse, taking into account transportation routes, batch size, time window and other practical constraints. This hierarchical architecture ensures both global optimality of the decision and feasibility of the execution level. The following Table 1 shows the comparison data of the application method and the traditional optimization method in the warehouse allocation task during the six-month deployment period:
[0124] Table 1 Performance comparison data table of the application and the traditional method
[0125] Evaluation index Traditional method Method of the present application Lifting amplitude (%) Order satisfaction rate (%) 87.3 95.8 +9.7 Average inventory turnover days 28.5 19.2 -32.6 Allocation cost ratio (%) 12.4 8.7 -29.8 Out-of-stock rate (%) 8.7 2.3 -73.6 Inventory overstock rate (%) 15.2 4.8 -68.4 Decision response time (minutes) 45.8 8.3 -81.9 Prediction accuracy rate (%) 72.6 91.4 +25.9 Cross-regional coordination efficiency (%) 63.5 89.2 +40.5
[0126] According to the comparative data shown in Table 1, it can be seen that the intelligent allocation method based on hierarchical reinforcement learning proposed in the application has a significant performance advantage in warehouse network management compared with the traditional optimization method, especially in key indicators such as order satisfaction rate, inventory turnover efficiency, cost control and decision response speed, which has achieved overall improvement.
[0127] In terms of core business indicators, the order satisfaction rate is improved from 87.3% to 95.8%, which directly translates into higher customer satisfaction and market share. This leap is due to the huge improvement of prediction accuracy from 72.6% to 91.4%, enabling the system to more accurately predict demand fluctuations and thus plan inventory in advance. At the same time, inventory management efficiency has been fundamentally improved, with the average inventory turnover days shortened from 28.5 days to 19.2 days, and the inventory backlog rate and out-of-stock rate decreased by 68.4% and 73.6% respectively, effectively releasing the capital occupation and avoiding the sales loss caused by out-of-stock.
[0128] In terms of cost and efficiency control, the application also has outstanding advantages. The allocation cost ratio is reduced from 12.4% to 8.7%, which is due to the global optimization of allocation path and timing selection. The decision response time is greatly shortened from 45.8 minutes to 8.3 minutes, with a decrease of 81.9%, giving the system the ability to respond to sudden market changes. In addition, the cross-regional coordination efficiency is improved by 40.5%, indicating that the system has upgraded from isolated node management to efficient networked operation.
[0129] Overall, the application successfully solves the core pain points of traditional warehouse management such as response lag, fragmented decision-making and low efficiency by integrating digital twin, causal reasoning and hierarchical reinforcement learning mechanism, realizes the transformation from passive response to active prediction, from local optimization to global coordination, and has high commercial landing value and industry promotion prospects.
[0130] The above describes only the preferred specific embodiments of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can make equivalent substitutions or changes to the technical solutions and inventive concepts of the application within the technical scope disclosed by the application, which should be covered within the protection scope of the application.
Claims
1. A method for intelligent allocation of overseas warehouses based on digital twins, characterized in that, Includes the following steps: S1. Synchronously collect multi-source core operational data from overseas warehouse networks to build a digital twin of overseas warehouses; S2. Within the digital twin of the overseas warehouse, preprocess multi-source core operational data to form a twin dataset; S3. Using each warehouse and logistics hub in the twin dataset as nodes, the time series data prediction relationship of each node is analyzed through the Granger causality-based AGCN model, a causal influence diagram is constructed, the propagation path of causal influence is captured, and twin evolution data is generated. S4. Using twin evolution data as a virtual environment, run the improved QMix algorithm, introduce a hierarchical reinforcement learning mechanism to divide all warehouses into multiple subgroups according to region or function, and set up a high-level strategist and multiple low-level executors to make collaborative decisions, with the goal of optimizing global cost, and output the optimal allocation strategy set. S5. Backtrack and verify the optimal allocation strategy set in the overseas warehouse digital twin, generate evolution trajectory data, verify by comparing and calculating key performance indicators, generate a self-explanatory report based on the decision causal chain, and transform the optimal allocation strategy set into standardized allocation instructions. S6. Issue standardized allocation instructions to the physical warehouse management and logistics platform for execution, and display the real-time logistics trajectory and self-explanatory report after execution on the client.
2. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, S1 specifically includes: S11. Through the data interfaces deployed at each node of the overseas warehouse network, real-time inventory data of the physical overseas warehouse network, order information data reflecting immediate market demand, logistics status data characterizing network connectivity, and sales forecast data used to guide future planning are collected synchronously. S12. Based on the collected multi-source core operational data, construct a digital twin of the overseas warehouse through 3D modeling and data binding technology.
3. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, S2 specifically includes: S21. Read the timestamps of each data source in the multi-source core operation data, and align the time series of all data sources with the highest precision timestamp as the benchmark through interpolation or resampling methods. S22. Assign a unique identifier to each data item in the timestamp-aligned multi-source core operational data. By associating the unique identifiers, integrate real-time inventory data, order information data, logistics status data, and sales forecast data to generate a twin dataset. S23. Write the data items in the twin dataset into the corresponding warehouse or product status attributes in the overseas warehouse digital twin in real time, based on the unique identifier, for status synchronization.
4. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, S3 specifically includes: S31. From the twin dataset, instantiate each warehouse and each logistics hub as an independent node in the graph structure, and extract multi-dimensional time series data within a preset historical time window as node attributes for each node. For any two nodes in the graph structure, perform Granger causality test and construct a causal influence graph: S32. Input the initial causal influence graph and the time series data of each node into the Granger causality-based AGCN model. Before each graph convolution operation, for each target node in the causal influence graph, identify all incoming edges and record the starting node of each incoming edge as the source node to form a list of source nodes. S33. For each source node in the source node list, perform an online Granger causality test. Extract a data segment from the time series data within a time window of a set length before the current time step for the target node and the current source node. Use these two data segments to calculate a real-time F statistic and use it as the message passing weight from the current source node to the target node in this convolution operation. S34. The current source node is processed by the convolution operation of the graph convolutional layer with the current preset convolutional kernel size, number and stride to obtain a one-dimensional array as a feature vector. Each element in the feature vector is multiplied by the corresponding message passing weight to obtain the weighted source node feature vector. S35. Create an aggregated feature vector with the same dimension as the feature vector and all element values are zero. Add the weighted source node feature vector to the aggregated feature vector element by element. After each source node is added, update the value of the aggregated feature vector. Continue until all source nodes have been traversed to obtain the final aggregated feature vector. S36. Obtain the feature vector of the target node in the current preset graph convolutional layer, and concatenate it with the aggregated feature vector to form a concatenated vector with doubled dimensions. Input the concatenated vector into a multilayer perceptron, pass it through a preset linear transformation layer, map the concatenated vector to a hidden vector of preset dimensions, apply the ReLU activation function to each element, and pass it through another preset linear transformation layer to map the output vector back to the same dimension as the original feature vector, generating the updated feature vector of the target node in the next layer. S37. Stack the graph convolution operations into a preset number of layers. In the last layer, each node learns the final feature vector that integrates the global causal structure and spatiotemporal dependencies of the network. Construct the final feature vectors of all nodes into a feature time series matrix and input it into a long short-term memory network for encoding to obtain the context vector of each node. Through a fully connected output layer of a preset dimension, obtain multi-scenario predictions of warehouse demand and inventory risk within a set future period, i.e., twin evolution data.
5. The intelligent overseas warehouse allocation method based on digital twins according to claim 4, characterized in that, The Granger causality test specifically includes: Construct a restricted autoregressive model to predict the current value based solely on the historical data of the current node itself. This involves establishing a linear equation that sets the value of the current node at the current time point as a constant term and adds the sum of the values of the current node at a preset number of consecutive time points in the past, each multiplied by its corresponding preset weight coefficient, to obtain the current predicted value. By continuously adjusting the preset weight coefficients using the least squares method, and substituting historical data into the equation, the total sum of squared errors between the current predicted value and the actual value is minimized. The optimal weight coefficients are then determined, and the minimum total sum of squared errors is recorded as the residual sum of squares of the constrained model. Construct an unrestricted autoregressive model to predict the current value of the current node based on the historical data of the current node itself and another node. Establish a new linear equation, set the value of the current node at the current time point as a new constant term, add the sum of the values of the current node at the past preset number of consecutive time points multiplied by their respective preset weight coefficients, and add the sum of the values of the other node at the past same number of consecutive time points multiplied by their respective other preset weight coefficients to obtain the new current predicted value. Similarly, by using the least squares method, all preset weight coefficients are adjusted so that the sum of squared errors between the current predicted value and the actual value of the current node is minimized after substituting the historical data of the current node and another node into the new linear equation. The optimal new weight coefficients are determined and this new minimum sum of squared errors is recorded as the residual sum of squared errors of the unrestricted model. Subtracting the sum of squared residuals of the unrestricted model from the sum of squared residuals of the restricted model yields a reduction in error. Dividing this by the preset lag order gives the numerator. Dividing the sum of squared residuals of the unrestricted model by the total sample size minus twice the lag order and minus one gives the denominator. Dividing the numerator by the denominator gives the specific value of the F-statistic. The calculated F-statistic is compared with a preset critical value. If the F-statistic is greater than the critical value, the other node is determined to be the Granger cause of the current node. A directed causal edge is established from the other node to the current node, and the normalized value of the F-statistic is recorded as the initial weight of the directed causal edge. The steps are repeated for all node pairs to construct the causal influence graph.
6. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, S4 specifically includes: S41. Divide all warehouses into a preset number of subgroups, set up a high-level strategist and a number of low-level executors equal to the number of subgroups. The state vector of the preset high-level strategist consists of the total inventory, total demand and total logistics cost of all subgroups. S42. Define the action of the high-level strategist as a macro-allocation vector assigned to the corresponding subgroup. Define the local state matrix of each low-level executor as a matrix whose rows and columns correspond to the warehouse number and twin evolution data of the subgroup, respectively. Define the action of each low-level executor as a three-dimensional tensor representing the source warehouse number, the target warehouse number, and the specific quantity of goods to be allocated. S43. The high-level policyr inputs the state vector into a multilayer perceptron containing three preset linear layers and activation functions, and outputs a real vector as the global state value function evaluation value. The high-level policyr runs the policy gradient algorithm to minimize the preset global cost function. It updates the internal parameters of the policy network and generates a macro-allocation vector through gradient descent. Each scalar element in the macro-allocation vector represents the allocation amount allocated to the corresponding subgroup. S44. The underlying actuator performs hybrid value calculation under macro constraints. For each subgroup, the underlying actuator concatenates the corresponding scalar elements of the macro allocation vector issued by the upper layer with its own local state matrix to form an extended state tensor. This tensor is then input into a shared two-layer convolutional neural network with a preset number, size, and stride of convolutional kernels to calculate a one-dimensional local action value vector for each warehouse in the subgroup. S45. Input the local action value vector into an independent supernetwork. The supernetwork consists of two preset linear layers and outputs a non-negative weight vector with the same dimension as the number of warehouses. Pass the weight vector through the ReLU activation function and perform a weighted summation on the vector processed by the other linear layer, which is a concatenation of the extended state tensor and the macro-allocation vector, to calculate the value of the joint action value function. S46. Each underlying actuator solves for the maximum joint action value function with equality constraints. The constraint is that the algebraic sum of all transfer quantities recorded in the action tensor must be equal to the corresponding scalar of the macroscopic transfer vector. A Lagrangian function is constructed by subtracting the product of the preset Lagrange multiplier and the constraint term from the joint action value function. The constraint term is the difference between the algebraic sum of all transfer quantities in the action tensor and the corresponding scalar of the macroscopic transfer vector. The action tensor and the Lagrange multiplier are iteratively updated alternately by gradient descent until the Lagrangian function value converges, thus obtaining the optimal refined transfer vector that satisfies the macroscopic constraints. S47. Backpropagation for hierarchical parameter updates based on global cost: Simulate the execution of the optimal fine-tuned allocation vectors output by all bottom-level executors in the overseas warehouse digital twin and generate a global cost after execution. Add the product of the global cost and the global state value function evaluation value after execution to the preset discount factor, and subtract the global state value function evaluation value before execution to obtain the time-series difference error. Calculate the gradient of the global value network parameters and update the parameters through the Adam optimizer. S48. Each underlying executor uses the weighted sum of the preset influence factor within the subgroup and the global cost, plus the product of the preset discount factor and the maximum value of the joint action value function, and subtracts the value of the current joint action value function to obtain its own temporal difference error. It uses its own temporal difference error to calculate the parameter gradients of the internal convolutional neural network and the super network, and updates the parameters through the Adam optimizer. S49. Repeatedly execute the complete loop from macro-allocation vector generation to fine-grained allocation vector selection to hierarchical parameter update, and perform strategy iteration in a virtual environment composed of twin evolutionary data. When the average change of global cost is less than the convergence threshold in a series of preset iterations, it is determined that convergence has been achieved. The complete strategy set composed of the optimal macro-allocation vector and the optimal fine-grained allocation vector output after convergence, spliced by dimension, is the optimal allocation strategy set.
7. The intelligent overseas warehouse allocation method based on digital twins according to claim 6, characterized in that, The global cost function specifically includes: The global cost function is obtained by adding up the transportation cost, inventory holding cost and stockout penalty cost. The transportation cost is obtained by iterating through all warehouse pairs that have executed macro-transfer vectors and fine-grained transfer vectors, multiplying the quantity of goods transferred from the source warehouse to the target warehouse for each pair by the transportation distance and unit freight cost, and summing up the costs of all these single transfers. Inventory holding cost is the inventory status of all warehouses after the transfer is completed. The calculation method is to obtain the latest inventory of each warehouse after the transfer is executed and multiply it by the average daily warehousing management cost of the warehouse holding a unit of goods. The average daily warehousing management cost of all warehouses is added together to obtain the inventory holding cost. The stockout penalty cost is calculated by subtracting the actual inventory level after allocation from the predicted demand. If the result is positive, it indicates that there is a stockout. This stockout quantity is multiplied by a preset unit stockout penalty coefficient, and the penalty amounts of all warehouses where stockouts occurred are summed to obtain the stockout penalty cost.
8. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, S5 specifically includes: S51. In the digital twin of the overseas warehouse, record an initial state snapshot containing real-time inventory data of all warehouses, logistics status data of all orders in transit, and twin evolution data of each warehouse before executing the optimal allocation strategy set. S52. Input the optimal allocation strategy set into the overseas warehouse digital twin. According to the macro allocation vector and fine allocation vector contained in the optimal allocation strategy set, use the improved QMix algorithm to simulate the execution of cargo allocation operations in the virtual environment. Based on the preset time step and allocation cost ratio, deduce the changes in inventory, logistics status and cost caused by the allocation operation, and generate the evolution trajectory data after the simulation execution. S53. Compare the evolution trajectory data after the simulation execution with the initial state snapshot and the twin evolution data of the unexecuted strategy, and calculate the key performance indicators of total allocation cost, order fulfillment rate and stockout risk value of minimum inventory threshold. If the total allocation cost and stockout risk value are less than the cost threshold and stockout threshold and the order fulfillment rate is greater than the preset acceptance threshold, the verification is deemed successful. S54. After the verification is passed, extract the causal edges related to the optimal allocation strategy set in this case from the causal influence graph, trace the high-level strategyr that generates the macro allocation vector, and record the decision path of the refined allocation scheme generated by each low-level executor to satisfy the macro allocation vector, and construct the decision causal chain. S55. The decision causal chain, initial state snapshot, evolution trajectory data and four key performance indicators are structurally integrated using a preset template to generate a self-explanatory report. The macro-allocation vector and fine-grained allocation vector in the optimal allocation strategy set are read and transformed into standardized allocation instructions containing source warehouse number, target warehouse number, goods inventory, allocation quantity and expected outbound time.
9. The intelligent overseas warehouse allocation method based on digital twins according to claim 1, characterized in that, Specifically, S6 includes: sending standardized allocation instructions to the physical warehouse management system and logistics system through an application programming interface for automated execution, and simultaneously updating the real-time logistics trajectory and self-explanatory report after execution to the client's visual dashboard for display.
Citation Information
Cited By
Multi-level warehouse accounting method and system based on front-end and back-end linkage
CN122089217A