Commodity sales volume prediction method and device, equipment and storage medium
By calculating the similarity between the product prediction scenario and the existing sales prediction model setting scenario, and automatically selecting and using the closest sales prediction model, the problems of inefficiency and dependence on manual experience in the existing technology are solved, and more accurate and efficient product sales prediction is achieved.
Patent Information
- Application Number
- CN202411774357.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art has problems of inefficiency and dependence on manual experience in commodity sales forecasting, especially when new scenarios appear, it is difficult to quickly adapt to multiple sales forecast models.
By obtaining the scene similarity between the prediction scenario information of the product to be predicted and the set scene information of the existing sales prediction model, the closest sales prediction model is automatically selected, and the second sales prediction value is calculated based on the first sales prediction value and the scene similarity of the model.
It improves the accuracy and efficiency of product sales forecasts, reduces the dependence on manual experience, and can better adapt to sales forecasts in new scenarios.
Smart Images

Figure CN119831633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a commodity sales forecasting method, device, equipment and storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, artificial intelligence has been widely used in many fields. For commodity sales, using artificial intelligence technology to predict sales has many benefits. For example, when a store predicts the sales of a commodity, it can ensure that the commodity is sufficient and there is no oversupply of the commodity, which will lead to waste.
[0003] At present, in order to predict the sales volume of a product, different sales prediction models are first established according to different scenarios of the product, and then the sales prediction models are prioritized by manual experience. When a new scenario appears, the model with the highest priority is selected from the existing scenarios as the final sales prediction model.
[0004] Artificially selecting sales forecast models is inefficient and requires strong manual experience, and cannot adapt to situations where there are many sales forecast models. Summary of the invention
[0005] The embodiments of the present application provide a sales forecasting method, apparatus, device and storage medium for improving the efficiency of commodity sales forecasting.
[0006] In a first aspect, an embodiment of the present application provides a sales forecasting method, which is applicable to forecasting sales of commodities in a new scenario, including:
[0007] Obtain the forecast scenario information indicated by the product to be forecasted in the sales forecast task;
[0008] For any sales prediction model, determining the scene similarity between the set scene information corresponding to the sales prediction model and the prediction scene information; each sales prediction model is trained based on sample data that conforms to the respective set scene information;
[0009] Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
[0010] In an embodiment of the present application, the similarity between the prediction scenario information of the product to be predicted and the set scenario information of the existing sales prediction model is used to determine which sales prediction model's scenario the product to be predicted is closer to, and the second sales prediction value of the product to be predicted is determined based on the closer sales prediction model and the first sales prediction value of the sales prediction model. This makes the sales prediction of the product to be predicted more accurate, eliminates the need for manual selection of the sales prediction model, and improves the accuracy and efficiency of the sales prediction of the product to be predicted.
[0011] Optionally, the determining, based on the first sales forecast value of the commodity to be predicted under the at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model, a second sales forecast value of the commodity to be predicted under the forecast scenario information includes:
[0012] Based on the first sales forecast value of the product to be predicted under at least one sales forecast model, the prediction accuracy corresponding to the at least one sales forecast model, and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the product to be predicted under the prediction scenario information is determined; the prediction accuracy corresponding to any sales forecast model is determined based on the corresponding first sales forecast value and the actual sales value.
[0013] In an embodiment of the present application, by calculating the first sales prediction value and the actual sales prediction value, the prediction accuracy of each sales prediction model can be determined, thereby determining the quality of the sales prediction model; the second sales prediction value of the product to be predicted is determined based on the prediction accuracy of the sales prediction model, the first sales prediction value, and the scene similarity, thereby using a sales prediction model that is relatively well trained as the sales prediction model for the product to be predicted, thereby improving the accuracy of determining the sales volume of the product to be predicted.
[0014] Optionally, the determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information includes:
[0015] Determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model; or determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model and the prediction accuracy corresponding to the at least one sales forecast model;
[0016] Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the weight information corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
[0017] In an embodiment of the present application, by determining the weight information of each sales prediction model based on the scene similarity and prediction accuracy of the sales prediction model, when the sales prediction model is used to perform sales prediction, the output results of the better model account for a larger proportion, thereby enabling more accurate sales prediction of the predicted product.
[0018] Optionally, the determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information includes:
[0019] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model; or determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model;
[0020] The first sales forecast value of the commodity to be predicted under the target forecasting model is used as the second sales forecast value of the commodity to be predicted under the forecasting scenario information.
[0021] In an embodiment of the present application, a target prediction model is determined from the sales prediction model based on the scene similarity and prediction accuracy of the sales prediction model. The target prediction model has the characteristics of high accuracy and high scene similarity. By using the target prediction model to predict the sales of the predicted product, the sales of the predicted product can be predicted more accurately.
[0022] Optionally, determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model includes:
[0023] From among the sales forecasting models, the sales forecasting model with the highest scenario similarity is determined as the target forecasting model; or
[0024] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model includes:
[0025] From the sales forecasting models, the sales forecasting model with the highest prediction accuracy among the top N sales forecasting models with the highest scene similarity is determined as the target forecasting model.
[0026] In an embodiment of the present application, by taking the corresponding sales prediction model with the highest scene similarity as the target model, or selecting the sales prediction model with the highest prediction accuracy from the sales prediction models with higher scene similarity as the target prediction model based on the prediction accuracy, the reliability of the sales prediction model is improved, thereby improving the accuracy of the sales prediction.
[0027] Optionally, before determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information, the method further includes:
[0028] Determining that no instruction to specify a sales forecast model has been received; the method further includes:
[0029] If an instruction for specifying a sales forecasting model is received, the second sales forecast value of the product to be forecasted under the forecasting scenario information is determined according to the sales forecasting model specified in the instruction.
[0030] In an embodiment of the present application, before using the above method to predict the sales volume of the predicted product, it is determined whether there is manual experience. If so, the manual experience is used to determine the sales prediction model; if not, the above method is used to determine the sales prediction value. By adding manual experience, the sales prediction results of the present application are made more accurate.
[0031] Optionally, the set scenario information corresponding to each sales forecasting model is set through a scenario configuration file; the scenario configuration file includes a field name of at least one scenario level and field values corresponding to the field name of the same scenario level in different scenarios.
[0032] In a second aspect, the embodiment of the present application provides a commodity sales forecasting method and device, which is suitable for forecasting sales of commodities in new scenarios, including:
[0033] An acquisition module, used to acquire the prediction scenario information indicated by the commodity to be predicted in the sales volume prediction task;
[0034] A determination module, for determining, for any sales forecasting model, the scene similarity between the set scene information corresponding to the sales forecasting model and the forecasting scene information; each sales forecasting model is trained based on sample data that conforms to the respective set scene information;
[0035] The determination module is also used to determine the second sales forecast value of the commodity to be predicted under the prediction scenario information based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model.
[0036] Optionally, the determining module is further used for:
[0037] Based on the first sales forecast value of the product to be predicted under at least one sales forecast model, the prediction accuracy corresponding to the at least one sales forecast model, and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the product to be predicted under the prediction scenario information is determined; the prediction accuracy corresponding to any sales forecast model is determined based on the corresponding first sales forecast value and the actual sales value.
[0038] Optionally, the determining module is further used for:
[0039] Determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model; or determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model and the prediction accuracy corresponding to the at least one sales forecast model;
[0040] Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the weight information corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
[0041] Optionally, the determining module is further used for:
[0042] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model; or determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model;
[0043] The first sales forecast value of the commodity to be predicted under the target forecasting model is used as the second sales forecast value of the commodity to be predicted under the forecasting scenario information.
[0044] Optionally, the determining module is specifically used to:
[0045] From among the sales forecasting models, the sales forecasting model with the highest scenario similarity is determined as the target forecasting model; or
[0046] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model includes:
[0047] From the sales forecasting models, the sales forecasting model with the highest prediction accuracy among the top N sales forecasting models with the highest scene similarity is determined as the target forecasting model.
[0048] Optionally, the determining module is further used for:
[0049] Determining that no instruction to specify a sales forecast model has been received; the method further includes:
[0050] If an instruction for specifying a sales forecasting model is received, the second sales forecast value of the product to be forecasted under the forecasting scenario information is determined according to the sales forecasting model specified in the instruction.
[0051] Optionally, the set scenario information corresponding to each sales forecasting model is set through a scenario configuration file; the scenario configuration file includes a field name of at least one scenario level and field values corresponding to the field name of the same scenario level in different scenarios.
[0052] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program executable by a computer device, wherein when the program is run on the computer device, the computer device executes the steps of the above method.
[0054] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above method.
[0055] In an embodiment of the present application, the similarity between the prediction scenario information of the product to be predicted and the set scenario information of the existing sales prediction model is used to determine which sales prediction model's scenario the product to be predicted is closer to, and the second sales prediction value of the product to be predicted is determined based on the closer sales prediction model and the first sales prediction value of the sales prediction model. This makes the sales prediction of the product to be predicted more accurate, eliminates the need for manual selection of the sales prediction model, and improves the accuracy and efficiency of the sales prediction of the product to be predicted. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0057] Figure 1 A system architecture diagram provided for an embodiment of the present application;
[0058] Figure 2 A flow chart of a method for predicting commodity sales volume provided in the present application Figure 1 ;
[0059] Figure 3A flowchart of a method for predicting commodity sales provided in an embodiment of the present application Figure 2 ;
[0060] Figure 4 A flowchart of a method for predicting commodity sales provided in an embodiment of the present application Figure 3 ;
[0061] Figure 5 A schematic diagram of the structure of a commodity sales forecasting device provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] To facilitate understanding of this solution, the application scenario of this solution is introduced below.
[0065] In order to understand the sales of goods and avoid the phenomenon of insufficient supply or oversupply, stores will regularly forecast the sales of goods. And when forecasting the sales of goods, in order to have a more comprehensive understanding of the sales of goods, stores will forecast the sales of goods from multiple dimensions. At present, sales forecasting models include machine learning models, deep learning models and other forecasting models, but when the final forecast of the sales of goods is made, which model to use often depends on manual experience or expert experience. There is no universal model selection device. Manual selection will obviously bring about inefficiency problems and is prone to errors. Therefore, the present invention proposes a method for forecasting the sales of goods, which can automatically and efficiently select the most suitable model, and can improve the accuracy of sales forecasting. The process of this application is described in detail below:
[0066] First, for different scenarios, this application uses sample data to train sales prediction models for each scenario, and determines the prediction accuracy of each sales prediction model by comparing the actual sales value of the sample data with the sales prediction value output by the prediction model. When it is necessary to predict the sales of goods in a new scenario, the goods to be predicted are input into the trained sales prediction models of each scenario to obtain the predicted sales of the goods to be predicted. By comparing the similarity between the scene where the goods to be predicted are located and the scene corresponding to the sales prediction model, and the prediction accuracy corresponding to the sales prediction model, the weight values of each sales prediction model are determined, and the sales prediction value is multiplied by the weight value of the corresponding sales prediction model to obtain the sales prediction value of the goods to be predicted; or, according to the scene similarity and the prediction accuracy corresponding to the sales prediction model, a target prediction model is determined, which can be the sales prediction model with the highest scene similarity as the target prediction model, or the scene similarity and prediction accuracy can be combined to determine a target model. The goods to be predicted are input into the target prediction model to obtain the sales prediction value of the goods to be predicted.
[0067] See also Figure 1 , is a system architecture diagram provided in an embodiment of the present application, the system architecture includes a terminal device 101 and a server 102.
[0068] The terminal device 101 is pre-installed with a service application for text matching, wherein the service application is a client application, a web application, a small program application, etc. The terminal device 101 can be a smart phone, a POS machine, a desktop notebook, a computer, etc., but is not limited thereto.
[0069] Server 102 is the backend server for business applications. Server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), as well as big data and artificial intelligence platforms.
[0070] See also Figure 2 , is a flow chart of a commodity sales forecasting method provided in an embodiment of the present application. The commodity sales forecasting method provided in the present application is applicable to forecasting the sales of commodities in a newly added scenario, and includes the following steps:
[0071] Step 201: Obtain prediction scenario information indicated by the commodity to be predicted in the sales forecasting task.
[0072] Specifically, the goods to be predicted are the goods whose sales volume a store needs to estimate, which can be vegetables, such as potatoes and tomatoes, or fresh produce, such as pork and beef. The sales volume prediction task is to predict the sales volume of any product, such as predicting the sales volume of potatoes tomorrow or next week. The prediction scenario information refers to the attributes of the product itself or the environment in which it is used. For example, the prediction scenario information of potatoes and tomatoes is vegetables, and the prediction scenario information of pork and beef is fresh produce.
[0073] Step 202: for any sales prediction model, determine the scene similarity between the set scene information corresponding to the sales prediction model and the prediction scene information; each sales prediction model is trained based on sample data that conforms to the respective set scene information.
[0074] Specifically, the sales prediction model is obtained by pre-training based on the scene information of the commodity. For example, vegetables such as potatoes and tomatoes are input into the sales prediction model to obtain a sales prediction model for vegetables, and fresh products such as pork and beef are input into another sales prediction model to obtain another sales prediction model for fresh products. According to any sales prediction model, the similarity between the prediction scene information of the commodity to be predicted and the set scene information corresponding to each sales prediction model is calculated, that is, the similarity between the scene information to which the commodity to be predicted belongs and the scene information to which each sales prediction model belongs is calculated.
[0075] Step 203: Determine a second sales forecast value of the commodity to be predicted under the prediction scenario information based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to at least one sales forecast model.
[0076] Specifically, the product to be predicted is input into each sales prediction model to obtain the first sales prediction value of the product to be predicted. According to the similarity between the prediction scenario information of the product to be predicted and the scenarios corresponding to each sales prediction model, the second sales prediction value of the product to be predicted is determined. The second sales prediction value is the sales prediction value of the product to be predicted.
[0077] In some embodiments, based on the first sales forecast value of the commodity to be forecasted under at least one sales forecast model and the scene similarity corresponding to at least one sales forecast model, determining the second sales forecast value of the commodity to be forecasted under the forecast scene information includes:
[0078] Based on the first sales forecast value of the product to be predicted under at least one sales forecast model, the prediction accuracy corresponding to at least one sales forecast model, and the scene similarity corresponding to at least one sales forecast model, the second sales forecast value of the product to be predicted under the prediction scene information is determined; the prediction accuracy corresponding to any sales forecast model is determined based on the corresponding first sales forecast value and the actual sales value.
[0079] Specifically, any sales forecasting model has its own forecasting accuracy. The forecasting accuracy is determined based on the first sales forecast value and the actual sales value of the commodity to be forecasted, and reflects the accuracy of the sales forecasting model in forecasting the sales of the commodity.
[0080] The product to be predicted is input into multiple sales forecasting models to obtain multiple first sales forecast values. At the same time, the similarity between the prediction scenario information of the product to be predicted and the scenarios corresponding to each sales forecasting model, as well as the prediction accuracy corresponding to each sales forecasting model are calculated to determine the second sales forecast value of the product to be predicted.
[0081] In an embodiment of the present application, the similarity between the prediction scenario information of the product to be predicted and the set scenario information of the existing sales prediction model is used to determine which sales prediction model's scenario the product to be predicted is closer to, and the second sales prediction value of the product to be predicted is determined based on the closer sales prediction model and the first sales prediction value of the sales prediction model. This makes the sales prediction of the product to be predicted more accurate, eliminates the need for manual selection of the sales prediction model, and improves the accuracy and efficiency of the sales prediction of the product to be predicted.
[0082] In some embodiments, the second sales forecast value of the commodity to be forecasted under the forecast scenario information is determined, such as Figure 3 As shown, the following steps are included:
[0083] Step 301: determine weight information corresponding to at least one sales forecast model based on the scene similarity corresponding to at least one sales forecast model; or determine weight information corresponding to at least one sales forecast model based on the scene similarity corresponding to at least one sales forecast model and the prediction accuracy corresponding to at least one sales forecast model.
[0084] Specifically, when determining the second sales volume forecast value of the commodity to be forecasted under the forecast scenario information, it can be determined in the following manner:
[0085] First, according to the similarity between the prediction scene information of the commodity to be predicted and the setting scene information of each sales prediction model, the weight information corresponding to each sales prediction model is determined. The similarity calculation can be determined according to the similarity between the phrases contained in the prediction scene information of the commodity to be predicted and the phrases contained in the setting scene information. The sales prediction results of the sales prediction model with higher similarity are given higher weight values, and the sales prediction results of the sales prediction model with lower similarity are given lower weight values.
[0086] Second, according to the similarity between the prediction scenario information of the commodity to be predicted and the setting scenario information of each sales prediction model, as well as the prediction accuracy corresponding to each sales prediction model, the weight value corresponding to each sales prediction model is determined.
[0087] For example, when determining the predicted sales volume of potatoes, it is known that there are three sales volume prediction models, namely, the vegetable sales volume prediction model, the fresh food sales volume prediction model and the fruit sales volume prediction model. Based on the prediction scenario information of potatoes, i.e., vegetables, the similarities with the vegetable sales volume prediction model, the fresh food sales volume prediction model and the fruit sales volume prediction model are calculated respectively, and the similarity with the vegetable sales volume prediction model is 70%, the similarity with the fresh food sales volume prediction model is 1%, and the similarity with the fruit sales volume prediction model is 29%. Based on the similarity, the weight information of the vegetable sales volume prediction model is determined to be 0.7, the weight information of the fresh food sales prediction model is 0.2, and the weight information of the fruit sales prediction model is 0.1. Or,
[0088] After calculating the similarity between potatoes and the three sales prediction models, the prediction accuracy of the vegetable sales prediction model, the fresh sales prediction model, and the fruit sales prediction model is determined. The prediction accuracy is determined when the prediction model is trained, and is obtained based on the first sales prediction value and the actual sales prediction value. The prediction accuracy is: 0.8 for the vegetable sales prediction model, 0.9 for the fresh sales prediction model, and 0.6 for the fruit sales prediction model. Then the similarity can be combined with the prediction accuracy of each sales prediction model, such as multiplying the similarity with the prediction accuracy to determine the final weight value of the sales prediction model. The weight information of the vegetable sales prediction model is 0.7*0.8=0.56, the weight information of the fresh sales prediction model is 0.2*0.9=0.18, and the weight information of the fruit sales prediction model is 0.1*0.6=0.06.
[0089] Step 302: Determine a second sales forecast value of the commodity to be predicted under the prediction scenario information based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and weight information corresponding to at least one sales forecast model.
[0090] Specifically, the commodity to be predicted is input into each sales forecasting model to obtain multiple first sales forecast values of the commodity to be predicted, and then the weight information of each sales forecasting model is obtained, and the second sales forecast value of the commodity to be predicted is determined based on the weight information and the first sales forecast value.
[0091] For example, the commodity to be predicted, potatoes, are input into the vegetable sales forecast model, the fresh sales forecast model, and the fruit sales forecast model respectively, and the first sales forecast values of potatoes are 20 tons, 50 tons, and 25 tons respectively. When determining the second sales forecast value of potatoes, the value with the largest weight information can be selected from the three sales forecast models as the second sales forecast value of potatoes, that is, 20 tons of the vegetable sales forecast model is the second sales forecast value of potatoes. Alternatively, the first sales forecast value of potatoes can be weighted and summed according to the weight information of the three sales forecast models to obtain the second sales forecast value of potatoes, and the result is: 20*0.7+50*0.2+25*0.1=26.5 (tons); or, 20*0.56+50*0.18+25*0.06=21.7 (tons).
[0092] In an embodiment of the present application, by determining the weight information of each sales prediction model based on the scene similarity and prediction accuracy of the sales prediction model, when the sales prediction model is used to perform sales prediction, the output results of the better model account for a larger proportion, thereby enabling more accurate sales prediction of the predicted product.
[0093] In some embodiments, the second sales forecast value of the commodity to be forecasted under the forecast scenario information is determined, such as Figure 4 As shown, the following steps are included:
[0094] Step 401: determine a target prediction model from each sales prediction model based on the scenario similarity corresponding to at least one sales prediction model; or determine a target prediction model from each sales prediction model based on the scenario similarity corresponding to at least one sales prediction model and the prediction accuracy corresponding to at least one sales prediction model.
[0095] Specifically, the target prediction model is the model that is ultimately used to predict the sales volume of the predicted product. When determining the target prediction model, it can be obtained in the following ways:
[0096] 1. According to the prediction scenario information of the product to be predicted and the setting scenario information of each sales prediction model, the target prediction model is determined according to the similarity.
[0097] 2. Calculate the prediction accuracy of each sales prediction model, and determine the target prediction model based on the sales prediction models and similarities.
[0098] Step 402: The first sales forecast value of the commodity to be forecasted under the target forecasting model is used as the second sales forecast value of the commodity to be forecasted under the forecasting scenario information.
[0099] Specifically, the first sales forecast value obtained by inputting the commodity to be forecasted into the target forecasting model is the second sales forecast value of the commodity to be forecasted.
[0100] For example, if the target prediction model is a vegetable prediction model, potatoes are input into the vegetable prediction model, and the first sales prediction value of potatoes is 25 tons. Therefore, the second sales prediction value of potatoes is 25 tons.
[0101] In an embodiment of the present application, a target prediction model is determined from the sales prediction model based on the scene similarity and prediction accuracy of the sales prediction model. The target prediction model has the characteristics of high accuracy and high scene similarity. By using the target prediction model to predict the sales of the predicted product, the sales of the predicted product can be predicted more accurately.
[0102] In some embodiments, based on the scene similarity corresponding to at least one sales prediction model, a target prediction model is determined from each sales prediction model, including: from each sales prediction model, the sales prediction model with the highest scene similarity is determined as the target prediction model.
[0103] Specifically, the similarity between the scene information of the product to be predicted and the set scene information of each sales prediction model is calculated. If the scene similarity is the highest, it is considered that the scene of the product to be predicted is similar to the scene of the sales prediction model, and the corresponding sales prediction model with the highest scene similarity is used as the target prediction model.
[0104] For example, when predicting potato sales, the prediction scenario information of potatoes (i.e. vegetables) is calculated, and the similarities with the vegetable sales prediction model, fresh food sales prediction model, and fruit sales prediction model are 70%, 1%, and 29%, respectively. The vegetable sales model is used as the target prediction model.
[0105] In some embodiments, based on the scene similarity corresponding to at least one sales prediction model and the prediction accuracy corresponding to at least one sales prediction model, a target prediction model is determined from each sales prediction model, including: from each sales prediction model, the sales prediction model with the highest prediction accuracy among the top N sales prediction models with the highest scene similarity is determined as the target prediction model.
[0106] Specifically, the prediction accuracy of each sales prediction model is calculated, and under the premise of known scene similarity, the top N sales prediction models with the highest scene similarity are determined, and from the top N sales prediction models, the one with the highest prediction accuracy is selected as the target prediction model.
[0107] For example, when predicting potato sales, the prediction accuracy of the vegetable sales prediction model, the fresh sales prediction model and the fruit sales prediction model are calculated, which are 0.8, 0.9 and 0.6 respectively. The prediction scene information of potatoes (i.e. vegetables) is known, and the similarities with the vegetable sales prediction model, the fresh sales prediction model and the fruit sales prediction model are 70%, 1% and 29% respectively. The top two sales prediction models with the highest similarity are: vegetable sales prediction model and fruit sales prediction model. The prediction accuracy of the vegetable sales prediction model is 0.8, and the prediction accuracy of the fruit sales prediction model is 0.6. The vegetable sales prediction model is used as the target prediction model.
[0108] In an embodiment of the present application, by taking the corresponding sales prediction model with the highest scene similarity as the target model, or selecting the sales prediction model with the highest prediction accuracy from the sales prediction models with higher scene similarity as the target prediction model based on the prediction accuracy, the reliability of the sales prediction model is improved, thereby improving the accuracy of the sales prediction.
[0109] In some embodiments, before determining the second sales volume forecast value of the commodity to be forecasted under the forecast scenario information, the method further includes:
[0110] Determine that no instruction for specifying a sales forecast model has been received; the method also includes: if an instruction for specifying a sales forecast model is received, determine the second sales forecast value of the product to be predicted under the forecast scenario information according to the sales forecast model specified in the instruction.
[0111] Specifically, the instruction for specifying the sales forecast model is to instruct the sales forecast model based on manual experience or expert experience. If the instruction is received, the sales forecast of the commodity to be forecasted is performed according to the sales forecast model specified in the instruction; if the instruction is not received, the sales forecast of the commodity to be forecasted is performed using the above method.
[0112] For example, when predicting the sales volume of potatoes, if an instruction to specify a sales volume prediction model is received, and the instruction is to use the vegetable sales volume prediction model as the model for predicting the sales volume of potatoes, the potatoes are input into the vegetable sales volume prediction model to obtain the second sales volume prediction value of the potatoes; if no instruction to specify a sales volume prediction model is received, the above method is used to determine the second sales volume prediction value of the potatoes.
[0113] In an embodiment of the present application, before using the above method to predict the sales volume of the predicted product, it is determined whether there is manual experience. If so, the manual experience is used to determine the sales prediction model; if not, the above method is used to determine the sales prediction value. By adding manual experience, the sales prediction results of the present application are made more accurate.
[0114] In some embodiments, the set scenario information corresponding to each sales forecasting model is set through a scenario configuration file; the scenario configuration file includes a field name of at least one scenario level and field values corresponding to the field name of the same scenario level in different scenarios.
[0115] Specifically, the scenario configuration file contains the setting scenario information of the sales forecasting model. The configuration file includes multiple scenarios, and each scenario is divided into multiple scenario levels.
[0116] For example, in the scenario configuration file of the potato sales prediction model, potato sales are divided into three scenarios: [0,1] tons, (1,2] tons, and (2,999] tons. These three scenarios are further divided into three levels according to the city, namely Shanghai, Beijing, and other cities.
[0117] Based on the same technical concept, the embodiment of the present application provides a commodity sales forecasting device, which is suitable for forecasting the sales of commodities in new scenarios, such as Figure 5 As shown, the device 500 includes:
[0118] An acquisition module 501 is used to acquire prediction scenario information indicated by the commodity to be predicted in the sales volume prediction task;
[0119] The determination module 502 is used to determine, for any sales prediction model, the scene similarity between the set scene information corresponding to the sales prediction model and the prediction scene information; each sales prediction model is trained based on sample data that conforms to the respective set scene information;
[0120] The determination module 502 is further used to determine the second sales forecast value of the commodity to be predicted under the prediction scenario information based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model.
[0121] Optionally, the determining module 502 is further configured to:
[0122] Based on the first sales forecast value of the product to be predicted under at least one sales forecast model, the prediction accuracy corresponding to the at least one sales forecast model, and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the product to be predicted under the prediction scenario information is determined; the prediction accuracy corresponding to any sales forecast model is determined based on the corresponding first sales forecast value and the actual sales value.
[0123] Optionally, the determining module 502 is further configured to:
[0124] Determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model; or determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model and the prediction accuracy corresponding to the at least one sales forecast model;
[0125] Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the weight information corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
[0126] Optionally, the determining module 502 is further configured to:
[0127] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model; or determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model;
[0128] The first sales forecast value of the commodity to be predicted under the target forecasting model is used as the second sales forecast value of the commodity to be predicted under the forecasting scenario information.
[0129] Optionally, the determining module 502 is specifically configured to:
[0130] From among the sales forecasting models, the sales forecasting model with the highest scenario similarity is determined as the target forecasting model; or
[0131] Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model includes:
[0132] From the sales forecasting models, the sales forecasting model with the highest prediction accuracy among the top N sales forecasting models with the highest scene similarity is determined as the target forecasting model.
[0133] Optionally, the determining module 502 is further configured to:
[0134] Determining that no instruction to specify a sales forecast model has been received; the method further includes:
[0135] If an instruction for specifying a sales forecasting model is received, the second sales forecast value of the product to be forecasted under the forecasting scenario information is determined according to the sales forecasting model specified in the instruction.
[0136] Optionally, the set scenario information corresponding to each sales forecasting model is set through a scenario configuration file; the scenario configuration file includes a field name of at least one scenario level and field values corresponding to the field name of the same scenario level in different scenarios.
[0137] Based on the same technical concept, the embodiment of the present application provides a computer device, which may be a terminal or a server, such as Figure 6 As shown, it includes at least one processor 601 and a memory 602 connected to the at least one processor. The specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application. Figure 6 For example, the processor 601 and the memory 602 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, and the like.
[0138] In the embodiment of the present application, the memory 602 stores instructions that can be executed by at least one processor 601. The at least one processor 601 can execute the steps included in the above-mentioned commodity sales prediction method by executing the instructions stored in the memory 602.
[0139] The processor 601 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, by running or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601. In some embodiments, the processor 601 and the memory 602 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0140] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0141] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 602 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 602 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 602 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0142] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program that can be executed by a computer device. When the program runs on the computer device, the computer device executes the steps of the above-mentioned commodity sales forecasting method.
[0143] Based on the same inventive concept, an embodiment of the present application provides a computer program product, characterized in that the computer program product includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer device, the computer device executes the steps of the above-mentioned commodity sales forecasting method.
[0144] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0148] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A commodity sales forecasting method, characterized in that: Applicable to sales forecasting of products in new scenarios, including: Obtain the forecast scenario information indicated by the product to be forecasted in the sales forecast task; For any sales prediction model, determining the scene similarity between the set scene information corresponding to the sales prediction model and the prediction scene information; each sales prediction model is trained based on sample data that conforms to the respective set scene information; Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
2. The method according to claim 1, characterized in that The determining, based on the first sales forecast value of the commodity to be forecasted under the at least one sales forecast model and the scene similarity corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be forecasted under the forecast scene information includes: Based on the first sales forecast value of the product to be predicted under at least one sales forecast model, the prediction accuracy corresponding to the at least one sales forecast model, and the scenario similarity corresponding to the at least one sales forecast model, the second sales forecast value of the product to be predicted under the prediction scenario information is determined; the prediction accuracy corresponding to any sales forecast model is determined based on the corresponding first sales forecast value and the actual sales value.
3. The method according to claim 1 or 2, characterized in that The determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information includes: Determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model; or determine the weight information corresponding to the at least one sales forecast model based on the scene similarity corresponding to the at least one sales forecast model and the prediction accuracy corresponding to the at least one sales forecast model; Based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the weight information corresponding to the at least one sales forecast model, the second sales forecast value of the commodity to be predicted under the forecast scenario information is determined.
4. The method according to claim 1 or 2, characterized in that: The determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information includes: Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model; or determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model; The first sales forecast value of the commodity to be predicted under the target forecasting model is used as the second sales forecast value of the commodity to be predicted under the forecasting scenario information.
5. The method according to claim 4, characterized in that The determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model includes: From among the sales forecasting models, the sales forecasting model with the highest scenario similarity is determined as the target forecasting model; or Determining a target prediction model from the sales prediction models based on the scenario similarity corresponding to the at least one sales prediction model and the prediction accuracy corresponding to the at least one sales prediction model includes: From the sales forecasting models, the sales forecasting model with the highest prediction accuracy among the top N sales forecasting models with the highest scene similarity is determined as the target forecasting model.
6. The method according to claim 1 or 2, characterized in that: Before determining the second sales forecast value of the commodity to be forecasted under the forecast scenario information, the method further includes: Determining that no instruction to specify a sales forecast model has been received; the method further includes: If an instruction for specifying a sales forecasting model is received, the second sales forecast value of the product to be forecasted under the forecasting scenario information is determined according to the sales forecasting model specified in the instruction.
7. The method according to claim 1 or 2, characterized in that: The set scenario information corresponding to each of the sales forecast models is set through a scenario configuration file; the scenario configuration file includes a field name of at least one scenario level and field values corresponding to the field name of the same scenario level in different scenarios.
8. A commodity sales forecasting method and device, characterized in that: Applicable to sales forecasting of products in new scenarios, including: An acquisition module, used to acquire the prediction scenario information indicated by the commodity to be predicted in the sales volume prediction task; A determination module, for determining, for any sales forecasting model, the scene similarity between the set scene information corresponding to the sales forecasting model and the forecasting scene information; each sales forecasting model is trained based on sample data that conforms to the respective set scene information; The determination module is also used to determine the second sales forecast value of the commodity to be predicted under the prediction scenario information based on the first sales forecast value of the commodity to be predicted under at least one sales forecast model and the scenario similarity corresponding to the at least one sales forecast model.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of any one of the methods of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device. When the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 7.
11. A computer program product, characterized in that The computer program product comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer device, the computer device is caused to execute the steps of the method according to any one of claims 1 to 7.