Model training method and device, inventory allocation method and device, electronic equipment, storage medium and program product
Through the end-to-end model training method, combined with the inventory estimate module and the allocation simulation module, the problem that the existing inventory allocation system cannot achieve global optimal decisions is solved, and more efficient and lower-cost inventory allocation management is achieved.
Patent Information
- Application Number
- CN202411554148.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-01
AI Technical Summary
The existing inventory allocation system cannot achieve global optimal decisions due to module splitting, the system is complex and maintenance costs are high, and a single module cannot be optimized quickly.
Using an end-to-end model training method, by obtaining the demand of target items in different storage centers, a model including inventory estimate module and allocation simulation module is trained to realize end-to-end estimate and simulation of inventory allocation decisions.
It realizes global optimal inventory allocation decisions, reduces system complexity and maintenance costs, and improves the optimization speed and efficiency of a single module.
Smart Images

Figure CN119444064A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of warehousing and logistics technology, and in particular to a model training, inventory transfer method, device, electronic equipment, storage medium and program product. Background Art
[0002] Inventory management is the cornerstone of the entire supply chain. Excellent inventory management can reduce costs and improve efficiency, especially when faced with massive quantities of goods. How to plan inventory, allocate inventory more reasonably, and plan items more forward and closer to consumers, so as to meet the growing demand of consumers for faster delivery, is a common challenge faced by current retail e-commerce companies.
[0003] Regarding inventory transfer decisions, the current relevant technology in the industry is to split the inventory transfer system into multiple modules and determine the final inventory transfer decision through serial decisions of each module.
[0004] In the process of realizing the present invention, the inventors found that the prior art has the following technical problems: failure to bring about global optimal decision-making, high system complexity and high maintenance cost, and inability to quickly optimize a single module. Summary of the invention
[0005] The embodiments of the present invention provide a model training, inventory transfer method, device, electronic device, storage medium and program product to achieve end-to-end inventory transfer decision-making.
[0006] According to one aspect of the present invention, a model training method is provided, which may include:
[0007] Obtaining a first sample demand quantity of the target item in a first storage center and a second sample demand quantity in a second storage center within a sample historical time period, and obtaining a model to be trained, wherein the model to be trained includes an inventory estimation module and a transfer simulation module;
[0008] Using the inventory estimation module, based on the first sample demand, obtain a first estimated inventory of the target item at a simulation historical time point, and based on the second sample demand, obtain a second estimated inventory of the target item at a simulation historical time point;
[0009] The transfer simulation module is used to perform transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation result and obtain the target inventory estimation module.
[0010] According to another aspect of the present invention, a method for stock transfer is provided, which may include:
[0011] Obtaining a first target demand quantity of a target item in a first storage center and a second target demand quantity in a second storage center within a target historical time period, and a target inventory estimation module trained according to the model training method described in any embodiment of the present invention;
[0012] Using the target inventory estimation module, based on the first target demand, estimate the first target inventory of the target item at the inventory transfer time point, and based on the second target demand, estimate the second target inventory of the target item at the inventory transfer time point;
[0013] Based on the first target inventory and the second target inventory, a stock transfer decision between the first storage center and the second storage center is determined, so that according to the stock transfer decision, stock transfer between the first storage center and the second storage center is performed for the target item.
[0014] According to another aspect of the present invention, a model training device is provided, which may include:
[0015] A first acquisition module is used to obtain a first sample demand quantity of a target item in a first storage center and a second sample demand quantity in a second storage center within a sample historical time period, and to obtain a model to be trained, wherein the model to be trained includes an inventory estimation module and a transfer simulation module;
[0016] An estimated inventory module, used to obtain a first estimated inventory of a target item at a simulation historical time point based on a first sample demand quantity and a second estimated inventory of the target item at a simulation historical time point based on a second sample demand quantity using the inventory estimation module;
[0017] The model training module is used to use the transfer simulation module to perform transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation results to obtain the target inventory estimation module.
[0018] According to another aspect of the present invention, a stock transfer device is provided, which may include:
[0019] A second acquisition module, used to obtain a first target demand quantity of a target item in a first storage center and a second target demand quantity in a second storage center within a target historical time period, and a target inventory estimation module trained by the model training method described in any embodiment of the present invention;
[0020] The target inventory module is used to estimate the first target inventory of the target item at the inventory transfer time point based on the first target demand quantity and to estimate the second target inventory of the target item at the inventory transfer time point based on the second target demand quantity using the target inventory estimation module;
[0021] The inventory transfer module is used to determine the inventory transfer decision between the first storage center and the second storage center based on the first target inventory and the second target inventory, so as to transfer the inventory between the first storage center and the second storage center for the target items according to the inventory transfer decision.
[0022] According to another aspect of the present invention, there is provided an electronic device, which may include:
[0023] at least one processor; and
[0024] a memory communicatively connected to at least one processor; wherein,
[0025] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor implements the model training method or inventory transfer method provided by any embodiment of the present invention when executing.
[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a processor to implement the model training method or inventory transfer method provided by any embodiment of the present invention when executed.
[0027] According to another aspect of the present invention, a computer program product is provided, on which a computer program is stored. When the computer program is executed by a processor, the model training method or the inventory transfer method provided by any embodiment of the present invention is implemented.
[0028] The technical solution of the embodiment of the present invention obtains the first sample demand of the target item in the RDC and the second sample demand in the FDC within the sample historical time period, the demand is an important factor in estimating the required inventory, and obtains a model to be trained, the model to be trained includes an inventory estimation module and an allocation simulation module, so as to perform model training; using the inventory estimation module, based on the first sample demand, a first estimated inventory of the target item at a simulation historical time point is obtained, and based on the second sample demand, a second estimated inventory of the target item at a simulation historical time point is obtained, thereby realizing the estimation of the required inventory of the target item in the RDC and FDC; then, using the allocation simulation module, based on the first estimated inventory and the second estimated inventory, a transfer simulation between the RDC and FDC is performed for the target item, so that the parameters in the inventory estimation module can be adjusted according to the obtained allocation simulation results to obtain the target inventory estimation module. The above technical solution, by training an end-to-end target inventory estimation module that can be used for inventory transfer decisions, solves the problems of inability to make global optimal decisions due to module splitting, high system complexity and high maintenance costs, and inability to quickly optimize a single module, and realizes end-to-end inventory transfer decisions.
[0029] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 is a flow chart of a model training method provided according to an embodiment of the present invention;
[0032] Figure 2 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0033] Figure 3 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0034] Figure 4 is a schematic diagram of a model in another model training method provided according to an embodiment of the present invention;
[0035] Figure 5 is a flow chart of a method for stock transfer provided according to an embodiment of the present invention;
[0036] Figure 6 is a structural block diagram of a model training device provided according to an embodiment of the present invention;
[0037] Figure 7 is a structural block diagram of a stock transfer device provided according to an embodiment of the present invention;
[0038] Figure 8 It is a structural schematic diagram of an electronic device for implementing the model training method or the inventory transfer method of an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] Before introducing the embodiments of the present invention, the application scenarios of the embodiments of the present invention are first described by way of example. For example, the currently used inventory transfer system has problems such as failure to achieve global optimal decision-making due to separate decisions of each module, high system complexity and high maintenance cost due to the coordinated decision-making of multiple modules, and inability to quickly optimize a single module due to the need for coordination of other modules for the optimization of a single module.
[0042] In view of this, an embodiment of the present invention proposes a technical solution for making inventory transfer decisions in an end-to-end manner, which does not require module splitting, thereby solving a series of problems caused by module splitting.
[0043] Figure 1 It is a flow chart of a model training method provided in an embodiment of the present invention. This embodiment is applicable to the case of training a target inventory estimation module that can realize end-to-end inventory transfer decision. The method can be executed by the model training device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware. The device can be integrated in an electronic device, and the electronic device can be various user terminals or servers.
[0044] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0045] S110. Obtain a first sample demand of the target item in the first storage center and a second sample demand in the second storage center within a sample historical time period, and obtain a model to be trained;
[0046] Among them, the models to be trained include inventory estimation module and transfer simulation module.
[0047] Among them, the target items can be understood as items that need to be transferred between the first storage center and the second storage center, and can be further understood as items that need to be transferred from the first storage center to the second storage center, or items that need to be transferred from the second storage center to the first storage center. The specific inventory transfer direction is related to the actual situation and is not specifically limited here.
[0048] The above-mentioned first storage center and second storage center are different storage centers that are at least used to store target items. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, optionally, the first storage center and the second storage center can be any two of the storage centers such as the Central Distribution Center (CDC), the Regional Distribution Center (RDC) and the Front Distribution Center (FDC). Of course, it can also be other storage centers. This can be set according to actual needs and is not specifically limited here.
[0049] On this basis, in order to more vividly understand the model training process described in the embodiment of the present invention, the following will take the example that the first storage center is RDC and the second storage center is FDC for explanation, but it should be emphasized that this is only an example and not a specific limitation on the two storage centers.
[0050] The sample history time period can be understood as the time period that has occurred and is used in the model training process.
[0051] The first sample demand can be understood as time series data that characterizes the demand for the target item in the RDC within the sample historical time period. In combination with the application scenarios that may be involved in the embodiments of the present invention, the demand can optionally be understood as sales volume.
[0052] Similarly, the second sample demand can be understood as time series data representing the demand for the target item in FDC within the sample historical time period.
[0053] The model to be trained can be understood as a model with training needs, and the model may include an inventory estimation module and an allocation simulation module. Among them, the inventory estimation module can be understood as a module for performing inventory estimation, and in particular, it can be understood as a module for estimating the required inventory, and the required inventory is related to the demand. On this basis, optionally, the module may include a demand prediction unit and an inventory estimation unit. The allocation simulation module is connected to the inventory estimation module, and is used to simulate the inventory allocation process of the target item between the RDC and the FDC according to the inventory estimation results output by the inventory estimation module. In practical applications, optionally, the model may also include a loss calculation module connected to the allocation simulation module to perform loss calculation according to the allocation simulation results output by the allocation simulation module; and so on, which are not specifically limited here.
[0054] Obtain the first sample demand, the second sample demand and the model to be trained. In combination with the application scenarios that may be involved in the embodiments of the present invention, optionally, the number of RDCs is usually one, and the number of FDCs may be one or more. In this step, the second sample demand corresponding to each FDC may be obtained.
[0055] S120. Using the inventory estimation module, based on the first sample demand, obtain a first estimated inventory of the target item at a simulation historical time point, and based on the second sample demand, obtain a second estimated inventory of the target item at a simulation historical time point.
[0056] Among them, the simulation history time point can be understood as the time point that has occurred in the application during the allocation simulation process. In the embodiment of the present invention, optionally, the time point may be a time point within the sample history time period, such as a relatively late time point within the sample history time period; or a time point later than all time points within the sample history time period; and so on, which are not specifically limited here. Optionally, the number of the time points may be one or more, and in the case of multiple, each time point may be processed separately.
[0057] The first estimated inventory can be understood as the inventory required by the target item in the RDC at a simulation history time point. The inventory is estimated based on the first sample demand using the inventory estimation module.
[0058] The second estimated inventory is similar, so I will not go into details here.
[0059] S130. Using the transfer simulation module, based on the first estimated inventory and the second estimated inventory, perform transfer simulation between the first storage center and the second storage center, so as to adjust the parameters in the inventory estimation module according to the transfer simulation result, and obtain a target inventory estimation module.
[0060] Among them, the transfer simulation module is used to simulate the stock transfer between RDC and FDC for the target item based on the first estimated inventory and the second estimated inventory. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, before the stock transfer, considering that the target items may be stored in RDC and / or FDC, in order to avoid invalid transfer, the stock transfer simulation can be performed based on the first estimated inventory and the second estimated inventory, and combined with the first initial inventory and the second initial inventory. Among them, the first initial inventory can be understood as the number of target items stored in RDC before the stock transfer, and the second initial inventory can be understood as the number of target items stored in FDC before the stock transfer.
[0061] In this way, further, according to the transfer simulation results output by the transfer simulation module, the parameters in the inventory estimation module in the model to be trained can be adjusted to obtain the target inventory estimation module. Therefore, the trained target inventory estimation module can be used to perform inventory estimation in the future, and inventory transfer decisions can be made based on this.
[0062] In practical applications, it is optional to train corresponding target inventory estimation modules for different target items or different stock keeping units (SKUs); or to train a target inventory estimation module for at least some SKUs; etc., which are not specifically limited here. For the latter, in both the model training and reasoning stages, the item information representing the SKU can be input into the model so that the model can determine the SKU currently being processed. The item information can be, for example, the item name and / or item brand.
[0063] The technical solution of the embodiment of the present invention obtains the first sample demand of the target item in the RDC and the second sample demand in the FDC within the sample historical time period, the demand is an important factor in estimating the required inventory, and obtains a model to be trained, the model to be trained includes an inventory estimation module and an allocation simulation module, so as to perform model training; using the inventory estimation module, based on the first sample demand, a first estimated inventory of the target item at a simulation historical time point is obtained, and based on the second sample demand, a second estimated inventory of the target item at a simulation historical time point is obtained, thereby realizing the estimation of the required inventory of the target item in the RDC and FDC; then, using the allocation simulation module, based on the first estimated inventory and the second estimated inventory, a transfer simulation between the RDC and FDC is performed for the target item, so that the parameters in the inventory estimation module can be adjusted according to the obtained allocation simulation results to obtain the target inventory estimation module. The above technical solution, by training an end-to-end target inventory estimation module that can be used for inventory transfer decisions, solves the problems of inability to make global optimal decisions due to module splitting, high system complexity and high maintenance costs, and inability to quickly optimize a single module, and realizes end-to-end inventory transfer decisions.
[0064] Figure 2 It is a flowchart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the inventory estimation module includes a demand prediction unit and an inventory estimation unit; using the inventory estimation module, based on the first sample demand, a first estimated inventory of the target item at a simulation historical time point is obtained, including: inputting the first sample demand into the demand prediction unit to obtain the first predicted demand of the target item at the associated simulation historical time point; inputting the first predicted demand into the inventory estimation unit to obtain the first estimated inventory of the target item at the simulation historical time point. Among them, the explanations of the terms that are the same or corresponding to the above-mentioned embodiments are not repeated here.
[0065] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0066] S210. Obtain the first sample demand of the target item in the first storage center and the second sample demand in the second storage center within the sample history time period, and obtain the model to be trained;
[0067] The model to be trained includes an inventory estimation module and a transfer simulation module, and the inventory estimation module includes a demand prediction unit and an inventory estimation unit.
[0068] As mentioned above, demand is an important factor in estimating the required inventory, so inventory estimation is achieved here through a demand forecasting unit and an inventory estimation unit.
[0069] S220. Input the first sample demand into the demand prediction unit to obtain the first predicted demand of the target item related to the simulation historical time point, and input the second sample demand into the demand prediction unit to obtain the second predicted demand of the target item related to the simulation historical time point.
[0070] Among them, the first predicted demand can be understood as the predicted demand of the target item in the RDC. On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, the demand may be the demand of the target item in the RDC at the simulation historical time point, or it may be the demand of the RDC in the time period including the simulation historical time point. This can be set according to the actual situation and is not specifically limited here. The first sample demand is input into the demand prediction unit to obtain the first predicted demand.
[0071] The second predicted demand is similar to the first predicted demand and is not specifically limited here.
[0072] S230. Input the first predicted demand into the inventory estimation unit to obtain the first estimated inventory of the target item at the simulation historical time point, and input the second predicted demand into the inventory estimation unit to obtain the second estimated inventory of the target item at the simulation historical time point.
[0073] Among them, the inventory estimation unit is used to process the demand forecast result (i.e., the first predicted demand or the second predicted demand) output by the demand forecast unit to obtain the estimated inventory (i.e., the first estimated inventory corresponding to the first predicted demand or the second estimated inventory corresponding to the second predicted demand).
[0074] S240. Using the transfer simulation module, based on the first estimated inventory and the second estimated inventory, perform transfer simulation between the first storage center and the second storage center, so as to adjust the parameters in the inventory estimation module according to the transfer simulation result, and obtain a target inventory estimation module.
[0075] The technical solution of the embodiment of the present invention divides inventory estimation into two parts: demand prediction and inventory estimation, and uses the demand prediction result to perform inventory estimation. The estimated inventory obtained is explainable, thereby ensuring the accuracy of inventory estimation.
[0076] On this basis, with respect to demand forecasting, combined with application scenarios that may be involved in the embodiments of the present invention, illustratively, taking sales volume as an example, the relevant contents of sales volume forecasting are described as follows.
[0077] During the sales forecasting process, the input data may include historical sales at the sku level, historical sales at the three-level classification level, historical sales at the brand level, and historical sales at the national sku level. On this basis, it may also include promotional marketing activity factors that affect sales and / or item information that characterizes the sku, etc., which are not specifically limited here.
[0078] Furthermore, after obtaining these input data, they can be preprocessed by cleaning outliers and constructing feature engineering. Exemplarily, statistical features can be obtained by one or more aggregation methods, which may include at least one of max, min, avg, std, sum and count; onehot conversion can be performed on the provided data frame and specified columns, and multiple columns can be converted simultaneously; missing values can be filled by selecting the mean, median or random sampling filling; standardization can be performed, such as converting the data to a specified range to transform the overall mean and standard deviation, normal standardization and robust standardization (such as data standardization according to quartiles), which can be selected according to actual needs and are not specifically limited here.
[0079] Furthermore, the demand forecasting unit (i.e., sales forecasting unit) can work in the following two steps:
[0080] The first step: information encoding, which may include the following parts: recent sales encoder, influence activity encoder, and concurrent sales encoder. In practical applications, these encoders may optionally adopt a transformer structure, which is composed of multiple multi-head attention mechanisms (Multi-Head Attention) stacked together. Each multi-head attention mechanism is composed of 3 linear layers stacked with multiple attention machines. The entire structure is to increase the depth of the network by stacking the network structure, so that the network has a stronger learning representation ability.
[0081] Specifically, the recent sales encoder can input recent sales, time information, and item information into the transformer structure, encode them, and output the encoded data of the predicted length;
[0082] Impact Activity Encoder: It can input price data into the transformer structure, encode it, and output the encoded data of the predicted length;
[0083] Concurrent Sales Encoder: The historical concurrent sales can be input into the transformer structure, encoded, and the encoded data of the predicted length can be output.
[0084] Step 2: Information merging and decoding.
[0085] Specifically, the encoded data output by the three encoders are merged together according to the same dimension, and a multi-layer linear network plus a relu activation function is performed through the linear layer, and the sales forecast of multiple quantiles is output by accumulation, and it can be ensured that the prediction of each high quantile is ≥ the prediction of the relatively low quantile. Among them, for the accumulation method, exemplarily, q1 represents the lowest quantile, then q2 quantile = q1 quantile + X, where X represents a number greater than or equal to 0, and X can be obtained through network learning.
[0086] On this basis, the sales forecast loss function can be expressed as follows: Among them, q i represents the i-th quantile, q i and q i Similarly, y n represents the historical sales volume of the nth item, Represents the predicted sales volume of the nth item.
[0087] With respect to inventory estimation, in combination with application scenarios that may be involved in the embodiments of the present invention, optionally, the inventory estimation unit includes a basic inventory estimation subunit, a fluctuation inventory estimation subunit, and an inventory estimation subunit;
[0088] Inputting the first predicted demand into the inventory estimation unit to obtain the first estimated inventory of the target item at the simulation historical time point includes:
[0089] Inputting the first forecast demand into the basic inventory estimation subunit to obtain an estimated basic inventory;
[0090] Inputting the first predicted demand, the first real demand corresponding to the first predicted demand in the first sample demand, and the prediction deviation obtained according to the first predicted demand and the first real demand into the fluctuation inventory estimation subunit to obtain the estimated fluctuation inventory;
[0091] The estimated basic inventory and the estimated fluctuating inventory are input into the inventory estimation subunit to obtain the first estimated inventory of the target item at the simulation historical time point.
[0092] Here, RDC is taken as an example. The related processing of FDC is similar and will not be described in detail here.
[0093] The first predicted demand is input into the basic inventory estimation subunit to obtain the estimated basic inventory of the target item in the RDC. In combination with the application scenarios that may be involved in the embodiments of the present invention, optionally, the estimated basic inventory can specifically be the basic inventory at the simulation historical time point; it can also be the basic inventory within the time period including the simulation historical time point, such as the basic inventory within the allocation leading time (allocation leading time, alt); etc., which are not specifically limited here.
[0094] The first sample demand includes multiple first real demands (i.e., demands actually occurring in the RDC) within the sample historical time period, and the first real demand in the present technical solution can be understood as the first real demand corresponding to the first predicted demand among the multiple first real demands. Exemplarily, considering that in the model reasoning stage, the first predicted demand is the demand at a future time point, and the first real demand at the future time point does not exist, in order to ensure the consistency between model training and model reasoning, the first real demand used in the present technical solution can be the first real demand at a time point where the time point corresponding to the first predicted demand is slid forward by one prediction cycle. The prediction deviation can be understood as the difference between the first predicted demand and the first real demand. The first predicted demand, the first real demand, and the prediction deviation are input into the fluctuation inventory estimation subunit to obtain the estimated fluctuation inventory.
[0095] Furthermore, the estimated basic inventory and the estimated fluctuation inventory are input into the inventory estimation subunit to obtain a first estimated inventory of the target item at a simulation historical time point.
[0096] The above technical solution takes into account the volatility of inventory. Therefore, the first estimated inventory is calculated based on the estimated basic inventory and the estimated fluctuating inventory, thereby improving the accuracy of the first estimated inventory.
[0097] On this basis, optionally, for the transfer lead time corresponding to the simulation historical time point, the estimated basic inventory is the estimated basic inventory within the transfer lead time, and the estimated fluctuation inventory is the estimated fluctuation inventory within the transfer lead time;
[0098] The inventory estimation unit also includes a mask inventory estimation subunit;
[0099] Inputting the first predicted demand into the inventory estimation unit to obtain the first estimated inventory of the target item at the simulation history time point also includes:
[0100] Using the masked inventory estimation subunit, mask the masked demand quantity within the transfer lead time from the first forecasted demand quantity, and sum up each masked demand quantity to obtain the estimated masked inventory;
[0101] Accordingly, the estimated basic inventory and the estimated fluctuation inventory are input into the inventory estimation subunit to obtain the first estimated inventory of the target item at the simulation historical time point, including:
[0102] The estimated basic inventory, estimated fluctuation inventory and estimated mask inventory are input into the inventory estimation subunit to obtain the first estimated inventory of the target item at the simulation history time point.
[0103] Among them, for alt corresponding to the simulation historical time point, the estimated basic inventory can be the estimated basic inventory within alt, and the estimated fluctuation inventory can be the estimated fluctuation inventory within alt.
[0104] On this basis, the first real demand in alt is masked from the multiple first real demands represented by the first predicted demand through the masked inventory estimation subunit. For the sake of distinction, the first real demand is referred to as the masked demand. Then, all the masked demands are summed to obtain the estimated masked inventory. In this way, the first estimated inventory can be obtained based on the estimated basic inventory and the estimated fluctuation inventory, combined with the estimated masked inventory.
[0105] The above technical solution further improves the accuracy of the first estimated inventory estimate by introducing alt and combining mask addition to perform inventory estimate.
[0106] On this basis, combined with the application scenarios that may be involved in the embodiments of the present invention, illustratively, the inventory can be divided into safety inventory Ss and target inventory Ti. Ss of a distribution center (DC) (such as RDC or FDC) can be understood as the inventory required to ensure that the target items shipped from the DC on the same day are available in the DC, and Ti can be understood as the inventory required to ensure that the target items shipped from the DC within a transfer frequency are available in the DC. The number of inventory transfers can be reduced by setting Ti.
[0107] On this basis, here we still take sales volume as an example, and we can estimate inventory in the following way:
[0108] 1) The sales forecast can be generated by a multilayer perceptron (MLP) to generate the estimated base inventory within alt and the estimated base inventory within alt+7 f mlp (alt+7), where 7 refers to 7 days, that is, the default transfer frequency is weekly. 2) Based on the predicted sales, actual sales, and forecast deviation, the transformer structure is used to learn the demand fluctuation within alt and generate the estimated fluctuation inventory f diff (α). 3) Sum the predicted sales volume for each day in alt to get the estimated masked inventory sum(alt). Thus, Ss = f mlp (alt)+f diff (α)+sum(alt), Ti=f mlp (alt+7)+Ss to complete inventory estimation.
[0109] Figure 3It is a flow chart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the model to be trained also includes a loss calculation module connected to the allocation simulation module, and the target item is to be allocated from the first storage center to the second storage center; using the allocation simulation module, based on the first estimated inventory and the second estimated inventory, the allocation simulation between the first storage center and the second storage center is performed to adjust the parameters in the inventory estimation module according to the allocation simulation results to obtain the target inventory estimation module, which may include: using the allocation simulation module, executing the following three steps to perform the allocation simulation between the first storage center and the second storage center: according to the first estimated inventory and the second estimated inventory , obtain the inventory transfer amount from the first storage center to the second storage center; obtain the first simulated demand according to the inventory transfer amount and the first real demand of the target item in the first storage center at the simulation historical time point; obtain the second simulated demand according to the inventory transfer amount and the second real demand of the target item in the second storage center at the simulation historical time point; use the loss calculation module to calculate the loss based on the first real demand, the first simulated demand, the second real demand and the second simulated demand, so as to adjust the parameters in the inventory estimation module according to the loss calculation result, and obtain the target inventory estimation module. Among them, the explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.
[0110] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0111] S310. Obtain the first sample demand of the target item in the first storage center and the second sample demand in the second storage center within the sample history time period, and obtain the model to be trained;
[0112] Among them, the model to be trained includes an inventory estimation module, an allocation simulation module and a loss calculation module connected to the allocation simulation module; the target items are to be allocated from the first storage center to the second storage center.
[0113] S320. Using the inventory estimation module, based on the first sample demand, obtain a first estimated inventory of the target item at a simulation historical time point, and based on the second sample demand, obtain a second estimated inventory of the target item at a simulation historical time point.
[0114] S330. Utilize the transfer simulation module to execute the following S340-S360 to perform transfer simulation between the first storage center and the second storage center.
[0115] S340. Obtain the inventory transfer quantity from the first storage center to the second storage center based on the first estimated inventory and the second estimated inventory.
[0116] Here, taking the case where the target item is to be transferred from the first storage center to the second storage center as an example, the first estimated inventory can represent the inventory required by the RDC for the target item, and the second estimated inventory can represent the inventory required by the FDC for the target item. The inventory transfer quantity of the target item from the RDC to the FDC can be obtained based on the two. It should be noted that when there are multiple FDCs corresponding to the RDC, the inventory transfer quantity from the RDC to each FDC can be calculated separately.
[0117] On this basis, as explained above, before the inventory is transferred, considering that the target items may be stored in the RDC and / or FDC, in order to avoid invalid transfers, the inventory transfer quantity can be determined based on the first estimated inventory and the second estimated inventory, in combination with the first initial inventory and the second initial inventory.
[0118] The determined inventory transfer quantity is the inventory transfer decision. The inventory transfer simulation can be performed according to the inventory transfer decision to obtain the first demand loss and the second demand loss in subsequent steps.
[0119] S350. Obtain a first simulated demand quantity based on the inventory transfer quantity and the first real demand quantity of the target item in the first storage center at the simulation historical time point.
[0120] The first real demand can be understood as the actual demand of the target item in the RDC at the simulation historical time point, that is, the number of target items actually shipped out. The first simulated demand can be understood as the simulated demand of the target item in the RDC at the simulation historical time point.
[0121] According to the inventory transfer amount and the first real demand, the first simulated demand can be obtained. Exemplarily, the first simulated demand can be the minimum value between the inventory left by RDC after the inventory transfer of the inventory transfer amount and the first real demand. On this basis, optionally, if there is a purchase of the target item, the purchase order quantity must be added to the inventory. Here, taking the demand as sales as an example, RDC simulated sales = min (RDC inventory + purchase order quantity - inventory transfer, RDC real sales), where RDC simulated sales is the first simulated demand and RDC inventory is the first initial inventory.
[0122] On this basis, further optionally, at the end of a day, the remaining inventory of RDC can be expressed by the following formula: RDC inventory = RDC inventory + purchase order quantity - inventory transfer quantity - transfer sales - RDC actual sales, wherein the RDC inventory on the left side of “=” is the remaining inventory and is also the first initial inventory for the day, and the RDC inventory on the right side of “=” is the first initial inventory for the day, and the transfer sales will be explained in the following text.
[0123] S360. Obtain a second simulated demand based on the inventory transfer quantity and the second real demand of the target item in the second storage center at the simulation historical time point.
[0124] The second simulation demand is substantially the same as the first simulation demand.
[0125] Exemplarily, FDC simulated sales = min(FDC real sales, FDC inventory + FDC transferred arrivals), wherein FDC simulated sales is the second simulated demand, FDC real sales is the second real demand, FDC inventory is the second initial inventory, and FDC transferred arrivals is the inventory transfer quantity.
[0126] On this basis, optionally, after the end of the day, the remaining inventory of FDC can be expressed by the following formula: FDC inventory = max(FDC inventory + FDC transfer arrival - FDC actual sales, 0). Among them, the FDC inventory on the left side of "=" is the remaining inventory, and the FDC inventory on the right side of "=" is the second initial inventory of the day.
[0127] S370. Using the loss calculation module, based on the first real demand, the first simulated demand, the second real demand and the second simulated demand, the loss calculation is performed to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain the target inventory estimation module.
[0128] Among them, using the loss calculation module, the loss calculation of the relevant demand quantity is performed based on the four demand quantities, and then the parameters in the inventory estimation module are adjusted according to the loss calculation results to minimize the loss calculation results and obtain the target inventory estimation module. On this basis, optionally, for the optional scheme that the inventory estimation module includes a demand prediction unit and an inventory estimation unit, using the loss calculation module, in addition to performing the loss calculation of the relevant demand quantity, the loss calculation of the relevant prediction deviation can also be performed, so as to adjust the parameters by combining the two, thereby improving the accuracy of the parameter adjustment. Among them, the prediction deviation can be calculated based on the predicted demand quantity and the actual demand quantity at the same training historical time point.
[0129] The technical solution of the embodiment of the present invention calculates the simulated demand of RDC and FDC, thereby calculating the loss of related demand in combination with the real demand, and adjusting parameters based on this, thereby minimizing the loss of demand, so that all target items that need to be shipped out can be shipped out.
[0130] On this basis, an optional technical solution is that the first estimated inventory includes the first estimated safety inventory and the first estimated target inventory, and the second estimated inventory may include the second estimated safety inventory and the second estimated target inventory. On this basis, according to the first estimated inventory and the second estimated inventory, the inventory transfer quantity from the first storage center to the second storage center is obtained, including:
[0131] According to the first estimated safety stock and the second estimated safety stock, a first transfer quantity from the RDC to the FDC is obtained, and a stock transfer simulation is performed according to the first transfer quantity to obtain a first simulated stock of the RDC;
[0132] When the first simulated inventory is greater than the first estimated safety inventory, the second transfer quantity from the RDC to the FDC can be obtained according to the first simulated inventory, the first estimated target inventory and the second estimated target inventory;
[0133] The inventory transfer quantity is obtained according to the first transfer quantity and the second transfer quantity.
[0134] The first transfer amount can be determined based on the first estimated safety stock and the second estimated safety stock, and on this basis, it can also be determined in combination with the first initial stock and the second initial stock. According to the first transfer amount, stock is transferred from RDC to FDC to simulate the first simulated stock of RDC after the stock transfer. That is to say, when the first initial stock is limited, the stock is first allocated between RDC (here refers to the local RDC, excluding the area covered by RDC) and each FDC according to the safety stock. Usually, the local RDC is the first priority, and then the FDC is allocated.
[0135] Furthermore, when the first simulated inventory is greater than the first estimated safety stock, this means that there is surplus inventory in the RDC while ensuring the safety of the local inventory of the RDC. At this time, the second transfer quantity from the RDC to the FDC can be obtained based on the first simulated inventory, the first estimated target inventory and the second estimated target inventory. Compared with directly transferring inventory according to the first transfer quantity, the application of the second transfer quantity helps to reduce the number of inventory transfers from the RDC to the FDC.
[0136] Furthermore, the inventory transfer amount is obtained according to the first transfer amount and the second transfer amount. For example, the sum of the first transfer amount and the second transfer amount can be used as the inventory transfer amount. The inventory transfer amount can reduce the number of inventory transfers as much as possible while ensuring inventory safety.
[0137] Another optional technical solution is to use a loss calculation module to perform loss calculation based on the first real demand, the first simulated demand, the second real demand and the second simulated demand, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain a target inventory estimation module, including:
[0138] Using a loss calculation module, a first demand loss is obtained according to the first simulated demand and the first real demand, and a second demand loss is obtained according to the second simulated demand and the second real demand;
[0139] A loss calculation result is obtained according to the first demand loss and the second demand loss, so as to adjust the parameters in the inventory estimation module according to the loss calculation result and obtain a target inventory estimation module.
[0140] The first demand loss can be understood as the demand that should be provided but cannot be provided in the RDC after the inventory transfer is carried out according to the inventory transfer quantity, that is, the number of target items that should have been shipped out but failed to be shipped out. The meaning of the second demand loss is similar and will not be repeated here.
[0141] The loss calculation module is used to obtain the second demand loss according to the second simulated demand and the second real demand. For example, the maximum value between the difference between the second simulated demand and the second real demand and 0 can be used as the second demand loss. Exemplarily, FDC sales loss = max (FDC real sales - FDC simulated sales, 0), where FDC sales loss is the second demand loss.
[0142] The process of obtaining the first demand loss can be the same as or different from the process of obtaining the second demand loss. For different situations, it is mainly considered that FDC may transfer sales, as follows:
[0143] By using the transfer simulation module, the transfer demand of the target item in the second storage center at the simulation historical time point is obtained according to the second real demand and the inventory transfer quantity. At this time, the first demand loss can be obtained according to the first simulated demand, the first real demand and the transfer demand.
[0144] Among them, the transfer demand can be understood as the demand that should have been shipped from FDC at the simulation historical time point, but was shipped from RDC due to insufficient FDC inventory. Using the allocation simulation module, according to the second real demand and inventory allocation, on this basis, the second initial inventory can also be combined to obtain the transfer demand. Exemplarily, FDC transfer sales = max (FDC real sales - FDC inventory - FDC allocation arrival, 0), where FDC transfer sales is the transfer demand, and FDC inventory is the second initial inventory. At this time, the loss of the first demand can be expressed by the following formula: RDC sales loss = max (RDC real sales - RDC simulation sales - FDC transfer sales, 0), where RDC sales loss is the loss of the first demand. Consideration of the transfer demand improves the accuracy of determining the loss of the first demand.
[0145] On this basis, optionally, since the existence of transfer demand will affect the timeliness of delivery, when calculating the loss, not only the loss of the first demand and the loss of the second demand can be taken into account, but also the transfer demand can be taken into account, and the loss calculation result can be obtained based on these three.
[0146] The above technical solution calculates the first demand loss and the second demand loss, and then obtains the loss calculation result based on this. The loss calculation result can characterize the demand loss situation, and the demand loss situation is an important factor in evaluating the quality of inventory estimation. Therefore, the parameters in the inventory estimation module can be adjusted based on the loss calculation result, thereby improving the model training effect and ensuring the accuracy of inventory estimation.
[0147] On this basis, optionally, if the number of simulation historical time points is multiple, then according to the first demand loss and the second demand loss, a loss calculation result is obtained, including:
[0148] Accumulating the first demand losses corresponding to the multiple simulation historical time points to obtain the first demand loss, and accumulating the second demand losses corresponding to the multiple simulation historical time points to obtain the second demand loss;
[0149] A loss calculation result is obtained according to the first demand loss and the second demand loss.
[0150] Among them, compared with a single simulation historical time point, the loss calculation result based on multiple simulation historical time points is more universal, and the parameters adjusted thereby can better ensure the accuracy of inventory estimation. Therefore, here, the first demand losses corresponding to multiple simulation historical time points are accumulated to obtain the first cumulative loss, and the second demand losses corresponding to each other are accumulated to obtain the second cumulative loss. Further, the loss calculation result can be obtained based on these two cumulative losses.
[0151] The above technical solution takes into account that each decision is not isolated and will be affected by previous decisions, and the current decision will affect subsequent decisions. Therefore, the demand losses corresponding to multiple simulation historical time points are accumulated, and parameters are adjusted based on the accumulated results. That is, the losses are minimized by simulation in the process decision to adjust the parameters. The adjusted parameters can better guarantee the accuracy of inventory estimation.
[0152] On this basis, in order to better understand the model training process described in the above technical solutions as a whole, the following is an illustrative explanation of it with specific examples.
[0153] For example, see Figure 4, the blue background indicates FDC, and the orange background indicates RDC. Model training can be divided into two stages. The first stage is to use historical sales to train sales forecasting unit 1, and obtain sales forecasting unit 2 that has completed preliminary training; the second stage is to use sample sales, initial inventory, and purchase order quantity to train sales forecasting unit 2 and inventory estimation unit 1. The sales forecasting unit 3 and inventory estimation unit 2 obtained in this way can be used for end-to-end inventory transfer decisions, ensuring the global optimality of inventory transfer. Among them, in actual applications, optionally, the sample historical time period corresponding to the historical sales can be a part of the sample historical time period corresponding to the sample sales. For example, the sales data of the past 21 days can be used for the first stage model training, and the sales data of the past 42 days can be used for the second stage model training and simulation, which can avoid the phenomenon of data crossing.
[0154] Specifically, the training process of the second stage is as follows:
[0155] First, the predicted sales volume is output through the sales volume prediction unit 2; then, Ss and Ti are output through the inventory estimation unit 1; and then, the simulated sales volume is output through the inventory simulation module.
[0156] The above steps are repeated s times, that is, after the first execution, they are repeated s-1 times. Then, the accumulated sales loss and prediction deviation loss are calculated, and the model minimizes the sales loss and prediction deviation loss:
[0157] loss=w1*loss1+w2*loss2+w3*loss3+loss sale (y,y q );
[0158] Among them, loss1 is the RDC sales loss, loss2 is the FDC sales loss, loss3 is the FDC transfer sales, w1, w2, w3 are super parameters; loss sale is the forecast deviation loss, y represents the forecast sales, y q Represents the actual sales volume, from which the global optimal inventory transfer decision can be obtained.
[0159] It should be noted that, first, the above-mentioned model to be trained is a large recurrent neural network (RNN) structure, that is, it has a recurrent connection, so that the network can retain and utilize the information of the previous time step, and the simulation process is realized through the RNN structure.
[0160] Second, the above-mentioned model to be trained minimizes regional sales losses and uses Ss to reasonably allocate limited inventory to ensure that the inventory is allocated to the most urgent distribution center (DC). The RDC is regarded as a DC, and the Ss of the RDC is calculated according to the local demand of the RDC. Each allocation to the RDC reserves enough inventory to resist local fluctuations. RDC and FDC output predictions at the same time, and RDC makes decisions at the same time. The regional sales losses are calculated through the simulation mechanism, which can reduce the inconsistency between the forecast deviation and the regional spot rate and the FDC local sales satisfaction rate, and solve the problems such as biased warehouse caused by inconsistent forecasts between RDC and FDC and between FDC.
[0161] Figure 5 : is a flow chart of a method for stock transfer provided in an embodiment of the present invention. This embodiment is applicable to situations where stock transfer decisions are made in an end-to-end manner. The method can be executed by a stock transfer device provided in an embodiment of the present invention, which can be implemented in software and / or hardware, and can be integrated in an electronic device, which can be various user terminals or servers.
[0162] See also Figure 5 The method of this embodiment may specifically include the following steps:
[0163] S410. Obtain a first target demand quantity of the target item in a first storage center and a second target demand quantity in a second storage center within a target historical time period, and a target inventory estimation module trained according to the model training method described in any embodiment of the present invention.
[0164] The target historical time period can be understood as the time period that has occurred and is applied in the model reasoning process.
[0165] The first target demand can be understood as the time series data representing the demand of the target item in the RDC within the target historical time period. The second target demand can be described in the same way, which will not be elaborated here.
[0166] Obtain the first target demand, the second target demand, and a pre-trained target inventory estimation module.
[0167] S420. Using the target inventory estimation module, based on the first target demand, estimate the first target inventory of the target item at the inventory transfer time point, and based on the second target demand, estimate the second target inventory of the target item at the inventory transfer time point.
[0168] The inventory transfer time point can be understood as the time point when inventory transfer is required.
[0169] The first target inventory can be understood as the inventory required by the target item in the RDC at the inventory transfer time point. The target inventory estimation module is used to estimate the inventory based on the first target demand.
[0170] The same goes for the second target inventory, so I won’t go into details here.
[0171] S430. Based on the first target inventory and the second target inventory, determine an inventory transfer decision between the first storage center and the second storage center, so as to perform inventory transfer between the first storage center and the second storage center for the target item according to the inventory transfer decision.
[0172] Among them, according to the above description, the first target inventory can represent the inventory required for the target item locally by the RDC, and the second target inventory can represent the inventory required for the target item locally by the FDC. Therefore, based on the two, especially the initial inventory of the target item by the RDC and FDC respectively, the inventory transfer quantity of the target item from the RDC to the FDC can be obtained, and the inventory transfer quantity can be used as the inventory transfer decision.
[0173] Further, according to the inventory transfer decision, the inventory transfer between the RDC and the FDC can be performed for the target item. At this point, the inventory transfer process of the target item at the inventory transfer time point is completed.
[0174] In combination with the application scenarios that may be involved in the embodiments of the present invention, the above technical solution can be optionally packaged in a data-driven end-to-end inventory transfer system for implementation. The system makes decisions for all DCs simultaneously, thereby achieving the optimal end-to-end inventory transfer with controllable costs.
[0175] The technical solution of the embodiment of the present invention implements end-to-end inventory transfer decision by using a pre-trained target inventory estimation module to perform inventory estimation.
[0176] Figure 6 This is a structural block diagram of a model training device provided in an embodiment of the present invention, and the device is used to execute the model training method provided in any of the above embodiments. The device and the model training method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the model training device, please refer to the embodiment of the above model training method. Figure 6 The device may specifically include: a first acquisition module 510, an estimated inventory module 520 and a model training module 530.
[0177] The first acquisition module 510 is used to obtain a first sample demand of the target item in the first storage center and a second sample demand in the second storage center within a sample historical time period, and to obtain a model to be trained, wherein the model to be trained includes an inventory estimation module and a transfer simulation module;
[0178] The estimated inventory module 520 is used to obtain a first estimated inventory of the target item at a simulation historical time point based on the first sample demand quantity and obtain a second estimated inventory of the target item at a simulation historical time point based on the second sample demand quantity using the inventory estimation module;
[0179] The model training module 530 is used to use the transfer simulation module to perform transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation results to obtain a target inventory estimation module.
[0180] Optionally, the inventory estimation module includes a demand forecasting unit and an inventory estimation unit;
[0181] The estimated inventory module 520 may include:
[0182] A first predicted demand obtaining submodule, used for inputting the first sample demand into the demand prediction unit to obtain a first predicted demand of the target item related to a simulation historical time point;
[0183] The first estimated inventory obtaining submodule can be used to input the first predicted demand into the inventory estimation unit to obtain the first estimated inventory of the target item at a simulation historical time point.
[0184] Optionally, based on the above device, the inventory estimation unit includes a basic inventory estimation subunit, a fluctuation inventory estimation subunit and an inventory estimation subunit;
[0185] The first estimated inventory acquisition submodule may include:
[0186] An estimated basic inventory obtaining unit is used to input the first predicted demand into the basic inventory estimation subunit to obtain the estimated basic inventory;
[0187] The estimated fluctuation inventory obtaining unit is used to input the first predicted demand, the first real demand corresponding to the first predicted demand in the first sample demand, and the prediction deviation obtained according to the first predicted demand and the first real demand into the fluctuation inventory estimation subunit to obtain the estimated fluctuation inventory;
[0188] The first estimated inventory obtaining unit is used to input the estimated basic inventory and the estimated fluctuation inventory into the inventory estimation subunit to obtain the first estimated inventory of the target item at a simulation historical time point.
[0189] Optionally, based on the above device, for the transfer lead time corresponding to the simulation historical time point, the estimated basic inventory is the estimated basic inventory within the transfer lead time, and the estimated fluctuation inventory is the estimated fluctuation inventory within the transfer lead time; the inventory estimation unit further includes a mask inventory estimation subunit;
[0190] The first estimated inventory obtaining submodule may further include:
[0191] An estimated mask inventory obtaining unit is used to use the mask inventory estimation subunit to mask the mask demand quantity within the transfer lead time from the first predicted demand quantity, and to sum up each mask demand quantity to obtain the estimated mask inventory;
[0192] Accordingly, the first estimated inventory obtains a unit, which is specifically used for:
[0193] The estimated basic inventory, the estimated fluctuation inventory and the estimated mask inventory are input into the inventory estimation subunit to obtain the first estimated inventory of the target item at the simulation history time point.
[0194] Optionally, the model to be trained may further include a loss calculation module connected to the transfer simulation module, and the target item is to be transferred from the first storage center to the second storage center;
[0195] The model training module 530 may include:
[0196] The inventory transfer quantity obtaining submodule is used to obtain the inventory transfer quantity from the first storage center to the second storage center according to the first estimated inventory and the second estimated inventory by using the transfer simulation module;
[0197] A first demand loss obtaining submodule is used to obtain a first simulated demand according to the inventory transfer quantity and the first real demand of the target item in the first storage center at a simulation historical time point by using the transfer simulation module;
[0198] A second demand loss obtaining submodule is used to obtain a second simulated demand according to the inventory transfer quantity and the second real demand of the target item in the second storage center at a simulation historical time point by using the transfer simulation module;
[0199] The target inventory estimation module obtains a submodule, which is used to use the loss calculation module to perform loss calculation based on the first real demand, the first simulated demand, the second real demand and the second simulated demand, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain the target inventory estimation module.
[0200] Optionally, based on the above device, the target inventory estimation module obtains submodules, which may include:
[0201] A second demand loss obtaining unit, configured to obtain a first demand loss according to the first simulated demand and the first real demand by using the loss calculation module, and to obtain a second demand loss according to the second simulated demand and the second real demand;
[0202] The target inventory estimation module obtaining unit is used to obtain a loss calculation result according to the first demand loss and the second demand loss, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain the target inventory estimation module.
[0203] Based on the above device, optionally, the model training module 530 may also include:
[0204] The transfer demand obtaining submodule is used to obtain the transfer demand of the target item in the second storage center at the simulation historical time point by using the transfer simulation module according to the second real demand and the inventory transfer quantity;
[0205] The second demand loss unit may include:
[0206] The first demand loss obtaining subunit is used to obtain the first demand loss according to the first simulated demand, the first real demand and the transferred demand.
[0207] Alternatively, the number of simulation history time points is multiple, and the target inventory estimation module obtains the unit, which may include:
[0208] A second accumulated loss obtaining subunit is used to accumulate the first demand losses corresponding to a plurality of simulation historical time points to obtain a first accumulated loss, and to accumulate the second demand losses corresponding to a plurality of simulation historical time points to obtain a second accumulated loss;
[0209] The loss calculation result obtaining subunit is used to obtain the loss calculation result according to the first cumulative loss and the second cumulative loss.
[0210] Optionally, based on the above device, the first estimated inventory includes a first estimated safety inventory and a first estimated target inventory, and the second estimated inventory includes a second estimated safety inventory and a second estimated target inventory;
[0211] The submodules for obtaining the inventory transfer quantity include:
[0212] A first simulated inventory obtaining unit is used to obtain a first transfer quantity from the first storage center to the second storage center according to the first estimated safety stock and the second estimated safety stock, so as to perform a stock transfer simulation according to the first transfer quantity to obtain a first simulated inventory of the first storage center;
[0213] A second transfer quantity obtaining unit is used to obtain a second transfer quantity from the first storage center to the second storage center according to the first simulation inventory, the first estimated target inventory, and the second estimated target inventory when the first simulation inventory is greater than the first estimated safety inventory;
[0214] The inventory transfer quantity obtaining unit is used to obtain the inventory transfer quantity according to the first transfer quantity and the second transfer quantity.
[0215] The model training device provided in the embodiment of the present invention realizes end-to-end inventory transfer decision-making through the cooperation of various modules.
[0216] The model training device provided in the embodiment of the present invention can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0217] It is worth noting that in the embodiment of the above-mentioned model training device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0218] Figure 7 This is a structural block diagram of a stock transfer device provided in an embodiment of the present invention. The device is used to execute the stock transfer method provided in any of the above embodiments. The device and the stock transfer method in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the stock transfer device, please refer to the embodiments of the above stock transfer method. Figure 7 The device may specifically include: a second acquisition module 610, a target inventory module 620 and an inventory transfer module 630.
[0219] The second acquisition module 610 is used to obtain the first target demand of the target item in the first storage center and the second target demand of the target item in the second storage center within the target historical time period, and the target inventory estimation module trained by the model training method described in any embodiment of the present invention;
[0220] The target inventory module 620 is used to estimate the first target inventory of the target item at the inventory transfer time point based on the first target demand quantity and to estimate the second target inventory of the target item at the inventory transfer time point based on the second target demand quantity using the target inventory estimation module;
[0221] The inventory transfer module 630 is used to determine the inventory transfer decision between the first storage center and the second storage center based on the first target inventory and the second target inventory, so as to perform inventory transfer between the first storage center and the second storage center for the target item according to the inventory transfer decision.
[0222] The inventory transfer device provided in the embodiment of the present invention realizes end-to-end inventory transfer decision-making through the cooperation of various modules.
[0223] The inventory transfer device provided in the embodiment of the present invention can execute the inventory transfer method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0224] It is worth noting that in the embodiment of the above-mentioned inventory transfer device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0225] Figure 8 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0226] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0227] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0228] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a model training method or an inventory transfer method.
[0229] In some embodiments, the model training method or the inventory transfer method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the model training method or the inventory transfer method described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute the model training method or the inventory transfer method in any other appropriate manner (e.g., by means of firmware).
[0230] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0231] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0232] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.
[0233] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0234] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0235] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0236] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0237] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A model training method, characterized in that: include: Obtaining a first sample demand quantity of the target item in a first storage center and a second sample demand quantity in a second storage center within a sample historical time period, and obtaining a model to be trained, wherein the model to be trained includes an inventory estimation module and an allocation simulation module; Using the inventory estimation module, based on the first sample demand, obtain a first estimated inventory of the target item at a simulation historical time point, and based on the second sample demand, obtain a second estimated inventory of the target item at the simulation historical time point; The transfer simulation module is used to perform a transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation result to obtain a target inventory estimation module.
2. The method according to claim 1, characterized in that The inventory estimation module includes a demand prediction unit and an inventory estimation unit; The using the inventory estimation module to obtain a first estimated inventory of the target item at a simulation historical time point based on the first sample demand includes: Inputting the first sample demand into the demand prediction unit to obtain a first predicted demand of the target item related to a simulation historical time point; The first predicted demand is input into the inventory estimation unit to obtain a first estimated inventory of the target item at the simulation historical time point.
3. The method according to claim 2, characterized in that The inventory estimation unit includes a basic inventory estimation subunit, a fluctuation inventory estimation subunit and an inventory estimation subunit; The step of inputting the first predicted demand into the inventory estimation unit to obtain a first estimated inventory of the target item at the simulation historical time point includes: Inputting the first predicted demand into the basic inventory estimation subunit to obtain an estimated basic inventory; Inputting the first predicted demand, the first real demand corresponding to the first predicted demand in the first sample demand, and the prediction deviation obtained according to the first predicted demand and the first real demand into the fluctuation inventory estimation subunit to obtain an estimated fluctuation inventory; The estimated basic inventory and the estimated fluctuating inventory are input into the inventory estimation subunit to obtain a first estimated inventory of the target item at the simulation historical time point.
4. The method according to claim 3, characterized in that For the transfer lead time corresponding to the simulation historical time point, the estimated basic inventory is the estimated basic inventory within the transfer lead time, and the estimated fluctuation inventory is the estimated fluctuation inventory within the transfer lead time; The inventory estimation unit also includes a mask inventory estimation subunit; The step of inputting the first predicted demand into the inventory estimation unit to obtain a first estimated inventory of the target item at the simulation historical time point further includes: Using the mask inventory estimation subunit, masking the mask demand quantity within the transfer lead time from the first predicted demand quantity, and summing up the mask demand quantities to obtain an estimated mask inventory; Accordingly, the estimated basic inventory and the estimated fluctuation inventory are input into the inventory estimation subunit to obtain a first estimated inventory of the target item at the simulation historical time point, including: The estimated basic inventory, the estimated fluctuation inventory and the estimated mask inventory are input into the inventory estimation subunit to obtain a first estimated inventory of the target item at the simulation historical time point.
5. The method according to claim 1, characterized in that The model to be trained further includes a loss calculation module connected to the transfer simulation module, and the target item is to be transferred from the first storage center to the second storage center; Then, using the transfer simulation module to perform a transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation result to obtain a target inventory estimation module, including: The transfer simulation module is used to perform the following three steps to simulate the transfer between the first storage center and the second storage center: Obtaining a stock transfer quantity from the first storage center to the second storage center according to the first estimated inventory and the second estimated inventory; Obtaining a first simulated demand quantity according to the inventory transfer quantity and a first real demand quantity of the target item in the first storage center at the simulation historical time point; Obtaining a second simulated demand quantity according to the inventory transfer quantity and a second real demand quantity of the target item in the second storage center at the simulation historical time point; The loss calculation module is used to perform loss calculation based on the first real demand, the first simulated demand, the second real demand and the second simulated demand, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain a target inventory estimation module.
6. The method according to claim 5, characterized in that The loss calculation module is used to perform loss calculation based on the first real demand, the first simulated demand, the second real demand, and the second simulated demand, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain a target inventory estimation module, including: Using the loss calculation module, a first demand loss is obtained according to the first simulated demand and the first real demand, and a second demand loss is obtained according to the second simulated demand and the second real demand; A loss calculation result is obtained according to the first demand loss and the second demand loss, so as to adjust the parameters in the inventory estimation module according to the loss calculation result to obtain a target inventory estimation module.
7. The method according to claim 6, characterized in that The transfer simulation module is also used to perform the following steps: According to the second real demand and the inventory transfer quantity, obtaining the transfer demand of the target item in the second storage center at the simulation historical time point; Correspondingly, obtaining a first demand loss according to the first simulated demand and the first real demand includes: A first demand loss is obtained according to the first simulated demand, the first real demand and the transferred demand.
8. The method according to claim 6, characterized in that The number of the simulation historical time points is multiple, and the loss calculation result is obtained according to the first demand loss and the second demand loss, including: Accumulating the first demand losses corresponding to the plurality of simulation historical time points to obtain a first accumulated loss, and accumulating the second demand losses corresponding to the plurality of simulation historical time points to obtain a second accumulated loss; A loss calculation result is obtained according to the first accumulated loss and the second accumulated loss.
9. The method according to claim 5, characterized in that The first estimated inventory includes a first estimated safety inventory and a first estimated target inventory, and the second estimated inventory includes a second estimated safety inventory and a second estimated target inventory; The obtaining, according to the first estimated inventory and the second estimated inventory, the inventory transfer quantity from the first storage center to the second storage center includes: According to the first estimated safety stock and the second estimated safety stock, a first transfer quantity from the first storage center to the second storage center is obtained, and a stock transfer simulation is performed according to the first transfer quantity to obtain a first simulated stock of the first storage center; When the first simulated inventory is greater than the first estimated safety inventory, obtaining a second transfer quantity from the first storage center to the second storage center according to the first simulated inventory, the first estimated target inventory, and the second estimated target inventory; The inventory transfer quantity is obtained according to the first transfer quantity and the second transfer quantity.
10. A method for stock transfer, characterized in that: include: Obtaining a first target demand quantity of a target item in a first storage center and a second target demand quantity in a second storage center within a target historical time period, and a target inventory estimation module trained according to the model training method of any one of claims 1 to 9; Using the target inventory estimation module, based on the first target demand, estimate a first target inventory of the target item at the inventory transfer time point, and based on the second target demand, estimate a second target inventory of the target item at the inventory transfer time point; Based on the first target inventory and the second target inventory, a stock transfer decision between the first storage center and the second storage center is determined, so that according to the stock transfer decision, stock transfer is performed between the first storage center and the second storage center for the target item.
11. A model training device, characterized in that: include: A first acquisition module is used to obtain a first sample demand quantity of a target item in a first storage center and a second sample demand quantity in a second storage center within a sample historical time period, and to obtain a model to be trained, wherein the model to be trained includes an inventory estimation module and a transfer simulation module; an estimated inventory module, configured to obtain, by using the inventory estimation module, a first estimated inventory of the target item at a simulation historical time point based on the first sample demand, and obtain a second estimated inventory of the target item at the simulation historical time point based on the second sample demand; A model training module is used to use the transfer simulation module to perform transfer simulation between the first storage center and the second storage center based on the first estimated inventory and the second estimated inventory, so as to adjust the parameters in the inventory estimation module according to the transfer simulation results to obtain a target inventory estimation module.
12. A stock transfer device, characterized in that: include: A second acquisition module, used to obtain a first target demand quantity of a target item in a first storage center and a second target demand quantity in a second storage center within a target historical time period, and a target inventory estimation module trained according to the model training method of any one of claims 1 to 9; a target inventory module, configured to estimate, by using the target inventory estimation module, a first target inventory of the target item at a stock transfer time point based on the first target demand, and to estimate, by using the target inventory estimation module, a second target inventory of the target item at the stock transfer time point based on the second target demand; The inventory transfer module is used to determine the inventory transfer decision between the first storage center and the second storage center based on the first target inventory and the second target inventory, so as to perform inventory transfer between the first storage center and the second storage center for the target item according to the inventory transfer decision.
13. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the model training method as described in any one of claims 1-9, or the inventory allocation method as described in claim 10.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the model training method as described in any one of claims 1 to 9, or the inventory transfer method as described in claim 10 when executed.
15. A computer program product, characterized in that The computer program product includes a computer program, which, when executed by a processor, implements the model training method as described in any one of claims 1 to 9, or the inventory transfer method as described in claim 10.
Citation Information
Patent Citations
Method and equipment for determining allocation warehouse
CN110046755A
Supply chain inventory management method and device, storage medium and processor
CN111667207A
Replenishment decision model training and replenishment decision method, system, device and medium
CN113095745A
Dynamic inventory optimization method
CN113505908A
Article allocation method and device, electronic equipment and medium
CN113762576A
Cited By
Model training method and apparatus, inventory allocation method and apparatus, electronic device, storage medium and program product
WO2026091717A1