Supply chain inventory optimization method, device and equipment

CN121304036APending Publication Date: 2026-01-09SHENZHEN CHENGZHIXUN TECHNOLOGY CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202511473158.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

In existing technologies, inventory forecasting models lack dynamic cascading effect analysis of upstream and downstream links in the supply chain, resulting in inaccurate forecasts, inflexible replenishment strategies, and an inability to respond promptly to changes in demand and unexpected events. This leads to insufficient accuracy and real-time performance in inventory management, affecting the operational efficiency and economic benefits of enterprises.

Method used

By employing a dynamic cascaded supply chain network and a spatiotemporal joint prediction function, supply chain graph data is acquired, node state vectors are encoded, and a pre-trained spatiotemporal joint prediction function is used for prediction. Combined with a decision constraint optimization function, an executable shipping decision is generated, and replenishment strategies are dynamically adjusted to meet inventory capacity constraints.

Benefits of technology

It enables more accurate inventory forecasting, rapid response to supply chain emergencies, avoidance of inventory backlog or stockouts, improved flexibility and intelligence in replenishment decisions, reduced computational complexity, and improved supply chain operational efficiency and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention is suitable for the field of computers, and provides a supply chain inventory optimization method, device and equipment, and the method comprises the steps: obtaining supply chain graph data; inputting the supply chain graph data into a pre-trained supply chain dynamic cascade network, and encoding to obtain a node state vector; inputting the node state vector into a pre-trained spatio-temporal joint prediction function to obtain a prediction result; and if the current mode is not the training mode, obtaining a planned delivery quantity vector and a service constraint rule corresponding to the supply chain network, and inputting the predicted delivery quantity vector, the planned delivery quantity vector and the service constraint rule corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable delivery decision vector. According to the method, the problems of inaccurate dynamic prediction, lack of flexibility of replenishment strategies and high optimization complexity in the prior art are effectively solved, and an efficient, accurate and dynamically adaptive solution is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and in particular relates to a supply chain inventory optimization method, apparatus and equipment. Background Technology

[0002] In current supply chain management, the effectiveness of inventory forecasting and replenishment strategies is crucial. Existing technologies mainly rely on static forecasting models, such as time-series algorithms like ARIMA and Prophet. These models only perform single-point forecasts, ignoring the dynamic cascading effects between upstream and downstream links in the supply chain. Therefore, in the face of demand changes or unexpected events (such as supply disruptions), these models cannot adjust their forecasts in a timely manner, resulting in insufficient accuracy and real-time performance in inventory management.

[0003] Furthermore, traditional rule-based replenishment methods, which trigger replenishment based on safety stock formulas, lack intelligent analysis of the overall supply chain status and cannot dynamically respond to unforeseen circumstances such as supply delays. This mechanical replenishment approach can easily lead to inventory backlogs or stockouts, impacting operational efficiency and economic benefits for businesses.

[0004] In summary, existing technologies suffer from inaccurate dynamic forecasting, inflexible replenishment strategies, and high optimization complexity. There is an urgent need for a new dynamic forecasting and replenishment solution to adapt to the rapidly changing market environment and improve the flexibility and intelligence of supply chain management. Summary of the Invention

[0005] This application provides a supply chain inventory optimization method, apparatus, and equipment that can solve the above-mentioned problems.

[0006] In a first aspect, embodiments of this application provide a supply chain inventory optimization method, including: Obtain supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The supply chain graph data is input into a pre-trained dynamic cascaded supply chain network, and the node state vector is encoded to obtain a node state vector; wherein, the node state vector reflects the cascaded characteristics between upstream and downstream links in the supply chain network; The node state vector is input into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; If the current mode is not the training mode, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network are obtained. The predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network are input into the preset decision constraint optimization function to obtain an executable shipment decision vector.

[0007] Secondly, embodiments of this application provide a supply chain inventory optimization device, comprising: An acquisition unit is used to acquire supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The first processing unit is used to input the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encode it to obtain a node state vector; wherein, the node state vector reflects the cascade characteristics between upstream and downstream links in the supply chain network; The second processing unit is used to input the node state vector into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; The third processing unit is used to obtain the planned shipment volume vector and the business constraint rules corresponding to the supply chain network if the current mode is not the training mode, and input the predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable shipment decision vector.

[0008] Thirdly, embodiments of this application provide a supply chain inventory optimization device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect above.

[0010] In this embodiment, by synchronously modeling the supply and demand impact of upstream and downstream through a dynamic cascaded network of the supply chain, the dynamic cascaded relationships between various links in the supply chain can be captured, taking into account the mutual influence of upstream and downstream supply and demand. Compared with traditional static forecasting models, it can more accurately reflect the dynamic trend of supply chain inventory changes, providing more reliable forecasting results for inventory management. A decision-constrained optimization function is used instead of the traditional heuristic scaling method, achieving second-level satisfaction of hard constraints on inventory capacity. Compared with traditional rule-based replenishment, it can quickly respond to emergencies such as supply delays, dynamically adjust replenishment strategies, avoid inventory backlogs or stockouts, and improve the flexibility and intelligence of replenishment decisions. A spatiotemporal joint forecasting function is introduced, integrating spatiotemporal information and considering multiple objective factors such as inventory cost, service level, and forecast accuracy, to achieve multi-objective balanced optimization of supply chain inventory management. Compared with traditional optimizers, it significantly reduces computational complexity, enabling rapid adjustment of model parameters and solution strategies in a real-time fluctuating supply chain environment, ensuring that optimization results match actual needs, and improving the overall operational efficiency and economic benefits of the supply chain. It effectively solves the problems of inaccurate dynamic forecasting, lack of flexibility in replenishment strategies, and high optimization complexity in existing technologies, providing an efficient, accurate, and dynamically adaptable solution for supply chain inventory management. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic flowchart of a supply chain inventory optimization method provided in the first embodiment of this application; Figure 2 This is a schematic flowchart of steps S105 to S107 in a supply chain inventory optimization method provided in the first embodiment of this application; Figure 3 This is a schematic diagram of the supply chain inventory optimization device provided in the second embodiment of this application; Figure 4 This is a schematic diagram of the supply chain inventory optimization device provided in the third embodiment of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0015] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0016] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0017] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0018] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0019] Please see Figure 1 , Figure 1This is a schematic flowchart illustrating a supply chain inventory optimization method provided in the first embodiment of this application. In this embodiment, the executing entity of the supply chain inventory optimization method is a device with supply chain inventory optimization functionality, such as a desktop computer, server, etc. Figure 1 The supply chain inventory optimization methods shown may include: S101: Obtain supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships.

[0020] The device acquires supply chain graph data. The device stores supply chain graph data, which is used to store the graph structure corresponding to the supply chain network. The graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships.

[0021] The equipment pre-builds a supply chain graph, which includes several nodes and edges. Nodes represent various entities in the supply chain (such as suppliers, manufacturers, distributors, retailers, etc.), while edges represent the relationships between these entities (such as supply relationships, logistics routes, and capital flow relationships).

[0022] For example, a simple supply chain diagram can include nodes “Supplier A”, “Manufacturer B”, “Distributor C”, and edges connecting these nodes, representing the relationship of “Supplier A” supplying goods to “Manufacturer B”.

[0023] Each node From a feature vector Indicates dimension This refers to the number of features. Features are typically extracted from business data and may include: current inventory levels, historical average demand, demand volatility, processing capacity, geolocation coding, etc. For example, the feature vector of node "Supplier A" could be: Where 100 is the inventory level, 50 is the historical average demand, 0.2 is the demand volatility, 200 is the processing capacity, and the following coordinates are the geographical locations.

[0024] Each edge From a feature vector This can be represented by features such as: transit time, unit transit cost, historical on-time delivery rate, and current inventory in transit. For example, an edge from "Supplier A" to "Manufacturer B" could have a feature vector: This indicates a delivery time of 3 days, a delivery cost of 50 yuan, a historical on-time delivery rate of 90%, and 20 units of inventory in transit.

[0025] In this embodiment, the latest data can be periodically retrieved from various business systems to maintain the accuracy and timeliness of the supply chain map. This can be achieved by setting up scheduled jobs or using trigger mechanisms.

[0026] S102: Input the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encode it to obtain a node state vector; wherein, the node state vector reflects the cascaded characteristics between upstream and downstream links in the supply chain network.

[0027] In this embodiment, the device pre-stores a pre-trained dynamic cascaded supply chain network. A suitable dynamic cascaded network model can be selected, such as Graph Neural Networks (GNNs), bidirectional graph attention network (GATv2), or other deep learning models. The specific selection depends on the data characteristics and requirements.

[0028] The constructed supply chain graph is used as input, and node features and edge features are fed into the model in the corresponding formats. The model learns the relationships between nodes through a multi-layer network and outputs the node state vector for each node.

[0029] The node state vector reflects the cascading characteristics between upstream and downstream links in the supply chain network. These characteristics are used for subsequent predictions. For example, the state vector of node "Supplier A" might output: This indicates the status characteristics of the node in the supply chain. It can reflect information such as "Supplier A's" current inventory level, delivery history, and production capacity.

[0030] In one embodiment, the supply chain graph data includes feature matrices of all nodes in the supply chain network, feature matrices of all edges, and timestamp differences between all nodes. S102 may include: inputting the feature matrices of the nodes, feature matrices of the edges, and timestamp differences between nodes into a pre-trained bidirectional graph attention network to encode the node state vector; wherein the bidirectional graph attention network includes an attention module; the attention module is used to calculate attention coefficients between the nodes, and the attention coefficients fuse the feature similarity and time decay degree between the nodes.

[0031] In this implementation, a bidirectional graph attention network is used to process supply chain graph data to optimize inventory management. Feature matrices of all nodes and edges in the supply chain network, as well as timestamp differences between nodes, are collected and organized. The node feature matrices, edge feature matrices, and timestamp differences are standardized and normalized to ensure input data consistency. The processed data is then input into a pre-trained bidirectional graph attention network to encode node state vectors. Within the bidirectional graph attention network, an attention module calculates attention coefficients between nodes, which integrate feature similarity and time decay between nodes. Based on the node state vectors and attention coefficients, predictive outputs are generated, including predicted shipment volume and inventory levels.

[0032] In one embodiment, the attention module is used to obtain the attention coefficient based on the feature matrix of the node, the feature matrix of the edge, the timestamp difference between the nodes, and a preset attention coefficient calculation formula; The default formula for calculating the attention coefficient is: in, The spatiotemporal decay factor is defined as follows: , This indicates the timestamp difference between the nodes. Used to control the spatiotemporal decay intensity Let 'c' represent the data update timestamps of nodes i and j, and 'j' represent the dimension. Attention score vector This represents the transpose of c. yes All of these are learnable parameters in the graph attention network based on the spatiotemporal decay mechanism. They represent dimensions as follows: The feature matrix and dimension of node i are The feature matrix of node j, The feature matrix representing the edge between node i and node j, with dimension 1. , Represents the normalized exponential function, This represents the activation function.

[0033] in, The range of values ​​can be .

[0034] By combining feature matrices and timestamp differences, the attention module effectively captures the similarity and temporal correlation between nodes, thereby enhancing the representational power of node state vectors and enabling the model to more accurately understand the dynamic changes in the supply chain network. Utilizing the structure of a bidirectional graph attention network allows for a more comprehensive consideration of the mutual influence between nodes, thus improving the prediction accuracy of various events in the supply chain (such as demand fluctuations and inventory changes), helping enterprises make better decisions. The attention mechanism allows the model to adaptively adjust the nodes and edges it focuses on based on input data, enhancing its adaptability to different supply chain environments and enabling it to handle heterogeneous data and complex relationships. By introducing timestamp differences, the model can effectively learn time decay characteristics, identify time-related changes and trends, and thus more accurately reflect the timeliness and responsiveness of the supply chain.

[0035] S103: Input the node state vector into the pre-trained spatiotemporal joint prediction function to obtain the prediction result; wherein, the prediction result includes the predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function.

[0036] The device pre-stores pre-trained spatiotemporal joint prediction functions, which can select appropriate spatiotemporal joint prediction models, such as Long Short-Term Memory (LSTM) networks, Temporal Convolutional Networks (TCN) or Transformer models. These models are suitable for processing the combination of temporal and spatial data.

[0037] The generated node state vectors are input into a pre-trained spatiotemporal joint prediction function, which transforms the previously generated node state vectors into a format suitable for model input, typically including timestamp information and possible historical data. For example, it might be necessary to construct a time series input sample containing node state vectors from the past few days as features.

[0038] The processed data is input into the spatiotemporal joint forecasting model for prediction. The model will output the demand and inventory forecasts for each node at future times.

[0039] For example, the model might predict the demand from "Supplier A" over the next 7 days as follows: This indicates changes in demand over the next 7 days.

[0040] In one embodiment, the spatiotemporal joint prediction function includes an accuracy evaluation function, which is used to calculate a spatiotemporal index for evaluating the prediction accuracy based on the predicted shipment volume vector, the actual shipment volume vector, and a preset accuracy calculation formula. The preset accuracy calculation formula is: ST represents the spatiotemporal index used to evaluate the accuracy of the prediction; a smaller ST value indicates higher prediction accuracy. T represents the length of the evaluation time window, and τ represents the time point within the evaluation time window. The dynamic weight at time point τ is calculated from the inventory turnover rate using a function, at that time point. The dynamic weight is calculated from the inventory turnover rate at that moment using an objective function, which is: , This represents the inventory turnover rate at time point τ. These represent the predicted shipment volume vector and the actual shipment volume vector corresponding to the time point τ, respectively. express of Norm, express of Norm, This represents the dynamic time-normalized distance between the predicted shipment volume vector and the actual shipment volume vector.

[0041] The equipment acquires relevant data from the supply chain network, including historical shipment volumes, inventory levels, order data, supplier delivery times, and market demand. It can clean the collected data, removing outliers and missing values ​​to ensure data quality. Features are extracted from the raw data, such as time-series characteristics of shipment volumes, seasonality, and the impact of promotional activities.

[0042] Choose a suitable spatiotemporal prediction model, such as a Long Short-Term Memory (LSTM) network, a Convolutional Neural Network (CNN), or a Bidirectional Graph Attention Network (Bi-GAT). Input the processed feature vectors into the selected model to construct a joint spatiotemporal prediction function. This function can predict future shipment volumes using historical data.

[0043] In this embodiment, an accuracy evaluation function is embedded in the spatiotemporal joint prediction function. The accuracy evaluation function is used to calculate the prediction accuracy, resulting in spatiotemporal indices. These indices reflect the accuracy of the prediction and the model performance, providing a basis for inventory optimization.

[0044] S104: If the current mode is not the training mode, then obtain the planned shipment volume vector and the business constraint rules corresponding to the supply chain network, and input the predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network into the preset decision constraint optimization function to obtain an executable shipment decision vector.

[0045] The device determines whether the current mode is training mode. If the current mode is not training mode, it formulates an inventory optimization strategy based on the predicted demand and inventory situation to ensure supply chain efficiency.

[0046] If the current mode is not the training mode, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network are obtained. The predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network are input into the preset decision constraint optimization function to obtain an executable shipment decision vector.

[0047] The equipment obtains the current shipping plan and business constraint rules. For example, the shipping plan stipulates that "Production Plant A" needs to ship 500 units to "Distribution Center" every week, while the business constraint rules require that the minimum quantity of each shipment is 200 units and the maximum quantity is 1,000 units, and must be completed within 72 hours.

[0048] The predicted shipment vector, the current planned shipment vector, and business constraint rules are input into the decision-constrained optimization function. For example, suppose the predicted demand increases to 600 units, while the current planned shipment volume is 500 units. The input constraints include a minimum shipment volume of 200 units and a maximum shipment volume of 1000 units. The decision-constrained optimization function needs to adjust the shipment volume under these conditions.

[0049] The optimal shipping decision is calculated using a decision constraint optimization function, generating an executable shipping decision vector. For example, the optimization result might show that "Production Plant A" needs to adjust the shipping quantity from 500 units to 600 units to meet the needs of "Retailer C" while ensuring compliance with all constraints.

[0050] In one implementation, the predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network are input into a preset decision constraint optimization function to obtain an executable shipment decision vector. This may include: inputting the predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network into a preset KKT constraint optimizer to obtain an executable shipment decision vector. The preset KKT constraint optimizer is: ; This represents the predicted shipment volume vector to be optimized. Let C represent the planned shipment volume vector, C be the constraint matrix, and b be the constraint boundary vector. This indicates that the constraint objective of the preset KKT constraint optimizer is... and This represents minimizing the predicted shipment volume vector. With the planned shipment volume vector The square of the Euclidean distance between them Represented by the constraint matrix and constraint boundary vector Defined constraints.

[0051] In this implementation, the optimized final shipping decision vector that satisfies all hard business constraints is output. By combining neural network prediction with operations research constraint optimization, the generated decision not only predicts trends well but is also directly executable in actual business operations, thus obtaining inventory decisions.

[0052] In one embodiment, the prediction result further includes a predicted inventory level vector. This embodiment may also include S105~S107, such as... Figure 2 As shown, S105~S107 are as follows: S105: If the current mode is training mode, obtain the actual shipment volume vector, the actual inventory level vector, and the inventory capacity upper limit vector.

[0053] In the model training mode, it is first necessary to collect real data on shipment volume, inventory level, and inventory capacity limit. This data is an important basis for training the model.

[0054] Data can be extracted from a company’s historical order system, warehouse management system (WMS), or enterprise resource planning system (ERP).

[0055] Data can typically be exported in a structured format using CSV or database queries.

[0056] You can choose an appropriate time window (such as day, week, or month) to extract data for time series analysis.

[0057] S106: Calculate the triple loss data based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and the preset triple loss function.

[0058] The triple loss data is calculated using the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and the preset triple loss function.

[0059] The pre-defined triple loss function simultaneously optimizes three objectives: prediction accuracy, no overcapacity constraint, and supply plan smoothness.

[0060] When defining a triple loss function, it can include prediction error loss (such as mean squared error) to measure the difference between the predicted shipment volume and the actual shipment volume; inventory loss (such as inventory level deviation) to measure the difference between the predicted inventory and the actual inventory; and capacity constraint loss to penalize situations where the inventory capacity limit is exceeded.

[0061] The device can use deep learning frameworks such as TensorFlow or PyTorch to calculate the loss function.

[0062] Specifically, the device can calculate triple loss data based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and a preset triple loss function. The preset triple loss function is as follows: ; This indicates the error in inventory level forecasting. This represents the predicted inventory level vector. This represents the actual inventory level vector. This indicates the penalty for calculating capacity constraints. The upper limit vector of inventory capacity, Indicates the first 1 node This indicates the calculation of the supply smoothing penalty. Let t represent the predicted shipment volume vector, and t represent time. Represents the weight parameters. Used to control the impact of inventory level forecasting errors. Used to control the impact of capacity constraint penalties Used to control the impact of supply smoothing penalties.

[0063] S107: Calculate the gradient of the triple loss data with respect to the learnable parameters according to the preset backpropagation algorithm, and optimize and update the learnable parameters according to the preset optimization algorithm to minimize the triple loss data; wherein, the learnable parameters include the learnable parameters in the supply chain dynamic cascade network and the learnable parameters in the spatiotemporal joint prediction function.

[0064] Using the calculated triple loss data, the gradients of the learnable parameters are calculated through the backpropagation algorithm, and these parameters are updated using an optimization algorithm to minimize the loss.

[0065] Common optimization algorithms include stochastic gradient descent (SGD), Adam optimizer, and RMSprop.

[0066] Initialize the learnable parameters in the supply chain dynamic cascade network and the spatiotemporal joint prediction function. Perform forward propagation, inputting training data and obtaining predicted values. Calculate the loss using the loss function defined in S106. Perform backpropagation using the automatic differentiation function of the deep learning framework to calculate the gradient of the loss function with respect to all learnable parameters. Update all learnable parameters according to a preset optimization algorithm, aiming to minimize the loss function. This process can be repeated multiple times to gradually optimize the model parameters until the loss function converges to a satisfactory value or the preset number of iterations is reached.

[0067] In one implementation, a supply chain graph dataset is constructed. Each sample contains a graph structure for a time slice, the actual inventory value of each node, and the actual supply value. During training, the data in the training set is traversed multiple times until the model loss converges or the predetermined performance metric is reached.

[0068] In this embodiment, by acquiring real-world shipment volume and inventory level data through training mode, the model can better learn and adapt to actual operating conditions, thereby improving the accuracy of its predictions of future shipment volumes and inventory levels. This accuracy helps reduce inventory backlogs and stockouts. Calculating triple loss data can effectively evaluate the model's performance, especially under inventory capacity constraints. By optimizing inventory levels, companies can reduce holding costs, improve capital turnover, and reduce the risk of excess inventory. Through a combination of backpropagation and optimization algorithms, the model can dynamically adjust learnable parameters based on loss feedback. This dynamic adaptability allows the model to quickly respond to market changes, demand fluctuations, and supply chain disruptions, maintaining flexibility in inventory management. The design of the triple loss function allows the model to weigh shipment volume, inventory levels, and capacity constraints, supporting multi-objective optimization. This approach ensures that service levels and customer satisfaction are maintained while pursuing efficiency.

[0069] This application utilizes a dynamic cascading network model to synchronously model the supply and demand impacts between upstream and downstream entities, capturing the dynamic cascading relationships between various links in the supply chain and considering the mutual influence of supply and demand. Compared to traditional static forecasting models, it can more accurately reflect the dynamic trends of supply chain inventory changes, providing more reliable forecasting results for inventory management. Furthermore, it employs a decision-constrained optimization function instead of the traditional heuristic scaling method, achieving second-level satisfaction of hard inventory capacity constraints. Compared to traditional rule-based replenishment, it can quickly respond to unexpected situations such as supply delays, dynamically adjust replenishment strategies, avoid inventory backlogs or stockouts, and improve the flexibility and intelligence of replenishment decisions. The application introduces a spatiotemporal joint forecasting function, integrating spatiotemporal information and considering multiple objective factors such as inventory cost, service level, and forecast accuracy, to achieve multi-objective balanced optimization of supply chain inventory management. Compared to traditional optimizers, it significantly reduces computational complexity, enabling rapid adjustment of model parameters and solution strategies in a real-time fluctuating supply chain environment, ensuring that optimization results match actual needs, and improving the overall operational efficiency and economic benefits of the supply chain. It effectively solves the problems of inaccurate dynamic forecasting, lack of flexibility in replenishment strategies, and high optimization complexity in existing technologies, providing an efficient, accurate, and dynamically adaptable solution for supply chain inventory management.

[0070] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0071] Please see Figure 3 , Figure 3 This is a schematic diagram of the supply chain inventory optimization device provided in the second embodiment of this application. The included units are used to perform... Figures 1-2 The steps in the corresponding embodiments. Please refer to the details. Figures 1-2 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown. See also... Figure 3 The supply chain inventory optimization device 3 includes: The acquisition unit 310 is used to acquire supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The first processing unit 320 is used to input the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encode it to obtain a node state vector; wherein, the node state vector reflects the cascaded characteristics between upstream and downstream links in the supply chain network; The second processing unit 330 is used to input the node state vector into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; The third processing unit 340 is used to obtain the planned shipment volume vector and the business constraint rules corresponding to the supply chain network if the current mode is not the training mode, and input the predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable shipment decision vector.

[0072] Furthermore, the supply chain inventory optimization device 3 also includes: The fourth processing unit is used to obtain the actual shipment volume vector, the actual inventory level vector, and the inventory capacity limit vector if the current mode is training mode. The fifth processing unit is used to calculate triple loss data based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and a preset triple loss function. The sixth processing unit is used to calculate the gradient of the triple loss data with respect to the learnable parameters according to a preset backpropagation algorithm, and to optimize and update the learnable parameters according to a preset optimization algorithm to minimize the triple loss data; wherein, the learnable parameters include the learnable parameters in the supply chain dynamic cascade network and the learnable parameters in the spatiotemporal joint prediction function.

[0073] Furthermore, the supply chain graph data includes feature matrices of all nodes in the supply chain network, feature matrices of all edges, and timestamp differences between all nodes. The first processing unit is specifically used for: The feature matrix of the node, the feature matrix of the edge, and the timestamp difference between the nodes are input into a pre-trained bidirectional graph attention network to encode the node state vector; wherein, the bidirectional graph attention network includes an attention module; the attention module is used to calculate the attention coefficient between the nodes, and the attention coefficient integrates the feature similarity and time decay degree between the nodes.

[0074] Furthermore, the attention module is used to obtain the attention coefficient based on the feature matrix of the node, the feature matrix of the edge, the timestamp difference between the nodes, and a preset attention coefficient calculation formula; The default formula for calculating the attention coefficient is: in, The spatiotemporal decay factor is defined as follows: , The timestamp difference between the nodes is represented by λ, which represents a learnable parameter in the graph attention network based on the spatiotemporal decay mechanism. λ is used to control the spatiotemporal decay intensity. Let c represent the data update timestamps of node i and node j, respectively, and let c represent the dimension. Attention score vector, This represents the transpose of c. It is a dimension of The node feature weight matrix, It is a dimension of The edge feature weight matrix, All of these are learnable parameters in the graph attention network based on the spatiotemporal decay mechanism. They represent dimensions as follows: The feature matrix and dimension of node i are The feature matrix of node j, The feature matrix representing the edge between node i and node j, with dimension 1. , Represents the normalized exponential function, This represents the activation function.

[0075] Furthermore, the spatiotemporal joint prediction function includes an accuracy evaluation function, which is used to calculate a spatiotemporal index to evaluate the prediction accuracy based on the predicted shipment volume vector, the actual shipment volume vector, and a preset accuracy calculation formula. The preset accuracy calculation formula is: ; ST represents the spatiotemporal index used to evaluate the accuracy of the prediction; the smaller the value of ST, the higher the accuracy of the prediction. Indicates the length of the evaluation time window. This represents a point in time within the evaluation time window. The dynamic weight at time point τ is calculated from the inventory turnover rate using a function, at that time point. The dynamic weight is calculated from the inventory turnover rate at that moment using an objective function, which is: , This represents the inventory turnover rate at time point τ. These represent the predicted shipment volume vector and the actual shipment volume vector corresponding to the time point τ, respectively. express of Norm, express of Norm, This represents the dynamic time-normalized distance between the predicted shipment volume vector and the actual shipment volume vector.

[0076] Furthermore, the third processing unit is specifically used for: The predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network are input into a preset KKT constraint optimizer to obtain an executable shipment decision vector. The preset KKT constraint optimizer is: ; This represents the predicted shipment volume vector to be optimized. This represents the planned shipment volume vector. It is a constraint matrix. It is the constraint boundary vector. This indicates that the constraint objective of the preset KKT constraint optimizer is... and This represents minimizing the predicted shipment volume vector. With the planned shipment volume vector The square of the Euclidean distance between them Represented by the constraint matrix and constraint boundary vector Defined constraints.

[0077] Furthermore, the fifth processing unit is specifically used for: Based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and the preset triple loss function, triple loss data is calculated. The preset triple loss function is as follows: ; This indicates the error in inventory level forecasting. This represents the predicted inventory level vector. The actual inventory level vector is shown below. This indicates the penalty for calculating capacity constraints. The upper limit vector of inventory capacity, Indicates the first 1 node This indicates the calculation of the supply smoothing penalty. Let t represent the predicted shipment volume vector, and t represent time. Represents the weight parameters. Used to control the impact of inventory level forecasting errors. Used to control the impact of capacity constraint penalties Used to control the impact of supply smoothing penalties.

[0078] Figure 4 This is a schematic diagram of the supply chain inventory optimization device provided in the third embodiment of this application. Figure 4 As shown, the supply chain inventory optimization device 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40, such as a supply chain inventory optimization program. When the processor 40 executes the computer program 42, it implements the steps in the various supply chain inventory optimization method embodiments described above, for example... Figure 1 Steps 101 to 104 are shown. Alternatively, when the processor 40 executes the computer program 42, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3 The functions of modules 310 to 340 are shown.

[0079] For example, the computer program 42 can be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 42 in the supply chain inventory optimization device 4. For example, the computer program 42 can be divided into an acquisition unit, a first processing unit, a second processing unit, and a third processing unit, with the specific functions of each unit as follows: An acquisition unit is used to acquire supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The first processing unit is used to input the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encode it to obtain a node state vector; wherein, the node state vector reflects the cascade characteristics between upstream and downstream links in the supply chain network; The second processing unit is used to input the node state vector into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; The third processing unit is used to obtain the planned shipment volume vector and the business constraint rules corresponding to the supply chain network if the current mode is not the training mode, and input the predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable shipment decision vector.

[0080] The supply chain inventory optimization device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that... Figure 4 This is merely an example of the supply chain inventory optimization device 4 and does not constitute a limitation on the supply chain inventory optimization device 4. It may include more or fewer components than shown, or combine certain components, or different components. For example, the supply chain inventory optimization device may also include input / output devices, network access devices, buses, etc.

[0081] The processor 40 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0082] The memory 41 can be an internal storage unit of the supply chain inventory optimization device 4, such as a hard drive or memory of the supply chain inventory optimization device 4. The memory 41 can also be an external storage device of the supply chain inventory optimization device 4, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the supply chain inventory optimization device 4. Furthermore, the supply chain inventory optimization device 4 can include both internal storage units and external storage devices. The memory 41 is used to store the computer program and other programs and data required by the supply chain inventory optimization device. The memory 41 can also be used to temporarily store data that has been output or will be output.

[0083] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0084] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0085] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0086] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0087] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. Computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0089] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0090] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0091] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0092] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A supply chain inventory optimization method, characterized in that, Including the following steps: Obtain supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The supply chain graph data is input into a pre-trained dynamic cascaded supply chain network, and the node state vector is encoded to obtain a node state vector; wherein, the node state vector reflects the cascaded characteristics between upstream and downstream links in the supply chain network; The node state vector is input into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; If the current mode is not the training mode, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network are obtained. The predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network are input into the preset decision constraint optimization function to obtain an executable shipment decision vector.

2. The supply chain inventory optimization method according to claim 1, characterized in that, The prediction result also includes a predicted inventory level vector, and further includes the following steps: If the current mode is training mode, obtain the actual shipment volume vector, the actual inventory level vector, and the inventory capacity limit vector; Based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and the preset triple loss function, triple loss data is calculated. According to a preset backpropagation algorithm, the gradient of the triple loss data with respect to the learnable parameters is calculated, and the learnable parameters are optimized and updated according to a preset optimization algorithm to minimize the triple loss data; wherein, the learnable parameters include the learnable parameters in the supply chain dynamic cascade network and the learnable parameters in the spatiotemporal joint prediction function.

3. The supply chain inventory optimization method according to claim 1 or 2, characterized in that, The supply chain graph data includes feature matrices of all nodes in the supply chain network, feature matrices of all edges, and timestamp differences between all nodes. The step of inputting the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encoding it to obtain node state vectors includes the following steps: The feature matrix of the node, the feature matrix of the edge, and the timestamp difference between the nodes are input into a pre-trained bidirectional graph attention network to encode the node state vector; wherein, the bidirectional graph attention network includes an attention module; the attention module is used to calculate the attention coefficient between the nodes, and the attention coefficient integrates the feature similarity and time decay degree between the nodes.

4. The supply chain inventory optimization method according to claim 3, characterized in that: The attention module is used to obtain the attention coefficient based on the feature matrix of the node, the feature matrix of the edge, the timestamp difference between the nodes, and a preset attention coefficient calculation formula; The default formula for calculating the attention coefficient is: in, The spatiotemporal decay factor is defined as follows: , This indicates the timestamp difference between the nodes. This represents a learnable parameter in the graph attention network based on the spatiotemporal decay mechanism. Used to control the spatiotemporal decay intensity Let c represent the data update timestamps of node i and node j, respectively, and let c represent the dimension. Attention score vector, This represents the transpose of c. It is a dimension of The node feature weight matrix, It is a dimension of The edge feature weight matrix, All of these are learnable parameters in the graph attention network based on the spatiotemporal decay mechanism. They represent dimensions as follows: The feature matrix and dimension of node i are The feature matrix of node j, The feature matrix representing the edge between node i and node j, with dimension 1. , Represents the normalized exponential function, This represents the activation function.

5. The supply chain inventory optimization method according to claim 1 or 2, characterized in that, The spatiotemporal joint prediction function includes an accuracy evaluation function, which is used to calculate a spatiotemporal index to evaluate the prediction accuracy based on the predicted shipment volume vector, the actual shipment volume vector, and a preset accuracy calculation formula. The preset accuracy calculation formula is: ST represents the spatiotemporal index used to evaluate the accuracy of the prediction; a smaller ST value indicates higher prediction accuracy. T represents the length of the evaluation time window, and τ represents the time point within the evaluation time window. The dynamic weight at time point τ is calculated from the inventory turnover rate using a function, at that time point. The dynamic weight is calculated from the inventory turnover rate at that moment using an objective function, which is: , This represents the inventory turnover rate at time point τ. These represent the predicted shipment volume vector and the actual shipment volume vector corresponding to the time point τ, respectively. express of Norm, express of Norm, This represents the dynamic time-normalized distance between the predicted shipment volume vector and the actual shipment volume vector.

6. The supply chain inventory optimization method according to claim 1 or 2, characterized in that, The step of inputting the predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable shipment decision vector includes the following steps: The predicted shipment volume vector, the planned shipment volume vector, and the business constraint rules corresponding to the supply chain network are input into a preset KKT constraint optimizer to obtain an executable shipment decision vector. The preset KKT constraint optimizer is: ; This represents the predicted shipment volume vector to be optimized. Let C represent the planned shipment volume vector, C be the constraint matrix, and b be the constraint boundary vector. This indicates that the constraint objective of the preset KKT constraint optimizer is... and , This represents minimizing the predicted shipment volume vector. With the planned shipment volume vector The square of the Euclidean distance between them Represented by the constraint matrix and constraint boundary vector Defined constraints.

7. The supply chain inventory optimization method according to claim 2, characterized in that, The step of calculating triple loss data based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and a preset triple loss function includes the following steps: Based on the predicted shipment volume vector, the actual shipment volume vector, the predicted inventory level vector, the actual inventory level vector, the inventory capacity upper limit vector, and the preset triple loss function, triple loss data is calculated. The preset triple loss function is as follows: ; This indicates the error in inventory level forecasting. This represents the predicted inventory level vector. This represents the actual inventory level vector. This indicates the penalty for calculating capacity constraints. The upper limit vector of inventory capacity, Indicates the first node, This indicates the calculation of the supply smoothing penalty. This represents the predicted shipment volume vector. Indicates time, Represents the weight parameters. Used to control the impact of inventory level forecasting errors. Used to control the impact of capacity constraint penalties Used to control the impact of supply smoothing penalties.

8. A supply chain inventory optimization device, characterized in that, include: An acquisition unit is used to acquire supply chain graph data; wherein, the supply chain graph data is used to store the graph structure corresponding to the supply chain network, and the graph structure contains nodes corresponding to several supply chain entities and edges corresponding to several entity relationships; The first processing unit is used to input the supply chain graph data into a pre-trained dynamic cascaded supply chain network and encode it to obtain a node state vector; wherein, the node state vector reflects the cascade characteristics between upstream and downstream links in the supply chain network; The second processing unit is used to input the node state vector into a pre-trained spatiotemporal joint prediction function to obtain a prediction result; wherein, the prediction result includes a predicted shipment volume vector; the supply chain dynamic cascade network and the spatiotemporal joint prediction function are obtained by training and optimization based on a preset triple loss function; The third processing unit is used to obtain the planned shipment volume vector and the business constraint rules corresponding to the supply chain network if the current mode is not the training mode, and input the predicted shipment volume vector, the planned shipment volume vector and the business constraint rules corresponding to the supply chain network into a preset decision constraint optimization function to obtain an executable shipment decision vector.

9. A supply chain inventory optimization device, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.