CN113919558A - Product sales prediction method and device - Google Patents

Product sales prediction method and device Download PDF

Info

Publication number
CN113919558A
CN113919558A CN202111145771.6A CN202111145771A CN113919558A CN 113919558 A CN113919558 A CN 113919558A CN 202111145771 A CN202111145771 A CN 202111145771A CN 113919558 A CN113919558 A CN 113919558A
Authority
CN
China
Prior art keywords
product sales
product
data
model
sales prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111145771.6A
Other languages
Chinese (zh)
Inventor
俞宏福
卢阳光
张明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sany Heavy Machinery Ltd
Original Assignee
Sany Heavy Machinery Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sany Heavy Machinery Ltd filed Critical Sany Heavy Machinery Ltd
Priority to CN202111145771.6A priority Critical patent/CN113919558A/en
Publication of CN113919558A publication Critical patent/CN113919558A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities

Abstract

The invention provides a product sales prediction method and a product sales prediction device, wherein the method comprises the following steps: inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model; the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; the product sales prediction model is used for respectively obtaining initial sales prediction results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales prediction results to obtain product sales prediction results. The method not only can quickly obtain the product sales prediction result, but also can ensure the stability and the accuracy of the product sales prediction result because the product sales prediction result is obtained by fusing the initial sales prediction results respectively corresponding to at least two machine learning models.

Description

Product sales prediction method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a product sales prediction method and device.
Background
The sales forecast refers to the estimation of the accumulated sales of the products in a period of time in the future, and the manufacturer formulates a reasonable production and operation strategy, optimizes the product structure and guides the product shipment scheduling based on the sales forecast result of each type of sold products.
However, in the existing practical production application, the product sales prediction result can only be preliminarily estimated based on the historical sales of each type of commodity, and then adjusted by combining with manual experience, so that not only is the efficiency low, but also the accuracy of the prediction result is low.
Disclosure of Invention
The invention provides a product sales prediction method and a product sales prediction device, which are used for overcoming the defects of low product sales prediction efficiency and accuracy in the prior art.
The invention provides a product sales prediction method, which comprises the following steps:
determining influence factor data of product sales;
inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
According to the product sales prediction method provided by the invention, the step of inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model comprises the following steps:
inputting the influence factor data into an initial prediction layer of the product sales prediction model, and predicting the influence factor data by the initial prediction layer based on at least two machine learning models to obtain each initial sales prediction result;
and inputting each initial sales prediction result into a result fusion layer of the product sales prediction model, and fusing all the initial sales prediction results by the result fusion layer to obtain the product sales prediction result.
According to the product sales prediction method provided by the invention, before training the initial model of the product sales prediction model based on the product sample data and the product sales result corresponding to the product sample data, the method further comprises the following steps: and carrying out data preprocessing on the product sample data.
According to the product sales prediction method provided by the invention, the product sample data comprises historical sales data, economic factor data, natural factor data and product operation data;
the data preprocessing of the product sample data comprises:
sequentially carrying out data normalization processing and normalization processing on the historical sales data;
acquiring the importance of each economic factor data, and carrying out normalization processing on each economic factor data after filtering out economic factor data with the importance smaller than the economic factor data corresponding to a preset value;
performing box separation processing or single-hot coding processing on the natural factor data, and then performing normalization processing;
and carrying out normalization processing on the product operation data.
According to the product sales prediction method provided by the invention, the machine learning model comprises at least two of a combined network model, a LightGBM model, an RNN network model and a CNN network model, and the combined network model is obtained based on an ARIMA model and a BP network model.
According to the product sales prediction method provided by the invention, after obtaining the product sales prediction result output by the product sales prediction model, the method further comprises the following steps: and displaying the product sales prediction result in a target format.
The present invention also provides a product sales predicting apparatus, comprising:
the determining unit is used for determining the influence factor data of the product sales volume;
the prediction unit is used for inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the product sales prediction method.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the product sales prediction method as described in any of the above.
The present invention also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the product sales prediction method according to any of the above.
According to the product sales prediction method and device provided by the invention, the product sales prediction model respectively obtains the initial sales prediction results corresponding to the influence factor data based on at least two machine learning models, and all the initial sales prediction results are fused, so that the product sales prediction result can be quickly obtained, and the product sales prediction result is obtained by fusing the initial sales prediction results respectively corresponding to at least two machine learning models, so that the stability and the accuracy of the product sales prediction result can be ensured.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a product sales forecasting method provided by the present invention;
FIG. 2 is a diagram of a comparative example of a smoothing process provided by the present invention;
FIG. 3 is a schematic illustration of the smoothing test results provided by the present invention;
FIG. 4 is a schematic diagram of time series data decomposition provided by the present invention;
FIG. 5 is a schematic diagram of an autocorrelation map and a partial autocorrelation map provided by the present invention;
FIG. 6 is a schematic diagram of training data partitioning provided by the present invention;
FIG. 7 is a schematic diagram of the LSTM network model framework provided by the present invention;
FIG. 8 is a schematic diagram of a memory cell structure provided by the present invention;
fig. 9 is a schematic diagram of a CNN network model framework provided by the present invention;
FIG. 10 is a schematic representation of a derivative of the features provided by the present invention;
FIG. 11 is a schematic diagram of a multi-model fusion process provided by the present invention;
FIG. 12 is a process diagram of multi-model fusion prediction provided by the present invention;
FIG. 13 is a schematic structural diagram of a product sales prediction apparatus according to the present invention;
FIG. 14 is a schematic diagram of a product sales forecasting system according to the present invention;
FIG. 15 is a schematic of the topology of the product sales prediction system provided by the present invention;
FIG. 16 is a schematic diagram of a hierarchical model of a product sales prediction system provided by the present invention;
FIG. 17 is a schematic illustration of sales forecast based on a product sales forecast system provided by the present invention;
fig. 18 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the existing practical production application, the product sales prediction result can only be preliminarily estimated based on the historical sales of each type of commodity, and then adjusted by combining with manual experience, so that not only is the efficiency lower, but also the accuracy of the prediction result is lower.
In view of the above, the present invention provides a product sales prediction method. Fig. 1 is a schematic flow chart of a product sales prediction method provided by the present invention, and as shown in fig. 1, the method includes the following steps:
and step 110, determining influence factor data of the product sales volume.
Here, the influence factor data refers to data that influences product sales, which may include weather data, area data, equipment operation data, and the like.
Taking an excavator product as an example, as for weather data, in rainy and snowy weather, the excavator construction is difficult, and the amount of sales may be reduced. For regional data, the demand of a large excavator is large in places with more mines, so that the large excavator is sold in a large scale; in places with high urbanization level, the small and medium-sized excavators have large demand, so that the small and medium-sized excavators have large sales volume. For equipment operation data, if the operation rate of the equipment is higher, the market of the area is better, the demand of the excavator is large, and the sales volume may be increased correspondingly.
Step 120, inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; the product sales prediction model is used for respectively obtaining initial sales prediction results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales prediction results to obtain product sales prediction results.
Specifically, the product sales prediction model is used for predicting influence factor data based on at least two machine learning models, respectively obtaining initial sales prediction results output by the machine learning models, and then fusing the initial sales prediction results to obtain a final product sales prediction result.
It should be noted that the product sales prediction model may be divided into two layers, and in the process of training the product sales prediction model, the first layer is used for predicting product sample data based on at least two machine learning models to obtain initial sample sales prediction results output by each machine learning model; and the second layer is used for training by taking the initial sample sales prediction result output by each machine learning model as a training sample until the model converges.
If a machine learning model is used to train product sample data, the error of the product sales prediction result may be large due to the fluctuation of the prediction precision of the single machine learning model. Therefore, the product sales prediction model in the embodiment of the invention predicts the sample product data through at least two machine learning models, and then trains the model by taking the initial sample sales prediction result output by each machine learning model as the next layer of training sample, thereby ensuring the stability of the product sales prediction result and improving the precision of the product sales prediction result.
In addition, before step 120 is executed, a product sales prediction model may be obtained through pre-training, which may specifically be implemented by executing the following steps: firstly, a large amount of sample product data is collected, and a corresponding product sales result is determined through manual marking. And training the initial model based on the product sample data and the product sales volume result corresponding to the product sample data, thereby obtaining a product sales volume prediction model.
According to the product sales prediction method provided by the embodiment of the invention, the product sales prediction model respectively obtains the initial sales prediction results corresponding to the influence factor data based on at least two machine learning models, and all the initial sales prediction results are fused, so that the product sales prediction result can be quickly obtained, and the product sales prediction result is obtained by fusing the initial sales prediction results respectively corresponding to at least two machine learning models, so that the stability and the accuracy of the product sales prediction result can be ensured.
Based on the above embodiment, the method for obtaining the product sales prediction result output by the product sales prediction model by inputting the influence factor data into the product sales prediction model includes:
inputting the influence factor data into an initial prediction layer of a product sales prediction model, and predicting the influence factor data by the initial prediction layer based on at least two machine learning models to obtain each initial sales prediction result;
and inputting each initial sales prediction result into a result fusion layer of the product sales prediction model, and fusing all the initial sales prediction results by the result fusion layer to obtain a product sales prediction result.
Specifically, after the influence factor data is input to the initial prediction layer, the influence factor data is respectively predicted by the initial prediction layer based on at least two machine learning models, so that initial sales prediction results corresponding to the machine learning models can be obtained. And then, inputting each initial sales prediction result into a result fusion layer, and fusing all the initial sales prediction results by the result fusion layer to finally obtain a product sales prediction result. The machine learning model may be an LSTM network model, a BP network model, a CNN network model, and the like, which is not specifically limited in this embodiment of the present invention.
By adopting the method, the product sales prediction result can be quickly obtained, and the product sales prediction result is obtained by fusing the initial sales prediction results respectively corresponding to the at least two machine learning models, so that the stability and the accuracy of the product sales prediction result can be ensured.
Based on any of the embodiments above, before training the initial model of the product sales prediction model based on the product sample data and the product sales result corresponding to the product sample data, the method further includes: and carrying out data preprocessing on the product sample data.
Specifically, incomplete data, error data, and the like may exist in originally obtained product sample data, and training the initial model based on the data may not only affect the training effect of the model, but also may prolong the training time of the model. Therefore, before the initial model is trained, the embodiment of the present invention performs data preprocessing on the product sample data to improve the quality of the product sample data used for training the initial model, wherein the product sample data may be subjected to data cleaning, data integration, data transformation, data reduction, and the like, which is not specifically limited in the embodiment of the present invention.
Based on any embodiment, the product sample data comprises historical sales data, economic factor data, natural factor data and product operation data;
carrying out data preprocessing on product sample data, comprising the following steps:
sequentially carrying out data normalization processing and normalization processing on the historical sales data;
acquiring the importance of each economic factor data, and carrying out normalization processing on each economic factor data after filtering out economic factor data with the importance smaller than the economic factor data corresponding to a preset value;
carrying out box separation processing or single-hot coding processing on the natural factor data, and then carrying out normalization processing;
and carrying out normalization processing on the product operation data.
Specifically, the product sample data includes historical sales data, economic factor data, natural factor data, and product operation data. According to the embodiment of the invention, the sales volume of the future 12 months can be predicted according to the product sample data of the previous n months, model iteration is carried out on the basis of previous month data every month, and the sales volume is predicted in a rolling mode.
Here, taking an excavator as an example, the product historical sales data is sales numbers of micro-excavation, small-excavation, medium-excavation and large-excavation in each market. The economic factor data comprises more than 1000 indexes such as GDP (total domestic production value) reflecting the whole economic condition, PMI (index of purchasing economy), fixed asset investment acceleration reflecting the entity industry condition, share-ratio acceleration and export acceleration of the retail total of social consumer goods, M2 reflecting the financial system condition, deposit standard interest rate, deposit reserve money, CPI (price index of consumer goods) reflecting the individual living condition, PPI (factory price index of industrial producers) and the like.
The natural factor data includes weather data, regional characteristic data, season/month data, and holiday data. The weather data comprises cloudy, sunny, rainy and snowy weather, air temperature, wind direction, wind power, air pressure, humidity, visibility, special disastrous weather and the like in the area, the construction of the excavator is difficult in rainy and snowy weather, and the sales volume can be reduced. The regional characteristic data comprises natural geographic conditions, social and economic activities, population conditions, urbanization level, regional openness degree, external connection and the like, for example, large-sized excavation and sales are more in places with more mines, and medium-sized excavation and sales are mainly used in places with high urbanization level. The season/month data includes spring, summer, autumn and winter and 1-12 months, for example, the engine digging sales in the month of thirty-four can be increased significantly. The holiday data comprises spring festival, five-one festival, national day and other festivals, and for example, the sales volume of the excavator is obviously different before and after the spring festival.
The product operation data comprises equipment operation time length data and equipment operation rate data which can be calculated by equipment working condition data stored in a big data platform, and the calculation formula is as follows:
Figure BDA0003285498190000091
Figure BDA0003285498190000092
wherein T represents the equipment operation time length, R represents the equipment operation rate, n is the total quantity of the equipment, TiFor the time length of the equipment working on the day (unit h, t)iNot less than 1). Length of time of operation of the equipmentThe data and the equipment operating rate data directly reflect the market condition of a certain area, the equipment operating time is long, the equipment operating rate is high, the market of the area is better, the demand of the excavator is large, and the sales volume can be correspondingly increased.
After obtaining the product sample data, the product sample data may be preprocessed, which specifically includes: historical sales data, economic factor data, natural factor data, and product operational data
For historical sales data: the method is structured firstly, and the data of provinces, cities and dates are arranged into a proper format according to machine types (micro digging, small digging, middle digging and large digging). And secondly, processing the NA value and the negative value in the structured data, replacing the NA value with a value of 0, verifying the meaning represented by the specific negative value for the negative value, if the negative value is the return condition of sales, still replacing the negative value data with 0, and if the negative value is an artificial input error, extracting the data again for calculation.
For economic factor data: due to the fact that economic factor data are more, dimension disasters can be caused and the performance of the model is affected if all dimensions are input into the model, therefore, random forests are used for sorting the importance of the features according to the information gain, the first 20 features with the highest information gain are selected, the interpretability of the model is guaranteed, and auxiliary decision making is facilitated.
For natural factor data: such as weather data, regional characteristic data, season/month data, holiday data, can be subjected to binning or one-hot processing according to data conditions.
Meanwhile, considering that the difference of partial characteristic dimensions is large, the gradient is slowly reduced when a deep learning model is trained subsequently, and in order to improve the convergence speed of the model, Min-max normalization processing can be performed on the data by adopting Min-max.
Based on any of the above embodiments, the machine learning model includes at least two of a combined network model, a LightGBM model, an RNN network model, and a CNN network model, and the combined network model is obtained based on an ARIMA model and a BP network model.
Specifically, the ARIMA model and the BP network model have advantages in predicting linear data and non-linear data respectively, so that combining the two models can receive a good result, and it is assumed that the time series Y can be regarded as a combination of the linear autocorrelation portion L and the non-linear residual R, that is, Y is L + R. The combined model constructed by the invention is as follows:
firstly, an ARIMA model is utilized to model a linear part, and a prediction result is recorded as
Figure BDA0003285498190000103
At the moment, the residual error is R, and regression is established according to the corresponding characteristics of economic factor data, product operation data and the like
A prediction model, obtaining a prediction result of
Figure BDA0003285498190000101
Final predicted result
Figure BDA0003285498190000102
It should be noted that before training the combined network model by using the product sample data, the historical sales data needs to be smoothed, and the specific reason is that:
first, the data structure of time series data differs from the conventional data structure in that a plurality of observations are available for conventional random variables. In time series data, each random variable only has one observed value, and the data is too small to study the distributed trace. But through stationarity, the internal correlation is found among the distributions of different dates, and the problem of low estimation precision caused by small sample capacity is solved.
Secondly, the final purpose of researching the time series is to predict the future, but the future is unknown, and the data owned by the people is history, so that the future can be predicted only by using the history data. But if the past data does not have some similarity to the future, then the prediction is not reasonable. Smoothness is to ensure the similarity between the past and the future, and if the data is smooth, the past data can be considered to show some properties and the future can also show the properties. The stationarity is divided into strict stationarity and wide stationarity.
The embodiment of the invention can adopt a wide and steady judgment method, and the main reason is that the strict and steady condition is too strong, so that it is generally difficult to prove that a time sequence is strict and steady in theory or practice, and particularly when the distribution is complicated, not only is it difficult to compare all the possibilities, but also it is difficult to write a combined distribution function. In the embodiment of the invention, whether the time sequence is stable or not is judged on the graph, and if not, the data is subjected to stabilization processing. A comparative example of the smoothing process is shown in fig. 2, and a Dickey-Fuller test is adopted to test the stationarity from the probability value, and the specific test result is shown in fig. 3:
in addition, for the time series, a traditional time series model is adopted, so that the time series data is disassembled into a trend term, a period term and a residual error, and the trend term, the period term and the residual error are specifically shown in fig. 4.
In the parameter adjusting process of the ARIMA model, three parameters of the ARIMA model are as follows: p, d, q, the basic steps of parameter adjustment are firstly determining d, firstly observing whether the time sequence is a stable sequence or not, and carrying out difference on a non-stable sequence, wherein the difference order is the numerical value of d. After d-order difference, the autocorrelation coefficient ACF and the partial autocorrelation coefficient PACF of the stationary time sequence are respectively obtained, and the optimal order p and the order q can be obtained by analyzing the autocorrelation graph and the partial autocorrelation graph. The resulting d, p, q determine the parameters of the ARIMA model. Wherein the correlation diagram and the autocorrelation diagram are shown in fig. 5.
For training of the BP network model, economic factor data, weather data, regional characteristic data, seasonal/month data, holiday data and the like are input into the BP network model, the BP network model can comprise an input layer, three hidden layers and an output layer, the number of nerve units of the hidden layers can be respectively 64, 256 and 64, and a drop _ out layer is added to inhibit overfitting. And taking the sales prediction residual R of the ARIMA model as a prediction target, and training the BP network model by using five-fold cross validation.
It will be appreciated that the combined network model has the combined predictions of the ARIMA model and the BP network model added.
For the construction of the LSTM network model, considering that the acquisition of data such as economic factors has hysteresis, and data of the previous month can only be acquired in the current month, the method shown in fig. 6 is adopted to divide training data, select appropriate hyper-parameters (including but not limited to learning rate, activation function, optimizer, etc.), and use five-fold cross validation to train the model. Wherein, the LSTM network model framework is shown in FIG. 7 and the memory cell structure is shown in FIG. 8.
For the construction of the CNN network model, considering that the acquisition of data such as macroscopic economic indicators has hysteresis, and data of the previous month can only be acquired in the current month, the method shown in fig. 6 is adopted to divide training data, appropriate hyper-parameters (including but not limited to learning rate, activation function, optimizer, etc.) are selected, model training is performed by using five-fold cross validation, and the frame of the CNN network model is shown in fig. 9.
For the construction of the LightGBM model, since the LightGBM model cannot directly input data within a period of time to the model like the LSTM network model and the CNN network model, feature extraction needs to be performed again, and for example, a part of features derived from historical sales data is shown in fig. 10:
statistical characteristics such as half-year quantity: the total amount, mean, maximum, minimum, standard deviation, skewness, kurtosis and the like of the sales volume of the sample in the first 6 months; total sales 1-3 months prior to the sample, 4-6 months prior; the sales mean of the sample 1-3 months before and 4-6 months before;
trend characteristics: the difference in sales between the first 1 month and the first 2 months of the sample; the difference between the sales of the sample in the first 1 month and the samples in the first three months; difference in the amount of the sample sold in the first 2 months and the first 3 months; difference in the amount of the sample sold in the first 2 months and the first 4 months; the total sales for the sample 1-3 months differed from the previous 4-6 months.
Ring ratio: the sales volume ring ratio 6 months before the sample;
ring ratio: the ratio of the first 6 months to the ratio of the adjacent two monthly rings;
meanwhile, the method is adopted to carry out feature derivation on economic factor data, weather data, regional characteristic data, season/month data, holiday data, equipment operation rate, equipment operation duration and the like, and comprises the steps of extracting statistical features such as maximum values, minimum values, mean values, variances, kurtosis, skewness and the like in a period of time, and carrying out identity-to-ring ratios and the like on the features.
And finally generating training sample data, inputting the training sample data into a LightGBM model, selecting appropriate hyper-parameters (including but not limited to a gradient lifting method, the number of trees, the maximum depth of the trees and the maximum number of leaves of the trees) and performing model training by using five-fold cross validation.
In order to avoid overlarge prediction error caused by the fluctuation of the prediction precision of the single model, a stacking method can be adopted to fuse the multiple models, so that the stability of a prediction result is ensured. The prediction result of each verification set is extracted when the ARIMA + BP combined network model, the CNN network model, the LSTM network model and the LightGBM model are subjected to five-fold cross verification, an n x 4 second-layer training set (n is the number of training set samples) is formed, and in order to avoid overfitting, the model on the second layer is not too complex, so that a linear regression model is selected. Among them, the Stacking fusion process is shown in FIG. 11.
In the prediction process, the data of the test set are respectively input into an ARIMA + BP combined network model, a CNN network model, an LSTM network model and a LightGBM model for prediction, the prediction results are combined into a second layer test sample set with m x 4(m is the number of test samples), and the trained linear regression model of the second layer is used for prediction to obtain the final prediction result. The Stacking prediction process is as shown in FIG. 12.
Based on any of the above embodiments, after obtaining the product sales prediction result output by the product sales prediction model, the method further includes: and displaying the product sales prediction result in a target format.
Specifically, after the product sales prediction result is obtained, the product sales prediction result may be displayed in a target format. The product sales prediction result can be directly browsed on a page, visually presented in a chart mode, exported excel is supported, a statistical chart is drawn in a user-defined mode, or data detail is quoted in document writing, and manual copying or copying from a webpage is avoided.
The product sales predicting apparatus according to the present invention is described below, and the product sales predicting apparatus described below and the product sales predicting method described above may be referred to in correspondence with each other.
Based on any of the above embodiments, the present invention further provides a product sales prediction apparatus, as shown in fig. 13, the apparatus including:
a determining unit 1310 for determining influence factor data of product sales;
the prediction unit 1320 is configured to input the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
According to any of the above embodiments, the prediction unit includes:
the initial prediction unit is used for inputting the influence factor data into an initial prediction layer of the product sales prediction model, and the initial prediction layer predicts the influence factor data respectively based on at least two machine learning models to obtain each initial sales prediction result;
and the fusion unit is used for inputting each initial sales prediction result into a result fusion layer of the product sales prediction model, and fusing all the initial sales prediction results by the result fusion layer to obtain the product sales prediction result.
Based on any embodiment above, still include: and the preprocessing unit is used for preprocessing the data of the product sample data before training an initial model of the product sales prediction model based on the product sample data and the product sales result corresponding to the product sample data.
Based on any one of the embodiments, the product sample data comprises historical sales data, economic factor data, natural factor data and product operation data;
the preprocessing unit comprises:
the first processing unit is used for sequentially carrying out data normalization processing and normalization processing on the historical sales data;
the second processing unit is used for acquiring the importance of each economic factor data, and carrying out normalization processing on each economic factor data after filtering the economic factor data with the importance smaller than the economic factor data corresponding to the preset value;
the third processing unit is used for performing box separation processing or single-hot coding processing on the natural factor data and then performing normalization processing;
and the fourth processing unit is used for carrying out normalization processing on the product operation data.
Based on any of the above embodiments, the machine learning model includes at least two of a combined network model, a LightGBM model, an RNN network model, and a CNN network model, and the combined network model is obtained based on an ARIMA model and a BP network model.
Based on any embodiment above, still include: and the display unit is used for displaying the product sales prediction result in a target format after obtaining the product sales prediction result output by the product sales prediction model.
Based on any of the above embodiments, the present invention further provides a product sales prediction system, as shown in fig. 14, which is formed by performing encapsulation deployment on the product sales prediction model established in any of the above embodiments. The system can schedule the model at regular time, and model iterative upgrade can be carried out according to the latest economic factor data, weather data, regional characteristic data, season/month data, holiday data, equipment operation rate data, equipment operation duration data and the like in the previous month every month, so that the model can continuously learn the latest information, and the rationality and accuracy of sales prediction are ensured.
The overall framework of the product sales prediction system can adopt a browser-server architecture (BS architecture), so that the requirements of user usability, system expandability (including models and data), cross-platform deployment and the like are fully considered, and the method specifically includes:
1) ease of use for the user
Under the BS framework, a user can operate only by accessing the website without installing a client, and the framework has no difference of an operating system.
Secondly, if the applied service logic changes, the algorithm upgrading is completely carried out in the background, and no additional operation is required by the user before and after the algorithm upgrading; the complexity of application operation is completely isolated at the server side, so that the method is transparent to users and better in user experience. The topology of the entire system is shown in fig. 15.
2) System extensibility
In order to make the software logic level clear, a system background is divided into four levels of a presentation layer, a service interaction layer, a business logic layer and a persistence layer, each sub-level is in a specific abstract level to provide higher-level services for the next level, calling is carried out between each level through an appointed network interface, dependence between the services is limited to dependence of the upper level and the lower level, and dependence relationship between the services is limited through layering. The API interface specification of the upper and lower layer services can be easily replaced. Even implemented using different languages and technologies. The hierarchical model of the product sales prediction system is shown in fig. 16.
Meanwhile, due to the fact that a predicted algorithm is heavy, a large number of system resources are consumed during operation, and the difference between the predicted algorithm and the deployment and operation instance number of the web service is large, the service background is split into different services according to different services when being built. And in the later period, if the number of users is increased suddenly, the algorithm service cannot respond to the analysis requirements of the users in time, and the new nodes with the same functions as the existing algorithm service nodes are added, and then the configuration (combined with Ribbon service) is carried out in the Feign client of the webservice, and the code is not required to be changed greatly. A single service can be easily extended to a cluster service so that incoming requests can be distributed among all servers, thereby solving the problem that the traditional CS architecture is difficult to extend horizontally. Meanwhile, languages used by the system service are Java and python, components such as data uploading and downloading, Web containers, gateway agents and the like are open source services written by the golang language, and the languages are cross-platform development languages. In the execution process of the Java webservice service, the Java webservice service is compiled into an intermediate language, and then is compiled, interpreted and executed for the second time by an interpreter, so that platform independence is ensured, and therefore, only JDKs of corresponding versions need to be installed in a Linux environment during deployment. The Python language is a pure interpretation execution language, a corresponding release edition is also available in Linux, and only a Python virtual machine and a dependency library of the corresponding edition are required to be installed. Although Golang is a compiling type language, when compiling, only a platform and a processor architecture of a target operating system need to be specified, and then a gcc environment of another platform can be called to realize cross compiling and publishing.
Fig. 17 is a schematic diagram of the product sales prediction system according to the present invention, and as shown in fig. 17, a dotted line frame is a product sales prediction system, and a marketer organizes new sales data according to a template every month and uploads the new sales data to the product sales prediction system, starts an analysis task of an uploaded successful file in a data management module, and the prediction system invokes a background distributed algorithm service to perform prediction analysis, thereby outputting a final result.
The predicted result can be directly browsed on a page, visualized presentation is realized in a chart mode, export of excel is supported, a statistical chart is drawn in a user-defined mode, or data detail is quoted in document writing, and manual copying or copying from the webpage is avoided.
Fig. 18 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 18, the electronic device may include: a processor (processor)1810, a communication Interface 1820, a memory (memory)1830, and a communication bus 1840, wherein the processor 1810, the communication Interface 1820, and the memory 1830 communicate with each other via the communication bus 1840. Processor 1810 may invoke logic instructions in memory 1830 to perform a product sales prediction method comprising: determining influence factor data of product sales; inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model; the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
In addition, the logic instructions in the memory 1830 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a product sales prediction method provided by the above methods, the method comprising: determining influence factor data of product sales; inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model; the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program that when executed by a processor is implemented to perform the product sales prediction methods provided above, the method comprising: determining influence factor data of product sales; inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model; the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for predicting product sales, comprising:
determining influence factor data of product sales;
inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
2. The method for predicting the product sales according to claim 1, wherein the step of inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model comprises:
inputting the influence factor data into an initial prediction layer of the product sales prediction model, and predicting the influence factor data by the initial prediction layer based on at least two machine learning models to obtain each initial sales prediction result;
and inputting each initial sales prediction result into a result fusion layer of the product sales prediction model, and fusing all the initial sales prediction results by the result fusion layer to obtain the product sales prediction result.
3. The method of claim 1, wherein before training the initial model of the product sales prediction model based on the product sample data and the product sales results corresponding to the product sample data, the method further comprises: and carrying out data preprocessing on the product sample data.
4. The product sales prediction method of claim 3, wherein the product sample data comprises historical sales data, economic factor data, natural factor data, and product operational data;
the data preprocessing of the product sample data comprises:
sequentially carrying out data normalization processing and normalization processing on the historical sales data;
acquiring the importance of each economic factor data, and carrying out normalization processing on each economic factor data after filtering out economic factor data with the importance smaller than the economic factor data corresponding to a preset value;
performing box separation processing or single-hot coding processing on the natural factor data, and then performing normalization processing;
and carrying out normalization processing on the product operation data.
5. The product sales prediction method of any of claims 1 to 4, wherein the machine learning model comprises at least two of a combined network model, a LightGBM model, a RNN network model, and a CNN network model, and wherein the combined network model is derived based on an ARIMA model and a BP network model.
6. The product sales prediction method according to any one of claims 1 to 4, further comprising, after obtaining the product sales prediction result output by the product sales prediction model: and displaying the product sales prediction result in a target format.
7. A product sales prediction apparatus, comprising:
the determining unit is used for determining the influence factor data of the product sales volume;
the prediction unit is used for inputting the influence factor data into a product sales prediction model to obtain a product sales prediction result output by the product sales prediction model;
the product sales forecasting model is obtained by training based on product sample data and a product sales result corresponding to the product sample data; and the product sales forecasting model is used for respectively obtaining initial sales forecasting results corresponding to the influence factor data based on at least two machine learning models, and fusing all the initial sales forecasting results to obtain the product sales forecasting results.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps of the product sales prediction method according to any of claims 1 to 6.
9. A non-transitory computer readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the product sales prediction method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the steps of the product sales prediction method according to any one of claims 1 to 6.
CN202111145771.6A 2021-09-28 2021-09-28 Product sales prediction method and device Pending CN113919558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111145771.6A CN113919558A (en) 2021-09-28 2021-09-28 Product sales prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111145771.6A CN113919558A (en) 2021-09-28 2021-09-28 Product sales prediction method and device

Publications (1)

Publication Number Publication Date
CN113919558A true CN113919558A (en) 2022-01-11

Family

ID=79236885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111145771.6A Pending CN113919558A (en) 2021-09-28 2021-09-28 Product sales prediction method and device

Country Status (1)

Country Link
CN (1) CN113919558A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529071A (en) * 2022-02-11 2022-05-24 杭州致成电子科技有限公司 Method for predicting power consumption of transformer area
CN117272846A (en) * 2023-11-22 2023-12-22 山东建筑大学 Dynamic response prediction algorithm for two-degree-of-freedom rotary pitching motion mechanism

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2961596A1 (en) * 2016-03-22 2017-09-22 Wal-Mart Stores, Inc. Event-based sales prediction
CN109685583A (en) * 2019-01-10 2019-04-26 博拉网络股份有限公司 A kind of supply chain needing forecasting method based on big data
CN111178624A (en) * 2019-12-26 2020-05-19 浙江大学 Method for predicting new product demand
KR20200131549A (en) * 2019-05-14 2020-11-24 카페24 주식회사 Item sales volume prediction method, apparatus and system using artificial intelligence model

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2961596A1 (en) * 2016-03-22 2017-09-22 Wal-Mart Stores, Inc. Event-based sales prediction
CN109685583A (en) * 2019-01-10 2019-04-26 博拉网络股份有限公司 A kind of supply chain needing forecasting method based on big data
KR20200131549A (en) * 2019-05-14 2020-11-24 카페24 주식회사 Item sales volume prediction method, apparatus and system using artificial intelligence model
CN111178624A (en) * 2019-12-26 2020-05-19 浙江大学 Method for predicting new product demand

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张雷东等: ""多种算法融合的产品销售预测模型应用"", 《计算机系统应用》, vol. 29, no. 9, 4 September 2020 (2020-09-04), pages 244 - 248 *
王辉等: ""Stacking集成学习方法在销售预测中的应用"", 《计算机应用与软件》, no. 8, 12 August 2020 (2020-08-12), pages 91 - 96 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529071A (en) * 2022-02-11 2022-05-24 杭州致成电子科技有限公司 Method for predicting power consumption of transformer area
CN117272846A (en) * 2023-11-22 2023-12-22 山东建筑大学 Dynamic response prediction algorithm for two-degree-of-freedom rotary pitching motion mechanism

Similar Documents

Publication Publication Date Title
KR101864286B1 (en) Method and apparatus for using machine learning algorithm
Perla et al. Equilibrium imitation and growth
CN110400022B (en) Cash consumption prediction method and device for self-service teller machine
CN110400021B (en) Bank branch cash usage prediction method and device
CN111178624B (en) New product demand prediction method
CN107563705A (en) Household electrical appliances product safety stock and the system and method ordered goods again are analyzed using big data
CN110516910A (en) Declaration form core based on big data protects model training method and core protects methods of risk assessment
CN113919558A (en) Product sales prediction method and device
CN108694673A (en) A kind of processing method, device and the processing equipment of insurance business risk profile
Islam et al. Extreme gradient boosting (XGBoost) method in making forecasting application and analysis of USD exchange rates against rupiah
CN116186548B (en) Power load prediction model training method and power load prediction method
CN109409561A (en) The construction method of Multiple Time Scales time series collaborative forecasting model
CN111144950A (en) Model screening method and device, electronic equipment and storage medium
Özdemir et al. A new modified artificial bee colony algorithm for energy demand forecasting problem
CN116776006B (en) Customer portrait construction method and system for enterprise financing
CN106779245B (en) Event-based civil aviation demand prediction method and device
CN113657990A (en) Ant-lion algorithm optimized NARX neural network risk prediction system and method
Xu et al. An improved credit card users default prediction model based on RIPPER
CN116865254A (en) Power load index prediction method, system, equipment and medium
CN116523622A (en) Object risk prediction method and device, electronic equipment and storage medium
CN109741172A (en) Credit method for early warning, device, system and storage medium
CN112950350B (en) Loan product recommendation method and system based on machine learning
CN112231299A (en) Method and device for dynamically adjusting feature library
CN110135647A (en) A kind of control method and control device for realizing trend prediction based on feature modeling
CN112418260A (en) Model training method, information prompting method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination