Sales prediction method and device, terminal and storage medium
By combining historical sales and feature data with residual prediction networks and weighted networks, the problem of inaccurate sales forecasting is solved, interpretable distribution forecasting in supply chain scenarios is realized, and the accuracy of sales forecasting is improved.
Patent Information
- Application Number
- CN202410592528.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2025-11-14
AI Technical Summary
Existing sales forecasting methods lack interpretability in supply chain scenarios, leading to inaccurate forecasts that fail to meet actual replenishment and allocation needs.
By acquiring historical sales data and feature data of the target item, and utilizing a residual prediction network model and a weight network, combined with the standard deviation of the residual prediction data and feature prediction data, sales are predicted, providing an interpretable distribution prediction mechanism.
It improves the accuracy of sales forecasting, enhances the distribution forecasting effect of product sales, and meets the interpretability requirements in supply chain scenarios.
Smart Images

Figure CN120952848A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a sales forecasting method, apparatus, terminal and storage medium. Background Technology
[0002] With the continuous development of the internet and terminal technologies, users' lives are becoming increasingly convenient. Among these conveniences, online sales are also becoming increasingly easier. For example, machine learning and deep learning can be used to predict sales volume. However, this method is a black-box prediction method, resulting in relatively poor accuracy in sales forecasting. Summary of the Invention
[0003] This application aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, the first objective of this application is to propose a sales forecasting method to provide an interpretable distribution forecasting mechanism in a supply chain scenario, which can improve the accuracy of sales forecasting and enhance the distribution forecasting effect of product sales.
[0005] The second objective of this application is to provide a sales forecasting device.
[0006] The third objective of this application is to propose a terminal.
[0007] The fourth objective of this application is to provide a computer-readable storage medium.
[0008] The fifth objective of this application is to provide a computer program product.
[0009] To achieve the above objectives, the first aspect of this application proposes a sales forecasting method, comprising the following steps:
[0010] Obtain a set of historical sales data, a set of historical features, and a set of input features for the target item. The set of historical sales data includes historical sales data for at least one historical moment, and the set of input features is the original set of input features used for sales prediction.
[0011] Based on the historical sales data set and the historical feature set, residual prediction data is obtained, and feature prediction data set is obtained based on the input feature set and the historical feature set.
[0012] Based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, the sales volume of the target item is predicted to obtain the sales volume prediction data corresponding to the target item.
[0013] To achieve the above objectives, a second aspect of this application provides a sales forecasting device, comprising:
[0014] The set acquisition unit is used to acquire a set of historical sales data, a set of historical features, and a set of input features for a target item. The set of historical sales data includes historical sales data at least at one historical moment, and the set of input features is the original set of input features used for sales prediction.
[0015] The data acquisition unit is used to acquire residual prediction data based on the historical sales data set and the historical feature set, and to predict the data set based on the input feature set and the feature set corresponding to the historical feature set.
[0016] The sales forecasting unit is used to forecast the sales of the target item based on the residual forecast data, the feature forecast data set, the first standard deviation corresponding to the residual forecast data, and the second standard deviation corresponding to any feature forecast data in the feature forecast data set, and to obtain the sales forecast data corresponding to the target item.
[0017] To achieve the above objectives, a third aspect of this application provides a terminal, including: a processor and a memory communicatively connected to the processor;
[0018] The memory stores computer-executed instructions;
[0019] The processor executes computer execution instructions stored in the memory to implement the method as described in any of the first aspects above.
[0020] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any of the first aspects above.
[0021] To achieve the above objectives, a fifth aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0022] The sales forecasting method, apparatus, terminal, and storage medium provided in this application address the problem of inaccurate sales forecasts caused by the lack of interpretability in distribution forecasting. The method acquires a historical sales data set, a historical feature set, and an input feature set for a target item. The historical sales data set includes historical sales data from at least one historical moment, and the input feature set is the original input feature set used for sales forecasting. Based on the historical sales data set and the historical feature set, residual forecast data is obtained, and feature forecast data is acquired based on the input feature set and the corresponding feature forecast data set. The sales of the target item are then predicted based on the residual forecast data, the feature forecast data set, a first standard deviation corresponding to the residual forecast data, and a second standard deviation corresponding to any feature forecast data in the feature forecast data set. This method solves the problem of inaccurate sales forecasts caused by the lack of interpretability in distribution forecasting. By using the residual forecast data and the feature forecast data set, an interpretable distribution forecasting mechanism can be provided in supply chain scenarios. Furthermore, the first and second standard deviations can improve the accuracy of sales forecasting and enhance the distribution forecasting effect of item sales.
[0023] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0024] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0025] Figure 1 A schematic flowchart illustrating a sales forecasting method provided in an embodiment of this application;
[0026] Figure 2 A schematic flowchart illustrating a sales forecasting method provided in an embodiment of this application;
[0027] Figure 3 A schematic diagram illustrating an example of a sales forecasting method provided in this application embodiment.
[0028] Figure 4 A schematic diagram illustrating an example of a sales forecasting method provided in this application embodiment.
[0029] Figure 5A Examples of sales forecasting provided in some embodiments of this application are illustrated in the diagram.
[0030] Figure 5B This is an example diagram illustrating a sales forecast provided in an embodiment of this application.
[0031] Figure 6A schematic diagram illustrating an example of a sales forecasting method provided in this application embodiment; and
[0032] Figure 7 This is a schematic diagram of a sales forecasting device provided in an embodiment of this application. Detailed Implementation
[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0034] According to some implementations, sales forecasting can provide a basis for e-commerce replenishment and allocation, improving the convenience of product sales and enhancing the user's purchasing experience. For example, machine learning or deep learning methods can be used for sales forecasting. However, the interpretable forecasts involved in this method are unreasonable and cannot meet the actual needs of replenishment and allocation, resulting in poor accuracy of sales forecasting and a lower service level.
[0035] Distribution prediction techniques may include the following, but none of them are suitable for e-commerce sales scenarios:
[0036] 1. Quantile Regression: Typically, quantile loss is set to output predictions for each quantile point, such as MQCNN and XGBoost. However, quantile prediction ignores the uncertainties in the prediction process. It only uses the specified quantile points in the loss function to predict the distribution. The disadvantage is obvious: it ignores the uncertainties in the prediction process, resulting in a relatively wide overall prediction range.
[0037] 2. Traditional statistical methods: These generally employ the theory of establishing confidence intervals (ci) using nonlinear regression models to estimate model uncertainty. For example, the delta method suggests that g(X) obtained after the transformation of the differentiable function still tends to a normal distribution, and provides formulas for calculating expectation and variance. However, because it requires the use of the Hessian matrix, its computational requirements are very high, the optimization objective is relatively complex, it cannot be optimized using gradients, and it is not suitable for big data scenarios.
[0038] 3. Mean-Variance Estimation (MVE): This method uses a neural network with two output nodes, one representing the mean of the normal distribution and the other representing the variance of the normal distribution, while also allowing estimation of the variance of data noise. The loss function used is the negative log-likelihood (NLL) of the predicted distribution of the given data. However, due to the complexity and diversity of items, the distribution data may be unknown, thus limiting the applicability of this method in supply chain scenarios.
[0039] The sales forecasting method and apparatus of this application are described below with reference to the accompanying drawings.
[0040] Figure 1 This is a schematic flowchart of a sales forecasting method provided in an embodiment of this application.
[0041] To address this issue, embodiments of this application provide a sales forecasting method to offer an interpretable distribution forecasting mechanism in a supply chain scenario. This can improve the accuracy of sales forecasting and enhance the distribution forecasting effect of product sales, such as... Figure 1 As shown, this sales forecasting method includes the following steps:
[0042] Step 101: Obtain the historical sales data set, historical feature set, and input feature set of the target item;
[0043] According to some embodiments, the technical solutions of this application can be applied, for example, to sales forecasting in a supply chain scenario.
[0044] According to some embodiments, the target item can refer to a single item or a category of items; this application does not limit this. For example, the target item can be item A or item B.
[0045] According to some embodiments, the historical sales data set may be, for example, a collection of historical sales data from at least one historical moment. This historical sales data set does not specifically refer to a fixed set. For example, when the historical sales data at any historical moment changes, the historical sales data set may also change accordingly.
[0046] According to some embodiments, a historical feature set refers to a collection comprised of at least one historical feature. This historical feature set may include, for example, one or more of baseline historical features, promotional historical features, and marketing historical features. The historical feature set may include, for example, baseline features, promotional features, and marketing features from different historical moments. The historical feature set is not specifically a fixed set; for example, it may change as historical moments change. For instance, when the feature values at a particular historical moment change, the historical feature set may also change accordingly.
[0047] According to some embodiments, the input feature set is a raw set of input features used for sales forecasting. This input feature set may include, for example, at least one feature corresponding to the sales forecasting time. The input feature set may include, for example, one or more of baseline input features, promotional input features, and marketing input features.
[0048] In some embodiments, when performing sales forecasting, a set of historical sales data, a set of historical features, and a set of input features for the target item can be obtained.
[0049] Step 102: Obtain residual prediction data based on the historical sales data set and the historical feature set, and predict the feature data set corresponding to the input feature set and the historical feature set.
[0050] According to some embodiments, residual prediction data may be obtained, for example, from a set of historical sales data and a set of historical features. This residual prediction data can be used to indicate the difference between actual sales and predicted sales. The residual prediction data is not specifically defined by a fixed set of data; for example, it may change when the set of historical sales data or the set of historical features changes. Similarly, the parameter prediction data may change when the method of obtaining the residual prediction data changes.
[0051] According to some embodiments, the feature prediction dataset may be, for example, a collection of at least one feature prediction data set. This feature prediction dataset does not specifically refer to a fixed set. The feature prediction dataset may, for example, include one or more of baseline prediction features, promotion prediction features, and marketing prediction features. The features included in the feature prediction dataset may correspond to features in a feature set.
[0052] According to some embodiments, when a set of historical sales data, a set of historical features, and a set of input features are obtained, residual prediction data can be obtained based on the set of historical sales data and the set of historical features, and a set of feature prediction data can be obtained based on the set of input features and the set of historical features.
[0053] Step 103: Based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, predict the sales volume of the target item and obtain the sales volume prediction data corresponding to the target item.
[0054] According to some embodiments, the first standard deviation refers to the standard deviation corresponding to the residual prediction data. The "first" in the first standard deviation is only used to distinguish it from the other standard deviations and does not specifically refer to a fixed standard deviation. For example, when the method of obtaining the standard deviation changes, the first standard deviation may also change accordingly. For example, when the number of neurons in the standard deviation acquisition method changes, the first standard deviation may also change accordingly.
[0055] In some embodiments, the second standard deviation refers to the standard deviation corresponding to any feature prediction data in the feature prediction dataset. This second standard deviation is not specifically a fixed standard deviation; for example, it may change accordingly when any feature prediction data changes.
[0056] According to some embodiments, the sales volume of a target item can be predicted based on residual prediction data, a set of feature prediction data, a first standard deviation corresponding to the residual prediction data, and a second standard deviation corresponding to any feature prediction data in the set of feature prediction data, thereby obtaining the sales volume prediction data corresponding to the target item.
[0057] The sales forecast data can be a single value or a range of sales data. This application does not limit this.
[0058] The sales forecasting method, apparatus, terminal, and storage medium provided in this application address the problem of inaccurate sales forecasts caused by the lack of interpretability in distribution forecasting. The method acquires a historical sales data set, a historical feature set, and an input feature set for a target item. The historical sales data set includes historical sales data from at least one historical moment, and the input feature set is the original set of input features used for sales forecasting. Based on the historical sales data set and the historical feature set, residual forecast data is obtained, and feature forecast data sets corresponding to the input and historical feature sets are used. The sales volume of the target item is then predicted based on the residual forecast data, the feature forecast data set, the first standard deviation of the residual forecast data, and the second standard deviation of any feature forecast data in the feature forecast data set. This method solves the problem of inaccurate sales forecasts caused by the lack of interpretability in distribution forecasting. By using the residual forecast data and the feature forecast data set, an interpretable distribution forecasting mechanism can be provided in supply chain scenarios. Furthermore, the first and second standard deviations can improve the accuracy of sales forecasting and enhance the distribution forecasting effect of item sales.
[0059] This embodiment provides another method for sales forecasting. Figure 2 This is a schematic flowchart of a sales forecasting method provided in an embodiment of this application.
[0060] like Figure 2 As shown, this sales forecasting method may include the following steps:
[0061] Step 201: Obtain the historical sales data set, historical feature set, and input feature set of the target item;
[0062] The specific process is as described above and will not be repeated here.
[0063] According to some embodiments, Figure 3This is an example illustration of a sales forecasting method provided in an embodiment of this application. The historical sales data set may, for example, include the historical sales data set Y from time ti to time t. t-i,t The set of historical features could be, for example, set X. t (x 1,t ,x 2,t ,x 3,t ), where x 1,t For baseline historical features, x 2,t Based on promotional history characteristics, x 3,t This is a characteristic of marketing history.
[0064] Step 202: Input the historical sales data set and historical feature set into the residual prediction network model to perform residual prediction and obtain residual prediction data;
[0065] In one embodiment of this application... Figure 4 This is a schematic diagram illustrating an example of a sales forecasting method provided in an embodiment of this application. t-i : The set of features at time ti;
[0066] y t-i Sales data at time ti;
[0067] h t-i The available time covariates at time ti;
[0068] c t-i : The context of time ti;
[0069] l t+i The set of features input at time t+1;
[0070] ω t+i The weight at time t+1;
[0071] The predicted mean value at time t+1;
[0072] y t+i Sales forecast data at time t+1;
[0073] Baseline prediction data at time t+1;
[0074] Promotion forecast data at time t+1;
[0075] Marketing forecast data at time t+1; where i can be a positive integer. i can be 1, 2, 3, etc., time ti represents the i-th time before time t, and time t+i represents the i-th time after time t.
[0076] A Multilayer Perceptron (MLP) is a feedforward artificial neural network that maps a set of input vectors to a set of output vectors. An MLP can be viewed as a directed graph composed of multiple layers of nodes, each fully connected to the next. Besides the input nodes, each node is a neuron (or processing unit) with a non-linear activation function.
[0077] For example, the residual prediction network model can be a predictive model, such as the MQCCN model. When historical sales data sets and historical feature sets are obtained, these sets can be input into the residual prediction network model to perform residual prediction, thereby obtaining residual prediction data.
[0078] For example, in one embodiment of this application, the historical sales data set Y from time t-2 to time t can be used. t-2,t and historical feature set X t (x 1,t ,x 2,t ,x 3,t The data is input into the MQCCN model to obtain the residual prediction data for any time after time t.
[0079] The obtained residual prediction data can be, for example, ε. t+i Among them, ε t+i For example, it could be the residual prediction data at time t+i. Here, i can be a positive integer. i can be 1, 2, 3, etc.
[0080] Step 203: Based on the residual prediction data, obtain the weight corresponding to any input feature in the input feature set;
[0081] The specific process is as described above and will not be repeated here.
[0082] According to some embodiments, the weight corresponding to any input feature in the input feature set is obtained based on residual prediction data, including:
[0083] The residual prediction data is input into the weighted network WR network to obtain the weight corresponding to any input feature in the input feature set.
[0084] In one embodiment of this application, when obtaining residual prediction data, the weight corresponding to any feature in the feature set can be obtained by normalizing the data after normalizing it using the normalized exponential function softmax.
[0085] For example, the weight corresponding to each component could be ω. t+i .
[0086] Step 204: Based on any input feature in the input feature set and the weight corresponding to any input feature, obtain the feature prediction data corresponding to any input feature;
[0087] In some embodiments, when any input feature and its corresponding weight are obtained from the input feature set, the weights of any input feature and its corresponding weight can be combined to obtain the feature prediction data corresponding to any input feature.
[0088] For example, Baseline prediction data at time t+1; Promotion forecast data at time t+1; Marketing forecast data at time t+1; Baseline input data at time t+1; Promotional input data at time t+1; Marketing input data at time t+1
[0089] Step 205: Add the feature prediction data corresponding to any input feature to the feature prediction data set;
[0090] According to some embodiments, when feature prediction data corresponding to any input feature is obtained, the feature prediction data corresponding to any input feature can be added to the feature prediction data set.
[0091] For example, it can be and Add to the feature prediction dataset.
[0092] Step 206: Based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, predict the sales volume of the target item and obtain the sales volume prediction data corresponding to the target item.
[0093] The specific process is as described above and will not be repeated here.
[0094] According to some embodiments, illustrative diagrams illustrating sales forecasting in some embodiments may be as follows: Figure 5A As shown in the illustration, the sales forecasting example of this application embodiment can be illustrated as follows: Figure 5B As shown.
[0095] According to some embodiments, based on residual prediction data, a set of feature prediction data, a first standard deviation corresponding to the residual prediction data, and a second standard deviation corresponding to any feature prediction data in the feature prediction data set, the sales volume of a target item is predicted to obtain sales prediction data corresponding to the target item, including:
[0096] Obtain mean prediction data based on the residual prediction data and feature prediction data sets;
[0097] The residual prediction data is input into N neurons for calculation to obtain the first Nth data sample corresponding to the residual prediction data, where N is a positive integer;
[0098] Obtain the first standard deviation corresponding to the first Nth data sample;
[0099] Input any feature prediction data in the feature prediction dataset into N neurons for calculation, and obtain the second Nth data sample corresponding to any feature prediction data.
[0100] Obtain the second standard deviation corresponding to the second Nth data sample;
[0101] Based on the mean forecast data, the first standard deviation, and the second standard deviation, the sales volume of the target item is predicted, and the corresponding sales forecast data for the target item is obtained.
[0102] According to some embodiments, when residual prediction data and feature prediction data sets are obtained, mean prediction data can be obtained based on the residual prediction data and feature prediction data sets. The mean prediction data can be, for example, […]. in, For example, it can be based on and To obtain, for example, could be and Adding them together, we get, where, For example, it could be u t+i .
[0103] Optional, Figure 6 This is an example illustration of a sales forecasting method provided in an embodiment of this application. For example, promotional forecast data can be used... The input is fed into the constructed N neurons, and through the computation of the N neurons, a second Nth data sample (s) can be obtained. 1,t+i ,s 2,t+i ,…,s N,t+i This allows us to obtain the second standard deviation of the second Nth data sample, i.e. N can be greater than 30, for example.
[0104] Similarly, sigma can be obtained. 基线 sigma 促销 sigma 营销 sigma 残差 The distribution information of each component can also be, for example, sigma. 基线 sigma 促销sigma 营销 sigma 残差 .
[0105] In some implementations, the total standard deviation at time t+1 can be obtained:
[0106] sigma t+i = sigma t+i,基线 +sigma t+i,促销 +sigma t+i,营销 +sigma t+i,残差 .
[0107] According to some embodiments, the sales volume of a target item is predicted based on the mean prediction data, a first standard deviation, and a second standard deviation, to obtain the corresponding sales volume prediction data for the target item, including:
[0108] Based on the first and second standard deviations, obtain the target deviation corresponding to the mean prediction data;
[0109] Based on the mean forecast data and the target standard deviation, the sales volume of the target item is predicted, and the corresponding sales forecast data range for the target item is obtained.
[0110] In some implementations, the target difference corresponding to the mean prediction data can be obtained, i.e., the total standard deviation at time t+1:
[0111] sigma t+i = sigma t+i,基线 +sigma t+i,促销 +sigma t+i,营销 +sigma t+i,残差 .
[0112] In some embodiments, the range of the sales forecast data for the target item at time t+i can be, for example, [u t+i -sigma t+i ,u t+i +sigma t+i ].
[0113] According to some embodiments, the method further includes:
[0114] Obtain the item type of the target item and the corresponding N value. This can improve the matching between the N value and the item type, thereby increasing the accuracy of sales forecast data.
[0115] The sales forecasting method, apparatus, terminal, and storage medium provided in this application address the problem of inaccurate sales forecasts caused by neglecting interpretability in distribution forecasting. This method improves the accuracy of obtaining residual forecast data by inputting historical sales data sets and historical feature sets into a residual prediction network model for residual prediction. The method obtains residual prediction data by inputting historical sales data sets and historical feature sets into a residual prediction network model for residual prediction, acquiring residual prediction data based on the weights of any input feature and the corresponding input feature, and adding the feature prediction data to the feature prediction data set. This solves the problem of inaccurate sales forecasts caused by neglecting interpretability in distribution forecasting. Through the residual prediction network model and weight network, the accuracy of obtaining residual prediction data and feature prediction data sets can be improved. This provides an interpretable distribution forecasting mechanism in supply chain scenarios, thereby improving the accuracy of sales forecasting and enhancing the distribution forecasting effect of product sales.
[0116] To achieve the above embodiments, this application also proposes a sales forecasting device.
[0117] Figure 7 This is a schematic diagram of a sales forecasting device provided in an embodiment of this application.
[0118] like Figure 7 As shown, the sales forecasting device includes:
[0119] The set acquisition unit 701 is used to acquire a set of historical sales data, a set of historical features, and a set of input features for the target item. The set of historical sales data includes historical sales data at least at one historical moment, and the set of input features is the original set of input features used for sales prediction.
[0120] The data acquisition unit 702 is used to acquire residual prediction data based on the historical sales data set and the historical feature set, and to predict the data set based on the input feature set and the feature set corresponding to the historical feature set.
[0121] The sales forecasting unit 703 is used to forecast the sales of a target item based on residual forecast data, a set of feature forecast data, the first standard deviation corresponding to the residual forecast data, and the second standard deviation corresponding to any feature forecast data in the set of feature forecast data, and to obtain the sales forecast data corresponding to the target item.
[0122] Furthermore, in one possible implementation of this application embodiment, the data acquisition unit 702, when acquiring residual prediction data based on the historical sales data set and the historical feature set, is specifically used for:
[0123] Historical sales data and historical feature sets are input into the residual prediction network model to perform residual prediction and obtain residual prediction data.
[0124] Furthermore, in one possible implementation of this application embodiment, the data acquisition unit 702, when predicting the data set based on the features corresponding to the input feature set and the historical feature set, is specifically used for:
[0125] Based on the residual prediction data, obtain the weight corresponding to any input feature in the input feature set;
[0126] Based on any input feature and its corresponding weight in the input feature set, obtain the feature prediction data corresponding to any input feature;
[0127] Add the feature prediction data corresponding to any input feature to the feature prediction data set.
[0128] Furthermore, in one possible implementation of this application embodiment, the data acquisition unit 702, when acquiring the weight corresponding to any input feature in the input feature set based on the residual prediction data, is specifically used for:
[0129] The residual prediction data is input into the weight network to obtain the weight corresponding to any input feature in the input feature set.
[0130] Furthermore, in one possible implementation of this application embodiment, the sales forecasting unit 703 is used to forecast the sales volume of the target item based on residual forecast data, a set of feature forecast data, a first standard deviation corresponding to the residual forecast data, and a second standard deviation corresponding to any feature forecast data in the set of feature forecast data. When obtaining the sales forecast data corresponding to the target item, it is specifically used for:
[0131] Obtain mean prediction data based on the residual prediction data and feature prediction data sets;
[0132] The residual prediction data is input into N neurons for calculation to obtain the first Nth data sample corresponding to the residual prediction data, where N is a positive integer;
[0133] Obtain the first standard deviation corresponding to the first Nth data sample;
[0134] Input any feature prediction data in the feature prediction dataset into N neurons for calculation, and obtain the second Nth data sample corresponding to any feature prediction data.
[0135] Obtain the second standard deviation corresponding to the second Nth data sample;
[0136] Based on the mean forecast data, the first standard deviation, and the second standard deviation, the sales volume of the target item is predicted, and the corresponding sales forecast data for the target item is obtained.
[0137] Furthermore, in one possible implementation of this application embodiment, the sales forecasting unit 703 is used to forecast the sales volume of the target item based on the mean forecast data, the first standard deviation, and the second standard deviation. When obtaining the sales forecast data corresponding to the target item, it is specifically used for:
[0138] Based on the first and second standard deviations, obtain the target deviation corresponding to the mean prediction data;
[0139] Based on the mean forecast data and the target standard deviation, the sales volume of the target item is predicted, and the corresponding sales forecast data range for the target item is obtained.
[0140] Furthermore, in one possible implementation of this application embodiment, the sales forecasting unit 703 is also specifically used for:
[0141] Get the item type of the target item and get the N value corresponding to the item type.
[0142] It should be noted that the foregoing explanation of the sales forecasting method embodiment also applies to the sales forecasting device of this embodiment, and will not be repeated here.
[0143] In this embodiment, the set acquisition unit is used to acquire a historical sales data set, a historical feature set, and an input feature set for the target item. The historical sales data set includes historical sales data from at least one historical moment, and the input feature set is the original input feature set used for sales prediction. The data acquisition unit is used to acquire residual prediction data based on the historical sales data set and the historical feature set, and to acquire feature prediction data sets corresponding to the input feature set and the historical feature set. The sales prediction unit is used to predict the sales of the target item based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, thereby acquiring the sales prediction data corresponding to the target item. This solves the problem of inaccurate sales prediction caused by the lack of interpretability in distribution prediction. Through the residual prediction data and the feature prediction data set, an interpretable distribution prediction mechanism in the supply chain scenario can be provided. Furthermore, the first and second standard deviations can improve the accuracy of sales prediction and enhance the distribution prediction effect of item sales.
[0144] To implement the above embodiments, this application also proposes a terminal, including: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.
[0145] To implement the above embodiments, this application also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.
[0146] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.
[0147] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0148] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0149] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this application is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.
[0150] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0151] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0152] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0153] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0154] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0155] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0156] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0157] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A sales forecasting method, characterized in that, include: Obtain a set of historical sales data, a set of historical features, and a set of input features for the target item. The set of historical sales data includes historical sales data for at least one historical moment, and the set of input features is the original set of input features used for sales prediction. Based on the historical sales data set and the historical feature set, residual prediction data is obtained, and feature prediction data set is obtained based on the input feature set and the historical feature set. Based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, the sales volume of the target item is predicted to obtain the sales volume prediction data corresponding to the target item.
2. The method according to claim 1, characterized in that, The step of obtaining residual prediction data based on the historical sales data set and the historical feature set includes: The historical sales data set and the historical feature set are input into the residual prediction network model to perform residual prediction and obtain residual prediction data.
3. The method according to claim 1, characterized in that, The feature prediction data set corresponding to the input feature set and the historical feature set includes: Based on the residual prediction data, obtain the weight corresponding to any input feature in the input feature set; Based on any input feature in the input feature set and the weight corresponding to any input feature, obtain the feature prediction data corresponding to any input feature; Add the feature prediction data corresponding to any of the input features to the feature prediction data set.
4. The method according to claim 3, characterized in that, The step of obtaining the weight corresponding to any input feature in the input feature set based on the residual prediction data includes: The residual prediction data is input into the weight network to obtain the weight corresponding to any input feature in the input feature set.
5. The method according to claim 1, characterized in that, The step of predicting the sales volume of the target item based on the residual prediction data, the feature prediction data set, the first standard deviation corresponding to the residual prediction data, and the second standard deviation corresponding to any feature prediction data in the feature prediction data set, and obtaining the sales volume prediction data corresponding to the target item, includes: Based on the residual prediction data and the feature prediction data set, the mean prediction data is obtained; The residual prediction data is input into N neurons for calculation to obtain the first N data sample corresponding to the residual prediction data, where N is a positive integer; Obtain the first standard deviation corresponding to the first N data samples; Input any feature prediction data in the feature prediction dataset into the N neurons for calculation, and obtain the second Nth data sample corresponding to any feature prediction data; Obtain the second standard deviation corresponding to the second Nth data sample; Based on the mean prediction data, the first standard deviation, and the second standard deviation, the sales volume of the target item is predicted, and the corresponding sales volume prediction data for the target item is obtained.
6. The method according to claim 5, characterized in that, The step of predicting the sales volume of the target item based on the mean prediction data, the first standard deviation, and the second standard deviation, and obtaining the corresponding sales volume prediction data for the target item, includes: Based on the first standard deviation and the second standard deviation, obtain the target difference corresponding to the mean prediction data; Based on the mean prediction data and the target standard deviation, the sales volume of the target item is predicted to obtain the corresponding sales volume prediction data range for the target item.
7. The method according to claim 5, characterized in that, The method further includes: Obtain the item type of the target item, and obtain the N value corresponding to the item type.
8. A sales forecasting device, characterized in that, include: The set acquisition unit is used to acquire a set of historical sales data, a set of historical features, and a set of input features for a target item. The set of historical sales data includes historical sales data at least at one historical moment, and the set of input features is the original set of input features used for sales prediction. The data acquisition unit is used to acquire residual prediction data based on the historical sales data set and the historical feature set, and to predict the data set based on the input feature set and the feature set corresponding to the historical feature set. The sales forecasting unit is used to forecast the sales of the target item based on the residual forecast data, the feature forecast data set, the first standard deviation corresponding to the residual forecast data, and the second standard deviation corresponding to any feature forecast data in the feature forecast data set, and to obtain the sales forecast data corresponding to the target item.
9. A terminal, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-7.