Deep learning based retail supply chain collaborative optimization system

CN122905563APending Publication Date: 2026-10-13北京胜邦世纪控股有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611061833.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

部署后的预测和决策模型若无法自适应这些变化,其协同优化效果随时间持续退化,最终导致初期优化的多级协同补货策略完全失效

Benefits of technology

[0041]本发明通过异源时序异构图构建与脉冲知识库模块构建包含事件影响边的异源时序异构图,并构建存储有不同外部事件类型需求脉冲模板的脉冲响应知识库,通过多维需求脉冲响应感知模块内置的图门控时序卷积网络输出时空影响衰减矩阵,量化了外部事件冲击在供应链节点间的传导强度与延迟,使多级库存系统能够提前感知需求波动的空间扩散路径,提升了协同感知能力;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905563A_ABST
    Figure CN122905563A_ABST
Patent Text Reader

Abstract

The application discloses a retail supply chain collaborative optimization system based on deep learning, relates to the technical field of retail supply chain inventory management, and solves the problems of the lack of multi-level inventory collaborative sensing, the lack of risk resistance ability of collaborative replenishment decision and the invalidation of collaborative optimization strategy after the scene changes in the traditional method. The application obtains multi-source data and constructs a graph structure and an event impact template through a heterogeneous time sequence heterogeneous graph construction and a pulse knowledge base module, obtains a demand probability distribution and a space-time influence decay matrix through a multi-dimensional demand pulse response sensing module, generates multi-level collaborative replenishment instructions through the strategy network and the dual network of the distribution robust inventory collaborative decision module through the strategy network and the dual network of the distribution robust inventory collaborative decision module, and divides learnable parameters through a causal decoupling adaptive calibration module and recalculates scene-specific factors and fine-tunes output layer weights when the prediction error is over a threshold value, so that the whole-link retail supply chain collaborative optimization from demand sensing to replenishment execution to continuous adaptation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of retail supply chain inventory management technology, specifically a retail supply chain collaborative optimization system based on deep learning. Background Technology

[0002] Retail supply chains typically consist of a multi-tiered network structure comprised of suppliers, regional distribution centers, and numerous stores. These nodes are interconnected through replenishment relationships, forming a goods flow link from upstream to downstream. In this multi-tiered supply chain structure, demand fluctuations at any node can be transmitted upstream through the replenishment link and amplified at each level, creating a bullwhip effect. This can lead to inventory buildup at upstream nodes or stockouts at downstream nodes, ultimately impacting the operational efficiency and customer service levels of the entire supply chain.

[0003] With the diversification of retail formats and the increasing complexity of consumer demands, the impact of external events on store demand is becoming increasingly significant. Promotional activities, holidays, and weather changes can drastically alter store demand patterns in the short term. This demand shock does not occur in isolation but rather generates a spatial transmission effect between stores through geographical proximity and product category similarity. For example, a promotional event at one store may attract customers to surrounding stores, leading to a decrease in demand at those stores. Traditional demand forecasting methods typically treat each store as an independent sample, failing to capture the transmission process of external event shocks between stores and across the supply chain, resulting in delayed demand perception and biased inventory decisions.

[0004] In multi-level inventory collaborative decision-making, existing methods are mostly based on deterministic demand assumptions or simple safety stock rules, failing to effectively handle the uncertainties inherent in demand forecasting itself. When demand forecasts are biased, the independent decision-making nodes are prone to coordination misalignment, leading to increased overall inventory costs. Furthermore, the retail supply chain operating environment is not static; seasonal changes, shifts in consumer trends, and the introduction of new promotional strategies all cause conceptual drift in data distribution. If deployed models cannot perceive and adapt to these environmental changes in a timely manner, their forecasting accuracy and decision-making quality will continuously degrade over time.

[0005] The following problems exist in the existing technology:

[0006] Existing demand forecasting methods treat each store as an independent sample, failing to depict the spatial transmission process of demand shocks triggered by external events such as promotions and weather between stores, nor to quantify the intensity and delay of shock transmission across multiple supply chain levels. This results in upstream warehouses being unable to anticipate the source and direction of downstream demand fluctuations, and a severe lack of collaborative perception capabilities across multiple inventory levels.

[0007] Existing multi-level inventory decisions are mostly based on the mean of demand point forecasts, ignoring the tail risk in the forecast distribution. This leads to simultaneous stockouts or stockpiles at all nodes when demand deviates significantly, resulting in coordination misalignment. Traditional safety stock methods cannot endogenously generate robust multi-level coordinated replenishment plans under global joint opportunity constraints.

[0008] In existing technologies, the retail supply chain operating environment is constantly changing with seasonal shifts, shifting consumer trends, and the introduction of new promotional strategies, resulting in conceptual drift in data distribution. If the deployed forecasting and decision-making models cannot adapt to these changes, their collaborative optimization effectiveness will continuously degrade over time, ultimately causing the initially optimized multi-level collaborative replenishment strategy to completely fail. Summary of the Invention

[0009] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a retail supply chain collaborative optimization system based on deep learning to solve the above-mentioned technical problems.

[0010] The first aspect of the present invention provides a deep learning-based retail supply chain collaborative optimization system, comprising the following modules:

[0011] The module for constructing heterogeneous temporal graphs and impulse knowledge bases is used to acquire sales data, inventory data, external event data, actual demand data, as well as basic data of stores, products, and warehouses in the retail supply chain. It constructs a heterogeneous temporal graph containing store nodes, product nodes, warehouse nodes, physical supply edges, and event-affected edges, and builds an impulse response knowledge base.

[0012] The multidimensional demand impulse response sensing module has a built-in graph-gated temporal convolutional network. Based on the heterogeneous temporal graph and the impulse response knowledge base, the graph-gated temporal convolutional network processes the data to obtain the demand probability distribution and spatiotemporal influence attenuation matrix for a preset future time period. By comparing the demand probability distribution with the actual demand data, a residual sequence is generated.

[0013] The Bulubang inventory collaborative decision-making module has a built-in strategy network and dual network. The dual network is used to search for the worst demand disturbance in the uncertainty set of the demand distribution defined by the demand probability distribution and the preset uncertainty radius parameter in order to conduct adversarial training on the strategy network. After adversarial training, the strategy network generates multi-level collaborative replenishment instructions based on the demand probability distribution and the spatiotemporal influence decay matrix.

[0014] The causal decoupling adaptive calibration module is used to divide the learnable parameters in the graph-gated temporal convolutional network, the policy network, and the dual network into scene-invariant kernels, scene-specific factors, and noise components corresponding to random deactivation layers. When the prediction error of the demand probability distribution exceeds a preset prediction error statistical threshold, the scene-invariant kernel is frozen, the scene-specific factors are recalculated using the residual sequence, and the output layer weights of the graph-gated temporal convolutional network, the policy network, and the dual network are fine-tuned to reconfigure the scene-specific factors and output layer weights in the graph-gated temporal convolutional network, the policy network, and the dual network.

[0015] Preferably, in the heterogeneous temporal heterogeneous graph construction and pulse knowledge base module, the heterogeneous temporal heterogeneous graph includes:

[0016] The node construction unit is used to build store nodes, product nodes, and warehouse nodes. Store nodes are built based on the store's geographical location, sales area, and business type in the basic store data, as well as the average daily customer traffic and category sales ratio in the sales data. Product nodes are built based on the product's category, brand, specifications, shelf life in the basic product data, as well as historical sales statistics in the sales data. Warehouse nodes are built based on the warehouse's storage capacity limit, service store list, and standard replenishment lead time in the basic warehouse data.

[0017] The physical supply edge construction unit is used to establish physical supply edges between warehouse nodes and store nodes based on the actual replenishment connection relationship between warehouses and stores in the warehouse basic data. The edge attributes include fixed replenishment lead time and minimum order quantity constraints.

[0018] The event impact edge construction unit is used to calculate the straight-line distance between two store nodes and the overlap of the product categories they operate. When the straight-line distance is lower than a preset distance threshold and the product category overlap is higher than a preset overlap threshold, an event impact edge is established between the two store nodes, and the weight of the event impact edge is calculated by the reciprocal of the straight-line distance and the Gaussian decay function.

[0019] Preferably, in the heterogeneous temporal graph construction and impulse knowledge base module, the impulse response knowledge base includes:

[0020] The template construction unit is used to determine different external event types based on the external event data, and to construct a demand pulse template for each external event type, consisting of an impact amplitude parameter and an attenuation coefficient parameter; wherein, the impact amplitude parameter is the maximum increase multiple of the daily average demand for the corresponding external event type per unit time, and the attenuation coefficient parameter is the rate constant of the attenuation of the impact intensity of the corresponding external event type over time.

[0021] The template parameter acquisition unit is used to acquire the actual demand data in the historical event window corresponding to each type of external event within a preset time period; and uses a matrix factorization algorithm with non-negative constraints and sparse induced regularization terms to decompose the impact amplitude parameter and attenuation coefficient parameter from the actual demand data in the historical event window.

[0022] Preferably, in the multidimensional demand impulse response sensing module, the graph-gated temporal convolutional network includes:

[0023] The temporal convolutional encoder is used to perform dilated causal convolution and gated linear unit processing on the historical demand sequence of each store node to generate a temporal hidden state vector.

[0024] A graph attention propagation encoder is used to execute a graph attention mechanism on the event-affected edge. The graph attention mechanism uses the attenuation coefficient parameter corresponding to the current external event type to perform exponential attenuation modulation on the weight of the event-affected edge when calculating the attention coefficient between nodes. The modulation result and the impact amplitude parameter corresponding to the current external event type are used together to perform attention aggregation, generate the spatial latent state vector of event perception, and output the attention weight.

[0025] The multi-task output layer is used to concatenate the temporal hidden state vector and the spatial hidden state vector, obtain the demand probability distribution through the quantile prediction head, and generate the spatiotemporal influence decay matrix based on the attention weight and the decay coefficient parameter through the spatiotemporal influence matrix generation head.

[0026] Preferably, in the distributed inventory collaborative decision-making module, the adversarial training method between the policy network and the dual network includes:

[0027] The adversarial training unit is used to jointly optimize the policy network and the dual network based on a loss function, which is: ,in, For the parameters of the policy network, For the parameters of the dual network, Let be the state vector for the t-th replenishment decision step. For policy networks Replenishment action vector generated based on state vector Total operating costs The demand probability distribution is... For Centered on a preset uncertain radius parameter Wasserstein's indeterminate sphere of radius , Let be the worst-case demand perturbation vector found by the dual network within the Wasserstein uncertainty sphere. Let be the state vector for the (t+1)th replenishment decision step. In order to be in The out-of-stock penalty cost is λ, which is a preset robustness adjustment coefficient.

[0028] Preferably, in the distributed inventory collaborative decision-making module, the strategy network includes:

[0029] The encoder is used to take the current inventory state vector obtained from the inventory data as input, and perform neighborhood aggregation on the inventory state of warehouse nodes and store nodes by utilizing the connection relationship between warehouse nodes and store nodes defined by the physical supply edge in the heterogeneous time-series graph. The aggregated node features are concatenated with the mean of the demand probability distribution, and the state embedding vector is extracted through a fully connected layer.

[0030] The decoder is used to generate, through parallel output heads, the replenishment quantity of each product from each store to its regional warehouse, and the purchase quantity of each product from each regional warehouse to upstream suppliers, taking the state embedding vector as input.

[0031] The allocation generation unit is used to identify the transmission path of demand shocks between store nodes based on the spatiotemporal impact attenuation matrix, and generate cross-store inventory allocation volume.

[0032] The instruction generation unit is used to combine the replenishment volume of each product from each store to its regional warehouse, the purchase volume of each product from each regional warehouse to upstream suppliers, and the cross-store inventory transfer volume into multi-level collaborative replenishment instructions.

[0033] Preferably, the causal decoupling adaptive calibration module includes:

[0034] The parameter partitioning unit is used to input the actual demand data, sales data and inventory data within the preset observation window into the preset scene encoder to obtain scene-specific factor vectors. The scene-specific factor vectors constitute scene-specific factors. The scene-specific factor vectors are configured to adjust the scaling and translation parameters of the batch normalization layer in the graph-gated temporal convolutional network, the policy network and the dual network.

[0035] The scene-invariant kernel includes the kernel weights of the dilated causal convolutional layer and the weight matrix of the gated linear unit in the graph-gated temporal convolutional network, the linear transformation matrix in the graph attention propagation encoder, the graph convolutional layer weights and fully connected layer weights of the encoder in the policy network, and the weight matrix of each fully connected layer in the dual network.

[0036] The noise component is fixed by the graph-gated temporal convolutional network, the policy network, and the random deactivation layer in the dual network.

[0037] Preferably, the causal decoupling adaptive calibration module further includes:

[0038] The drift detection unit is used to calculate the absolute percentage error between the preset quantile prediction value in the demand probability distribution and the actual demand data after each replenishment decision step is completed, and maintain an error sliding window of preset length. When the weighted average absolute percentage error for a consecutive preset number of days exceeds the historical mean plus twice the standard deviation calculated based on the error sequence of the past preset number of days, it is determined that concept drift is triggered.

[0039] An adaptation execution unit is used to freeze the scene-invariant kernel after triggering concept drift, recalculate the scene-specific factors using the residual sequence and the actual demand data, and fine-tune the weights of the multi-task output layer of the graph-gated temporal convolutional network, the weights of the fully connected layers of each output head in the policy network decoder, and the weights of the fully connected layers of the output layer of the dual network.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] This invention constructs a heterogeneous temporal graph containing event-affected edges through a heterogeneous temporal graph construction and impulse knowledge base module, and builds an impulse response knowledge base storing demand impulse templates of different external event types. Through the graph-gated temporal convolutional network built into the multidimensional demand impulse response perception module, the spatiotemporal impact attenuation matrix is ​​output, which quantifies the transmission intensity and delay of external event shocks between supply chain nodes, enabling multi-level inventory systems to perceive the spatial diffusion path of demand fluctuations in advance and improving collaborative perception capabilities.

[0042] This invention uses the strategy network built into the split-bar inventory collaborative decision-making module to conduct adversarial training with the dual network. The dual network searches for the worst demand disturbance within the uncertainty set of the demand distribution defined by the demand probability distribution and the preset uncertainty radius parameter. After adversarial training, the strategy network generates multi-level collaborative replenishment instructions based on the demand probability distribution and the spatiotemporal influence decay matrix, so that the replenishment scheme inherently possesses split-bar properties and maintains the collaborative stability of multi-level inventory under the condition of demand uncertainty.

[0043] This invention uses a causal decoupling adaptive calibration module to divide the learnable parameters in the graph-gated temporal convolutional network, policy network, and dual network into scene-invariant kernels, scene-specific factors, and noise components corresponding to randomly deactivated layers. When the prediction error exceeds the threshold, the scene-invariant kernel is frozen, the scene-specific factors are recalculated using the residual sequence, and the output layer weights are fine-tuned. This achieves lightweight scene adaptation without full retraining and ensures the long-term effectiveness of the multi-level collaborative optimization strategy after scene changes. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the module flow of the present invention. Detailed Implementation

[0045] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0046] Please see Figure 1 This invention is a deep learning-based retail supply chain collaborative optimization system, comprising the following modules:

[0047] The module for constructing heterogeneous temporal graphs and impulse knowledge bases is used to acquire sales data, inventory data, external event data, actual demand data, as well as basic data of stores, products, and warehouses in the retail supply chain. It constructs a heterogeneous temporal graph containing store nodes, product nodes, warehouse nodes, physical supply edges, and event-affected edges, and builds an impulse response knowledge base.

[0048] The multidimensional demand impulse response sensing module has a built-in graph-gated temporal convolutional network. Based on the heterogeneous temporal graph and the impulse response knowledge base, the graph-gated temporal convolutional network processes the data to obtain the demand probability distribution and spatiotemporal influence attenuation matrix for a preset future time period. By comparing the demand probability distribution with the actual demand data, a residual sequence is generated.

[0049] The Bulubang inventory collaborative decision-making module has a built-in strategy network and dual network. The dual network is used to search for the worst demand disturbance in the uncertainty set of the demand distribution defined by the demand probability distribution and the preset uncertainty radius parameter in order to conduct adversarial training on the strategy network. After adversarial training, the strategy network generates multi-level collaborative replenishment instructions based on the demand probability distribution and the spatiotemporal influence decay matrix.

[0050] The causal decoupling adaptive calibration module is used to divide the learnable parameters in the graph-gated temporal convolutional network, the policy network, and the dual network into scene-invariant kernels, scene-specific factors, and noise components corresponding to random deactivation layers. When the prediction error of the demand probability distribution exceeds a preset prediction error statistical threshold, the scene-invariant kernel is frozen, the scene-specific factors are recalculated using the residual sequence, and the output layer weights of the graph-gated temporal convolutional network, the policy network, and the dual network are fine-tuned to reconfigure the scene-specific factors and output layer weights in the graph-gated temporal convolutional network, the policy network, and the dual network.

[0051] Specifically, firstly, through the heterogeneous temporal graph construction and impulse knowledge base module, sales data, inventory data, external event data, actual demand data, as well as basic store data, basic product data, and basic warehouse data are obtained daily from the retail enterprise's sales point system, warehouse management system, customer relationship management system, and third-party data interfaces. Using this data, a heterogeneous temporal graph containing store nodes, product nodes, warehouse nodes, physical supply edges, and event impact edges is constructed. At the same time, an impulse response knowledge base storing demand impulse templates corresponding to different external event types is constructed. Then, the multidimensional demand impulse response perception module has a built-in graph-gated temporal convolutional network. Taking heterogeneous temporal graphs and impulse response knowledge bases as input, it sequentially passes through a temporal convolutional encoder to perform dilated causal convolution and gated linear unit processing on the historical demand sequences of each store. A graph attention propagation encoder executes a graph attention mechanism that integrates impulse template parameters on the event influence edges. The multi-task output layer concatenates the temporal hidden state and the spatial hidden state and processes them in parallel through a quantile prediction head and a spatiotemporal influence matrix generation head to obtain the demand probability distribution and spatiotemporal influence decay matrix for the preset future time period. The residual sequence is generated by comparing the demand probability distribution with the actual demand data. Next, the Brumb inventory collaborative decision-making module incorporates a strategy network and a dual network. The dual network searches for the worst-case demand disturbance within the uncertainty set of the demand distribution defined by the demand probability distribution and a preset uncertainty radius parameter. The strategy network then undergoes adversarial training based on this worst-case disturbance. After training, the strategy network takes the current inventory state vector, the demand probability distribution, and the spatiotemporal impact decay matrix as input. The encoder performs neighborhood aggregation and feature fusion to extract the state embedding vector, which is then output by the decoder in parallel to generate the replenishment quantity for each store and the procurement quantity for each regional warehouse. Simultaneously, the allocation generation unit identifies the demand shock transmission path based on the spatiotemporal impact decay matrix and generates cross-store inventory allocation quantities. Finally, the instruction generation unit combines these into multi-level collaborative replenishment instructions for execution. Finally, the causal decoupling adaptive calibration module divides the learnable parameters in the graph-gated temporal convolutional network, policy network, and dual network into scene-invariant kernels, scene-specific factors, and noise components corresponding to random deactivation layers. When the prediction error of the demand probability distribution exceeds the preset prediction error statistical threshold, the scene-invariant kernel is frozen, the scene-specific factors are recalculated using the residual sequence, and the output layer weights of the three networks are fine-tuned to reconfigure the scene-specific factors and output layer weights in the three networks, thus completing the adaptive calibration of the system under the new scene.

[0052] In one embodiment of the present invention, the heterogeneous temporal graph construction and pulse knowledge base module includes:

[0053] The node construction unit is used to build store nodes, product nodes, and warehouse nodes. Store nodes are built based on the store's geographical location, sales area, and business type in the basic store data, as well as the average daily customer traffic and category sales ratio in the sales data. Product nodes are built based on the product's category, brand, specifications, shelf life in the basic product data, as well as historical sales statistics in the sales data. Warehouse nodes are built based on the warehouse's storage capacity limit, service store list, and standard replenishment lead time in the basic warehouse data.

[0054] The physical supply edge construction unit is used to establish physical supply edges between warehouse nodes and store nodes based on the actual replenishment connection relationship between warehouses and stores in the warehouse basic data. The edge attributes include fixed replenishment lead time and minimum order quantity constraints.

[0055] The event impact edge construction unit is used to calculate the straight-line distance between two store nodes and the overlap of the product categories they operate. When the straight-line distance is lower than a preset distance threshold and the product category overlap is higher than a preset overlap threshold, an event impact edge is established between the two store nodes, and the weight of the event impact edge is calculated by the reciprocal of the straight-line distance and the Gaussian decay function.

[0056] Specifically, data is retrieved daily from various business information systems of the retail enterprise. Sales data comes from the enterprise's point-of-sale (POS) system. Each day, all transaction records from the previous day are extracted from the POS system's transaction details table via a data interface. Each transaction record includes a store identifier, product identifier, sales date, sales quantity, sales amount, and transaction timestamp. Inventory data comes from the enterprise's warehouse management system (WMS). Each day, after store operations close and warehouse operations are completed, the WMS system automatically generates inventory snapshots for each store and warehouse. These inventory snapshot records are retrieved via a data interface. Each inventory snapshot record includes a node identifier (store identifier or warehouse identifier), node type (store or warehouse), product identifier, snapshot date, beginning inventory, ending inventory, in-transit inventory, and locked inventory. The beginning inventory is the quantity of goods actually held by the store or warehouse at the start of the day; the ending inventory is the quantity of goods actually held by the store or warehouse at the end of the day; the in-transit inventory is the quantity of goods shipped from upstream but not yet arrived at the node; and the locked inventory is the quantity of goods reserved for downstream orders but not yet shipped. External event data comes from the enterprise customer relationship management system (the promotion plan module in the CRM system) and weather data interfaces provided by third-party weather data service providers, as well as public holiday calendar data. Promotional event data includes the promotional activity identifier, promotion type (e.g., member day discount, spending-based discount, brand day sale, clearance sale), discount percentage, list of participating product identifiers, list of participating store identifiers, start date, and end date for each promotion. Weather event data includes the warning event identifier, warning type (e.g., rainstorm warning, snowstorm warning, high temperature warning, low temperature warning), warning level (indicated by color, e.g., blue, yellow, orange, red), affected area (indicated by administrative division or geofence), warning start time, and warning end time for each weather warning. Holiday data records the date and name of each holiday.

[0057] Actual demand data comes from transaction data recorded by the point-of-sale system and needs to be corrected for stockout distortion. When a certain product in a store is out of stock on a certain day, the sales quantity recorded by the POS system may be lower than the actual demand from customers, because some customers abandon their purchase or switch to other products due to stockouts, and this demand is not reflected in the transaction records. The stockout period percentage method is used to correct the sales data for stockout days, obtaining the beginning inventory of the product in the store on that day, as well as the hourly sales quantity and number of transactions for that product. When the cumulative sales volume at the end of a certain hour reaches the beginning inventory, it is determined that a stockout state has begun from that hour. The proportion of the number of hours the stockout state lasts to the total number of operating hours on that day is the stockout period percentage. Then the estimated actual demand for the commodity on that day is equal to the sales quantity multiplied by the correction factor 1 + .

[0058] The basic store data comes from the store master data table of the enterprise store management system; each store master data record includes store identifier, store name, geographical location longitude and latitude coordinates, operating area (in square meters), and business type (e.g., community convenience store, hypermarket, forward warehouse, department store). The basic product data comes from the product master data table of the enterprise product management system; each product master data record includes product identifier, product name, category, brand, specifications, and shelf life (in days). The basic warehouse data comes from the warehouse master data table of the enterprise warehouse management system; each warehouse master data record includes: warehouse identifier, warehouse name, maximum storage capacity (in cubic meters), a list of service store identifiers, and the standard replenishment lead time for each service store (in days).

[0059] Iterate through each store master data record in the store's basic data, creating a store node for each record. The store identifier, geographical location (longitude and latitude coordinates), sales area, and business type fields of the store node are all directly taken from the relevant data in the store master data record. Average daily customer traffic. ,in This represents the number of transactions for store i on day d. If a store's actual operating days within the 30-day statistical window are less than 30 (e.g., a newly opened store), the actual operating days are used as the denominator. This also represents the sales percentage of category k. ,in, Let $i$ be the cumulative sales amount of category $k$ in store $i$ over 30 days, and $k$ be the total sales amount of the store over 30 days. The sum of the sales percentages of all product categories equals 1.

[0060] Iterate through each product master data record in the product basic data table, creating a product node for each record. The product identifier, category, brand, specifications, and shelf life fields of the product node are directly taken from the relevant data in the product master data record. Filter the sales data to obtain the total sales records of all stores for the product with identifier j over the past 90 days, summarize the daily sales volume, and then calculate the average daily sales volume. ,in, The total sales volume of product j over 90 days; the coefficient of variation is calculated. ,in The standard deviation of daily sales over 90 days is used; for new products launched less than 90 days ago, the average daily sales volume is taken as the arithmetic mean of the average daily sales volume of all products in the same category as the default value for cold start, and the coefficient of variation is taken as the median of the coefficients of variation of all products in the same category as the default value for cold start.

[0061] Iterate through each warehouse master data record in the warehouse basic data table and create a warehouse node for each record. The warehouse identifier field, warehouse capacity limit field, service store list field, and standard replenishment lead time field of the warehouse node are all directly taken from the relevant data in the warehouse master data record.

[0062] Iterate through the service store identifier list field of each warehouse master data record in the warehouse basic data table. For each store identifier, create a physical supply edge between the corresponding warehouse node and store node. The direction of the edge is set from the warehouse node to the store node, indicating the replenishment flow of goods. Each physical supply edge includes a fixed replenishment lead time parameter and a minimum order quantity constraint parameter. The value of the fixed replenishment lead time parameter is taken from the standard replenishment lead time field of that warehouse for that store in the warehouse basic data record. This value represents the number of days elapsed from when the store submits a replenishment request to when the goods are delivered to the store. The value of the minimum order quantity constraint parameter is taken from the enterprise's procurement policy configuration table, which presets the minimum order quantity for each product category.

[0063] For all store nodes, pair them up. Iterate through each pair and determine if they meet the two conditions for establishing an event-affected edge. The first condition is the straight-line distance condition. Read the longitude and latitude coordinates of the two store nodes and calculate the straight-line distance between them. The store node with the store identifier "u" has the following longitude and latitude coordinates: The latitude and longitude of the store node identified by the store identifier 'v' are: straight-line distance The calculation method involves converting the difference in latitude and longitude into kilometers; when the calculated value is... The first condition is met when the distance is below a preset threshold; the distance threshold is 5 kilometers, and this value is adjusted according to the actual density of the enterprise's store network during system deployment. The second condition is the category overlap condition, which extracts the category set of each store node that has sales records in the past 30 days, thus obtaining the category set of store node u. The product category set of store node v Product category overlap ;when The second condition is met when the overlap exceeds a preset threshold; the overlap threshold is 0.7. An event-affected edge is created between the two store nodes u and v only if both conditions are met simultaneously, and the weight of that edge is calculated. ,in The standard deviation parameter is set to one-third of the distance threshold; when the distance threshold is 5 kilometers, Approximately 1.67 kilometers.

[0064] A heterogeneous temporal graph is constructed, consisting of a node set and an edge set. The node set contains all store nodes, product nodes, and warehouse nodes, with each node uniquely indexed by its node identifier. The edge set contains all physical supply edges and event-affected edges, with each edge uniquely indexed by a tuple of its start and end node identifiers. The attributes of physical supply edges—replenishment lead time and minimum order quantity constraints—are fixed and stored along with the edge. The weight values ​​of event-affected edges are also stored along with the edge. The overall graph structure is rebuilt monthly. Between two overall rebuilds, the average daily customer traffic and category sales share of store nodes are incrementally updated daily based on the latest sales data, while the average daily sales volume and coefficient of variation of product nodes are recalculated weekly based on the latest sales data. The topology of physical supply edges and event-affected edges remains unchanged.

[0065] In one embodiment of the present invention, the impulse response knowledge base in the heterogeneous temporal graph construction and impulse knowledge base module includes:

[0066] The template construction unit is used to determine different external event types based on the external event data, and to construct a demand pulse template for each external event type, consisting of an impact amplitude parameter and an attenuation coefficient parameter; wherein, the impact amplitude parameter is the maximum increase multiple of the daily average demand for the corresponding external event type per unit time, and the attenuation coefficient parameter is the rate constant of the attenuation of the impact intensity of the corresponding external event type over time.

[0067] The template parameter acquisition unit is used to acquire the actual demand data in the historical event window corresponding to each type of external event within a preset time period; and uses a matrix factorization algorithm with non-negative constraints and sparse induced regularization terms to decompose the impact amplitude parameter and attenuation coefficient parameter from the actual demand data in the historical event window.

[0068] Specifically, different external event types are extracted and categorized from external event data, which includes promotional event data, weather event data, and holiday data. For promotional event data, the promotional type field is obtained, and promotional activities of the same type are grouped together. Promotional types include member day discounts, spending-based reduction activities, brand day special sales, and clearance sales; each promotional type is an independent external event type. For weather event data, the warning type field is obtained, and weather warnings of the same type are grouped together. Warning types include rainstorm warnings, blizzard warnings, high temperature warnings, and low temperature warnings; each warning type is an independent external event type. For holiday data, each statutory holiday is treated as a separate external event type, with the holiday name serving as the identifier for that external event type. If a new event type other than the preset types appears in the external event data, a new type identifier is automatically created for the new event type, and it is included in the management scope of the impulse response knowledge base.

[0069] For each identified external event type, a demand impulse template is constructed, consisting of an impact magnitude parameter and a decay coefficient parameter. The impact magnitude parameter is a scalar value representing the maximum increase in average daily demand per unit time caused by that external event type; a magnitude of 1.5 indicates that the event can increase the affected average daily demand by up to 1.5 times the normal level; a magnitude of 1.0 indicates that the event has no demand-boosting effect. The decay coefficient parameter... Let be the rate constant of the impact intensity of this type of external event decaying over time, a scalar value; the function shape of the impact intensity decaying over time follows an exponential decay law, that is, the impact intensity decreases by on the th time after the event occurs. The value of 'day' is the impact amplitude parameter multiplied by the attenuation factor. ,in This represents the number of days elapsed since the event occurred.

[0070] Define a historical event window for each external event type. For each external event type, retrieve all historical instances of that type of event within a preset time period from the external event data. The preset time period is 24 months. For each historical event instance, a historical event window is formed by taking the actual demand data from 14 days prior and 21 days forward, based on the event occurrence date. The actual demand data for each day within the window is organized into a demand matrix according to store and product dimensions.

[0071] After collecting the demand matrices for all historical event windows, a matrix factorization algorithm with non-negativity constraints and sparse induced regularization terms is used to decompose the impact magnitude parameter and decay coefficient parameter for each external event type. Matrix factorization splits the demand matrix for each historical event window into a sum of three terms: the first term is the baseline demand, which is the average daily demand for each product in each store under normal circumstances; the second term is the event impact effect, which is the impact magnitude parameter multiplied by an exponential decay factor. The third item is random noise.

[0072] The objective function of matrix factorization consists of a reconstruction error term and a sparse regularization term. The reconstruction error term is the sum of squared differences between the actual demand data within all historical event windows and the sum of the above three terms. The sparse regularization term is the impact amplitude parameter multiplied by a preset sparse penalty coefficient, which automatically tends towards zero for event types with no significant impact effect. A typical value for the preset sparse penalty coefficient is 0.1, and this value can be optimally selected from the set {0.01, 0.05, 0.1, 0.5, 1.0} based on the verification error of the historical verification set. Non-negativity constraints are applied to both the impact amplitude parameter and the attenuation coefficient parameter to ensure that they are not negative. The solution process employs an alternating minimization method. The first step, with the current value of the attenuation coefficient parameter fixed, solves for the optimal value of the impact amplitude parameter. This subproblem, under non-negativity constraints, is a linear least squares problem with a regularization term, solved using the effective set algorithm. The second step, with the current value of the impact amplitude parameter fixed, solves for the optimal value of the attenuation coefficient parameter. This subproblem is a one-dimensional nonlinear search problem, solved using the golden section search algorithm. These two steps are iterated alternately until the relative change in the objective function falls below a preset convergence threshold, which is set to 10. -4 .

[0073] For external event types with too few historical instances within a preset time period (such as newly established promotional types or rare extreme weather types), business personnel manually set the initial values ​​of the impact amplitude parameter and attenuation coefficient parameter based on experience; after accumulating enough historical event samples, the parameter relearning process is automatically triggered.

[0074] After learning the impulse template parameters for all external event types, the impulse response knowledge base is complete. The knowledge base is stored in the system data layer as a structured data table. Each row corresponds to an external event type, including the external event type identifier, impact amplitude parameter value, attenuation coefficient parameter value, and last update time. The knowledge base is updated quarterly. At each quarterly update node, all newly added event instances from the previous quarter are collected, added to the historical event window set, and the matrix factorization algorithm is re-executed to output the updated impact amplitude and attenuation coefficient parameters. To ensure the smoothness of parameter updates, the old and new parameters are smoothed using an exponential moving average. The old parameter value is... The newly learned parameter value is The smoothing coefficient is The updated parameter value is , The value is 0.3.

[0075] In one embodiment of the present invention, the graph-gated temporal convolutional network in the multidimensional demand impulse response sensing module includes:

[0076] The temporal convolutional encoder is used to perform dilated causal convolution and gated linear unit processing on the historical demand sequence of each store node to generate a temporal hidden state vector.

[0077] A graph attention propagation encoder is used to execute a graph attention mechanism on the event-affected edge. The graph attention mechanism uses the attenuation coefficient parameter corresponding to the current external event type to perform exponential attenuation modulation on the weight of the event-affected edge when calculating the attention coefficient between nodes. The modulation result and the impact amplitude parameter corresponding to the current external event type are used together to perform attention aggregation, generate the spatial latent state vector of event perception, and output the attention weight.

[0078] The multi-task output layer is used to concatenate the temporal hidden state vector and the spatial hidden state vector, obtain the demand probability distribution through the quantile prediction head, and generate the spatiotemporal influence decay matrix based on the attention weight and the decay coefficient parameter through the spatiotemporal influence matrix generation head.

[0079] Specifically, the temporal convolutional encoder takes the historical demand sequence of each store node as input and outputs the temporal hidden state vector of each store node. For each store node, a fixed-length time window is extracted with the current date as the cutoff point to extract the total sales quantity of each product of the store each day, forming the historical demand sequence of the store; the fixed length of the time window is set to the past 90 days. If the store has been open for less than 90 days, the actual number of days it has been open is used as the window length.

[0080] The historical demand sequence for each store first passes through an embedding layer, mapping the daily scalar demand value to a dense vector of fixed dimensions (64-dimensional). The embedded vector sequence is then input into stacked dilated causal convolutional layers; four layers of these layers are stacked, with dilation factors of 1, 2, 4, and 8, respectively, exponentially increasing the receptive field without increasing the number of parameters. Causal convolution ensures that the output at the current time depends only on the input at the current time and previous times; each convolutional kernel has a size of 3, and the number of kernels is 64. Each dilated causal convolution is followed by a gated linear unit (LLU) as the activation function. The LLU divides the convolution output into two parts along the channel dimension. The first part, after linear transformation, is multiplied element-wise with the second part, after a sigmoid function transformation. This gating mechanism allows the network to adaptively retain or forget historical information. After processing by four layers of dilated causal convolutions and LLUs, the historical demand sequence for each store node is encoded into a fixed-dimensional temporal latent state vector of 64 dimensions. The graph attention propagation encoder takes the temporal hidden state vectors of each store node, event-influenced edges, and an impulse response knowledge base as input, and outputs the event-aware spatial hidden state vectors of each store node, along with attention weights. The encoder executes a multi-layer graph attention mechanism on the event-influenced edges, with two stacked graph attention layers, enabling each store node to perceive the transmission of demand impulses within its second-order neighborhood. In each graph attention layer, for each event-influenced edge connecting two store nodes u and v, the encoder calculates the attention coefficients between the nodes; the temporal hidden state vectors of u and v are respectively... and The impulse response knowledge base retrieves the impulse amplitude and attenuation coefficient parameters corresponding to the external event types effective on the current date. If multiple external event types are effective simultaneously on the current date, the parameters for each event type are retrieved separately, and subsequent processing is performed according to event type. If no external event is effective on the current date, the attenuation modulation and impulse amplitude weighting steps are skipped, and the attention coefficient is calculated entirely based on the similarity of the temporal hidden state vectors. The weights of the event-affected edges are exponentially attenuated using the attenuation coefficient parameters. The original weights of the event-affected edges are... Then the modulated edge weights The modulated edge weights and the impact amplitude parameter are applied together to attention aggregation; the impact amplitude parameter for the current external event type is... The temporal latent state vectors of store nodes u and v are mapped to query vectors through learnable linear transformation matrices. and key vector Then the attention coefficient of v on u , where a is the learnable attention parameter vector, For vector concatenation operations, LeakyReLU is the activation function with a negative slope of 0.2; Softmax normalization is performed on all nodes adjacent to u to obtain normalized attention coefficients. The value vectors of neighboring nodes are then weighted and aggregated based on these normalized attention coefficients. The temporal hidden state vector of v is mapped to a value vector via another learnable linear transformation matrix. Then the spatial hidden state vector of u after aggregation It equals the attention-weighted sum of the value vectors of all neighboring nodes; for cases where no event takes effect, =1, = Two graph attention layers are stacked sequentially. The first layer takes the temporal hidden state vector as input and outputs the intermediate spatial hidden state vector. The second layer takes the intermediate spatial hidden state vector as input and outputs the final event-aware spatial hidden state vector, which has the same 64-dimensional dimension as the temporal hidden state vector. The graph attention propagation encoder calculates the attention coefficients generated in each graph attention layer, which are then normalized by Softmax and output as attention weights. The dimension of the attention weights is equal to the number of edges affected by the event multiplied by the number of graph attention layers.

[0081] The multi-task output layer concatenates the temporal hidden state vector of each store node with the event-aware spatial hidden state vector along the channel dimension, resulting in a 128-dimensional vector. In the demand probability distribution prediction task, this concatenated vector is input into the quantile prediction head. The quantile prediction head consists of two fully connected layers. The first fully connected layer contains 128 neurons with the ReLU activation function; the second fully connected layer is the output layer, outputting multiple preset quantile predictions for the store's demand for each product within a preset future time period. The preset quantiles are 10%, 50%, and 90%, representing pessimistic demand scenarios, normal demand scenarios, and optimistic demand scenarios, respectively. The preset future time period is the next 7 days. Therefore, the quantile prediction head outputs three quantile values ​​for each product per store per day. These quantile values ​​collectively constitute the demand probability distribution, which is a three-dimensional tensor with dimensions of the number of stores, the number of products, and the number of prediction days. Each element stores the predicted values ​​for the three quantiles.

[0082] In the task of generating the spatiotemporal influence decay matrix, the concatenated vector is input into the spatiotemporal influence matrix generation head. The generation head calculates the spatiotemporal influence decay matrix based on the attention weights output by the graph attention propagation encoder, combined with the decay coefficient parameters for each external event type. For each external event type, the generation head takes the attention weights output by the second layer of the graph attention propagation encoder, expands them by source store, target store, and future date, and multiplies them by the decay factor for that event type. ,in Take the values ​​from day 1 to day 7 in the future to generate a three-dimensional sub-matrix corresponding to this event type. The sub-matrices of all event types are superimposed to form a complete spatiotemporal impact decay matrix. Each element in the matrix represents the estimated increase in demand at the target store on day τ when the source store experiences a single unit demand shock.

[0083] After outputting the demand probability distribution, the 50th percentile predicted value is taken as the point prediction value. The following day, after obtaining the actual demand data, the difference between the point prediction value and the actual demand data is calculated for each store and each product; this difference is the residual. The residuals of all stores and products are arranged by date to form a residual sequence.

[0084] In one embodiment of the present invention, the adversarial training method between the policy network and the dual network in the distributed inventory collaborative decision-making module includes:

[0085] The adversarial training unit is used to jointly optimize the policy network and the dual network based on a loss function, which is: ,in, For the parameters of the policy network, For the parameters of the dual network, Let be the state vector for the t-th replenishment decision step. For policy networks Replenishment action vector generated based on state vector Total operating costs The demand probability distribution is... For Centered on a preset uncertain radius parameter Wasserstein's indeterminate sphere of radius , Let be the worst-case demand perturbation vector found by the dual network within the Wasserstein uncertainty sphere. Let be the state vector for the (t+1)th replenishment decision step. In order to be in The out-of-stock penalty cost is λ, which is a preset robustness adjustment coefficient.

[0086] Specifically, adversarial training is conducted in a simulation environment built upon historical sales data, historical inventory data, and historical external event data. This environment simulates the multi-level dynamic evolution of inventory in regional warehouses and their subordinate stores. Training data is extracted from the system data layer, covering the past 36 months; the extracted data is arranged in chronological order, forming a continuous time series. The simulation environment maintains a state vector. , where t is the index of the replenishment decision step. The time interval for the replenishment decision step is one day, consistent with the daily scheduled replenishment decision cycle. This includes the current inventory levels of each product in each store, the current inventory levels of each product in each warehouse, the expected in-transit inventory levels of each product in each store within the replenishment lead time, the demand probability distribution, and a list of external event type identifiers effective on the current date. During simulation environment initialization, the start date of the training data is set as the first replenishment decision step, and the initial inventory level on that date is used as the initial inventory state.

[0087] The policy network employs an encoder-decoder architecture; its learnable parameters θ include the weight matrices and bias vectors of the convolutional layers and fully connected layers in the encoder, as well as the weight matrices and bias vectors of the fully connected layers at each output head in the decoder. The input is a state vector. The output is a replenishment action vector. Its components include the replenishment volume of each product from each store to its respective regional warehouse, as well as the purchase volume of each product from each regional warehouse to upstream suppliers.

[0088] The dual network employs a fully connected network structure, consisting of three stacked fully connected layers, each containing 128 neurons and using ReLU activation. Each fully connected layer is followed by a spectral normalization layer, which constrains the spectral norm of the weight matrix to 1, ensuring that the dual network, as a whole function, satisfies the 1-Lipschitz continuity condition. The input to the dual network is the current state vector. The vector is concatenated with the demand probability distribution; the mean vector of the demand probability distribution is formed by taking the 50th quantile prediction value and participating in the concatenation; the output is a perturbation vector with the same dimension as the demand mean vector. , Each component in the interval is clipped to the range. Inside, among which The pre-defined uncertain radius parameter is used. The learnable parameter ψ of the dual network is the weight matrix and bias vector of all its fully connected layers. The worst-case demand perturbation vector is also included. ,in Demand probability distribution The mean vector. The value is set to 0.2. This value is selected from the candidate set {0.1, 0.15, 0.2, 0.25, 0.3} through grid search, with the lowest total operating cost being the final value. The search range is based on statistical analysis of historical demand forecasting errors. The 36 months of data are divided into training and validation periods. The baseline demand forecasting model is trained during the training period, and the standardized forecasting error (predicted value minus actual value divided by actual value) for each product in each store is calculated during the validation period. Its 90th percentile is approximately 0.18. Setting the default value to 0.2 ensures that the Wasserstein uncertainty sphere covers approximately 90% of historical forecasting error scenarios.

[0089] Adversarial training jointly optimizes the policy network and dual network based on a loss function, in which the simulation environment executes the replenishment action vector. Then, calculate the total operating cost per step. Among them, inventory holding costs This is calculated by multiplying the ending inventory of each product in each store by the unit holding cost factor for that product, and then summing the results. The unit holding cost factor is preset according to the product category; for example, the unit holding cost factor for carbonated beverages is 0.05 yuan per unit per day. (Stockout penalty cost) This is calculated by multiplying the stockout quantity of each product in each store by the unit stockout penalty coefficient for that product, and then summing the results. The unit stockout penalty coefficient is preset according to the product category and is taken as five times the unit holding cost coefficient of that product. For example, the unit stockout penalty coefficient for carbonated beverages is 0.25 yuan per unit per day. (Transfer and transportation costs are also included.) The product replenishment quantity for each store is multiplied by the unit transportation cost coefficient from the warehouse to the store and then summed. The unit transportation cost coefficient is preset based on the distance between the warehouse and the store, with a typical value of 0.01 yuan per item per kilometer.

[0090] This represents the expectation of the state-action pairs generated by the interaction between the policy network and the simulation environment. In actual training, each training epoch contains 30 replenishment decision steps, and this expectation is approximated by the sample mean of these 30 steps. Since each replenishment decision step outputs only one definite vector, the expected value is... That is, it degenerates into the calculated value of the stockout cost under this defined vector, without involving random sampling.

[0091] Supremum operation This indicates the search within the Wasserstein indeterminate sphere. Maximize demand disturbance. It is also the difference between the expected shortage cost under the worst-case perturbation and the expected shortage cost under the original distribution sampling. During training, this upper bound is approximated by the gradient ascent of the dual network, with ψ updated along the gradient direction that maximizes this difference, thereby learning to generate a higher level of amplification of shortage costs. .

[0092] From The demand sampling vector is obtained by random sampling; the sampling method is to independently sample each product from each store. One random sample is taken from the distribution characterized by the given 10%, 50%, and 90% quantile values. Expected result: During training, each step approximates the true expectation through this sampling. Since there are 30 steps per round, and the entire training process involves thousands of rounds, the large number of single-step samplings can effectively estimate the true expectation.

[0093] Let t be the state vector for the (t+1)th replenishment decision step; the state transition follows the inventory dynamic equation, and the ending inventory of each product in each store is equal to the beginning inventory plus the amount of goods received in this step minus the actual demand in this step. If the ending inventory is less than the actual demand, the excess is counted as a stockout. The calculation method and same.

[0094] The robustness adjustment coefficient λ is set to 0.5, which makes the weight ratio of the expected operating cost term to the Wasserstein robust regularization term in the loss function 2:1.

[0095] Adversarial training is conducted round-based in the simulation environment. Each training round randomly samples a continuous date interval from the training data; the interval length is the preset round length, typically 30 replenishment decision steps. Within a round, state transitions and parameter updates are performed step-by-step according to the calculation logic defined by the loss function. Both the policy network parameters θ and the dual network parameters ψ utilize the Adam optimizer, and the learning rate of the policy network is [missing information]. The learning rate of the dual network is The training is preset to run for 5000 rounds. If the relative decrease in total loss is less than 100 consecutive rounds... If so, it will be terminated early.

[0096] In one embodiment of the present invention, the strategy network in the distributed inventory collaborative decision-making module includes:

[0097] The encoder is used to take the current inventory state vector obtained from the inventory data as input, and perform neighborhood aggregation on the inventory state of warehouse nodes and store nodes by utilizing the connection relationship between warehouse nodes and store nodes defined by the physical supply edge in the heterogeneous time-series graph. The aggregated node features are concatenated with the mean of the demand probability distribution, and the state embedding vector is extracted through a fully connected layer.

[0098] The decoder is used to generate, through parallel output heads, the replenishment quantity of each product from each store to its regional warehouse, and the purchase quantity of each product from each regional warehouse to upstream suppliers, taking the state embedding vector as input.

[0099] The allocation generation unit is used to identify the transmission path of demand shocks between store nodes based on the spatiotemporal impact attenuation matrix, and generate cross-store inventory allocation volume.

[0100] The instruction generation unit is used to combine the replenishment volume of each product from each store to its regional warehouse, the purchase volume of each product from each regional warehouse to upstream suppliers, and the cross-store inventory transfer volume into multi-level collaborative replenishment instructions.

[0101] Specifically, the policy network consists of an encoder, a decoder, a transfer generation unit, and an instruction generation unit in sequence. Each unit uses the parameters saved during the training phase for forward inference and does not involve parameter updates.

[0102] The encoder's input is the current inventory state vector. The encoder utilizes the connections between warehouse nodes and store nodes defined by physical supply edges to perform neighborhood aggregation on the inventory status of warehouse and store nodes. Specifically, for each store node, the encoder finds its corresponding regional warehouse node through the physical supply edge and concatenates the inventory vectors of the store node and its corresponding warehouse node into a neighborhood feature vector. Product nodes without physical supply edge connections do not participate in the aggregation operation. After neighborhood aggregation, the encoder concatenates the aggregated node features with the mean of the demand probability distribution. The demand probability distribution structure is a three-dimensional tensor with dimensions of the number of stores, the number of products, and the number of predicted days. Here, the 50th percentile predicted value for each of the next 7 days is taken, expanded into a one-dimensional mean vector along the store and product dimensions, and then concatenated with the aforementioned neighborhood feature vector along the feature dimensions. The concatenated vector is input into a fully connected layer, where the weight matrix and bias vector are part of the policy network parameters θ; the activation function of the fully connected layer is ReLU; the output of the fully connected layer is a state embedding vector with a fixed dimension of 128.

[0103] The decoder takes the state embedding vector as input and generates two types of replenishment purchase quantities simultaneously through parallel output heads. The first type of output head is responsible for generating the replenishment quantity of each product from each store to its respective regional warehouse; this output head contains a fully connected layer, whose weight matrix and bias vector are part of θ, and the activation function is Sigmoid. The fully connected layer outputs a vector corresponding to the number of stores and the number of products, with each component value between 0 and 1; then this vector is multiplied by the shelf capacity constraint of each product in each store according to the store dimension to obtain the final replenishment quantity; the shelf capacity constraint is the maximum inventory that each product in each store can hold, which is calculated from the sales area in the store's basic data and the specifications in the product's basic data; for example, if a store's shelf capacity constraint for carbonated beverages is 500 units, and if the Sigmoid output value for that product in that store is 0.6, then the replenishment quantity is set to 0.6 × 500 = 300 units. The second type of output header is responsible for generating the purchase quantity of each commodity from upstream suppliers for each regional warehouse. Its structure is the same as the first type of output header. The fully connected layer output, after being activated by a Sigmoid function, yields a value between 0 and 1, which is then multiplied by the upper limit constraint of the warehouse's inventory capacity for each commodity to obtain the purchase quantity. The upper limit constraint is calculated from the inventory capacity limit field in the warehouse's basic data, combined with the commodity specifications. For example, if a regional warehouse has an upper limit of 20,000 units for carbonated beverages, and the Sigmoid output is 0.4, then the purchase quantity is 8,000 units. The fully connected layer parameters of the two output headers are independent of each other and are both part of θ.

[0104] The allocation generation unit is responsible for generating cross-store inventory allocation quantities in cases of inventory shortage. Its inputs are the spatiotemporal impact decay matrix and the current inventory status of each store, and its output is the suggested cross-store inventory allocation quantity. The spatiotemporal impact decay matrix is ​​a three-dimensional tensor with dimensions of the source store, target store, and future time step. Elements in the matrix represent the estimated increase in demand at the target store on day τ when a unit demand shock occurs at the source store. The allocation generation unit takes a slice of the matrix for the next day, resulting in a two-dimensional matrix where rows correspond to source stores, columns correspond to target stores, and values ​​represent the transmission strength. For each store, it checks whether its current inventory of each product is below a preset safety stock line. The safety stock line is preset according to product category, taking the average daily demand for that category multiplied by twice the replenishment lead time. For example, if a store's average daily demand for carbonated beverages is 200 units and the replenishment lead time is 2 days, then the safety stock line is 200 × 2 × 2 = 800 units. If the store's current inventory is below 800 units, it is considered to be in a state of inventory shortage. For stores with tight inventory, all transmission paths originating from that store are retrieved from the spatiotemporal impact attenuation matrix, and paths with transmission strength exceeding a preset transfer threshold are selected; the preset transfer threshold is typically 0.05. For each path that meets the criteria, a certain amount of goods is transferred from the target store's current inventory to the source store. The transfer amount is calculated as the smaller of the source store's inventory shortfall and the target store's available transfer amount. The target store's available transfer amount is its current inventory minus its own safety stock level.

[0105] The instruction generation unit structurally combines the replenishment quantities of each product from each store to its respective regional warehouse, the purchase quantities of each product from each regional warehouse to upstream suppliers, and the cross-store inventory transfer quantities output by the transfer generation unit, according to instruction type and node dimension, into a multi-level collaborative replenishment instruction. The multi-level collaborative replenishment instruction specifically includes: a store replenishment list, recording the replenishment quantities of each product requested by each store from its respective regional warehouse; a warehouse purchase list, recording the purchase quantities of each product requested by each regional warehouse from upstream suppliers; and a cross-store transfer list, recording the source store, target store, product identifier, and transfer quantity for each transfer. The multi-level collaborative replenishment instruction is then distributed to the enterprise warehouse management system and purchasing system for execution.

[0106] In one embodiment of the present invention, the causal decoupling adaptive calibration module includes:

[0107] The parameter partitioning unit is used to input the actual demand data, sales data and inventory data within the preset observation window into the preset scene encoder to obtain scene-specific factor vectors. The scene-specific factor vectors constitute scene-specific factors. The scene-specific factor vectors are configured to adjust the scaling and translation parameters of the batch normalization layer in the graph-gated temporal convolutional network, the policy network and the dual network.

[0108] The scene-invariant kernel includes the kernel weights of the dilated causal convolutional layer and the weight matrix of the gated linear unit in the graph-gated temporal convolutional network, the linear transformation matrix in the graph attention propagation encoder, the graph convolutional layer weights and fully connected layer weights of the encoder in the policy network, and the weight matrix of each fully connected layer in the dual network.

[0109] The noise component is fixed by the graph-gated temporal convolutional network, the policy network, and the random deactivation layer in the dual network.

[0110] Specifically, the scene encoder is pre-built and initially trained in the causal decoupling adaptive calibration module. It consists of two stacked fully connected layers. The first fully connected layer contains 64 neurons with ReLU activation function, and the second fully connected layer is the output layer with a 32-dimensional output. The weight parameters of the scene encoder are obtained during the initial training phase of the system through joint training with the graph-gated temporal convolutional network, policy network, and dual network. After training, these parameters are stored as preset parameters in the causal decoupling adaptive calibration module.

[0111] Actual demand data is taken from the daily actual demand values ​​of each store and each product within the preset observation window, expanded into a one-dimensional vector by store and product dimensions. Sales data is taken from the daily sales quantity of each store and each product within the preset observation window, also expanded into a one-dimensional vector by store and product dimensions. Inventory data is taken from the daily ending inventory of each store, each warehouse, and each product within the preset observation window, expanded into a one-dimensional vector by node and product dimensions. The typical length of the preset observation window is the past 7 days. The three one-dimensional vectors are concatenated and used as the input vector for the scene encoder. The scene encoder performs forward propagation on the input vector and outputs a 32-dimensional scene-specific factor vector. Each component of this vector can take any real value, without mandatory constraints on the range of values.

[0112] The parameter partitioning unit traverses and classifies all learnable parameters in the graph-gated temporal convolutional network, policy network, and dual network, categorizing them into three types: scene-invariant kernel, scene-specific factor, and noise component.

[0113] The scene-invariant kernel contains weight matrices and bias vectors that meet specified conditions within the network. In a graph-gated temporal convolutional network, the scene-invariant kernel contains the kernel weights of the dilated causal convolutional layers and the weight matrices of the gated linear units, as well as the linear transformation matrices in the graph attention propagation encoder used to map temporal hidden state vectors to query vectors, key vectors, and value vectors. In a policy network, the scene-invariant kernel contains the weight matrices of the graph convolutional layers and the weight matrices of the fully connected layers in the encoder, as well as the bias vectors of each layer in the encoder; the weight matrices of the graph convolutional layers define the neighborhood aggregation method of inventory states between warehouse nodes and store nodes, and the weight matrices of the fully connected layers define the general mapping of aggregated features to state embedding vectors. In a dual network, the scene-invariant kernel contains the weight matrices and bias vectors of all three fully connected layers; the dual network is responsible for searching for the worst-case demand perturbation within the Wasserstein uncertainty sphere, and its weight matrices define a general search pattern for demand perturbations that does not change with the scene.

[0114] Scene-specific factors consist of a 32-dimensional real-valued vector output by the scene encoder. After parameter partitioning, this vector is configured to adjust the scaling and translation parameters of the batch normalization layers in the graph-gated temporal convolutional network, policy network, and dual network. Specifically, in the temporal convolutional encoder of the graph-gated temporal convolutional network, each batch normalization layer after dilated causal convolution contains a set of scaling and translation parameters, with the dimension of each set of parameters being the same as the number of output channels of that layer. In the encoder of the policy network, the batch normalization layer after the fully connected layer also contains a set of scaling and translation parameters. In the dual network, each batch normalization layer after the fully connected layer also contains a set of scaling and translation parameters. The scene-specific factor vector is mapped to the scaling and translation parameter adjustments of each batch normalization layer through a learnable linear mapping matrix. The dimension of the mapping matrix is ​​the batch normalization layer parameter dimension multiplied by 32. The adjustments are added to the original scaling and translation parameters of the batch normalization layer to obtain the actual scaling and translation parameters for that scene. In different scenarios, the scene encoder outputs different scene-specific factor vectors, thereby adjusting the behavior of each network to adapt to different demand environments and operating conditions. During initial deployment, the scene encoder outputs a default scene-specific factor vector, which corresponds to the comprehensive scene covered during the initial training phase of the system. When the causal decoupling adaptive calibration module detects concept drift and completes the adaptation, the scene-specific factor vector is updated with the new adapted values.

[0115] The noise component is fixedly composed of all randomly deactivated layers in the graph-gated temporal convolutional network, policy network, and dual network. During forward propagation, the randomly deactivated layers randomly set the output of some neurons to zero with a preset probability, typically 0.2. Once the system is running online, the random deactivation operation of the randomly deactivated layers is disabled, meaning all neurons participate in forward propagation, and the noise component exists in a fixed all-pass state. The noise component does not participate in any parameter updates and remains unchanged during scene-specific factor recalculation and output layer weight fine-tuning.

[0116] In one embodiment of the present invention, the causal decoupling adaptive calibration module further includes:

[0117] The drift detection unit is used to calculate the absolute percentage error between the preset quantile prediction value in the demand probability distribution and the actual demand data after each replenishment decision step is completed, and maintain an error sliding window of preset length. When the weighted average absolute percentage error for a consecutive preset number of days exceeds the historical mean plus twice the standard deviation calculated based on the error sequence of the past preset number of days, it is determined that concept drift is triggered.

[0118] An adaptation execution unit is used to freeze the scene-invariant kernel after triggering concept drift, recalculate the scene-specific factors using the residual sequence and the actual demand data, and fine-tune the weights of the multi-task output layer of the graph-gated temporal convolutional network, the weights of the fully connected layers of each output head in the policy network decoder, and the weights of the fully connected layers of the output layer of the dual network.

[0119] Specifically, after each replenishment decision step, the drift detection unit acquires the residual sequence and demand probability distribution for the current step. The value of each entry in the residual sequence is the difference between the 50th quantile predicted value of the demand probability distribution and the actual demand data. Based on this residual value, the absolute percentage error for the current step is calculated by dividing the absolute value of the residual by the actual demand data plus a smoothing constant. The smoothing constant is set to 1 to prevent division-by-zero errors when the actual demand is zero.

[0120] Maintain an error sliding window of a preset observation window length. Each element within the window represents the weighted average absolute percentage error for a past day. The weighted average absolute percentage error is calculated by weighting the absolute percentage errors of each product at each store by the average daily demand, and then dividing by the total weight. The error sliding window uses a first-in, first-out (FIFO) queue structure for storage. For each new replenishment decision step's error value, the error value of the oldest step is removed from the window. The window length is always maintained at the typical value of 30 days for the preset observation window. After updating the error sliding window, calculate the mean and standard deviation of the error sequence within the window as the historical error statistical baseline. Then check whether the weighted average absolute percentage error for the most recent consecutive preset number of days exceeds the preset prediction error statistical threshold of the historical mean plus twice the standard deviation; the typical value for the consecutive preset number of days is 7 days. For example, if the error sliding window includes the weighted average absolute percentage error over the past 30 days, with a calculated mean of 0.15 and a standard deviation of 0.03, then the statistical threshold for prediction error is 0.15 + 2 × 0.03 = 0.21. The error values ​​for the most recent 7 days are 0.22, 0.24, 0.23, 0.25, 0.26, 0.24, and 0.23, respectively. Since the error exceeds 0.21 for 7 consecutive days, concept drift is triggered.

[0121] If the error value of any day within the most recent consecutive preset number of days does not exceed the threshold, concept drift will not be triggered, and the current parameters will continue to be used. The drift detection unit will repeat the above process in the next replenishment decision step.

[0122] Once a concept drift is triggered, the adaptation execution unit initiates a lightweight adaptation process, which includes three sequentially executed steps: freezing the scene-invariant kernel, recalculating scene-specific factors, and fine-tuning the output layer weights. Based on the determined composition of the scene-invariant kernel, all parameters belonging to the scene-invariant kernel are located in the graph-gated temporal convolutional network, policy network, and dual network. The specific implementation of freezing the scene-invariant kernel involves disabling gradient accumulation for the corresponding parameters in the Adam optimizer. That is, these parameters still participate in the calculation during forward propagation, but their gradients are not calculated or their values ​​are updated during backward propagation. After freezing, these parameters remain unchanged in subsequent recalculation and fine-tuning steps.

[0123] Using residual sequences and actual demand data as the adaptation dataset, scenario-specific factors are recalculated. The time range of the adaptation dataset is all replenishment decision steps within the most recent preset observation window, typically the last 30 days. The network structure of the scenario encoder remains unchanged, and the weight parameters of the scenario encoder are fine-tuned using the adaptation dataset. The training objective is to minimize the joint loss, which is a weighted sum of the perception layer prediction error and the decision layer operating cost. The perception layer prediction error is the mean squared error between the 50th quantile predicted value of the demand probability distribution for each day in the adaptation dataset and the actual demand data. The decision layer operating cost is the total operating cost calculated for each day in the adaptation dataset using the replenishment actions generated by the current policy network under actual demand. The weight coefficients of the joint loss are set to 0.5 to 0.5. During training, the parameters marked as scenario-invariant kernels in the graph-gated temporal convolutional network and the policy network are frozen; only the weight parameters of the scenario encoder participate in gradient updates. The Adam optimizer is used for training, with the learning rate set to one-tenth of the initial training learning rate of the scenario encoder, typically [value missing]. The training iterations are preset to 50 rounds. After training is complete, the scene encoder outputs the adapted scene-specific factor vectors.

[0124] After the scene-specific factors were recalculated, the output layer weights of the three networks were fine-tuned. The fine-tuning included: the multi-task output layer weights of the graph-gated temporal convolutional network, specifically the fully connected layer weights of the quantile prediction head and the spatiotemporal influence matrix generation head; the fully connected layer weights of each output head in the policy network decoder, specifically the fully connected layer weights of the replenishment quantity output head and the purchase quantity output head; and the fully connected layer weights of the dual network output layer. The loss function used for fine-tuning training was the same as the joint loss during the scene-specific factor recalculation. During training, the scene-invariant kernel remained frozen, the scene-specific factors used the new values ​​obtained from the previous recalculation and remained fixed, and only the output layer weights participated in gradient updates. The Adam optimizer was used for fine-tuning, with a learning rate of [missing value]. The preset number of iterations is 20.

[0125] After completing the adaptation execution unit's steps, the scene-specific factors and output layer weights in the graph-gated temporal convolutional network, policy network, and dual network have been reconfigured. The scene-specific factor vectors are updated to the new adapted values, and the output layer weights of each network are updated to the fine-tuned values. The scene-invariant kernel remains unchanged, and the noise components remain unchanged. After the parameter update, the adaptation execution unit records the timestamp of this adaptation, the error statistics at the time of triggering concept drift, and the error statistics after adaptation, and writes them to the system log; the error sliding window of the drift detection unit is cleared and re-accumulated after the adaptation is completed. The system continues to run online using the updated parameters, and the drift detection unit resumes continuous monitoring.

[0126] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A deep learning-based collaborative optimization system for retail supply chains, characterized in that: Includes the following modules: The module for constructing heterogeneous temporal graphs and impulse knowledge bases is used to acquire sales data, inventory data, external event data, actual demand data, as well as basic data of stores, products, and warehouses in the retail supply chain. It constructs a heterogeneous temporal graph containing store nodes, product nodes, warehouse nodes, physical supply edges, and event-affected edges, and builds an impulse response knowledge base. The multidimensional demand impulse response sensing module has a built-in graph-gated temporal convolutional network. Based on the heterogeneous temporal graph and the impulse response knowledge base, the graph-gated temporal convolutional network processes the data to obtain the demand probability distribution and spatiotemporal influence attenuation matrix for a preset future time period. By comparing the demand probability distribution with the actual demand data, a residual sequence is generated. The Bulubang inventory collaborative decision-making module has a built-in strategy network and dual network. The dual network is used to search for the worst demand disturbance in the uncertainty set of the demand distribution defined by the demand probability distribution and the preset uncertainty radius parameter in order to conduct adversarial training on the strategy network. After adversarial training, the strategy network generates multi-level collaborative replenishment instructions based on the demand probability distribution and the spatiotemporal influence decay matrix. The causal decoupling adaptive calibration module is used to divide the learnable parameters in the graph-gated temporal convolutional network, the policy network, and the dual network into scene-invariant kernels, scene-specific factors, and noise components corresponding to random deactivation layers. When the prediction error of the demand probability distribution exceeds a preset prediction error statistical threshold, the scene-invariant kernel is frozen, the scene-specific factors are recalculated using the residual sequence, and the output layer weights of the graph-gated temporal convolutional network, the policy network, and the dual network are fine-tuned to reconfigure the scene-specific factors and output layer weights in the graph-gated temporal convolutional network, the policy network, and the dual network.

2. The deep learning-based retail supply chain collaborative optimization system according to claim 1, characterized in that, In the heterogeneous temporal heterogeneous graph construction and pulse knowledge base module, the heterogeneous temporal heterogeneous graph includes: The node construction unit is used to build store nodes, product nodes, and warehouse nodes. Store nodes are built based on the store's geographical location, sales area, and business type in the basic store data, as well as the average daily customer traffic and category sales ratio in the sales data. Product nodes are built based on the product's category, brand, specifications, shelf life in the basic product data, as well as historical sales statistics in the sales data. Warehouse nodes are built based on the warehouse's storage capacity limit, service store list, and standard replenishment lead time in the basic warehouse data. The physical supply edge construction unit is used to establish physical supply edges between warehouse nodes and store nodes based on the actual replenishment connection relationship between warehouses and stores in the warehouse basic data. The edge attributes include fixed replenishment lead time and minimum order quantity constraints. The event impact edge construction unit is used to calculate the straight-line distance between two store nodes and the overlap of the product categories they operate. When the straight-line distance is lower than a preset distance threshold and the product category overlap is higher than a preset overlap threshold, an event impact edge is established between the two store nodes, and the weight of the event impact edge is calculated by the reciprocal of the straight-line distance and the Gaussian decay function.

3. The deep learning-based retail supply chain collaborative optimization system according to claim 1, characterized in that, In the heterogeneous temporal graph construction and impulse knowledge base module, the impulse response knowledge base includes: The template construction unit is used to determine different external event types based on the external event data, and to construct a demand pulse template for each external event type, consisting of an impact amplitude parameter and an attenuation coefficient parameter; wherein, the impact amplitude parameter is the maximum increase multiple of the daily average demand for the corresponding external event type per unit time, and the attenuation coefficient parameter is the rate constant of the attenuation of the impact intensity of the corresponding external event type over time. The template parameter acquisition unit is used to acquire the actual demand data in the historical event window corresponding to each type of external event within a preset time period; and uses a matrix factorization algorithm with non-negative constraints and sparse induced regularization terms to decompose the impact amplitude parameter and attenuation coefficient parameter from the actual demand data in the historical event window.

4. The deep learning-based retail supply chain collaborative optimization system according to claim 3, characterized in that, In the multidimensional demand impulse response sensing module, the graph-gated temporal convolutional network includes: The temporal convolutional encoder is used to perform dilated causal convolution and gated linear unit processing on the historical demand sequence of each store node to generate a temporal hidden state vector. A graph attention propagation encoder is used to execute a graph attention mechanism on the event-affected edge. The graph attention mechanism uses the attenuation coefficient parameter corresponding to the current external event type to perform exponential attenuation modulation on the weight of the event-affected edge when calculating the attention coefficient between nodes. The modulation result and the impact amplitude parameter corresponding to the current external event type are used together to perform attention aggregation, generate the spatial latent state vector of event perception, and output the attention weight. The multi-task output layer is used to concatenate the temporal hidden state vector and the spatial hidden state vector, obtain the demand probability distribution through the quantile prediction head, and generate the spatiotemporal influence decay matrix based on the attention weight and the decay coefficient parameter through the spatiotemporal influence matrix generation head.

5. The deep learning-based retail supply chain collaborative optimization system according to claim 1, characterized in that, In the distributed inventory collaborative decision-making module, the adversarial training methods for the policy network and the dual network include: The adversarial training unit is used to jointly optimize the policy network and the dual network based on a loss function, which is: ,in, For the parameters of the policy network, For the parameters of the dual network, Let be the state vector for the t-th replenishment decision step. For policy networks Replenishment action vector generated based on state vector Total operating costs The demand probability distribution is... For Centered on a preset uncertain radius parameter Wasserstein's indeterminate sphere of radius , Let be the worst-case demand perturbation vector found by the dual network within the Wasserstein uncertainty sphere. Let be the state vector for the (t+1)th replenishment decision step. In order to be in The out-of-stock penalty cost is λ, which is a preset robustness adjustment coefficient.

6. The deep learning-based retail supply chain collaborative optimization system according to claim 1, characterized in that, In the distributed inventory collaborative decision-making module, the strategy network includes: The encoder is used to take the current inventory state vector obtained from the inventory data as input, and perform neighborhood aggregation on the inventory state of warehouse nodes and store nodes by utilizing the connection relationship between warehouse nodes and store nodes defined by the physical supply edge in the heterogeneous time-series graph. The aggregated node features are concatenated with the mean of the demand probability distribution, and the state embedding vector is extracted through a fully connected layer. The decoder is used to generate, through parallel output heads, the replenishment quantity of each product from each store to its regional warehouse, and the purchase quantity of each product from each regional warehouse to upstream suppliers, taking the state embedding vector as input. The allocation generation unit is used to identify the transmission path of demand shocks between store nodes based on the spatiotemporal impact attenuation matrix, and generate cross-store inventory allocation volume. The instruction generation unit is used to combine the replenishment volume of each product from each store to its regional warehouse, the purchase volume of each product from each regional warehouse to upstream suppliers, and the cross-store inventory transfer volume into multi-level collaborative replenishment instructions.

7. The deep learning-based retail supply chain collaborative optimization system according to claim 1, characterized in that, The causal decoupling adaptive calibration module includes: The parameter partitioning unit is used to input the actual demand data, sales data and inventory data within the preset observation window into the preset scene encoder to obtain scene-specific factor vectors. The scene-specific factor vectors constitute scene-specific factors. The scene-specific factor vectors are configured to adjust the scaling and translation parameters of the batch normalization layer in the graph-gated temporal convolutional network, the policy network and the dual network. The scene-invariant kernel includes the kernel weights of the dilated causal convolutional layer and the weight matrix of the gated linear unit in the graph-gated temporal convolutional network, the linear transformation matrix in the graph attention propagation encoder, the graph convolutional layer weights and fully connected layer weights of the encoder in the policy network, and the weight matrix of each fully connected layer in the dual network. The noise component is fixed by the graph-gated temporal convolutional network, the policy network, and the random deactivation layer in the dual network.

8. The deep learning-based retail supply chain collaborative optimization system according to claim 5, characterized in that, The causal decoupling adaptive calibration module further includes: The drift detection unit is used to calculate the absolute percentage error between the preset quantile prediction value in the demand probability distribution and the actual demand data after each replenishment decision step is completed, and maintain an error sliding window of preset length. When the weighted average absolute percentage error for a consecutive preset number of days exceeds the historical mean plus twice the standard deviation calculated based on the error sequence of the past preset number of days, it is determined that concept drift is triggered. An adaptation execution unit is used to freeze the scene-invariant kernel after triggering concept drift, recalculate the scene-specific factors using the residual sequence and the actual demand data, and fine-tune the weights of the multi-task output layer of the graph-gated temporal convolutional network, the weights of the fully connected layers of each output head in the policy network decoder, and the weights of the fully connected layers of the output layer of the dual network.