Inventory optimization method and system based on deep learning model

Process multi-dimensional inventory data through deep learning models, extract short-term and long-term features, generate accurate sales forecasts and optimize inventory decisions, solving the shortcomings of traditional methods in data diversity, demand complexity and market dynamics, and achieving more efficiency inventory management.

CN119338511AActive Publication Date: 2025-01-21QINSILK COM

Patent Information

Application Number
CN202411889872.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-01-21
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

Traditional inventory optimization methods are difficult to effectively process multi-dimensional data, capture complex demand patterns and adapt to dynamically changing market environments, resulting in insufficient prediction accuracy and timeliness.

Method used

An inventory optimization method based on deep learning models is adopted to obtain multi-dimensional data (historical sales, product attributes, consumer behavior, etc.), use temporal convolutional neural networks to extract short-term temporal features, and combine graph neural networks and multi-layer perceptrons to extract long-term Depending on the features, a sales forecast sequence is finally generated through a bidirectional long short-term memory network, and an inventory replenishment decision is generated through a dynamic programming model.

Benefits of technology

It improves the accuracy and reliability of sales forecasts, optimizes safety stock levels, realizes intelligent and refined management of inventory replenishment decisions, reduces inventory costs and improves the stability of the supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338511A_ABST
    Figure CN119338511A_ABST
Patent Text Reader

Abstract

The invention provides an inventory optimization method and system based on a deep learning model, and relates to the technical field of deep learning, and the method comprises the steps: obtaining the multi-dimensional data of a commodity, constructing a dynamic convolution kernel through employing a graph neural network, constructing a soft clustering distribution matrix in combination with a multi-layer perceptron, and obtaining a long-term dependence feature fusing a space dimension and a time dimension. And fusing the short-term and long-term features, inputting the fused short-term and long-term features into a bidirectional long-short-term memory network to generate a sales prediction sequence, and calculating a prediction confidence interval to obtain a final sales prediction result. And calculating a safe inventory level based on a sales prediction result, generating a replenishment decision by using a dynamic planning model based on deep reinforcement learning in combination with an inventory cost function, and finally sending the decision to a supply chain execution system. The sales volume is accurately predicted through the deep learning model, the inventory management is optimized, the storage cost, the stockout cost and the overstock cost are reduced, and the supply chain efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to deep learning technology, and in particular to an inventory optimization method and system based on a deep learning model. Background Art

[0002] Traditional inventory optimization methods mainly rely on statistical models, such as moving average method, exponential smoothing method and ARIMA model. These methods usually assume that demand patterns are relatively stable and have difficulty capturing complex demand fluctuations, especially when faced with factors such as promotions, seasonal changes and emergencies, and the forecasting accuracy is often insufficient. In addition, these methods usually only consider historical sales data and ignore other important information, such as product attributes, consumer behavior and external market environment, resulting in reduced reliability of forecast results.

[0003] The prior art has the following defects and deficiencies: 1. Traditional inventory optimization methods are difficult to effectively process multi-dimensional data. For example, data such as product attributes and consumer behavior contain rich potential information, but traditional statistical models are difficult to effectively integrate and utilize this information, resulting in limited accuracy of the prediction model.

[0004] 2. Traditional inventory optimization methods have difficulty capturing complex demand patterns. Actual demand is often affected by multiple factors, showing complex characteristics such as nonlinearity and time-varying. Traditional statistical models are usually based on linear assumptions and are difficult to accurately describe and predict such complex demand patterns.

[0005] 3. Traditional inventory optimization methods are difficult to adapt to the dynamically changing market environment. Changes in the market environment, such as the competition landscape and consumer preferences, will have a significant impact on demand. Traditional inventory optimization methods often lack effective capture and response mechanisms for these dynamic factors, resulting in reduced timeliness of forecast results. Summary of the invention

[0006] The embodiments of the present invention provide an inventory optimization method and system based on a deep learning model, which can solve the problems in the prior art.

[0007] According to a first aspect of the embodiments of the present invention, Provides inventory optimization methods based on deep learning models, including: Acquire multi-dimensional data corresponding to the target product, the multi-dimensional data including historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; the consumer behavior data includes page views, collections, purchases, and repurchase rates; perform time series alignment on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; A parameterized dynamic convolution kernel is constructed through a graph neural network according to the multi-dimensional data, and a soft clustering allocation matrix is ​​constructed based on a multi-layer perceptron, and a long-term dependency feature of the fused spatial dimension and the temporal dimension is obtained by combining residual connections; the short-term time series feature and the long-term dependency feature are subjected to feature fusion to obtain a mixed feature vector; the mixed feature vector is input into a bidirectional long short-term memory network to generate a sales forecast sequence; a forecast confidence interval is calculated based on the sales forecast sequence to form a final sales forecast result; Based on the sales forecast result, the safety stock level is calculated, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; an inventory cost function is constructed, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; the safety stock level and the inventory cost function are input into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; the inventory replenishment decision is sent to a supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

[0008] According to the multi-dimensional data, a parameterized dynamic convolution kernel is constructed through a graph neural network, and a soft clustering assignment matrix is ​​constructed based on a multi-layer perceptron. The long-term dependency features of the fusion space dimension and time dimension are obtained by combining residual connections, including: Normalizing the input multi-dimensional data to obtain a normalized feature matrix, taking each data in the multi-dimensional data as a graph node, calculating the similarity between graph nodes based on the normalized feature matrix to construct an adaptive adjacency matrix, and performing a graph convolution operation on the adaptive adjacency matrix and the normalized feature matrix to obtain initial node features; Extracting time coding information from the initial node features, performing a splicing operation on the time coding information and the initial node features and inputting the splicing operation into a multi-layer perceptron network to generate dynamic convolution kernel parameters, and performing an adaptive convolution operation on the initial node features based on the dynamic convolution kernel parameters to obtain dynamic time series features; Based on the dynamic time series features, a feature difference vector between node pairs is constructed, the feature difference vector is input into a multilayer perceptron to calculate a node similarity matrix, the node similarity matrix is ​​softmax normalized to obtain a soft clustering allocation matrix, and the dynamic time series features are weighted aggregated using the soft clustering allocation matrix to obtain cluster center features; Performing feature fusion on the cluster center feature and the dynamic time series feature to obtain a fused feature, inputting the fused feature into a gating network to generate an adaptive gating weight, and performing selective information transfer on the fused feature based on the adaptive gating weight to obtain a gated output feature; Input the gated output features into three independent linear mapping layers to obtain a query matrix, a key matrix and a value matrix, calculate an attention score based on the query matrix and the key matrix, and multiply the attention score by a time decay factor to obtain a temporal attention weight; Based on the temporal attention weights, a value matrix is ​​weightedly aggregated to obtain a multi-head attention feature, the multi-head attention feature is input into a feedforward neural network for nonlinear transformation to obtain a transformation feature, the transformation feature is residually connected with the multi-head attention feature and subjected to layer normalization processing to obtain a long-term dependency feature with a long-term dependency relationship.

[0009] Inputting the mixed feature vector into a bidirectional long short-term memory network to generate a sales forecast sequence; calculating a forecast confidence interval based on the sales forecast sequence to form a final sales forecast result includes: Input the mixed feature vector into the forward network of the bidirectional long short-term memory network to obtain a forward hidden state feature, input the mixed feature vector into the backward network of the bidirectional long short-term memory network to obtain a backward hidden state feature, and concatenate the forward hidden state feature with the backward hidden state feature to obtain a bidirectional hidden state feature; An attention weight calculation unit is constructed based on the bidirectional hidden state feature, and the attention weight calculation unit includes a historical state mapping layer and a current state mapping layer. The historical bidirectional hidden state feature and the bidirectional hidden state feature at the current moment are respectively input into the historical state mapping layer and the current state mapping layer, and a temporal attention weight is obtained through attention scoring; the context vector is obtained by weighted summing the bidirectional hidden state feature at the current moment using the temporal attention weight, and the context vector is feature-fused with the bidirectional hidden state feature at the current moment to obtain an enhanced feature representation; Input the enhanced feature representation into a prediction distribution generation network, the prediction distribution generation network includes a mean prediction layer and a variance prediction layer, the mean prediction layer outputs a prediction mean, and the variance prediction layer outputs a prediction variance; Monte Carlo sampling is performed based on the prediction mean and the prediction variance to obtain multiple groups of prediction samples, and statistical distribution characteristics of the multiple groups of prediction samples are calculated to obtain a sales forecast sequence; The prediction interval is adaptively adjusted, and the prediction mean and the prediction variance are dynamically updated based on the degree of deviation between the actual sales volume and the predicted mean, so as to obtain the calibrated upper and lower bounds of the prediction confidence interval, and the sales forecast sequence and the upper and lower bounds of the prediction confidence interval are combined to form the final sales forecast result.

[0010] Based on the sales forecast result, the safety stock level is calculated, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval, including: Calculate the forecast interval standard deviation based on the forecast confidence interval upper bound and the forecast confidence interval lower bound of the sales forecast sequence, and combine the forecast interval standard deviation with the service level coefficient, replenishment lead time, and review cycle to obtain the initial safety stock level; Calculate a first absolute value of the difference between the upper bound of the forecast confidence interval and the maximum historical forecast value, and a second absolute value of the difference between the minimum historical forecast value and the lower bound of the forecast confidence interval, and select the ratio of the larger value of the first absolute value and the second absolute value to the standard deviation of the forecast interval as the demand fluctuation adjustment factor; The product of the demand fluctuation adjustment factor and the pre-acquired sensitivity parameter is used as a dynamic adjustment amount, and the initial safety stock level and the dynamic adjustment amount are combined to obtain a final safety stock level.

[0011] Construct an inventory cost function, which includes a weighted combination of three dimensions: storage cost, out-of-stock cost, and backlog cost: Constructing a storage cost function, which is the product of the unit storage cost and the current inventory level; constructing a stockout cost function, which is the product of the unit stockout cost and the inventory gap; constructing a backlog cost function, which is the product of the unit backlog cost and the inventory amount exceeding the upper limit of the prediction confidence interval; Initial weight coefficients are respectively assigned to the warehousing cost function, the out-of-stock cost function, and the backlog cost function, and weight gradients are calculated based on the contribution of each cost function to the total cost. The weight coefficients are updated according to the weight gradients and the learning rate. The updated weight coefficients are normalized after exponential transformation to obtain the final weight coefficients, and the inventory cost function is constructed by weighted combination of the final weight coefficients and the corresponding cost functions.

[0012] The safety stock level and the inventory cost function are input into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity. Constructing a state vector space, wherein the state vector space includes the safety inventory level and the in-transit order quantity of each category; constructing a dynamic programming value function by adding the inventory cost function to the expected value of the future value function adjusted by the discount factor; constructing a state transfer equation based on the state vector space, wherein the state transfer equation calculates the inventory status of the next period according to the current inventory level, in-transit order quantity, actual demand quantity and replenishment quantity of each category, and updates the in-transit order status according to the replenishment lead time of each category; Substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner to obtain an optimal value function; calculating the reorder point of each category based on the optimal value function, comparing the sum of the safety stock level and the in-transit order quantity of each category with the corresponding reorder point, and determining the replenishment time point when the sum of the safety stock level and the in-transit order quantity is lower than the reorder point; The resource occupancy and total available resources of each category are obtained to construct resource constraints, and the unit procurement cost and available budget of each category are obtained to construct budget constraints. The economic order quantity is calculated based on the fixed ordering cost, average demand rate and unit holding cost of each category, and the economic order quantity is used as the replenishment quantity on the premise that the resource constraints and the budget constraints are met.

[0013] Substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner, and obtaining the optimal value function includes: ; in, Indicates the state at time t S t The optimal value function under A t represents the action at time t, represents the inventory cost function at time t, represents the discount factor, which is used to balance current costs with future costs, represents the expected value of the value function at time t+1; The inventory cost function is shown in the following formula: ; in, represents the storage cost function, represents the out-of-stock cost function, represents the backlog cost function, , , They represent the final weight coefficients corresponding to the warehousing cost function, out-of-stock cost function, and backlog cost function, respectively. represents the inventory level at time t; The state transition equation is shown in the following formula: ; ; ; in, represents the demand for category i at time t, represents the replenishment lead time of category i at time t+1, represents the replenishment lead time of category N at time t+1, represents the number of in-transit orders of category i at time t, represents the order quantity of category i at time t, represents transpose; The reorder point calculation formula is as follows: ; in, represents the optimal reorder point for category i, represents the average demand rate of category i, represents the standard normal distribution quantile corresponding to the service level, represents the standard deviation of demand for category i.

[0014] A second aspect of an embodiment of the present invention provides an inventory optimization system based on a deep learning model, including: The first unit is used to obtain multi-dimensional data corresponding to the target product, wherein the multi-dimensional data includes historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; the consumer behavior data includes page views, collections, purchases, and repurchase rates; perform time series alignment processing on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; The second unit is used to construct a parameterized dynamic convolution kernel through a graph neural network according to the multi-dimensional data, and to construct a soft clustering allocation matrix based on a multi-layer perceptron, and to obtain a long-term dependency feature that fuses the spatial dimension and the time dimension by combining residual connections; to perform feature fusion on the short-term time series feature and the long-term dependency feature to obtain a mixed feature vector; to input the mixed feature vector into a bidirectional long short-term memory network to generate a sales forecast sequence; to calculate a forecast confidence interval based on the sales forecast sequence to form a final sales forecast result; The third unit is used to calculate the safety stock level based on the sales forecast result, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; construct an inventory cost function, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; input the safety stock level and the inventory cost function into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; and send the inventory replenishment decision to a supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

[0015] The beneficial effects of this application are as follows: 1. Improve the accuracy of sales forecast: The present invention uses a time series convolutional neural network to extract short-term time series features, and combines a graph neural network and a multi-layer perceptron to extract long-term dependency features. Finally, a sales forecast sequence is generated through a bidirectional long short-term memory network, which can more comprehensively capture the trend of commodity sales changes and evaluate the reliability of the forecast results through the forecast confidence interval, thereby improving the accuracy of sales forecasts.

[0016] 2. Optimize safety stock level: This invention determines the safety stock level based on the forecast confidence interval, avoiding the limitations of traditional methods that set safety stock based on empirical values ​​or simple statistical methods. It can determine the safety stock level more accurately and reduce inventory costs while meeting sales demand.

[0017] 3. Intelligent inventory replenishment decision-making: The present invention constructs an inventory cost function that includes warehousing cost, out-of-stock cost and backlog cost, and combines the deep reinforcement learning model to build a dynamic programming model. It can automatically generate the optimal replenishment strategy based on the predicted sales volume and cost function, including replenishment time point and replenishment quantity, to achieve intelligent and refined management of inventory replenishment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a flowchart of an inventory optimization method based on a deep learning model according to an embodiment of the present invention; Figure 2 Schematic diagram of the structure of an inventory optimization system based on a deep learning model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0021] Figure 1 Schematic diagram of the process of the inventory optimization method based on the deep learning model according to the embodiment of the present invention. Figure 1 As shown, the method includes: S101. Acquire multi-dimensional data corresponding to the target product, wherein the multi-dimensional data includes historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; and the consumer behavior data includes page views, collections, additional purchases, and repurchase rate; perform time series alignment processing on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; S102. Construct a parameterized dynamic convolution kernel through a graph neural network based on the multi-dimensional data, and construct a soft clustering assignment matrix based on a multi-layer perceptron, and combine residual connections to obtain long-term dependency features that fuse spatial dimensions and time dimensions; perform feature fusion on the short-term time series features and the long-term dependency features to obtain a mixed feature vector; input the mixed feature vector into a bidirectional long short-term memory network to generate a sales forecast sequence; calculate a forecast confidence interval based on the sales forecast sequence to form a final sales forecast result; S103. Based on the sales forecast result, calculate the safety stock level, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; construct an inventory cost function, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; input the safety stock level and the inventory cost function into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; send the inventory replenishment decision to the supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

[0022] In an optional implementation, a parameterized dynamic convolution kernel is constructed through a graph neural network according to the multi-dimensional data, and a soft clustering assignment matrix is ​​constructed based on a multi-layer perceptron. The long-term dependency features of the fusion space dimension and the time dimension are obtained by combining residual connections, including: Normalizing the input multi-dimensional data to obtain a normalized feature matrix, taking each data in the multi-dimensional data as a graph node, calculating the similarity between graph nodes based on the normalized feature matrix to construct an adaptive adjacency matrix, and performing a graph convolution operation on the adaptive adjacency matrix and the normalized feature matrix to obtain initial node features; Extracting time coding information from the initial node features, performing a splicing operation on the time coding information and the initial node features and inputting the splicing operation into a multi-layer perceptron network to generate dynamic convolution kernel parameters, and performing an adaptive convolution operation on the initial node features based on the dynamic convolution kernel parameters to obtain dynamic time series features; Based on the dynamic time series features, a feature difference vector between node pairs is constructed, the feature difference vector is input into a multilayer perceptron to calculate a node similarity matrix, the node similarity matrix is ​​softmax normalized to obtain a soft clustering allocation matrix, and the dynamic time series features are weighted aggregated using the soft clustering allocation matrix to obtain cluster center features; Performing feature fusion on the cluster center feature and the dynamic time series feature to obtain a fused feature, inputting the fused feature into a gating network to generate an adaptive gating weight, and performing selective information transfer on the fused feature based on the adaptive gating weight to obtain a gated output feature; Input the gated output features into three independent linear mapping layers to obtain a query matrix, a key matrix and a value matrix, calculate an attention score based on the query matrix and the key matrix, and multiply the attention score by a time decay factor to obtain a temporal attention weight; Based on the temporal attention weights, a value matrix is ​​weightedly aggregated to obtain a multi-head attention feature, the multi-head attention feature is input into a feedforward neural network for nonlinear transformation to obtain a transformation feature, the transformation feature is residually connected with the multi-head attention feature and subjected to layer normalization processing to obtain a long-term dependency feature with a long-term dependency relationship.

[0023] A long-term dependency feature extraction method based on graph neural network and soft clustering assignment matrix is ​​used to process multi-dimensional time series data, which can effectively capture the long-term dependency relationship between spatial dimension and time dimension. The specific steps of this method are as follows: First, the input multi-dimensional data is normalized. For example, suppose the input data is a data set with 10 time steps, each time step has 20 sensors, and each sensor collects data in 3 dimensions. Min-Max normalization can be performed on the data of each dimension of each sensor, scaling the data range to between 0 and 1, and obtaining a 10x20x3 normalized feature matrix.

[0024] Next, an adaptive adjacency matrix is ​​constructed based on the normalized feature matrix. Each data point in the multidimensional data is regarded as a node in the graph, and the similarity between nodes is calculated. For example, the Euclidean distance can be used to measure the similarity between nodes. The smaller the distance, the higher the similarity. The calculated similarity values ​​are used to construct an adaptive adjacency matrix to represent the connection relationship between nodes.

[0025] Then, the adaptive adjacency matrix and the normalized feature matrix are subjected to graph convolution to obtain the initial node features. The graph convolution operation can be understood as a weighted average of the node's own features and the features of its neighboring nodes.

[0026] Extract time coding information from the initial node features. For example, you can use sine and cosine functions to generate time coding vectors to incorporate time information into node features. Concatenate the time coding information with the initial node features to obtain new features containing time information.

[0027] The concatenated features are input into the multi-layer perceptron network to generate dynamic convolution kernel parameters. The multi-layer perceptron network can learn the implicit patterns in the data and generate appropriate convolution kernel parameters based on these patterns. Based on the dynamic convolution kernel parameters, the initial node features are adaptively convolved to obtain dynamic time series features.

[0028] Construct feature difference vectors between node pairs based on dynamic time series features. For example, the difference between two node features can be calculated to obtain feature difference vectors. The feature difference vectors are input into a multilayer perceptron to calculate the node similarity matrix. Softmax normalization is performed on the node similarity matrix to obtain a soft clustering assignment matrix.

[0029] The soft clustering assignment matrix is ​​used to perform weighted aggregation on the dynamic time series features to obtain the cluster center features. The soft clustering assignment matrix can be regarded as the probability that each node belongs to each cluster.

[0030] The cluster center feature and the dynamic time series feature are fused to obtain the fused feature. For example, the two can be spliced. The fused feature is input into the gating network to generate adaptive gating weights. The gating network can control the flow of information and selectively transmit important information. Based on the adaptive gating weights, the fused feature is selectively transmitted to obtain the gated output feature.

[0031] The gated output features are fed into three separate linear mapping layers to obtain the query matrix, key matrix, and value matrix. The attention score is calculated based on the query matrix and key matrix. The attention score is multiplied by the time decay factor to obtain the temporal attention weight. The time decay factor can give higher weights to nodes with closer time steps.

[0032] Based on the temporal attention weight, the value matrix is ​​weighted and aggregated to obtain the multi-head attention feature. The multi-head attention feature is input into the feedforward neural network for nonlinear transformation to obtain the transformed feature. The transformed feature is residually connected with the multi-head attention feature and subjected to layer normalization to obtain the long-term dependency feature with long-term dependency.

[0033] The beneficial effects of this method are reflected in the following three aspects: 1. Improve the ability to express features: Through graph convolution operations and soft clustering assignment matrices, the dependencies of data in spatial and temporal dimensions can be effectively captured, thereby improving the ability to express features. For example, in the task of traffic flow prediction, the spatiotemporal patterns of road network structure and traffic flow can be better captured.

[0034] 2. Enhance the robustness of the model: Dynamic convolution kernels and adaptive gating mechanisms can make the model better adapt to different data distributions and noise interference, thereby enhancing the robustness of the model. For example, in the case of abnormal sensor data, it can still maintain good prediction performance.

[0035] 3. Capturing long-term dependencies: By combining time-coded information and temporal attention mechanisms, long-term dependencies in the data can be effectively captured, thereby improving the model's ability to predict long-term trends. For example, in the task of stock price prediction, market trends and cyclical fluctuations can be better captured.

[0036] In an optional implementation, the mixed feature vector is input into a bidirectional long short-term memory network to generate a sales forecast sequence; and a forecast confidence interval is calculated based on the sales forecast sequence to form a final sales forecast result, including: Input the mixed feature vector into the forward network of the bidirectional long short-term memory network to obtain a forward hidden state feature, input the mixed feature vector into the backward network of the bidirectional long short-term memory network to obtain a backward hidden state feature, and concatenate the forward hidden state feature with the backward hidden state feature to obtain a bidirectional hidden state feature; An attention weight calculation unit is constructed based on the bidirectional hidden state feature, and the attention weight calculation unit includes a historical state mapping layer and a current state mapping layer. The historical bidirectional hidden state feature and the bidirectional hidden state feature at the current moment are respectively input into the historical state mapping layer and the current state mapping layer, and a temporal attention weight is obtained through attention scoring; the context vector is obtained by weighted summing the bidirectional hidden state feature at the current moment using the temporal attention weight, and the context vector is feature-fused with the bidirectional hidden state feature at the current moment to obtain an enhanced feature representation; Input the enhanced feature representation into a prediction distribution generation network, the prediction distribution generation network includes a mean prediction layer and a variance prediction layer, the mean prediction layer outputs a prediction mean, and the variance prediction layer outputs a prediction variance; Monte Carlo sampling is performed based on the prediction mean and the prediction variance to obtain multiple groups of prediction samples, and statistical distribution characteristics of the multiple groups of prediction samples are calculated to obtain a sales forecast sequence; The prediction interval is adaptively adjusted, and the prediction mean and the prediction variance are dynamically updated based on the degree of deviation between the actual sales volume and the predicted mean, so as to obtain the calibrated upper and lower bounds of the prediction confidence interval, and the sales forecast sequence and the upper and lower bounds of the prediction confidence interval are combined to form the final sales forecast result.

[0037] A product sales forecasting method based on a bidirectional long short-term memory network and an attention mechanism can effectively improve the accuracy and reliability of sales forecasting. This method comprehensively considers various factors that affect sales, such as historical sales data, seasonal factors, and promotional activities, and uses the attention mechanism to capture the importance of different time steps, and finally generates a forecast result with a confidence interval.

[0038] First, extract and process various features that affect product sales. For example, historical sales data, product prices, promotional information, seasonal factors, holiday information, competitor information, macroeconomic indicators, etc. These features can be selected and adjusted according to specific scenarios. Then, standardize or normalize these different types of features to eliminate the dimensional differences between different features. Finally, concatenate these processed features together to form a mixed feature vector. For example, the sales of a product in the past 7 days are [10, 12, 15, 13, 16, 18, 20], the product price is 50 yuan, there are recent promotions, the season is summer, and the holiday is non-holiday. After these features are digitized and standardized, they are concatenated into a mixed feature vector.

[0039] Next, the mixed feature vector is input into the bidirectional long short-term memory network. The bidirectional long short-term memory network contains a forward network and a backward network, which learn time series features from the forward and backward directions respectively. The mixed feature vector is input into the forward network to obtain the forward hidden state feature sequence; the mixed feature vector is input into the backward network to obtain the backward hidden state feature sequence. Then, the forward hidden state features and the backward hidden state features of the corresponding time steps are concatenated to obtain the bidirectional hidden state feature sequence. For example, the above mixed feature vector is input into the bidirectional long short-term memory network to obtain the bidirectional hidden state features of 7 time steps, and the dimension of each feature vector is 256.

[0040] Then, an attention weight calculation unit is constructed based on the bidirectional hidden state features. The unit contains a historical state mapping layer and a current state mapping layer. The historical bidirectional hidden state features and the bidirectional hidden state features at the current moment are input into the two mapping layers respectively. The temporal attention weight is obtained by calculating the similarity score between the bidirectional hidden state features at the current moment and the bidirectional hidden state features at each historical moment. For example, the similarity score between the bidirectional hidden state features at the 7th time step and the bidirectional hidden state features at the previous 6 time steps is calculated to obtain a 6-dimensional attention weight vector.

[0041] The obtained temporal attention weights are used to perform weighted summation of historical bidirectional hidden state features to obtain a context vector. The context vector incorporates the contribution of historical information and highlights historical information that is important for prediction at the current moment. Then, the context vector is fused with the bidirectional hidden state features at the current moment, for example, the two are concatenated together to obtain an enhanced feature representation.

[0042] The enhanced feature representation is input into the prediction distribution generation network, which contains a mean prediction layer and a variance prediction layer. The mean prediction layer outputs the predicted mean, and the variance prediction layer outputs the predicted variance. For example, the enhanced feature representation of the 7th time step is input into the prediction distribution generation network, and the predicted mean is 22 and the predicted variance is 4.

[0043] Monte Carlo sampling is performed based on the predicted mean and predicted variance to obtain multiple sets of predicted samples. For example, sampling is performed based on a normal distribution with a mean of 22 and a variance of 4 to obtain 1,000 predicted samples. The statistical distribution characteristics of these predicted samples are calculated, such as the average value, to obtain the sales forecast sequence.

[0044] Finally, the prediction interval is adaptively adjusted. According to the degree of deviation between the actual sales and the predicted mean, the predicted mean and prediction variance are dynamically updated to obtain the calibrated upper and lower bounds of the prediction confidence interval. For example, if the actual sales continue to be higher than the predicted mean, the predicted mean and prediction variance are appropriately increased. The sales forecast sequence and the upper and lower bounds of the prediction confidence interval are combined to form the final sales forecast result. For example, the final forecast result is: the sales forecast sequence for the next 7 days is [22, 23, 25,24, 26, 28, 30], and the upper and lower bounds of the confidence interval are [20, 24], [21, 25], [23, 27], [22, 26],[24, 28], [26, 30], [28, 32] respectively.

[0045] The beneficial effects of this method are reflected in the following three aspects: 1. Improved prediction accuracy: By integrating multiple features and utilizing the attention mechanism, it is possible to more accurately capture the changing trend of product sales and improve prediction accuracy.

[0046] 2. Enhanced reliability: By predicting confidence intervals, the uncertainty of the prediction results can be quantified to provide more reliable decision support.

[0047] 3. Strong adaptability: By dynamically adjusting the prediction interval, it can adapt to changes in different products and different sales environments, and improve the generalization ability of the model.

[0048] In an optional implementation, based on the sales forecast result, the safety stock level is calculated, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval, including: Calculate the forecast interval standard deviation based on the forecast confidence interval upper bound and the forecast confidence interval lower bound of the sales forecast sequence, and combine the forecast interval standard deviation with the service level coefficient, replenishment lead time, and review cycle to obtain the initial safety stock level; Calculate a first absolute value of the difference between the upper bound of the forecast confidence interval and the maximum historical forecast value, and a second absolute value of the difference between the minimum historical forecast value and the lower bound of the forecast confidence interval, and select the ratio of the larger value of the first absolute value and the second absolute value to the standard deviation of the forecast interval as the demand fluctuation adjustment factor; The product of the demand fluctuation adjustment factor and the pre-acquired sensitivity parameter is used as a dynamic adjustment amount, and the initial safety stock level and the dynamic adjustment amount are combined to obtain a final safety stock level.

[0049] The safety stock calculation method is used to deal with the uncertainty of sales forecasts and improve the stability of the supply chain. The core of this method is to use the forecast confidence interval, combined with historical data and sensitivity parameters, to dynamically adjust the safety stock level to better cope with demand fluctuations.

[0050] First, obtain the sales forecast sequence and the corresponding upper and lower bounds of the forecast confidence interval. For example, through the time series analysis method, predict the daily sales in the next week and obtain the forecast confidence interval of each day. Assume that the forecast daily sales of a product in the next week is: [100, 110, 120, 130, 140, 150, 160], the corresponding upper bound of the forecast confidence interval is: [110, 121, 132, 143, 154, 165, 176], and the lower bound is: [90, 99, 108, 117, 126, 135,144].

[0051] Next, calculate the standard deviation of the forecast interval. Taking the above forecast interval as an example, we can calculate the fluctuation range of the daily forecast sales. For example, the fluctuation range of the first day is 110 - 90 = 20, and so on, we get the fluctuation range of a week. Then, based on these fluctuation ranges, calculate the standard deviation of the forecast interval, assuming that the calculation result is 10.

[0052] Then, the initial safety stock level is calculated by combining the service level coefficient, replenishment lead time and review cycle. Assume that the service level coefficient is 1.65 (corresponding to a 95% service level), the replenishment lead time is 3 days, and the review cycle is 1 day. Then, the initial safety stock level can be set as the standard deviation of the forecast interval * service level coefficient * sqrt(replenishment lead time / review cycle) = 10 * 1.65 * sqrt(3 / 1) ≈ 28.6. Here sqrt stands for square root.

[0053] Next, calculate the demand fluctuation adjustment factor. First, obtain the historical maximum forecast value and the historical minimum forecast value. Assume that the historical maximum forecast value is 200 and the historical minimum forecast value is 50. Then, calculate the absolute value of the difference between the upper bound of the forecast confidence interval and the historical maximum forecast value, and the absolute value of the difference between the historical minimum forecast value and the lower bound of the forecast confidence interval. Taking the upper bound of the above forecast interval as an example, the difference on the first day is |200 - 110| = 90, and so on to get the difference for one week. Similarly, the difference between the historical minimum forecast value and the lower bound can be calculated. Then, select the maximum value of these differences, assuming it is 100. Finally, the ratio of this maximum value to the standard deviation of the forecast interval is used as the demand fluctuation adjustment factor, that is, 100 / 10 = 10.

[0054] After that, the dynamic adjustment amount is calculated. The demand fluctuation adjustment factor is multiplied by the pre-acquired sensitivity parameter to obtain the dynamic adjustment amount. Assuming the sensitivity parameter is 0.2, the dynamic adjustment amount is 10 * 0.2 = 2.

[0055] Finally, the initial safety stock level is added to the dynamic adjustment amount to get the final safety stock level, which is 28.6 + 2 = 30.6. Therefore, the final safety stock level of this product is set to 31.

[0056] The beneficial effects of this method can be summarized in the following three aspects: Improved accuracy of inventory management: By combining forecast confidence intervals with historical data, more accurate estimates of demand fluctuations can be made to avoid excessively high or low inventory levels.

[0057] Enhance supply chain resilience: Dynamically adjust safety stock levels to better respond to market changes and emergencies, and improve the supply chain's ability to resist risks.

[0058] Reduce inventory costs: Avoid unnecessary inventory backlogs while ensuring service levels, thereby reducing inventory holding costs.

[0059] In an optional implementation, an inventory cost function is constructed, wherein the inventory cost function includes a weighted combination of three dimensions: storage cost, out-of-stock cost, and backlog cost. Constructing a storage cost function, which is the product of the unit storage cost and the current inventory level; constructing a stockout cost function, which is the product of the unit stockout cost and the inventory gap; constructing a backlog cost function, which is the product of the unit backlog cost and the inventory amount exceeding the upper limit of the prediction confidence interval; Initial weight coefficients are respectively assigned to the warehousing cost function, the out-of-stock cost function, and the backlog cost function, and weight gradients are calculated based on the contribution of each cost function to the total cost. The weight coefficients are updated according to the weight gradients and the learning rate. The updated weight coefficients are normalized after exponential transformation to obtain the final weight coefficients, and the inventory cost function is constructed by weighted combination of the final weight coefficients and the corresponding cost functions.

[0060] Inventory cost optimization method, which minimizes inventory cost by dynamically adjusting the weights of warehousing cost, out-of-stock cost and backlog cost.

[0061] First, collect historical inventory data, including daily inventory levels, sales data, forecast data, and forecast confidence intervals. For example, collect data from the past year and record daily beginning inventory, sales, forecast sales, and the upper and lower bounds of the forecast confidence interval.

[0062] Next, we construct the storage cost function, the out-of-stock cost function, and the backlog cost function respectively. The storage cost function is calculated as follows: the unit storage cost multiplied by the current inventory level. For example, if the unit storage cost is 0.5 yuan per item per day and the current inventory level is 100 items, the storage cost is 50 yuan. The out-of-stock cost function is calculated as follows: the unit out-of-stock cost multiplied by the inventory gap. The inventory gap refers to the difference between the demand and the inventory. If the difference is positive, it means out-of-stock, otherwise it is 0. For example, if the unit out-of-stock cost is 2 yuan per item per day, the demand for the day is 120 items, and there are only 100 items in stock, then the out-of-stock cost is 2 * (120 - 100) = 40 yuan. The backlog cost function is calculated as follows: the unit backlog cost multiplied by the inventory that exceeds the upper limit of the forecast confidence interval. The inventory that exceeds the upper limit of the forecast confidence interval refers to the part of the actual inventory that exceeds the upper limit of the forecast confidence interval. For example, if the unit backlog cost is 0.2 yuan per item per day, the inventory on that day is 150 pieces, and the upper limit of the forecast confidence interval is 130 pieces, then the backlog cost is 0.2 * (150 -130) = 4 yuan.

[0063] Then, the initial weight coefficients are assigned to the storage cost function, the out-of-stock cost function and the overstock cost function, respectively. For example, the initial weight coefficients are set to 0.3, 0.5 and 0.2, respectively.

[0064] Next, calculate the contribution of each cost function to the total cost, and calculate the weight gradient based on this. For example, assuming that the storage cost for a certain day is 50 yuan, the out-of-stock cost is 40 yuan, and the backlog cost is 4 yuan, then the total cost is 50 * 0.3 + 40 * 0.5 + 4 * 0.2 = 35.8 yuan. Then, calculate the weight gradient based on the value of each cost function and the total cost. For example, the gradient of the storage cost weight can be approximately calculated as the difference between the proportion of the storage cost to the total cost and the current weight, and so on.

[0065] Update the weight coefficient according to the calculated weight gradient and the preset learning rate. The learning rate controls the speed of weight update, for example, it is set to 0.01. The new weight coefficient is equal to the original weight coefficient plus the learning rate multiplied by the weight gradient.

[0066] The updated weight coefficients are subjected to exponential transformation and normalization to obtain the final weight coefficients. The exponential transformation can amplify the differences in weight coefficients, and the normalization process can ensure that the sum of the weight coefficients is 1.

[0067] Finally, the final weight coefficient is weighted and combined with the corresponding cost function to construct the final inventory cost function. For example, if the final weight coefficients are 0.25, 0.6, and 0.15, respectively, the final inventory cost function is 0.25 * storage cost + 0.6 * out-of-stock cost + 0.15 * overstock cost.

[0068] The beneficial effects of this inventory cost optimization method are reflected in three aspects: First, improve inventory management efficiency. By dynamically adjusting the weight of the cost function, the importance of various costs in different situations can be more accurately reflected, thereby formulating a more reasonable inventory strategy.

[0069] Second, reduce inventory costs. This method can effectively balance warehousing costs, out-of-stock costs, and backlog costs, thereby minimizing total inventory costs.

[0070] Third, enhance the competitiveness of enterprises. By optimizing inventory management, operating costs can be reduced, customer satisfaction can be improved, and ultimately the competitiveness of enterprises can be enhanced.

[0071] In an optional implementation, the safety stock level and the inventory cost function are input into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity. Constructing a state vector space, wherein the state vector space includes the safety inventory level and the in-transit order quantity of each category; constructing a dynamic programming value function by adding the inventory cost function to the expected value of the future value function adjusted by the discount factor; constructing a state transfer equation based on the state vector space, wherein the state transfer equation calculates the inventory status of the next period according to the current inventory level, in-transit order quantity, actual demand quantity and replenishment quantity of each category, and updates the in-transit order status according to the replenishment lead time of each category; Substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner to obtain an optimal value function; calculating the reorder point of each category based on the optimal value function, comparing the sum of the safety stock level and the in-transit order quantity of each category with the corresponding reorder point, and determining the replenishment time point when the sum of the safety stock level and the in-transit order quantity is lower than the reorder point; The resource occupancy and total available resources of each category are obtained to construct resource constraints, and the unit procurement cost and available budget of each category are obtained to construct budget constraints. The economic order quantity is calculated based on the fixed ordering cost, average demand rate and unit holding cost of each category, and the economic order quantity is used as the replenishment quantity on the premise that the resource constraints and the budget constraints are met.

[0072] A dynamic programming-based inventory replenishment decision method is used to determine the replenishment time and replenishment quantity of multiple categories to minimize inventory costs while meeting resource and budget constraints. The core of this method is to build a dynamic programming model that takes into account safety stock levels, orders in transit, demand forecasts, and various cost factors.

[0073] First, construct a state vector space. This space contains the safety stock level and in-transit order quantity of each category. For example, if there are two categories, one category has a safety stock of 10 units and in-transit orders of 5 units, and the other category has a safety stock of 20 units and in-transit orders of 10 units, then the current state vector can be expressed as (10, 5, 20, 10).

[0074] Next, define the inventory cost function. This function includes holding costs, out-of-stock costs, and ordering costs. For example, the holding cost per unit is 1 yuan, the out-of-stock cost per unit is 10 yuan, and the fixed cost of each order is 50 yuan. Then, add the inventory cost function to the expected value of the future value function adjusted by the discount factor to construct the dynamic programming value function. The discount factor is used to measure the impact of future costs on current decisions. Assuming the discount factor is 0.9, it means that the cost of a future period is equivalent to 0.9 times the cost of the current period.

[0075] Then, construct the state transition equation. This equation describes how the inventory state changes over time. It takes into account the current inventory level, in-transit orders, actual demand, and replenishment quantity, and updates the in-transit order state according to the replenishment lead time of each category. For example, if the current inventory of a category is 10 units, the in-transit orders are 5 units, the actual demand is 8 units, the replenishment quantity is 15 units, and the replenishment lead time is 2 periods, then the inventory state in the next period will be 10 + 5 - 8 +15 = 22 units, and the in-transit order state will be updated according to the lead time.

[0076] Substitute the state transition equation into the dynamic programming value function, solve the dynamic programming value function recursively, and obtain the optimal value function. The recursive process starts from the last period and gradually moves forward to the first period. The output value of the optimal value function corresponds to the reorder point of each category. The reorder point is a threshold. When the inventory level is lower than this threshold, replenishment is required.

[0077] Compare the sum of the safety stock level and the in-transit orders of each category with the corresponding reorder point. When the sum of the safety stock level and the in-transit orders is lower than the reorder point, determine the replenishment time point.

[0078] Get the resource usage and total available resources of each category and build resource constraints. For example, assume that each category occupies one unit of resources and the total available resources are 100 units. At the same time, get the unit procurement cost and available budget of each category and build budget constraints. For example, assume that the unit procurement cost of each category is 2 yuan and the available budget is 200 yuan.

[0079] The economic order quantity is calculated based on the fixed ordering cost, average demand rate, and unit holding cost of each category. The economic order quantity is the optimal quantity to order each time to minimize the total inventory cost. For example, if the fixed ordering cost of a category is 50 yuan, the average demand rate is 10 units / period, and the unit holding cost is 1 yuan / period, the economic order quantity can be calculated.

[0080] Under the premise of satisfying resource constraints and budget constraints, the economic order quantity is used as the replenishment quantity.

[0081] For example, assuming that the economic order quantity calculated according to the above steps is 20 units and meets the resource constraints and budget constraints, then the replenishment quantity of this category is 20 units.

[0082] The beneficial effects of this method can be summarized in the following three aspects: Reduce inventory costs: By optimizing replenishment decisions, you can effectively reduce inventory holding costs, out-of-stock costs, and ordering costs, thereby reducing total inventory costs.

[0083] Improve inventory management efficiency: This method provides a systematic and scientific inventory management method, which can help enterprises better manage inventory and improve inventory management efficiency.

[0084] Improve customer satisfaction: By ensuring sufficient inventory, customer needs can be met in a timely manner and out-of-stock situations can be avoided, thereby improving customer satisfaction.

[0085] In an optional implementation, substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner, and obtaining the optimal value function includes: ; in, Indicates the state at time t S t The optimal value function under A t represents the action at time t, represents the inventory cost function at time t, represents the discount factor, which is used to balance current costs with future costs, represents the expected value of the value function at time t+1; The inventory cost function is shown in the following formula: ; in, represents the storage cost function, represents the out-of-stock cost function, represents the backlog cost function, , , They represent the final weight coefficients corresponding to the warehousing cost function, out-of-stock cost function, and backlog cost function, respectively. represents the inventory level at time t; The state transition equation is shown in the following formula: ; ; ; in, represents the demand for category i at time t, represents the replenishment lead time of category i at time t+1, represents the replenishment lead time of category N at time t+1, represents the number of in-transit orders of category i at time t, represents the order quantity of category i at time t, represents transpose; The reorder point calculation formula is as follows: ; in, represents the optimal reorder point for category i, represents the average demand rate of category i, represents the standard normal distribution quantile corresponding to the service level, represents the standard deviation of demand for category i.

[0086] A multi-category inventory control method based on dynamic programming and reorder point can effectively reduce inventory costs and improve service levels. The core of this method is to determine the optimal inventory level through dynamic programming and make replenishment decisions in combination with the reorder point strategy.

[0087] First, the parameters of the model need to be determined, including the storage cost, out-of-stock cost, backlog cost, mean and standard deviation of demand, replenishment lead time, and service level target for each category. For example, suppose we have two categories. The storage cost of Category 1 is 1 yuan per unit per day, the out-of-stock cost is 10 yuan per unit, the backlog cost is 0.5 yuan per unit per day, the average demand is 10 units per day, the standard deviation is 2 units, the replenishment lead time is 3 days, and the service level target is 95%. The storage cost of Category 2 is 2 yuan per unit per day, the out-of-stock cost is 20 yuan per unit, the backlog cost is 1 yuan per unit per day, the average demand is 5 units per day, the standard deviation is 1 unit, the replenishment lead time is 2 days, and the service level target is 90%.

[0088] Next, according to the set service level target, look up the standard normal distribution table to get the corresponding quantile. For example, the quantile corresponding to the 95% service level is about 1.65, and the quantile corresponding to the 90% service level is about 1.28.

[0089] Then, calculate the reorder point for each category. The reorder point is calculated by multiplying the average demand rate by the replenishment lead time, plus the safety stock. The safety stock is calculated by multiplying the quantile by the standard deviation of the demand by the square root of the replenishment lead time. For example, the reorder point for category 1 is 10 * 3 + 1.65 * 2 * root 3 ≈ 35.8, and the reorder point for category 2 is 5 * 2 + 1.28 * 1 * root 2 ≈ 11.8.

[0090] Next, a dynamic programming model is constructed. The dynamic programming value function represents the minimum expected value of the total cost from the current to the future under a specific time and inventory status. The function contains the current inventory cost and the expected value of the future cost, and the future cost is adjusted by the discount factor. The inventory cost includes storage cost, out-of-stock cost and overstock cost, which are multiplied by the corresponding weight coefficients.

[0091] Then, the change of inventory level over time is described by the state transition equation. The state transition equation takes into account the current inventory level, demand, in-transit orders and order quantity.

[0092] Finally, the dynamic programming value function is solved recursively. Starting from the last time period, we work backwards to the first time period and calculate the optimal value function for each time period and inventory status. In each time period, we decide whether to place an order based on the current inventory level and the reorder point. If the inventory level is lower than the reorder point, we need to place an order, and the order quantity is equal to the reorder point minus the current inventory level plus the expected demand in the future.

[0093] Through the above steps, the optimal ordering strategy for each time period and inventory status can be obtained, thereby minimizing the total inventory cost.

[0094] The beneficial effects of this method are reflected in three aspects: Reduce inventory costs: By optimizing inventory levels through dynamic programming, you can effectively reduce warehousing costs, out-of-stock costs, and backlog costs, thereby minimizing total inventory costs.

[0095] Improve service levels: By setting service level targets and calculating safety stocks, you can effectively improve order fill rates and thus improve customer satisfaction.

[0096] Simplify the decision-making process: This approach provides a clear ordering strategy that can help companies simplify inventory management processes and improve operational efficiency.

[0097] Figure 2 Schematic diagram of the structure of the inventory optimization system based on the deep learning model according to the embodiment of the present invention. Figure 2 As shown, the system comprises: The first unit is used to obtain multi-dimensional data corresponding to the target product, wherein the multi-dimensional data includes historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; the consumer behavior data includes page views, collections, purchases, and repurchase rates; perform time series alignment processing on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; The second unit is used to construct a parameterized dynamic convolution kernel through a graph neural network according to the multi-dimensional data, and to construct a soft clustering allocation matrix based on a multi-layer perceptron, and to obtain a long-term dependency feature that fuses the spatial dimension and the time dimension by combining residual connections; to perform feature fusion on the short-term time series feature and the long-term dependency feature to obtain a mixed feature vector; to input the mixed feature vector into a bidirectional long short-term memory network to generate a sales forecast sequence; to calculate a forecast confidence interval based on the sales forecast sequence to form a final sales forecast result; The third unit is used to calculate the safety stock level based on the sales forecast result, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; construct an inventory cost function, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; input the safety stock level and the inventory cost function into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; and send the inventory replenishment decision to a supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

[0098] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. Inventory optimization method based on deep learning model, characterized in that: include: Acquire multi-dimensional data corresponding to the target product, the multi-dimensional data including historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; the consumer behavior data includes page views, collections, purchases, and repurchase rates; perform time series alignment on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; A parameterized dynamic convolution kernel is constructed through a graph neural network according to the multi-dimensional data, and a soft clustering assignment matrix is ​​constructed based on a multi-layer perceptron, and a long-term dependency feature integrating the spatial dimension and the temporal dimension is obtained by combining residual connections; The short-term time series features and the long-term dependency features are subjected to feature fusion to obtain a mixed feature vector; the mixed feature vector is input into a bidirectional long short-term memory network to generate a sales forecast sequence; a forecast confidence interval is calculated based on the sales forecast sequence to form a final sales forecast result; Based on the sales forecast result, the safety stock level is calculated, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; an inventory cost function is constructed, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; the safety stock level and the inventory cost function are input into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; the inventory replenishment decision is sent to a supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

2. The method according to claim 1, characterized in that According to the multi-dimensional data, a parameterized dynamic convolution kernel is constructed through a graph neural network, and a soft clustering assignment matrix is ​​constructed based on a multi-layer perceptron. The long-term dependency features of the fusion space dimension and time dimension are obtained by combining residual connections, including: Normalizing the input multi-dimensional data to obtain a normalized feature matrix, taking each data in the multi-dimensional data as a graph node, calculating the similarity between graph nodes based on the normalized feature matrix to construct an adaptive adjacency matrix, and performing a graph convolution operation on the adaptive adjacency matrix and the normalized feature matrix to obtain initial node features; Extracting time coding information from the initial node features, performing a splicing operation on the time coding information and the initial node features and inputting the splicing operation into a multi-layer perceptron network to generate dynamic convolution kernel parameters, and performing an adaptive convolution operation on the initial node features based on the dynamic convolution kernel parameters to obtain dynamic time series features; Based on the dynamic time series features, a feature difference vector between node pairs is constructed, the feature difference vector is input into a multilayer perceptron to calculate a node similarity matrix, the node similarity matrix is ​​softmax normalized to obtain a soft clustering allocation matrix, and the dynamic time series features are weighted aggregated using the soft clustering allocation matrix to obtain cluster center features; Performing feature fusion on the cluster center feature and the dynamic time series feature to obtain a fused feature, inputting the fused feature into a gating network to generate an adaptive gating weight, and performing selective information transfer on the fused feature based on the adaptive gating weight to obtain a gated output feature; Input the gated output features into three independent linear mapping layers to obtain a query matrix, a key matrix and a value matrix, calculate an attention score based on the query matrix and the key matrix, and multiply the attention score by a time decay factor to obtain a temporal attention weight; Based on the temporal attention weights, a value matrix is ​​weightedly aggregated to obtain a multi-head attention feature, the multi-head attention feature is input into a feedforward neural network for nonlinear transformation to obtain a transformation feature, the transformation feature is residually connected with the multi-head attention feature and subjected to layer normalization processing to obtain a long-term dependency feature with a long-term dependency relationship.

3. The method according to claim 1, characterized in that Inputting the mixed feature vector into a bidirectional long short-term memory network to generate a sales forecast sequence; calculating a forecast confidence interval based on the sales forecast sequence to form a final sales forecast result includes: Input the mixed feature vector into the forward network of the bidirectional long short-term memory network to obtain a forward hidden state feature, input the mixed feature vector into the backward network of the bidirectional long short-term memory network to obtain a backward hidden state feature, and concatenate the forward hidden state feature with the backward hidden state feature to obtain a bidirectional hidden state feature; An attention weight calculation unit is constructed based on the bidirectional hidden state feature, and the attention weight calculation unit includes a historical state mapping layer and a current state mapping layer. The historical bidirectional hidden state feature and the bidirectional hidden state feature at the current moment are respectively input into the historical state mapping layer and the current state mapping layer, and a temporal attention weight is obtained through attention scoring; the context vector is obtained by weighted summing the bidirectional hidden state feature at the current moment using the temporal attention weight, and the context vector is feature-fused with the bidirectional hidden state feature at the current moment to obtain an enhanced feature representation; Input the enhanced feature representation into a prediction distribution generation network, the prediction distribution generation network includes a mean prediction layer and a variance prediction layer, the mean prediction layer outputs a prediction mean, and the variance prediction layer outputs a prediction variance; Monte Carlo sampling is performed based on the prediction mean and the prediction variance to obtain multiple groups of prediction samples, and statistical distribution characteristics of the multiple groups of prediction samples are calculated to obtain a sales forecast sequence; The prediction interval is adaptively adjusted, and the prediction mean and the prediction variance are dynamically updated based on the degree of deviation between the actual sales volume and the predicted mean, so as to obtain the calibrated upper and lower bounds of the prediction confidence interval, and the sales forecast sequence and the upper and lower bounds of the prediction confidence interval are combined to form the final sales forecast result.

4. The method according to claim 3, characterized in that: Based on the sales forecast result, the safety stock level is calculated, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval, including: Calculate the forecast interval standard deviation based on the forecast confidence interval upper bound and the forecast confidence interval lower bound of the sales forecast sequence, and combine the forecast interval standard deviation with the service level coefficient, replenishment lead time, and review cycle to obtain the initial safety stock level; Calculate a first absolute value of the difference between the upper bound of the forecast confidence interval and the maximum historical forecast value, and a second absolute value of the difference between the minimum historical forecast value and the lower bound of the forecast confidence interval, and select the ratio of the larger value of the first absolute value and the second absolute value to the standard deviation of the forecast interval as the demand fluctuation adjustment factor; The product of the demand fluctuation adjustment factor and the pre-acquired sensitivity parameter is used as a dynamic adjustment amount, and the initial safety stock level and the dynamic adjustment amount are combined to obtain a final safety stock level.

5. The method according to claim 4, characterized in that Construct an inventory cost function, which includes a weighted combination of three dimensions: storage cost, out-of-stock cost, and backlog cost: Constructing a storage cost function, which is the product of the unit storage cost and the current inventory level; constructing a stockout cost function, which is the product of the unit stockout cost and the inventory gap; constructing a backlog cost function, which is the product of the unit backlog cost and the inventory amount exceeding the upper limit of the prediction confidence interval; Initial weight coefficients are respectively assigned to the warehousing cost function, the out-of-stock cost function, and the backlog cost function, and weight gradients are calculated based on the contribution of each cost function to the total cost. The weight coefficients are updated according to the weight gradients and the learning rate. The updated weight coefficients are normalized after exponential transformation to obtain the final weight coefficients, and the inventory cost function is constructed by weighted combination of the final weight coefficients and the corresponding cost functions.

6. The method according to claim 5, characterized in that The safety stock level and the inventory cost function are input into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity. Constructing a state vector space, wherein the state vector space includes the safety inventory level and the in-transit order quantity of each category; constructing a dynamic programming value function by adding the inventory cost function to the expected value of the future value function adjusted by the discount factor; constructing a state transfer equation based on the state vector space, wherein the state transfer equation calculates the inventory status of the next period according to the current inventory level, in-transit order quantity, actual demand quantity and replenishment quantity of each category, and updates the in-transit order status according to the replenishment lead time of each category; Substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner to obtain an optimal value function; calculating the reorder point of each category based on the optimal value function, comparing the sum of the safety stock level and the in-transit order quantity of each category with the corresponding reorder point, and determining the replenishment time point when the sum of the safety stock level and the in-transit order quantity is lower than the reorder point; The resource occupancy and total available resources of each category are obtained to construct resource constraints, and the unit procurement cost and available budget of each category are obtained to construct budget constraints. The economic order quantity is calculated based on the fixed ordering cost, average demand rate and unit holding cost of each category, and the economic order quantity is used as the replenishment quantity on the premise that the resource constraints and the budget constraints are met.

7. The method according to claim 6, characterized in that Substituting the state transfer equation into the dynamic programming value function, solving the dynamic programming value function in a recursive manner, and obtaining the optimal value function includes: ; in, Indicates the state at time t S t The optimal value function under A t represents the action at time t, represents the inventory cost function at time t, represents the discount factor, which is used to balance current costs with future costs, represents the expected value of the value function at time t+1; The inventory cost function is shown in the following formula: ; in, represents the storage cost function, represents the out-of-stock cost function, represents the backlog cost function, , , They represent the final weight coefficients corresponding to the warehousing cost function, out-of-stock cost function, and backlog cost function, respectively. represents the inventory level at time t; The state transition equation is shown in the following formula: ; ; ; in, represents the demand for category i at time t, represents the replenishment lead time of category i at time t+1, represents the replenishment lead time of category N at time t+1, represents the number of in-transit orders of category i at time t, represents the order quantity of category i at time t, represents transpose; The reorder point calculation formula is as follows: ; in, represents the optimal reorder point for category i, represents the average demand rate of category i, represents the standard normal distribution quantile corresponding to the service level, represents the standard deviation of demand for category i.

8. An inventory optimization system based on a deep learning model, used to implement the method according to any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain multi-dimensional data corresponding to the target product, wherein the multi-dimensional data includes historical sales data, product attribute data, and consumer behavior data, wherein the historical sales data includes product code, sales time, sales quantity, sales price, and product inventory; the product attribute data includes product material, product style, product seasonal attribute, and product size information; the consumer behavior data includes page views, collections, purchases, and repurchase rates; perform time series alignment processing on the multi-dimensional data to construct a unified time series feature matrix; input the time series feature matrix into a time series convolutional neural network model to extract short-term time series features; The second unit is used to construct a parameterized dynamic convolution kernel through a graph neural network according to the multi-dimensional data, and to construct a soft clustering allocation matrix based on a multi-layer perceptron, and to obtain a long-term dependency feature that integrates the spatial dimension and the temporal dimension by combining residual connections; The short-term time series features and the long-term dependency features are subjected to feature fusion to obtain a mixed feature vector; the mixed feature vector is input into a bidirectional long short-term memory network to generate a sales forecast sequence; a forecast confidence interval is calculated based on the sales forecast sequence to form a final sales forecast result; The third unit is used to calculate the safety stock level based on the sales forecast result, wherein the safety stock level is determined by the upper and lower bounds of the forecast confidence interval; construct an inventory cost function, wherein the inventory cost function includes a weighted combination of three dimensions: warehousing cost, out-of-stock cost, and backlog cost; input the safety stock level and the inventory cost function into a dynamic programming model to generate an inventory replenishment decision, wherein the inventory replenishment decision includes a replenishment time point and a replenishment quantity; and send the inventory replenishment decision to a supply chain execution system, wherein the dynamic programming model is constructed based on a deep reinforcement learning model.

Citation Information

Patent Citations

  • Replenishment decision model training and replenishment decision method, system, device and medium

    CN113095745A

  • Power grid topology optimization method and system based on search sorting

    CN118539441A

  • Traffic flow prediction system based on deep learning and dynamic network analysis and application method thereof

    CN118675324A

  • Inventory allocation optimization method and system based on genetic algorithm

    CN119090408A

  • Inventory determination method and apparatus

    WO2023124363A1

Cited By

  • Non-corresponding auditing system and method based on big data

    CN119831500A

  • Inventory management system based on order data

    CN120125146A

  • An inventory management system based on order data

    CN120125146B

  • Dynamic replenishment method and system for intelligent warehousing

    CN120218572A

  • Dynamic replenishment method and system for intelligent warehousing

    CN120218572B