Article demand amount prediction method and device, electronic equipment and storage medium
By combining random perturbation processing of historical demand characteristic data with a comprehensive forecasting model, the problem of low demand forecasting accuracy in cases of high proportion of zero demand and intermittent and sparse demand is solved, thus achieving more accurate demand forecasting and inventory management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
- Filing Date
- 2022-11-30
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies struggle to improve the accuracy of demand forecasting when there is a high proportion of zero demand and demand is intermittent and sparse, leading to increased inventory costs and the risk of stockouts.
A method for predicting the demand of goods is adopted. This method obtains historical demand characteristic data from a database, uses a first classification model to output the probability of demand occurrence, and performs random perturbation processing on the data to generate random perturbation characteristic results. These results are then input into a comprehensive prediction model to output the predicted demand, which includes the combined use of a second classification model and a regression model.
It improves the model's generalization ability, yields more accurate demand forecasting results, reduces inventory control costs, and can accurately determine whether there is demand, thus avoiding the risk of stockouts.
Smart Images

Figure CN115983759B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of smart supply chain technology, specifically to a method, apparatus, equipment, medium, and program product for predicting the demand for goods. Background Technology
[0002] Demand forecasting is a crucial foundation for planning activities such as inventory management. In many cases, demand may be sparse and intermittent, meaning there is some zero demand, especially in some parts and components industries. Existing intermittent forecasting methods are very conservative in estimating zero demand when the data is extremely sparse (i.e., the proportion of zero demand reaches more than 50%), making it difficult to further improve the accuracy and putting great pressure on inventory costs. Summary of the Invention
[0003] In view of the above problems, this disclosure provides a method, apparatus, device, medium and program product for predicting the demand of goods.
[0004] One aspect of this disclosure provides a method for forecasting the demand for goods, comprising:
[0005] Historical demand characteristic data is obtained from the database, which is used to characterize the historical demand for the pre-ordered item within a preset historical time period.
[0006] Historical demand characteristic data is input into the first classification model, so that the first classification model can be used to output the probability of demand for the pre-defined item occurring within a future preset time period;
[0007] The probability of demand occurrence is randomly perturbed to generate random perturbation feature results, which are used to characterize: the random occurrence of T demand events for the pre-ordered item within a preset time period in the future, where T is a positive integer;
[0008] The random disturbance characteristics and historical demand characteristics are input into the comprehensive prediction model, so that the comprehensive prediction model can output the predicted demand for the predetermined items in the future within a preset time period.
[0009] According to embodiments of this disclosure, the comprehensive prediction model includes a second classification model and a regression model. The comprehensive prediction model outputs a predicted demand for a predetermined item within a preset future time period, including:
[0010] The random perturbation feature results are input into the second classification model to output the phased demand prediction results of the predetermined item within a future preset time period. The phased demand prediction results are used to characterize whether a demand event for the predetermined item will occur within the future preset time period.
[0011] If a demand event for a predetermined item is expected to occur within a preset time period in the future, historical demand characteristic data will be input into a regression model to output the predicted demand for the predetermined item within the preset time period.
[0012] According to an embodiment of this disclosure, the historical demand characteristic data includes the historical demand volume of the predetermined item in M time windows within a preset historical time period, the demand occurrence probability includes the demand occurrence probability matrix of the predetermined item in N time windows within a future preset time period, and the random disturbance characteristic result includes: the random occurrence result of T demand events in each of the N time windows within the future preset time period.
[0013] The probability of demand occurrence is randomly perturbed to generate random perturbation feature results, including:
[0014] Generate a random probability matrix, which is used to represent the random probability of the occurrence of T demand events in each of the N time windows within a preset time period for the pre-ordered item.
[0015] The random probability matrix and the demand occurrence probability matrix are fused to generate a random perturbation feature matrix that characterizes the results of random perturbation.
[0016] According to embodiments of this disclosure, fusing the random probability matrix and the demand occurrence probability matrix to generate a random perturbation feature matrix includes:
[0017] The probability value P in the random probability matrix ij It is less than the probability value D in the probability matrix of demand occurrence. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The first value;
[0018] The probability value P in the random probability matrix ij The probability value D in the probability matrix of demand occurrence is greater than or equal to the probability value D. i In the case of generating eigenvalues S in the random perturbation feature matrix i j is the second value;
[0019] The first value represents the occurrence of the demand event, the second value represents the non-occurrence of the demand event, and the probability value P. ij Let D be the probability of a random occurrence of a demand event for a pre-ordered item within N time windows over a predetermined future time period, specifically the j-th demand event in the i-th time window. i Let S be the probability that demand for a pre-ordered item will occur in the i-th time window out of N time windows within a preset future time period. ijThis refers to the random occurrence of the j-th demand event within the i-th time window of N time windows in a future preset time period for the reserved item.
[0020] According to embodiments of this disclosure, wherein:
[0021] Historical demand characteristic data meets preset data constraints, which are used for characterization. The data discontinuity index value and data sparsity index value of historical demand characteristic data meet preset numerical ranges.
[0022] According to embodiments of this disclosure, wherein:
[0023] The preset data constraints are: the data discontinuity index value of historical demand characteristic data is greater than 1.32, and the data sparsity index value of historical demand characteristic data is greater than or equal to 50%.
[0024] According to embodiments of this disclosure, wherein:
[0025] The data discontinuity index is the ratio of the number of zero-demand time windows to the number of zero-demand intervals in historical demand characteristic data.
[0026] The data sparsity index is the ratio of the number of zero-demand time windows to the total number of time windows in historical demand characteristic data.
[0027] Another aspect of this disclosure provides an item demand prediction device, including an acquisition module, a first output module, a disturbance module, and a second output module.
[0028] The acquisition module is used to retrieve historical demand feature data from the database, where the historical demand feature data is used to characterize the historical demand for the pre-ordered item within a preset historical time period.
[0029] The first output module is used to input historical demand feature data into the first classification model, so as to use the first classification model to output the probability of demand for the pre-defined item occurring within a future preset time period.
[0030] The perturbation module is used to randomly perturb the probability of demand occurrence to generate random perturbation feature results. These features characterize the random occurrence of T demand events for a pre-defined item within a preset time period, where T is a positive integer.
[0031] The second output module is used to input the random disturbance characteristic results and historical demand characteristic data into the comprehensive prediction model, so as to use the comprehensive prediction model to output the predicted demand of the predetermined items in the future within a preset time period.
[0032] According to embodiments of this disclosure, the comprehensive prediction model includes a second classification model and a regression model, and the above-mentioned apparatus further includes an input module and a third output module.
[0033] The input module is used to input the random perturbation feature results into the second classification model, so as to use the second classification model to output the phased demand prediction results of the predetermined item in the future preset time period. The phased demand prediction results are used to characterize whether a demand event for the predetermined item will occur in the future preset time period.
[0034] The third output module is used to input historical demand characteristic data into a regression model when a demand event for a predetermined item is expected to occur within a preset time period in the future, so as to use the regression model to output the predicted demand for the predetermined item within the preset time period in the future.
[0035] According to an embodiment of this disclosure, the historical demand characteristic data includes the historical demand volume of the predetermined item in M time windows within a preset historical time period, the demand occurrence probability includes the demand occurrence probability matrix of the predetermined item in N time windows within a future preset time period, and the random disturbance characteristic result includes: the random occurrence result of T demand events in each of the N time windows within the future preset time period.
[0036] The disturbance module includes a generation unit and a fusion unit.
[0037] The generation unit is used to generate a random probability matrix, which is used to represent the random occurrence probability of a demand event for a pre-ordered item in each of the N time windows within a preset time period.
[0038] The fusion unit is used to fuse the random probability matrix and the demand occurrence probability matrix to generate a random perturbation feature matrix that characterizes the random perturbation feature results.
[0039] According to embodiments of this disclosure, the fusion unit includes a first generation subunit and a second generation subunit.
[0040] The first generating subunit is used to generate the probability value P in the random probability matrix. ij It is less than the probability value D in the probability matrix of demand occurrence. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The first value;
[0041] The second generating subunit is used to generate the probability value P in the random probability matrix. ij The probability value D in the probability matrix of demand occurrence is greater than or equal to the probability value D. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The second value;
[0042] The first value represents the occurrence of the demand event, the second value represents the non-occurrence of the demand event, and the probability value P. ij Let D be the probability of a random occurrence of a demand event for a pre-ordered item within N time windows over a predetermined future time period, specifically the j-th demand event in the i-th time window. i Let S be the probability that demand for a pre-ordered item will occur in the i-th time window out of N time windows within a preset future time period. ij This refers to the random occurrence of the j-th demand event within the i-th time window of N time windows in a future preset time period for the reserved item.
[0043] According to embodiments of this disclosure, historical demand characteristic data meets preset data limiting conditions, which are used to characterize that the data discontinuity index value and data sparsity index value of the historical demand characteristic data meet preset numerical ranges.
[0044] According to an embodiment of this disclosure, the preset data limiting conditions are: the data discontinuity index value of the historical demand characteristic data is greater than 1.32, and the data sparsity index value of the historical demand characteristic data is greater than or equal to 50%.
[0045] According to embodiments of this disclosure, the data discontinuity index is the ratio of the number of zero-demand time windows to the number of zero-demand intervals in the historical demand characteristic data; the data sparsity index is the ratio of the number of zero-demand time windows to the total number of time windows in the historical demand characteristic data.
[0046] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the above-described method for predicting the demand for goods.
[0047] Another aspect of this disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the above-described method for predicting the demand for goods.
[0048] Another aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for predicting the demand for goods.
[0049] According to embodiments of this disclosure, a reasonable method for quantifying interference is proposed by randomly perturbing the probability of demand for a predetermined item within a future preset time period output by the first classification model. This fully considers the impact of low-probability events on the probability prediction results. By using a comprehensive prediction model to make further predictions based on the perturbed data, the generalization ability of the model can be improved, resulting in more accurate demand prediction results and enhancing the accuracy of model predictions. This provides a reasonable reference for subsequent inventory preparation, not only saving on later inventory control costs but also avoiding the risk of stockouts by accurately judging whether demand exists. Attached Figure Description
[0050] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0051] Figure 1 The illustration schematically depicts application scenarios of the article demand forecasting method, apparatus, device, medium, and program products according to embodiments of the present disclosure;
[0052] Figure 2 A flowchart illustrating a method for predicting the demand for goods according to an embodiment of the present disclosure is shown schematically.
[0053] Figure 3 A flowchart illustrating a method for predicting the demand for goods according to another embodiment of this disclosure is shown schematically.
[0054] Figure 4 A schematic diagram illustrating a structural block diagram of an item demand prediction device according to an embodiment of the present disclosure; and
[0055] Figure 5 A block diagram schematically illustrates an electronic device suitable for implementing a method for predicting the demand for goods according to an embodiment of the present disclosure. Detailed Implementation
[0056] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0057] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0058] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0059] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0060] Demand forecasting is a crucial foundation for planning activities such as inventory management. In many cases, demand can be sparse and intermittent, meaning there are periods of zero demand, especially in some parts and components industries. Furthermore, non-intermittent data can become discontinuous at finer data decomposition levels. For example, breaking down the forecast time granularity from months to days will result in a large amount of discontinuous data. Improving the accuracy of intermittent demand forecasting plays a vital role in controlling inventory costs and levels.
[0061] For intermittent data, demand forecasting can be achieved using methods such as the following:
[0062] For example, the Croston method and its variants can be used. The Croston method splits the intermittent demand series into two continuous series: the demand quantity and the demand interval. Then, exponential smoothing is applied to each of these continuous series for forecasting. The final time series forecast is formed by using the predicted interval and the demand quantity. Based on the Croston correction coefficient, methods derived from it, such as the Syntetos-Boylan Approximation (SBA) method, can also be used.
[0063] For example, the Bootstrapping method can also be used. The Bootstrapping method has proven effective in improving intermittent forecasting. This method uses a two-stage Markov chain to generate non-zero demand points, and then resamples historical data to generate demand quantities. Its performance has been shown to be superior to Croston's method. This method uses non-zero demand intervals from historical data for resampling, thereby generating a distribution of non-zero demand intervals within the lead time. The steps are as follows:
[0064] Step 1: Obtain a histogram of historical demand data (including demand quantity data and demand interval data) over a certain period.
[0065] Step 2: Randomly generate the required intervals based on the corresponding histogram and update the time range.
[0066] Step 3: If the updated time range is shorter than or equal to the lead time, randomly generate the demand based on the histogram and then return to Step 2; if the time range is longer than the lead time, sum the demand within the lead time as a forecast value for the lead time demand and then proceed to Step 4.
[0067] Step 4: Repeat steps 2 and 3. Sort and generate the distribution of demand within the lead time, and obtain safety stock and replenishment points based on the required service level.
[0068] For example, aggregation methods can be used. These methods improve prediction accuracy by aggregating data to a higher level, reducing data sparsity. For instance, time-series aggregation combines shorter time periods into longer ones, such as combining daily granularity into weekly or monthly granularity. The advantage is that it minimizes the number of samples with zero demand in the sequence. However, the disadvantages are also obvious: the number of historical samples is significantly reduced, and how to allocate them is a major challenge. The allocation ratio can be based on the proportion of previous observations or the same weight, or other more effective methods can be used.
[0069] For example, a classification fusion method can also be used. Through certain classification paradigms, time series can be classified according to the average demand interval length and the coefficient of variation of demand. Based on effective time series classification, the model combination method can be better applied. Different applicable models can be used for different discontinuity characteristics, and finally the results can be combined to obtain the final prediction result.
[0070] In the process of implementing this disclosure, it was found that the above-mentioned intermittent demand forecasting method is very conservative in estimating zero demand when the data is extremely sparse (that is, the proportion of zero demand reaches more than 50%), which makes it difficult to further improve the accuracy and also puts great pressure on inventory costs.
[0071] In view of this, embodiments of the present disclosure provide a method for predicting the demand for goods, in order to solve the problem of how to improve the accuracy of prediction when the proportion of zero demand is high and demand is intermittent and sparse.
[0072] The method for predicting the demand for goods according to embodiments of this disclosure includes:
[0073] Historical demand characteristic data is obtained from the database, which is used to characterize the historical demand for the pre-ordered item within a preset historical time period.
[0074] Historical demand characteristic data is input into the first classification model, so that the first classification model can be used to output the probability of demand for the pre-defined item occurring within a future preset time period;
[0075] The probability of demand occurrence is randomly perturbed to generate random perturbation feature results, which are used to characterize: the random occurrence of T demand events for the pre-ordered item within a preset time period in the future, where T is a positive integer;
[0076] The random disturbance characteristics and historical demand characteristics are input into the comprehensive prediction model, so that the comprehensive prediction model can output the predicted demand for the predetermined items in the future within a preset time period.
[0077] According to embodiments of this disclosure, a reasonable method for quantifying interference is proposed by randomly perturbing the probability of demand for a predetermined item within a future preset time period output by the first classification model. This fully considers the impact of low-probability events on the probability prediction results. By using a comprehensive prediction model to make further predictions based on the perturbed data, the generalization ability of the model can be improved, resulting in more accurate demand prediction results and enhancing the accuracy of model predictions. This provides a reasonable reference for subsequent inventory preparation, not only saving on later inventory control costs but also avoiding the risk of stockouts by accurately judging whether demand exists.
[0078] Figure 1 The illustration schematically depicts application scenarios of the article demand prediction method, apparatus, device, medium, and program products according to embodiments of the present disclosure.
[0079] like Figure 1 As shown, application scenario 100 according to this embodiment may include terminal devices 101, 102, and 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0080] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0081] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0082] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0083] In the application scenarios of this disclosure embodiment, business personnel can initiate a request to server 105 via terminal devices 101, 102, and 103 to obtain the demand forecast result for a certain predetermined item. In response to the user request, server 105 can execute the item demand forecasting method of this disclosure embodiment. For example, it can first retrieve historical demand data for the predetermined item within a preset historical time period from the database, and based on the historical demand characteristic data, use a classification prediction model to output the demand occurrence forecast result for the predetermined item within a future preset time period. After generating the demand occurrence forecast result, server 105 can display the result to the user via terminal devices 101, 102, and 103.
[0084] It should be noted that the item demand forecasting method provided in this embodiment can generally be executed by server 105. Correspondingly, the item demand forecasting device provided in this embodiment can generally be located in server 105. The item demand forecasting method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the item demand forecasting device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0085] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0086] It should be noted that the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information in this disclosed technical solution comply with relevant laws and regulations, necessary confidentiality measures have been taken, and it does not violate public order and good morals. In this disclosed technical solution, user authorization or consent has been obtained before acquiring or collecting user personal information.
[0087] The following will be based on Figure 1 The described scene, through Figures 2-5 The method for predicting the demand for goods according to the disclosed embodiments is described in detail.
[0088] Figure 2 A flowchart illustrating a method for predicting the demand for goods according to an embodiment of the present disclosure is shown.
[0089] like Figure 2 As shown, the item demand prediction method in this embodiment includes operations S201 to S204.
[0090] In operation S201, historical demand characteristic data is obtained from the database. The historical demand characteristic data is used to characterize the historical demand of the pre-ordered item within a preset historical time period. Specifically, the historical demand characteristic data may include the historical demand of the pre-ordered item in M time windows within the preset historical time period, where M is a positive integer.
[0091] For example, we can first retrieve the sales figures for a certain SKU's automotive parts from January 1st to January 10th, 20xx, as shown in Table 1 below. Then, we can construct features from the sales data retrieved from the database to obtain the historical demand feature data for the automotive parts of that SKU.
[0092] Table 1
[0093] date Sales 20xx-01-01 1 20xx-01-02 0 20xx-01-03 0 20xx-01-04 2 20xx-01-05 0 20xx-01-06 5 20xx-01-07 0 20xx-01-08 0 20xx-01-09 0 20xx-01-10 4
[0094] In operation S202, historical demand characteristic data is input into the first classification model to output the probability of demand for the pre-ordered item occurring within a future preset time period. Specifically, the probability of demand occurrence can be a matrix of the probability of demand occurrence for the pre-ordered item in N time windows within the future preset time period.
[0095] According to embodiments of this disclosure, the first classification model can be a trained machine learning model, LightGBM, used to predict the probability of demand for a predetermined item occurring in N time windows within a preset time period (i.e., the probability of purchase demand occurring in each time window). For example, the probability of demand for a certain SKU of car parts occurring from January 1st to January 10th, 20xx, is output as follows: the probability of purchase demand occurring on January 1st, 20xx is 0.8; the probability of purchase demand occurring on January 2nd, 20xx is 0.7; the probability of purchase demand occurring on January 3rd, 20xx is 0.3, and so on.
[0096] In operation S203, the probability of demand occurrence is randomly perturbed to generate a random perturbation feature result. This random perturbation feature result characterizes the random occurrence of T demand events for the predetermined item within a preset future time period, where T is a positive integer. Specifically, the random perturbation feature result can be a random perturbation feature matrix, which characterizes the random occurrence of T demand events for the predetermined item within N time windows over a preset future time period, where T is a positive integer.
[0097] According to embodiments of this disclosure, the predicted probability obtained by the first classification model refers to the probability of a certain demand occurring. Considering the possibility of low-probability events, the predicted probability will be subject to certain perturbations, meaning the prediction cannot be 100% accurate and there will always be various interfering factors. This perturbation mechanism provides a relatively reasonable way to quantify interference. Based on this, the demand occurrence probability matrix is subjected to random perturbation processing to generate a random perturbation feature matrix. The random perturbation feature matrix is used to characterize the random occurrence of T demand events in each of N time windows within a preset time period for a predetermined item. For example, regarding the probability of demand for a certain SKU of car parts generated in the example above, the random perturbation feature matrix generates the following: In the 20xx-01-01 time window, the random occurrence of T (5) demand events is: 1, 0, 0, 1, 1 (1 represents that it will be sold, and 0 represents that it will not be sold); In the 20xx-01-02 time window, the random occurrence of T (5) demand events is: 0, 0, 0, 1, 1 (1 represents that it will be sold, and 0 represents that it will not be sold); In the 20xx-01-03 time window, the random occurrence of T (5) demand events is: 1, 1, 0, 1, 1 (1 represents that it will be sold, and 0 represents that it will not be sold)...
[0098] In operation S204, the random disturbance characteristic results and historical demand characteristic data are input into the comprehensive prediction model to output the predicted demand for the predetermined item within a preset future time period. According to an embodiment of the present invention, the comprehensive prediction model may include a second classification model and a regression model, and can be used to output the predicted demand for the predetermined item within a preset future time period (i.e., how many items are likely to be sold).
[0099] According to embodiments of this disclosure, a reasonable method for quantifying interference is proposed by randomly perturbing the probability of demand for a predetermined item within a future preset time period output by the first classification model. This fully considers the impact of low-probability events on the probability prediction results. By using a comprehensive prediction model to make further predictions based on the perturbed data, the generalization ability of the model can be improved, resulting in more accurate demand prediction results and enhancing the accuracy of model predictions. This provides a reasonable reference for subsequent inventory preparation, which can not only save on later inventory control costs but also avoid the risk of stockouts by accurately judging whether there is demand.
[0100] According to embodiments of this disclosure, further, using a comprehensive prediction model to output the predicted demand for a predetermined item within a preset future time period includes:
[0101] Operation 1: Input the random perturbation feature results into the second classification model, so as to use the second classification model to output the phased demand prediction results of the predetermined item in the future preset time period. The phased demand prediction results are used to characterize whether a demand event (such as purchasing behavior) for the predetermined item will occur in the future preset time period.
[0102] According to embodiments of this disclosure, the second classification model can be a trained machine learning model, LightGBM, used to predict the phased demand forecast results of a predetermined item within N time windows over a preset time period (i.e., whether there will be a purchase demand in each time window). For example, the output of the demand for a certain SKU of car parts from January 1st to January 10th, 20xx, is: 1, 1, 0, 0, 1, 1, 1, 0, 0, 0 (1 represents that it will be sold on that day, and 0 represents that it will not be sold on that day).
[0103] Operation 2: If a demand event for a pre-determined item is expected to occur within a preset time period in the future, input the historical demand characteristic data into the regression model to output the predicted demand for the pre-determined item within the preset time period (i.e., how many items are likely to be sold).
[0104] According to embodiments of this disclosure, based on the aforementioned output of the phased demand forecast results for N time windows within a future preset time period using the second classification model, the demand volume can be further predicted for the time windows where the predicted demand purchase event will occur. Specifically, this can involve inputting the data from the historical demand characteristic data of time windows where the demand volume is not zero into the aforementioned regression model, and using the regression model to predict the demand volume. Specifically, operation 2 can be performed when, within the N time windows within the future preset time period, there are k time windows where the demand occurrence prediction result indicates that a demand event will occur. In this case, the target historical demand characteristic data is the data from the historical demand characteristic data associated with the historical demand window where the demand volume is not zero, where k is a positive integer. Using the regression model, the predicted demand volume of the predetermined item within the N time windows within the future preset time period is output for the k time windows.
[0105] According to embodiments of this disclosure, the regression model may be a trained machine learning model, LightGBM, used to predict the demand for a given item in a specific time window (i.e., how many items are likely to be sold in each time window).
[0106] According to embodiments of this disclosure, in actual business scenarios, intermittent demand can occur due to product attributes (such as spare parts) or the fineness of forecast granularity (daily granularity forecasting). Forecasting such demand has always been a technical challenge; if accuracy cannot be effectively improved, it may lead to inventory backlog or stockout losses. The method described in this disclosure employs a two-stage approach: the first stage predicts when the demand will occur, and the second stage predicts the magnitude of the demand. Compared to directly predicting the magnitude of demand in related technologies, this significantly improves forecast accuracy and provides a reasonable reference for inventory preparation.
[0107] According to embodiments of this disclosure, the above-described method for predicting the demand for goods predicts future demand based on historical demand characteristic data. In implementing this disclosure, it was found that the above method has high prediction accuracy for discontinuous and sparse data.
[0108] Specifically, the aforementioned historical demand characteristic data meets preset data constraints, which are used to characterize the data discontinuity index and data sparsity index values of the historical demand characteristic data, ensuring they meet preset numerical ranges. Further, the preset data constraints are: the data discontinuity index value of the historical demand characteristic data is greater than 1.32, and the data sparsity index value of the historical demand characteristic data is greater than or equal to 50%. That is, this method shows better prediction performance for extremely sparse, discontinuous data.
[0109] Among them, the data discontinuity index value p represents the average demand interval, which is the ratio of the number of zero demand time windows to the number of zero demand intervals in the historical demand characteristic data. When p > 1.32, the data can be judged as discontinuous demand.
[0110] The data sparsity index σ refers to the proportion of zero demand, which is the ratio of the number of zero demand time windows to the total number of time windows in historical demand characteristic data. If the proportion of zero demand is greater than or equal to 50%, it is considered extremely sparse data; if it is less than 50%, it is considered generally sparse data.
[0111] In view of this, after obtaining historical demand characteristic data, it can be further determined whether the data format of the historical demand characteristic data meets the above-mentioned limiting conditions.
[0112] For example, regarding the sales data of automotive parts for a certain SKU in Table 1 above from January 1st to January 10th, 20xx, the data format is determined as follows:
[0113] The value of the data discontinuity index p is calculated as follows (1):
[0114]
[0115] The data sparsity index σ is calculated as follows (2):
[0116]
[0117] It can be seen that p > 1.32, σ = P(x = 0) = 60%, so the data is discontinuous and particularly sparse.
[0118] Table 2 below shows examples of features that can be referenced when constructing feature data. According to the embodiments of this disclosure, the above-described method for predicting the demand of goods is based on historical demand feature data of the predetermined goods within a preset historical time period when constructing feature data, but it is not limited to this. Suitable features can be selected according to actual needs, as shown in Table 2 as examples of features that can be referenced.
[0119] Table 2
[0120]
[0121] Based on the above two-stage model prediction method, Figure 3 A flowchart illustrating a method for predicting the demand for goods according to another embodiment of this disclosure is shown schematically. The following is in conjunction with... Figure 3 The method of the embodiments of this disclosure will be described.
[0122] like Figure 3As shown, firstly, target data is acquired and feature engineering is built. For example, historical demand feature data of the pre-ordered item in M time windows within a preset historical time period can be obtained from the database as initial feature data. Then, data that meets the characteristics of discontinuity and sparsity of historical demand feature data is selected from the initial feature data, that is, the data discontinuity index value is greater than 1.32 and the data sparsity index value is greater than or equal to 50%.
[0123] The dataset is split into a training set (m) and a test set (n), and labeled accordingly. If the sales volume is greater than 0, the label is marked as 1; if the sales volume is equal to 0, the label is marked as 0. Using the label as the target, the machine learning model LightGBM is invoked to build a first-class classification model M1 on the training set to predict the probability of demand occurrence.
[0124] Then, the aforementioned historical demand characteristic data is input into the first classification model, and the first classification model is used to output the probability matrix D(n×1) of the demand occurrence of the pre-ordered item in N time windows within a preset future time period.
[0125] The demand occurrence probability matrix D(n×1) is subjected to random perturbation to generate a random perturbation feature matrix S(n×T), which characterizes the random occurrence of T demand events in each of N time windows within a preset future time period for the pre-ordered item. Specifically, this may include:
[0126] Operation 1 generates a random probability matrix P(n×T) between [0, 1], where the random probability matrix is used to characterize the random occurrence probability of the demand event for the pre-ordered item in each of the N time windows within a preset time period.
[0127] Step 2 involves fusing the random probability matrix and the demand occurrence probability matrix to generate a random perturbation feature result, i.e., a random perturbation feature matrix. Fusing the random probability matrix and the demand occurrence probability matrix can be achieved by: the probability value P in the random probability matrix... ij It is less than the probability value D in the probability matrix of demand occurrence. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The first value; the probability value P in the random probability matrix. ij The probability value D in the probability matrix of demand occurrence is greater than or equal to the probability value D. i In the case of generating eigenvalues S in the random perturbation feature matrix ij This is the second numerical value; where the first numerical value represents the occurrence of the demand event and is set to 1, and the second numerical value represents the non-occurrence of the demand event and is set to 0. Probability value P ijLet D be the probability of a random occurrence of a demand event for a pre-ordered item within N time windows over a predetermined future time period, specifically the j-th demand event in the i-th time window. i Let S be the probability that demand for a pre-ordered item will occur in the i-th time window out of N time windows within a preset future time period. ij This refers to the random occurrence of the j-th demand event within the i-th time window of N time windows in a future preset time period for the reserved item.
[0128] For example, regarding the demand forecast example for a certain SKU of automotive parts, the first classification model outputs the probability of demand for the automotive parts of the aforementioned SKU from January 1st to January 10th, 20xx as follows: the probability of purchase demand occurring on January 1st, 20xx is 0.8, the probability of purchase demand occurring on January 2nd, 20xx is 0.7, the probability of purchase demand occurring on January 3rd, 20xx is 0.3, and so on.
[0129] For example, in generating the random probability matrix, under the time window of 20xx-01-01, the random occurrence probabilities of T (5) demand events are: 0.9, 0.5, 0, 1, 0.5; under the time window of 20xx-01-02, the random occurrence probabilities of T (5) demand events are: 0.5, 0.6, 0, 0, 0.8; under the time window of 20xx-01-03, the random occurrence probabilities of T (5) demand events are: 0.2, 0.2, 0.2, 0.7, 0.1...
[0130] Then, for the probability value P in the random probability matrix... 11 =0.9, which is greater than the probability value D1 = 0.8 in the demand occurrence probability matrix, generating the eigenvalue S in the random disturbance characteristic matrix. 11 A value of 0 indicates that the probability will not be sold in this random event; this refers to the probability value P in the random probability matrix. 12 =0.5, which is less than the probability value D1 = 0.8 in the demand occurrence probability matrix, generating the eigenvalue S in the random disturbance characteristic matrix. 12 A value of 1 indicates that it is predicted that the entity will sell in this random event...
[0131] According to the embodiments of this disclosure, the reason for adopting the above processing method is that the model predicts the probability of the demand occurring, which is between [0, 1]. For example, if the probability of occurrence is 0.9, then the probability of random generation is less than the probability of occurrence, which is about 90%, meaning that the possibility of the result being reversed is very small. Only when a low-probability event occurs will the result be disturbed, which is more in line with the real situation. Predictions cannot be 100% accurate, and there will definitely be various interference factors. This disturbance mechanism provides a more reasonable way to quantify interference.
[0132] Subsequently, using S(n×T) as the random perturbation feature set and Label as the target, a second classification model (M2) is constructed. The random perturbation feature matrix is input into the second classification model to output the demand prediction results for the predetermined item within N time windows in the future preset time period. This method is based on the idea of model stacking, which can further improve the generalization ability of the model.
[0133] Finally, based on the above-mentioned prediction results of demand occurrence for the pre-ordered item within N time windows in the future preset time period output by the second classification model, the demand volume can be further predicted for the time windows in which the predicted demand purchase event will occur. Specifically, the data of time windows in the historical demand characteristic data where the demand volume is not zero can be input into the regression model (M3), and the regression model (M3) can be used to predict the demand volume. The regression model (M3) is trained using historical non-zero demand data in the training set.
[0134] According to the embodiments of this disclosure, after prediction and inference through the above three-layer model, and combining the random probability to obtain the random perturbation matrix, a more generalized and robust classification prediction can be obtained. The non-zero demand estimate is obtained through the regression model. Finally, the two results are combined to obtain the final output.
[0135] Taking a certain SKU as an example, the prediction results are shown in Table 3 below.
[0136] Table 3
[0137]
[0138] According to the embodiments of this disclosure, Tables 4 and 5 below respectively show the prediction method of a certain SKU's automotive parts in the related technology (Table 4) and the result data obtained by using the prediction method of the embodiments of this disclosure (Table 5).
[0139] The table provides evaluation results for two accuracy metrics: Smape and Wmape are two commonly used metrics for evaluating data accuracy. A higher Smape value indicates higher accuracy, while a lower Wmape value indicates higher accuracy.
[0140] Table 4
[0141]
[0142]
[0143] Table 5
[0144]
[0145] As shown in Tables 4 and 5, after performing the first classification task using the random perturbation algorithm, the judgment between zero demand and non-zero demand is more accurate. Because zero demand accounts for a large proportion, traditional methods tend to give zero predictions, while the two-stage algorithm can provide accurate judgments of non-zero demand through feature engineering training. According to the classification results, after performing the regression task in the second step, the overall accuracy (1-smape) improves by about 20%, and the Wmape value decreases significantly. Therefore, the combined prediction algorithm using random perturbation can effectively improve the prediction accuracy of some parts, not only saving on later inventory control costs but also mitigating the risk of stockouts by accurately judging the existence of demand.
[0146] Based on the above-mentioned method for predicting the demand for goods, this disclosure also provides a device for predicting the demand for goods. The following will be combined with... Figure 4 The device is described in detail.
[0147] Figure 4 A schematic block diagram of an item demand prediction device according to an embodiment of the present disclosure is shown.
[0148] like Figure 4 As shown, the item demand prediction device 400 includes an acquisition module 401, a first output module 402, a disturbance module 403, and a second output module 404.
[0149] The acquisition module 401 is used to acquire historical demand feature data from the database, wherein the historical demand feature data is used to characterize the historical demand for the pre-ordered item within a preset historical time period.
[0150] The first output module 402 is used to input historical demand feature data into the first classification model, so as to use the first classification model to output the probability of demand for the predetermined item within a future preset time period.
[0151] The disturbance module 403 is used to perform random disturbance processing on the probability of demand occurrence to generate random disturbance feature results, wherein the random disturbance feature results are used to characterize: the random occurrence results of T demand events of the predetermined item in the future preset time period, where T is a positive integer;
[0152] The second output module 404 is used to input the random disturbance characteristic results and historical demand characteristic data into the comprehensive prediction model, so as to use the comprehensive prediction model to output the predicted demand of the predetermined item in the future preset time period.
[0153] According to embodiments of this disclosure, the comprehensive prediction model includes a second classification model and a regression model, and the above-mentioned apparatus further includes an input module and a third output module.
[0154] The input module is used to input the random perturbation feature results into the second classification model, so as to use the second classification model to output the phased demand prediction results of the predetermined item in the future preset time period. The phased demand prediction results are used to characterize whether a demand event for the predetermined item will occur in the future preset time period.
[0155] The third output module is used to input historical demand characteristic data into a regression model when a demand event for a predetermined item is expected to occur within a preset time period in the future, so as to use the regression model to output the predicted demand for the predetermined item within the preset time period in the future.
[0156] According to embodiments of this disclosure, historical demand characteristic data includes the historical demand volume of the predetermined item in M time windows within a preset historical time period, the demand occurrence probability includes the demand occurrence probability matrix of the predetermined item in N time windows within a future preset time period, and the random perturbation characteristic result includes: the random occurrence result of T demand events in each of the N time windows within the future preset time period.
[0157] The disturbance module includes a generation unit and a fusion unit.
[0158] The generation unit is used to generate a random probability matrix, which is used to represent the random occurrence probability of a demand event for a pre-ordered item in each of the N time windows within a preset time period.
[0159] The fusion unit is used to fuse the random probability matrix and the demand occurrence probability matrix to generate random perturbation feature results.
[0160] According to embodiments of this disclosure, the fusion unit includes a first generation subunit and a second generation subunit.
[0161] The first generating subunit is used to generate the probability value P in the random probability matrix. ij It is less than the probability value D in the probability matrix of demand occurrence. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The first value;
[0162] The second generating subunit is used to generate the probability value P in the random probability matrix. ij The probability value D in the probability matrix of demand occurrence is greater than or equal to the probability value D. i In the case of generating eigenvalues S in the random perturbation feature matrix ij The second value;
[0163] The first value represents the occurrence of the demand event, the second value represents the non-occurrence of the demand event, and the probability value P. ijLet D be the probability of a random occurrence of a demand event for a pre-ordered item within N time windows over a predetermined future time period, specifically the j-th demand event in the i-th time window. i Let S be the probability that demand for a pre-ordered item will occur in the i-th time window out of N time windows within a preset future time period. ij This refers to the random occurrence of the j-th demand event within the i-th time window of N time windows in a future preset time period for the reserved item.
[0164] According to embodiments of this disclosure, historical demand characteristic data meets preset data limiting conditions, which are used to characterize that the data discontinuity index value and data sparsity index value of the historical demand characteristic data meet preset numerical ranges.
[0165] According to an embodiment of this disclosure, the preset data limiting conditions are: the data discontinuity index value of the historical demand characteristic data is greater than 1.32, and the data sparsity index value of the historical demand characteristic data is greater than or equal to 50%.
[0166] According to embodiments of this disclosure, the data discontinuity index is the ratio of the number of zero-demand time windows to the number of zero-demand intervals in the historical demand characteristic data; the data sparsity index is the ratio of the number of zero-demand time windows to the total number of time windows in the historical demand characteristic data.
[0167] According to embodiments of this disclosure, any plurality of modules among the acquisition module 401, the first output module 402, the disturbance module 403, and the second output module 404 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the acquisition module 401, the first output module 402, the disturbance module 403, and the second output module 404 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the acquisition module 401, the first output module 402, the disturbance module 403, and the second output module 404 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0168] Figure 5A block diagram schematically illustrates an electronic device suitable for implementing a method for predicting the demand for goods according to an embodiment of the present disclosure.
[0169] like Figure 5 As shown, an electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage portion 508 into a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0170] RAM 503 stores various programs and data required for the operation of electronic device 500. Processor 501, ROM 502, and RAM 503 are interconnected via bus 504. Processor 501 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 502 and / or RAM 503. It should be noted that the programs may also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.
[0171] According to embodiments of this disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to a bus 504. The electronic device 500 may also include one or more of the following components connected to the I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 510 as needed so that computer programs read from it can be installed into the storage section 508 as needed.
[0172] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0173] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 502 and / or RAM 503 and / or one or more memories other than ROM 502 and RAM 503 described above.
[0174] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the item demand forecasting method provided in embodiments of this disclosure.
[0175] When the computer program is executed by the processor 501, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0176] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 509, and / or installed from a removable medium 511. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0177] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by processor 501, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0178] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0180] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0181] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for predicting the demand for a good, comprising: Historical demand characteristic data is obtained from the database, wherein the historical demand characteristic data is used to characterize the historical demand for the pre-determined item within a preset historical time period; The historical demand feature data is input into the first classification model, so as to use the first classification model to output the probability of demand for the predetermined item occurring in the future within a preset time period. The probability of the demand occurrence is randomly perturbed to generate a random perturbation feature result, wherein the random perturbation feature result is used to characterize: the random occurrence result of the predetermined item for T demand events within the future preset time period, wherein T is a positive integer; The random perturbation feature results are input into the second classification model to output the phased demand prediction results of the predetermined item within the future preset time period. The phased demand prediction results are used to characterize whether a demand event for the predetermined item will occur within the future preset time period. If a demand event for the predetermined item is expected to occur within the predetermined future time period, the historical demand characteristic data is input into a regression model to output the predicted demand for the predetermined item within the predetermined future time period.
2. The method according to claim 1, wherein, The historical demand feature data includes the historical demand volume of the pre-ordered item in M time windows within the preset historical time period; the demand occurrence probability includes the demand occurrence probability matrix of the pre-ordered item in N time windows within the preset future time period; and the random perturbation feature result includes the random occurrence result of T demand events in each of the N time windows within the preset future time period. The probability of the demand occurrence is randomly perturbed to generate random perturbation feature results, including: Generate a random probability matrix, wherein the random probability matrix is used to characterize the random occurrence probability of the desired item in T demand events in each of N time windows within the future preset time period; The random probability matrix and the demand occurrence probability matrix are fused to generate a random perturbation feature matrix that characterizes the random perturbation feature result.
3. The method according to claim 2, wherein, The step of fusing the random probability matrix and the demand occurrence probability matrix to generate the random perturbation feature matrix includes: probability values in the random probability matrix The probability value is less than the probability value in the probability matrix of the demand occurrence. In the case of generating eigenvalues in the random perturbation feature matrix. The first value; probability values in the random probability matrix The probability value is greater than or equal to the probability value in the probability matrix of the demand occurrence. In the case of generating eigenvalues in the random perturbation feature matrix. The second value; Wherein, the first value is used to characterize that the demand event will occur, the second value is used to characterize that the demand event will not occur, and the probability value The probability value is the random occurrence probability of the j-th demand event in the i-th time window within N time windows of a preset future time period for the pre-determined item. The probability value is the probability of demand for the pre-ordered item occurring in the i-th time window out of N time windows within a preset future time period. This refers to the random occurrence of the j-th demand event within the i-th time window of N time windows in a future preset time period for the pre-determined item.
4. The method according to claim 1, wherein: The historical demand characteristic data meets preset data constraint conditions, which are used to characterize that the data discontinuity index value and data sparsity index value of the historical demand characteristic data meet preset numerical ranges.
5. The method according to claim 4, wherein: The preset data limiting conditions are: the data discontinuity index value of the historical demand characteristic data is greater than 1.32, and the data sparsity index value of the historical demand characteristic data is greater than or equal to 50%.
6. The method according to claim 5, wherein: The data discontinuity index value is the ratio of the number of zero-demand time windows to the number of zero-demand intervals in the historical demand characteristic data. The data sparsity index is the ratio of the number of zero-demand time windows to the total number of time windows in the historical demand feature data.
7. A device for predicting the demand for goods, comprising: The acquisition module is used to acquire historical demand feature data from the database, wherein the historical demand feature data is used to characterize the historical demand of the predetermined item within a preset historical time period; The first output module is used to input the historical demand feature data into the first classification model, so as to use the first classification model to output the probability of demand for the predetermined item occurring in a future preset time period. The perturbation module is used to randomly perturb the probability of the demand occurrence to generate a random perturbation feature result, wherein the random perturbation feature result is used to characterize: the random occurrence result of the predetermined item for T demand events within the future preset time period, wherein T is a positive integer; The input module is used to input the random perturbation feature results into the second classification model, so as to use the second classification model to output the phased demand prediction results of the predetermined item in the future preset time period. The phased demand prediction results are used to characterize whether a demand event for the predetermined item will occur in the future preset time period. The third output module is used to input historical demand characteristic data into a regression model when a demand event for a predetermined item is expected to occur within a preset time period in the future, so as to use the regression model to output the predicted demand for the predetermined item within the preset time period in the future.
8. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 6.