Replenishment decision model training and replenishment decision method, system, equipment and medium

By constructing a unified replenishment decision model and using neural networks to encode historical data and train loss functions, the problem of replenishment decision errors and inconsistent goals in the existing technology is solved, and more accurate and economical replenishment decisions are achieved.

CN113095745BActive Publication Date: 2024-10-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010022990.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-09
Publication Date
2024-10-22
Estimated Expiration
2040-01-09

AI Technical Summary

Technical Problem

Existing replenishment decision-making methods rely on product sales forecasts and are prone to error amplification, which makes it difficult to achieve accurate replenishment decisions and inconsistent optimization goals, resulting in high procurement costs and decision-making deviations.

Method used

Construct a unified replenishment decision-making model, including three sub-models. The historical sales volume and product delivery lead time are encoded through a neural network, and a unified loss function is used for training to achieve one-step replenishment decision-making.

Benefits of technology

It improves the accuracy of replenishment decisions, reduces procurement costs, avoids decision-making deviations, and achieves more accurate replenishment quantity predictions through unified optimization goals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113095745B_ABST
    Figure CN113095745B_ABST
Patent Text Reader

Abstract

The present invention provides a replenishment decision model training and replenishment decision method, system, device and medium. The replenishment decision model is constructed, including a first sub-model, a second sub-model and a third sub-model. The first sub-model is used to encode a historical sales time series based on a first neural network. The second sub-model is used to encode a historical commodity delivery lead time series. The third sub-model is connected with a final hidden layer of the first sub-model and a final hidden layer of the second sub-model based on a second neural network to output a replenishment quantity prediction according to the encoding results of the first sub-model and the second sub-model. The third sub-model is based on a third neural network. The historical sales time series, the historical commodity delivery lead time series and the historical optimal replenishment quantity are added to a training set to train the replenishment decision model, thereby realizing end-to-end replenishment decision.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Supply chain replenishment optimization is the core of the entire supply management and operation. Scientific, reasonable and effective replenishment can effectively reduce the company's supply chain costs, reduce the company's operating costs and enhance competitiveness.

[0003] The current replenishment behavior is a two-stage replenishment decision method that first predicts sales and then makes replenishment decisions based on the sales forecast results. This method first predicts product sales based on historical sales, promotions, and sales rhythm, and then based on the product sales forecast, considers the company's requirements for indicators such as turnover days and spot rate, and decides on the replenishment quantity for a period of time in the future.

[0004] The current replenishment decision needs to be based on the results of the commodity sales forecast calculated in advance. When making replenishment decisions, it is usually necessary to consider the error of the commodity sales forecast, so some inventory must be artificially increased to ensure that the commodity has a certain spot rate. Therefore, the two-stage replenishment decision method will cause the forecast error to be amplified, and the replenishment decision is difficult to achieve accurate or better, which makes the enterprise's procurement cost higher.

[0005] In addition, since the goal of the product sales forecasting stage in the above two-stage replenishment decision-making method is to reduce the forecast deviation, while the replenishment decision stage mainly considers the balance between the holding cost and the out-of-stock cost of the forecast deviation, the optimization goals of the two stages are inconsistent, which can easily cause the replenishment decision deviation problem. Summary of the invention

[0006] In view of the problems in the prior art, the purpose of the present invention is to provide replenishment decision model training and replenishment decision method, system, equipment and medium. It only needs to build a unified model to realize replenishment decision in one step.

[0007] In a first aspect, the present invention provides a replenishment decision model training method, comprising the following steps: a step of constructing a replenishment decision model, the replenishment decision model comprising: a first sub-model, the first sub-model is used to encode a historical sales time series, and the first sub-model is based on a first neural network; a second sub-model, the second sub-model is used to encode a historical commodity delivery lead time sequence, and the second sub-model is based on a second neural network; a third sub-model, the third sub-model connects a final hidden layer of the first sub-model and a final hidden layer of the second sub-model to output a replenishment quantity prediction according to an encoding result of the first sub-model and an encoding result of the second sub-model, and the third sub-model is based on a third neural network; a step of training the replenishment decision model, adding the historical sales time series, the historical commodity delivery lead time sequence, and the historical optimal replenishment quantity to a training set to train the replenishment decision model.

[0008] Preferably, the first neural network is a recurrent neural network, which includes an input layer, a fully connected layer and a final hidden layer, and the final hidden layer of the first sub-model encodes and outputs a sales probability prediction sequence.

[0009] Preferably, the step of constructing the replenishment decision model includes constructing a loss function of the replenishment decision model, and the loss function satisfies the following formula:

[0010]

[0011] Among them, L(Out1 i ,a* i ) is the loss function of the third sub-model, L1(Out2 i ,a* DF,i ) is the first sub-model loss function, L2(Out3 i ,a* VLT,i ) is the loss function of the second sub-model, λ1 is the first weighting coefficient, λ2 is the second weighting coefficient, Out1 i is the replenishment quantity forecast output by the third sub-model, a* i is the historical optimal replenishment quantity, Out2 i is the sales probability prediction sequence output by the first sub-model, a* VLT,i For historical sales, Out3 i The predicted product delivery lead time output by the second sub-model, a* VLT,i is the historical product delivery lead time, and N is the number of samples; the step of training the replenishment decision model includes training the replenishment decision model using a gradient descent method, and performing reverse gradient propagation based on the gradient of the function value.

[0012] Preferably, the first sub-model loss function is a quantile loss function, and / or the third sub-model loss function is a quantile loss function.

[0013] Preferably, the step of training the replenishment decision model includes the following steps: obtaining the historical inventory and historical sales of a specific commodity within a period of time; calculating the historical optimal replenishment quantity based on the historical inventory and historical sales; arranging the historical sales by time into a historical sales time series and adding it to a training set, and adding the historical optimal replenishment quantity to the training set; and using the training set to train the replenishment decision model.

[0014] Preferably, the step of calculating the historical optimal replenishment quantity according to the historical inventory quantity and the historical sales volume includes constructing the following dynamic programming model:

[0015]

[0016] Among them, V m (Iv m) is the optimal cost between the mth order time and the m+1th order time; a m is the optimal replenishment quantity for the mth order, that is, the mth historical optimal replenishment quantity; h[] is the holding cost function; b[] is the out-of-stock cost function; V m is the time of the mth order; Iv m is the inventory quantity corresponding to the mth order, that is, the mth historical inventory quantity; d[v m ,s] is v m The total sales volume from time t to time s, that is, v m Historical sales volume from time s to time s; V m+1 is the optimal cost of the m+1th order; d[v m ,v m+1 -1] is v m Time to v m+1 -1 moment; the historical optimal replenishment quantity is obtained by solving the above dynamic programming model.

[0017] Preferably, the step of training the replenishment decision model further includes encoding specific commodities according to preset commodity attribute rules to obtain a commodity attribute sequence, adding the commodity attribute sequence to a training set, integrating the historical sales time series with the commodity attribute sequence, and encoding the integrated sequence by the first sub-model.

[0018] A second aspect of the present invention provides a replenishment decision method, comprising the following steps: inputting a sales volume time series and a commodity delivery lead time series into a replenishment decision model according to any one of claims 1 to 7; obtaining a third sub-model output, wherein the third sub-model output corresponds to a replenishment quantity forecast.

[0019] According to a third aspect of the present invention, a replenishment decision model training system is provided, which is applied to the replenishment decision model training method of the first aspect. The system comprises: a model building module, which is used to build a replenishment decision model; a data collection module, which is used to obtain multiple historical sales time series and historical commodity delivery lead time series, and calculate the historical optimal replenishment quantity, and add the historical sales time series, the historical commodity delivery lead time series and the historical optimal replenishment quantity to a training set; and a model training module, which is used to train the replenishment decision model using the training set.

[0020] The fourth aspect of the present invention also provides a replenishment decision model training device, comprising: a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to execute the steps of the replenishment decision model training method of the first aspect above by executing the executable instructions.

[0021] The fifth aspect of the present invention further provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the replenishment decision model training method of the first aspect.

[0022] The replenishment decision model training and replenishment decision method, system, device and medium provided by the present invention have the following advantages:

[0023] The present invention constructs a unified replenishment decision model including three sub-models and performs integrated training, so that replenishment decision can be realized in one step and sales forecast can be output at the same time, thereby avoiding the problem that the error in the two-stage replenishment decision method in the prior art is artificially amplified and the replenishment decision is difficult to achieve accuracy or better, thereby improving the accuracy of replenishment decision and reducing the procurement cost of the enterprise. Since a unified model is used, the optimization target is unified, which is not easy to cause decision deviation and is conducive to training to obtain better model parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.

[0025] Figure 1 is a flow chart of a replenishment decision model training method according to an embodiment of the present invention;

[0026] Figure 2 is a structural diagram of a replenishment decision model according to an embodiment of the present invention;

[0027] Figure 3 is a flow chart of a replenishment decision model identification method according to an embodiment of the present invention;

[0028] Figure 4 It is a structural schematic diagram of a replenishment decision model training system according to an embodiment of the present invention;

[0029] Figure 5 It is a structural schematic diagram of a replenishment decision model training device according to an embodiment of the present invention;

[0030] Figure 6 It is a schematic diagram of the structure of a computer storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar structures, and thus their repeated description will be omitted.

[0032] According to an embodiment of the present invention, a replenishment decision model training and replenishment decision method, system, device and medium are proposed.

[0033] Some of the terms used in this article are explained as follows:

[0034] "Neural network" is a highly complex nonlinear dynamic system formed by a large number of simple processing units (i.e. neurons) that are widely interconnected. It is a general machine learning algorithm.

[0035] A recurrent neural network (RNN) is a type of recursive neural network that takes sequence data as input, performs recursion in the direction of sequence evolution, and all nodes (recurrent units) are connected in a chain.

[0036] "Long Short-Term Memory Neural Network (LSTM)" is a type of recurrent neural network model, which is suitable for processing and predicting important events with very long intervals and delays in time series.

[0037] "Convolutional Neural Networks (CNN)" is a type of feedforward neural network that includes convolution calculations and has a deep structure. It is one of the representative algorithms of deep learning.

[0038] The "fully connected layer" is a layer in the neural network. Each node in the fully connected layer is connected to all the nodes in the previous layer to integrate the features extracted previously.

[0039] "Vendor Lead Time (VLT)" is used to measure supplier performance, which is generally equal to the actual delivery time minus the order time, and the unit is usually days.

[0040] The "Quantile Loss" function conforms to the following formula:

[0041]

[0042] where γ is the desired quantile, which is between 0 and 1. y and y p are the predicted value and the true value respectively.

[0043] The mean square error (MSE) is the most commonly used regression loss function, which is calculated by taking the sum of the squares of the distances between the predicted value and the true value.

[0044] "End-to-end replenishment" directly outputs the final replenishment quantity based on historical data (sales data, inventory quantity, arrival data, etc.).

[0045] like Figure 1 As shown, an embodiment of the present invention provides a replenishment decision model training method, comprising the following steps:

[0046] S110: Build a replenishment decision model.

[0047] like Figure 2 As shown, the replenishment decision model includes input layers 101, 102, 103, 104, 105, hidden layers 111, 112, 113, 114, 115, 116 and output layers 121, 122, 123. The replenishment decision model can be divided into a first sub-model 11, a second sub-model 12 and a third sub-model 13. The first sub-model 11 is used to encode the historical sales time series, and the first sub-model 11 is based on a first neural network. The second sub-model 12 is used to encode the historical commodity delivery lead time sequence, and the second sub-model 12 is based on a second neural network. The third sub-model 13 connects the final hidden layer 112 of the first sub-model 11 and the final hidden layer 114 of the second sub-model 12 to output the replenishment quantity forecast according to the encoding results of the first sub-model 11 and the encoding results of the second sub-model 10, and the third sub-model 13 is based on a third neural network. It should be noted that Figure 2 The replenishment decision model in FIG. 1 only schematically shows the hidden layers included in the first sub-model 11 , the second sub-model 12 , and the third sub-model 13 . In actual use, more hidden layers may be included.

[0048] In this example, the first neural network based on the first sub-model 11 is preferably set as a recurrent neural network, and the first neural network includes input layers 101, 102, multi-layer hidden layers 111, 112 and an output layer 122. The input layers 101, 102 include an input layer 101 for receiving a historical sales time series, and an input layer 102 for receiving a product attribute sequence. The multi-layer hidden layers 111, 112 include a fully connected layer 111 and a final hidden layer 112, and the final hidden layer 112 of the first sub-model 11 encodes and outputs a sales probability prediction sequence. The sales probability prediction sequence includes different sales prediction values ​​and the corresponding probability of occurrence of the sales prediction value, for example: 3w, 10%; 5w, 50%; 8w, 30%; 10w, 10%. The sales probability prediction sequence can be obtained by setting a regression function calculation. For example, in this embodiment, a quantile regression function can be used for implementation. The specific regression function calculation method can refer to the prior art. The output layer 122 of the first sub-model 11 outputs a sales probability prediction sequence. Outputting a sales probability prediction sequence rather than a single sales prediction value helps to observe model problems when there are computational problems in the replenishment decision model or when there are large deviations in the calculated data, thereby facilitating model adjustment. Since the sales sequence has a strong temporal nature, compared to other neural network types, the recurrent neural network can better reflect the above temporal nature, thereby improving the prediction accuracy. It is further preferred to set the first neural network as a long short-term memory neural network, thereby overcoming the difficulties of general recurrent neural networks in long-term memory, which mainly comes from the gradient explosion and gradient disappearance problems.

[0049] The second neural network based on the second sub-model 12 and the third neural network based on the third sub-model 13 can be set to a common neural network, such as a convolutional neural network or a recurrent neural network. In other embodiments, the first sub-model 11, the second sub-model 12 and the third sub-model 13 can also use other neural networks.

[0050] In this embodiment, preferably, the input layers 102, 103, 104 of the second sub-model 12 include an input layer 102 for receiving a sequence of commodity attributes, an input layer 103 for receiving a sequence of historical commodity delivery lead times, and an input layer 104 for receiving an order cycle. It should be noted that not all input layers 102, 103, 101 are connected to the same hidden layer at the same time. In this embodiment, the input layers 102 and 103 are connected to the first hidden layer 113, and the input layer 104 for receiving an order cycle is connected to the final hidden layer 114, thereby realizing batch operation of the input sequence. A large number of practices have proved that such a method has better accuracy than connecting to the same hidden layer at the same time. The output layer 123 of the second sub-model 12 outputs the predicted commodity delivery lead time.

[0051] In this embodiment, preferably, the third sub-model 13 includes an input layer 105 for receiving inventory data, hidden layers 115, 116 and an output layer 121. The first hidden layer 115 of the third sub-model 13 is connected to the final hidden layer 112 of the first sub-model 11 and the final hidden layer 114 of the second sub-model 12, respectively, to receive the encoding results of the first sub-model 11 and the second sub-model 12. In this implementation, the input layer 105 for receiving the initial inventory is connected to the final hidden layer 116 of the third sub-model 13, so as to realize batch processing of feature sequences and improve the model transportation accuracy. The output layer 121 outputs the replenishment quantity prediction.

[0052] The loss function of the replenishment decision model is built. The loss function is used to measure the gap between the predicted value obtained by building the model and the true value, that is, to measure the quality of the model's prediction.

[0053] The loss function satisfies the following formula:

[0054]

[0055] Among them, L(Out1 i ,a* i ) is the loss function of the third sub-model 13, L1(Out2 i ,a* DF,i ) is the loss function of the first sub-model 11, L2(Out3 i ,a* VLT,i ) is the loss function of the second sub-model 12, λ1 is the first weighting coefficient, and λ2 is the second weighting coefficient. Out1 i is the replenishment quantity forecast output by the output layer 121 of the third sub-model 13, a* i Out2 is the historical optimal replenishment quantity during the training process. i is the sales probability prediction sequence output by the output layer 122 of the first sub-model 11, a* VLT,i For historical sales. Out3 i is the predicted product delivery lead time output by the output layer 123 of the second sub-model 12, a* VLT,i is the historical product delivery lead time. N is the number of samples.

[0056] In this embodiment, the loss function of the first submodel 11 is preferably set as a quantile loss function, the loss function of the second submodel 12 is set as a mean square error function, and the loss function of the third submodel 13 is set as a quantile loss function. In other embodiments, loss functions of other regression problems may also be used, such as a root mean square loss function.

[0057] Since the output results of the first sub-model 11 and the third sub-model 13 are expected to be a value range rather than a value point, and compared with other loss functions, the quantile loss function is very sensitive to the prediction interval and can maintain good performance even under non-uniformly distributed residuals, the use of the quantile loss function has a better effect on the model as a whole.

[0058] Since the loss function set in this embodiment includes the loss functions of the first sub-model, the second sub-model and the third sub-model, during training, the loss functions of each sub-model affect each other, so the sub-models are organically integrated into one, and the prediction of each sub-model can be fully reflected. The weight of the loss function of each sub-model is adjusted by the first weighting coefficient and the second weighting coefficient to highlight the main concern factor, which is conducive to training better model parameters.

[0059] S120: Add the historical sales time series, the historical product delivery lead time series, and the historical optimal replenishment quantity to the training set to train the replenishment decision model.

[0060] Specifically, step S120 includes S121: obtaining the historical inventory and historical sales volume of a specific commodity within a period of time.

[0061] Commodity classification is divided according to the smallest granularity, that is, different product categories, brands, models, and specifications are divided into different commodities. Get the historical sales data and historical inventory of specific commodities.

[0062] The present invention further obtains historical commodity delivery lead time data. In this embodiment, the mean, variance, maximum, minimum, and different quantiles of the historical commodity delivery lead time data of multiple window times are preferably obtained. For example, one year, 6 months, 3 months, 28 days, 7 days, 3 days, etc. are used as different time windows to calculate and obtain multiple means, variances, maximums, minimums, and different quantiles.

[0063] In this embodiment, historical order cycle data is preferably also obtained.

[0064] S122: Calculate the historical optimal replenishment quantity based on the historical inventory and historical sales;

[0065] Construct the following dynamic programming model:

[0066]

[0067] Among them, V m (Iv m ) is the optimal cost between the mth order time and the m+1th order time; a mis the optimal replenishment quantity for the mth order, that is, the mth historical optimal replenishment quantity; h[] is the holding cost function; b[] is the out-of-stock cost function; V m is the time of the mth order; Iv m is the inventory quantity corresponding to the mth order, that is, the mth historical inventory quantity; d[v m ,s] is v m The total sales volume from time t to time s, that is, v m Historical sales volume from time s to time s; V m+1 is the optimal cost of the m+1th order; d[v m ,v m+1 -1] is v m Time to v m+1 -Total sales at 1 moment.

[0068] The dynamic programming model is used to calculate the historical optimal replenishment quantity in this example, and the model takes into account the impact of the m-th historical optimal replenishment quantity on the m+1-th cost, so it has high accuracy.

[0069] The historical optimal replenishment quantity is obtained by solving the above dynamic programming model.

[0070] The solution method of the dynamic programming model can take the historical sales and historical inventory of a period of time (for example, 1 to m times). m+1 Set the value of 0 and calculate V m and a m , and so on, all historical optimal replenishment quantities are calculated successively from the back to the front. In other embodiments, other existing dynamic programming solution methods can also be used.

[0071] S123: Arrange the historical sales volume into a historical sales volume time series according to time and add it to the training set, and add the historical optimal replenishment quantity to the training set.

[0072] The historical sales data obtained in step S122 is normalized according to a preset window period, and arranged in chronological order to form a historical sales time series.

[0073] In this embodiment, historical sales data of multiple dimensions are preferably generated, including sales data of the same period of 180 days, historical sales data of 90 to 180 days, and historical sales data of the past 30 days. The historical sales data of the above multiple dimensions are formed into a historical sales time series in the form of a matrix or a series. The use of multi-dimensional historical sales data can be further calculated from multiple angles, thereby further improving the accuracy of model calculation.

[0074] Arrange the historical product delivery lead time data obtained in step S121 into a historical product delivery lead time sequence. Input the historical order cycle data into the training set. In this example, the time measurement length is determined based on the historical product delivery lead time sequence and the historical order cycle data. The optimal replenishment quantity obtained by the replenishment decision model in this example is based on the above time measurement length. Add the historical inventory data as the initial inventory to the training set.

[0075] In this embodiment, the specific commodity is further encoded according to the preset commodity attribute rules to obtain a commodity attribute sequence. For example, fast-moving consumer goods are marked as 1, and non-fast-moving consumer goods are marked as 0. The commodity attribute can be set to multiple, thereby forming an array or matrix. The commodity attribute sequence is added to the training set.

[0076] S124: Using the training set to train the replenishment decision model.

[0077] like Figure 2 As shown, multiple historical sales time series, product attribute series, historical product delivery lead time series, historical order cycle data and inventory data are input into input layers 101, 102, 103, 104, and 105 respectively.

[0078] In the first sub-model 11, the historical sales time series and the product attribute series are integrated, and the integrated series is further encoded. The integration method can be, for example, matrix operation or increasing the number of array elements. Adding corresponding product attributes to sales further refines the model analysis, thereby further improving accuracy.

[0079] In the second sub-model 12, the historical product delivery lead time sequence is integrated with the product attribute sequence, and the integrated sequence is further encoded. The integration method can be, for example, matrix operation or increasing the number of array elements. Adding the corresponding product attributes to the historical product delivery lead time further refines the model analysis, thereby further improving the accuracy.

[0080] The historical optimal replenishment quantity is added to the model, and the replenishment decision model is trained using the gradient descent method, and the gradient of the loss function value is back-propagated using the gradient descent back-propagation method. In this embodiment, the gradient of the loss function value is the partial derivative of the loss function, and back-propagation is performed based on the gradient of the above loss function value.

[0081] Gradient descent is the core method of neural networks, which is used to update the weights between neurons and the bias of each layer; the back propagation algorithm is an algorithm that quickly calculates gradients, which enables the gradient descent method to be effectively applied. One of the main steps in machine learning is to construct a loss function. After the loss function is constructed, it is necessary to optimize the loss function to minimize the loss value. The gradient descent method is a method for optimizing the loss function. Specifically, it finds the steepest direction, takes small steps one by one, and then finds the steepest downhill direction at the current position and takes another small step.

[0082] The learning process of the back propagation algorithm consists of the forward propagation process and the back propagation process. In the forward propagation process, the input information passes through multiple hidden layers, is processed layer by layer and transmitted to the output layer. If the expected output value cannot be obtained in the output layer, the loss function is taken as the objective function, and the back propagation is turned on. The partial derivatives of the objective function to the weights of each neuron are calculated layer by layer to form the gradient of the objective function to the weight vector, which is used as the basis for modifying the weights. The training of the model is completed in the weight modification process. When the error reaches the expected value, the model training ends.

[0083] From the above description, it can be seen that the present invention constructs a unified replenishment decision model including three sub-models for integrated training, so that end-to-end replenishment decision can be achieved in one step. A unified loss function is used for back propagation, the optimization target is unified, and the prediction accuracy is improved. When constructing the training set, the historical optimal replenishment quantity is calculated by constructing a dynamic programming model, which further improves the accuracy of the training labels and improves the overall training accuracy of the model.

[0084] The serial numbers of the above steps are only for distinguishing the steps, but do not indicate the order. For example, the execution order of step S110 and step S121 can be changed, first obtaining the data in the training set and then building the model. Step S110 and step S121 can also be executed at the same time, all of which are within the protection scope of the present invention.

[0085] After obtaining the trained replenishment decision model, the historical sales time series and historical product delivery lead time series that need to be analyzed can be input into the model to perform sales forecasts and optimal replenishment quantity decisions at the same time.

[0086] like Figure 3 As shown, in one embodiment of the present invention, a replenishment decision method is also provided, comprising the following steps:

[0087] S210: Input the sales time series and the product delivery lead time series into the replenishment decision model. The replenishment decision model is as follows: Figure 1 The replenishment decision model training method shown in FIG. 1 trains the replenishment decision model. The architecture of the replenishment decision model is as follows: Figure 2 shown.

[0088] S220: Obtain the output of the third sub-model, where the output of the third sub-model corresponds to a replenishment quantity forecast.

[0089] Specifically, when the replenishment decision method is applied to the above specific example, after the above replenishment decision model is trained, the model is used to make replenishment decisions. The architecture of the replenishment decision model is as follows: Figure 2 Step S210 includes obtaining a sales time series, a product attribute series, a product delivery lead time series, an order cycle data, and inventory data of a specific product within a certain period of time, and inputting the above data into a trained replenishment decision model.

[0090] The step S220 includes the input layer of the replenishment decision model receiving input data respectively, the first sub-model 11 encoding the historical sales time series, the second sub-model 12 encoding the historical product delivery lead time series, the third sub-model 13 decoding the encoding results of the first sub-model 11 and the second sub-model 12, and the output layer 121 of the third sub-model 13 outputting the corresponding replenishment quantity forecast. Preferably, in this embodiment, the output layer 122 of the first sub-model 11 outputs the corresponding sales forecast sequence, so that the sales forecast interval can be intuitively seen, so that the replenishment decision method has interpretability, and can visually check the location of the problem when there is a large deviation or problem in the prediction. Preferably, in this embodiment, the output layer 123 of the second sub-model 12 outputs the predicted product delivery lead time, further realizing the visualization of the intermediate links of the replenishment decision method, facilitating problem troubleshooting, and thus improving the overall operation accuracy of the model.

[0091] Through the above method, the optimal replenishment quantity is directly determined from the historical sales volume, historical purchasing rhythm, supplier performance and other data, achieving end-to-end replenishment decision-making, thereby shortening the decision-making process and reducing the impact of the cumulative prediction errors in the intermediate links on the decision-making effect. The optimal replenishment quantity and sales volume forecast can be obtained simultaneously through the replenishment decision model, making the replenishment decision method explainable and able to visually check the location of the problem when there is a large deviation or problem in the prediction.

[0092] like Figure 4 As shown, an embodiment of the present invention further provides a replenishment decision model training system, which is applied to the replenishment decision model training method, and the system includes:

[0093] The model building module M100 is used to build a replenishment decision model.

[0094] The data acquisition module M200 is used to obtain multiple historical sales time series, historical commodity delivery lead time series, calculate the historical optimal replenishment quantity, and add the historical sales time series, historical commodity delivery lead time series and historical optimal replenishment quantity to the training set.

[0095] The model training module M300 is used to train the replenishment decision model using the above training set.

[0096] The replenishment decision model training system of the present invention constructs a neural network model based on three sub-models for integrated training, thereby being able to achieve end-to-end replenishment decision-making in one step. A unified loss function is used for back propagation, the optimization target is unified, and the prediction accuracy is improved. When constructing the training set, the historical optimal replenishment quantity is calculated by constructing a dynamic programming model, which further improves the accuracy of the training labels and the overall training accuracy of the model.

[0097] The functions of each module can be implemented by the implementation method of the replenishment decision model training method. For example, the model building module M100 can be implemented by the implementation method of step S110, the data acquisition module M200 can be implemented by the implementation methods of the above steps S121, S122, and S123, and the model training module M300 can be implemented by the implementation method of the above step S123. No further details will be given here.

[0098] An embodiment of the present invention also provides a replenishment decision model training device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to execute the steps of the replenishment decision model training method by executing the executable instructions.

[0099] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0100] Refer to the following Figure 5 The electronic device 600 according to this embodiment of the present invention is described. Figure 5 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0101] like Figure 5 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0102] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the electronic prescription circulation processing method section of this specification. For example, the processing unit 610 can execute the following steps: Figure 1 Follow the steps shown in .

[0103] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0104] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0105] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0106] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0107] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, which implements the steps of the replenishment decision model training method when executed. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of various exemplary embodiments of the present invention described in the above-mentioned electronic prescription circulation processing method section of this specification.

[0108] refer to Figure 6 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0109] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0110] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0111] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0112] In summary, compared with the prior art, the replenishment decision model training method, system, device and medium provided by the present invention have the following advantages:

[0113] By building a unified replenishment decision model including three sub-models and conducting integrated training, end-to-end replenishment decision-making can be achieved in one step. A unified loss function is used for back propagation to unify the optimization objectives and improve prediction accuracy. When constructing the training set, a dynamic programming model is constructed to calculate the historical optimal replenishment quantity, further improving the accuracy of the training labels and the overall training accuracy of the model.

[0114] The optimal replenishment quantity is directly determined from data such as the historical sales volume, historical purchasing rhythm, and supplier performance, achieving end-to-end replenishment decision-making, thereby shortening the decision-making process and reducing the impact of the cumulative prediction errors in the intermediate links on the decision-making effect. The optimal replenishment quantity and sales volume forecast can be obtained simultaneously through the replenishment model, making the replenishment decision method explainable and able to visually check the location of the problem when there is a large deviation or problem in the prediction.

[0115] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A replenishment decision model training method, characterized in that: The steps include: The step of constructing a replenishment decision model includes: A first sub-model, the first sub-model is used to encode the historical sales time series, and the first sub-model is based on a first neural network; a second sub-model, the second sub-model being used to encode the historical commodity delivery lead time sequence, the second sub-model being based on a second neural network; a third sub-model, the third sub-model connecting the final hidden layer of the first sub-model and the final hidden layer of the second sub-model to output a replenishment quantity forecast according to the encoding result of the first sub-model and the encoding result of the second sub-model, the third sub-model being based on a third neural network; The step of training the replenishment decision model includes adding the historical sales time series, the historical product delivery lead time series and the historical optimal replenishment quantity into the training set to train the replenishment decision model; The step of constructing a replenishment decision model includes constructing a loss function of the replenishment decision model, and the loss function satisfies the following formula: Among them, L(Out1 i ,a* i ) is the loss function of the third sub-model, L1(Out2 i ,a* DF,i ) is the first sub-model loss function, L2(Out3 i ,a* VLT,i ) is the loss function of the second sub-model, λ1 is the first weighting coefficient, λ2 is the second weighting coefficient, Out1 i is the replenishment quantity forecast output by the third sub-model, a* i is the historical optimal replenishment quantity, Out2 i is the sales probability prediction sequence output by the first sub-model, a* VLT,i For historical sales, Out3 i The predicted product delivery lead time output by the second sub-model, a* VLT,i is the historical product delivery lead time, N is the number of samples; The step of training the replenishment decision model includes training the replenishment decision model using a gradient descent method, and performing reverse gradient propagation based on the gradient of the function value.

2. The replenishment decision model training method according to claim 1, characterized in that: The first neural network is a recurrent neural network, which includes an input layer, a fully connected layer and a final hidden layer. The final hidden layer of the first sub-model encodes and outputs a sales probability prediction sequence.

3. The replenishment decision model training method according to claim 1, characterized in that: The first sub-model loss function is a quantile loss function, and / or the third sub-model loss function is a quantile loss function.

4. The replenishment decision model training method according to claim 1, characterized in that: The steps of training the replenishment decision model include the following steps: Get the historical inventory and sales volume of a specific product over a period of time; Calculate the historical optimal replenishment quantity based on the historical inventory quantity and historical sales volume; Arrange the historical sales volume in time as a historical sales volume time series and add it to the training set, and add the historical optimal replenishment quantity to the training set; The training set is used to train the replenishment decision model.

5. The replenishment decision model training method according to claim 4, characterized in that: The step of calculating the historical optimal replenishment quantity according to the historical inventory quantity and the historical sales volume includes constructing the following dynamic programming model: Among them, V m (Iv m ) is the optimal cost between the mth order time and the m+1th order time; a m is the mth historical optimal replenishment quantity; h[] is the holding cost function; b[] is the out-of-stock cost function; V m is the time of the mth order; Iv m is the historical inventory volume for the mth time; d[v m ,s] is v m Historical sales volume from time s to time s; V m+1 is the optimal cost of the m+1th order; d[v m ,v m+1 -1] is v m Time to v m+1 -Total sales at 1 moment; The historical optimal replenishment quantity is obtained by solving the above dynamic programming model.

6. The replenishment decision model training method according to claim 1, characterized in that: The step of training the replenishment decision model further includes encoding specific commodities according to preset commodity attribute rules to obtain a commodity attribute sequence, adding the commodity attribute sequence to a training set, integrating the historical sales time series with the commodity attribute sequence, and encoding the integrated sequence by the first sub-model.

7. A replenishment decision method, characterized in that: The steps include: Inputting the sales volume time series and the product delivery lead time series into the replenishment decision model described in any one of claims 1 to 6; The third sub-model output is obtained, where the third sub-model output corresponds to a replenishment quantity forecast.

8. A replenishment decision model training system, characterized in that: The replenishment decision model training method applied to any one of claims 1 to 6, wherein the system comprises: Model building module, used to build a replenishment decision model; A data collection module is used to obtain multiple historical sales time series and historical product delivery lead time series, calculate the historical optimal replenishment quantity, and add the historical sales time series, historical product delivery lead time series and historical optimal replenishment quantity to a training set; A model training module is used to train the replenishment decision model using the training set.

9. A replenishment decision model training device, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to execute the steps of the replenishment decision model training method according to any one of claims 1 to 6 by executing the executable instructions.

10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed, the steps of the replenishment decision model training method described in any one of claims 1 to 6 are implemented.