Data processing method, data processing device and electronic equipment
By combining timing models and classifiers, analyzing historical sales data and influencing factors and adjusting the prediction increment value, the problems of inaccurate sales forecasts and insufficient stability in the existing technology are solved, and more efficient sales forecasts are achieved.
Patent Information
- Application Number
- CN202410994050.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
The existing time series model cannot analyze more variables related to the prediction target when predicting future sales, and the training of small sample data is not accurate enough, the stability is insufficient, the parameter adjustment is complex, and the number of training data and computing resources is high. .
Using a data processing method, a combination of timing model and classifier is used to determine whether the sales data is within the predefined target range based on historical sales data and sales impact factors, and improve the incremental value of the model prediction. Prediction accuracy.
It improves the accuracy and stability of sales forecasts, can process small sample data more effectively, reduces the demand for computing resources, and enhances the adaptability of the model.
Smart Images

Figure CN118941325A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a data processing method, a data processing device and an electronic device. Background Art
[0002] The current time series model only predicts sales in the future through historical time series data, and cannot analyze more variables related to the prediction target. Machine learning methods are difficult to accurately train small sample data, and are not stable enough. Parameter adjustment during model training is more complicated, and requires a high amount of training data and computing resources. Summary of the invention
[0003] Embodiments of the present application provide a data processing method, a data processing device, and an electronic device.
[0004] On the one hand, an embodiment of the present application provides a data processing method, including:
[0005] Based on the historical sales data, using the first model, determine the first sales data at time t;
[0006] Based on the historical sales data and sales influencing factors, using the second model, determine N target sales data intervals at time t;
[0007] determining whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0008] If the first sales data is within the first target sales data interval, determining the first sales data as the target sales data;
[0009] If the first sales data is not within the first target sales data interval, the second model is used to adjust the first sales data to obtain the target sales data.
[0010] Optionally, the method further includes:
[0011] Using the second model, N first probabilities of the incremental value of the target sales volume at the tth moment in N target sales volume data intervals are determined, and the first target sales volume data interval is the interval corresponding to the maximum probability among the N first probabilities.
[0012] Optionally, determining whether the first sales data is in a first target sales data interval among N target sales data intervals includes:
[0013] Obtaining an incremental value of a first sales volume in the first sales volume data, wherein the incremental value of the first sales volume represents a predicted sales increment at the tth moment relative to the previous moment;
[0014] Determine whether the incremental value of the first sales volume is within the first target sales volume data interval.
[0015] Optionally, if the first sales data is within the first target sales data interval, determining that the first sales data is target sales data includes:
[0016] If the incremental value of the first sales volume in the first sales volume data is within the first target sales volume data interval, the sales volume forecast value corresponding to the incremental value of the first sales volume at the tth moment is determined to be the target sales volume value at the tth moment.
[0017] Optionally, if the first sales data is not within the first target sales data interval, adjusting the first sales data using the second model to obtain the target sales data includes:
[0018] Using the second model to perform correction calculation on the incremental value of the first sales volume, to obtain a corrected incremental value of the first sales volume; wherein the corrected incremental value of the first sales volume represents the target sales increment at the tth moment relative to the previous moment;
[0019] The target sales value at the last moment is obtained based on the target sales value at the previous moment and the incremental value of the corrected first sales value.
[0020] Optionally, the using the second model to perform correction calculation on the incremental value of the first sales volume to obtain the corrected incremental value of the first sales volume includes:
[0021] Based on the N first probabilities of the incremental value of the target sales volume at the t-th moment in the N target sales volume data intervals and the average value of the target sales volume data intervals corresponding to each of the first probabilities, the corrected incremental value of the first sales volume is obtained.
[0022] Optionally, determining the first sales data at time t by using the first model based on the historical sales data includes:
[0023] The first model is used to perform time series forecasting calculation on the historical sales data to obtain first time series forecasting data, where the first time series data is the first sales data at the tth moment.
[0024] Optionally, the method further includes:
[0025] Based on the historical sales data, the first model is trained, and the trained first model is used to perform prediction calculations on the historical sales data to obtain corresponding sales prediction values.
[0026] On the other hand, an embodiment of the present application further provides a data processing device, including:
[0027] A first acquisition module is configured to determine first sales data at time t based on historical sales data using a first model;
[0028] A second acquisition module is configured to determine N target sales data intervals at the tth time using a second model based on the historical sales data and sales influencing factors;
[0029] a determination module configured to determine whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0030] A first processing module configured to determine that the first sales data is target sales data if the first sales data is within the first target sales data interval;
[0031] The second processing module is configured to adjust the first sales data using the second model to obtain the target sales data if the first sales data is not within the first target sales data interval.
[0032] The present application also provides another electronic device, including:
[0033] The memory is used to store the executable program; the processor is used to execute the executable program to implement the following steps:
[0034] Based on the historical sales data, using the first model, determine the first sales data at time t;
[0035] Based on the historical sales data and sales influencing factors, using the second model, determine N target sales data intervals at time t;
[0036] determining whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0037] If the first sales data is within the first target sales data interval, determining the first sales data as the target sales data;
[0038] If the first sales data is not within the first target sales data interval, the second model is used to adjust the first sales data to obtain the target sales data. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flowchart of a data processing method according to an embodiment of the present application;
[0040] Figure 2 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S300;
[0041] Figure 3 For the embodiments of this application Figure 1 A flowchart of an embodiment of step S500;
[0042] Figure 4 A schematic diagram of the structure of a data detection device according to an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present application;
[0044] Figure 6 This is a schematic diagram comparing sales forecasts obtained by a prediction method of a fusion time series model and a classifier with a prediction method of a traditional time series model in one embodiment of the present application. DETAILED DESCRIPTION
[0045] Various aspects and features of the present application are described herein with reference to the accompanying drawings.
[0046] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.
[0047] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0048] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.
[0049] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.
[0050] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
[0051] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.
[0052] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.
[0053] Figure 1 A data processing method provided by an embodiment of the present application is shown in FIG. Figure 1 As shown, including:
[0054] S100, based on the historical sales data, using the first model, determining the first sales data at the tth moment;
[0055] The data processing method of this embodiment is applied to the prediction model of sales data. First, the historical sales data of the product to be predicted is obtained. The historical sales data can be historical time series data. The historical time series data characterizes the trend of historical sales of the product to be predicted in the past period of time. After obtaining the historical sales data of the product to be predicted, the first sales data at the tth moment is determined based on the historical sales data using the first model. Specifically, the first model can be a time series model, for example, the first model can be a seasonal autoregressive integrated moving average model (SARIMA). By analyzing the historical time series data using the first model, the sales volume of the product to be predicted in the future period of time can be predicted, and the sales volume forecast value of the product to be predicted and the predicted sales volume increment can be obtained. The tth moment can be any moment in the future period of time. The first sales volume data at the tth moment may include the sales volume forecast value corresponding to the product to be predicted at the tth moment, and the predicted sales increment at the tth moment relative to the previous moment.
[0056] S200, based on the historical sales data and sales influencing factors, using a second model, determining N target sales data intervals at time t;
[0057] In this embodiment, after the first sales data at the tth moment is determined using the first model, the N target sales data intervals at the tth moment are determined using the second model based on the historical sales data and the sales influencing factors. Specifically, the sales influencing factors may be factors that affect the sales of the product to be predicted. For example, the sales influencing factors include at least one of the following: promotion activity schedule, product price index, competitive product price comparison, and macroeconomic indicators. The second model may be a classifier that trains and predicts sales data. For example, the second model may be a classifier built based on TensorFlow Decision Forests (TF-DF), which is a machine learning algorithm that integrates random forests, gradient boosting, and classification and regression trees, and can be used to process data classification and regression. By using the second model to calculate the historical time series data and related sales influencing factors, the sales volume of the product to be predicted in the future period can be predicted and classified, and the change range of the predicted sales volume of the product to be predicted can be obtained, that is, the growth or decline range of the predicted sales volume of the product to be predicted. Specifically, N target sales volume data intervals at the tth moment can be obtained. For example, the target sales volume data intervals may include: a first sales volume data interval, the first sales volume data interval is a decrease of 0 to 2000; a second sales volume data interval, the second sales volume data interval is an increase of 0 to 2000; a third sales volume data interval, the third sales volume data interval is an increase of 2000 to 4000; and a fourth sales volume data interval, the fourth sales volume data interval is an increase of 4000 to 6000.
[0058] S300, determining whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0059] In this embodiment, after the second model is used to determine the N target sales data intervals at the tth moment, it is determined whether the first sales data is in the first target sales data interval among the N target sales data intervals, so as to determine whether the first sales data predicted by the first model is the target sales data. Specifically, the first target sales data interval is the interval in which the increment of sales at the tth moment predicted by the second model relative to the previous moment is most likely to fall, and the target sales data is close to or the same as the actual sales data of the product to be predicted at the tth moment, and the first target sales data interval can be used as the interval in which the actual sales value of the product to be predicted at the tth moment is most likely to fall relative to the increment of the previous moment. By judging whether the predicted sales increment of the first sales data predicted by the first model is in the first target sales data interval, it can be determined whether the sales forecast value of the first sales data predicted by the first model can be used as the actual sales value of the product to be predicted at the tth moment.
[0060] S400, if the first sales data is within the first target sales data interval, determining the first sales data as target sales data;
[0061] In this embodiment, if the first sales data at the tth moment is within the first target sales data interval, that is, the predicted sales increment of the first sales data is within the first target sales data interval, it indicates that the predicted sales increment of the first sales data predicted by the first model falls within the interval where the actual sales value of the product to be predicted at the tth moment is most likely to fall relative to the increment of the previous moment, and it can be determined that the sales value at the tth moment predicted by the first model is close to or the same as the actual sales value of the product to be predicted. In this case, it can be considered that the first sales data predicted by the first model is close to the actual sales data of the product to be predicted, or is the same as the actual sales data of the product to be predicted.
[0062] S500: If the first sales data is not within the first target sales data interval, use the second model to adjust the first sales data to obtain the target sales data.
[0063] In this embodiment, if the first sales data is not in the first target sales data interval, that is, the predicted sales increment of the first sales data predicted by the first model does not fall within the interval where the actual sales value of the product to be predicted at the tth moment is most likely to fall relative to the increment of the previous moment, it indicates that the first sales data predicted by the first model deviates from the actual sales data of the product to be predicted. In this case, the first sales data needs to be adjusted using the second model. Specifically, the predicted sales increment of the first sales data can be adjusted using the second model to correct the deviation of the first sales data from the actual sales data, thereby obtaining the actual sales data of the product to be predicted at the tth moment.
[0064] In the above manner, the present application first obtains the first sales data based on the historical sales data using the first model, and then obtains the target sales data interval based on the historical sales data and the sales influencing factors using the second model, and determines whether the first sales data predicted by the first model is the target sales data by judging whether the first sales data is in the first target sales data interval of the target sales data interval, and when the first sales data deviates from the actual sales data, the first sales data is adjusted using the second model to obtain the target sales data, that is, the actual sales data. The present application improves the accuracy of sales forecasts by integrating the prediction methods of the time series model and the classifier, and taking into account the influence of various sales influencing factors on sales forecasts, and adjusting the sales data predicted by the time series model through the classifier.
[0065] In one embodiment of the present application, the method further includes:
[0066] Using the second model, N first probabilities of the incremental value of the target sales volume at the tth moment in N target sales volume data intervals are determined, and the first target sales volume data interval is the interval corresponding to the maximum probability among the N first probabilities.
[0067] In this embodiment, the second model is used to predict and classify the historical time series data and related sales influencing factors, and N first probabilities that the incremental value of the target sales at the tth moment falls within the N target sales data intervals can be obtained. The incremental value of the target sales at the tth moment is close to or the same as the incremental value of the actual sales of the product to be predicted, and the N first probabilities that the incremental value of the target sales at the tth moment falls within the N target sales data intervals can be regarded as the N first probabilities that the incremental value of the actual sales of the product to be predicted falls within the N target sales data intervals. The first target sales data interval is the interval corresponding to the maximum probability among the N first probabilities, that is, the first target sales data interval is the interval that the incremental value of the target sales at the tth moment is most likely to fall into.
[0068] In one embodiment of the present application, Figure 2 As shown, the determining whether the first sales data is in the first target sales data interval among N target sales data intervals includes:
[0069] S310, obtaining an incremental value of a first sales volume in the first sales volume data, where the incremental value of the first sales volume represents a predicted sales increment at the tth moment relative to the previous moment;
[0070] In this embodiment, after the first sales data at the tth moment is determined by using the first model, the incremental value of the first sales in the first sales data is obtained, and the incremental value of the first sales represents the predicted sales increment at the tth moment relative to the previous moment. Specifically, the incremental value of the first sales is obtained by the sales forecast value at the tth moment determined by the first model and the actual sales value at the previous moment, and the difference between the sales forecast value determined by the first model and the actual sales value at the previous moment is the incremental value of the first sales.
[0071] S320, determining whether the incremental value of the first sales volume is within the first target sales volume data interval.
[0072] In this embodiment, after obtaining the incremental value of the first sales volume in the first sales volume data, it is determined whether the incremental value of the first sales volume is within the first target sales volume data interval, so as to determine whether the sales volume forecast value predicted by the first model is the target sales volume value. Specifically, the first target sales volume data interval is the interval into which the incremental value of the target sales volume at the t-th moment is most likely to fall. By judging whether the incremental value of the first sales volume predicted by the first model is within the first target sales volume data interval, it can be determined whether the sales volume forecast value at the t-th moment predicted by the first model is the target sales volume value. The target sales volume value can be considered as the actual sales volume value of the product to be forecasted at the t-th moment.
[0073] In one embodiment of the present application, if the first sales data is within the first target sales data interval, determining that the first sales data is the target sales data includes:
[0074] If the incremental value of the first sales volume in the first sales volume data is within the first target sales volume data interval, the sales volume forecast value corresponding to the incremental value of the first sales volume at the tth moment is determined to be the target sales volume value at the tth moment.
[0075] In this embodiment, if the incremental value of the first sales volume in the first sales volume data is within the first target sales volume data interval, it indicates that the incremental value of the first sales volume predicted by the first model falls within the interval into which the incremental value of the target sales volume at the t-th moment is most likely to fall, and it can be determined that the sales volume forecast value corresponding to the incremental value of the first sales volume at the t-th moment is the target sales volume value at the t-th moment. In other words, the incremental value of the first sales volume at the t-th moment predicted by the first model is close to or the same as the incremental value of the actual sales volume of the product to be predicted. In this case, it can be considered that the sales volume forecast value at the t-th moment predicted by the first model is close to the actual sales volume value of the product to be predicted, or is the same as the actual sales volume value of the product to be predicted.
[0076] In one embodiment of the present application, Figure 3 As shown, if the first sales data is not within the first target sales data interval, adjusting the first sales data using the second model to obtain the target sales data includes:
[0077] S510, using the second model to perform correction calculation on the incremental value of the first sales volume, to obtain a corrected incremental value of the first sales volume; wherein the corrected incremental value of the first sales volume represents the target sales increment at the tth moment relative to the previous moment;
[0078] In this embodiment, if the incremental value of the first sales volume in the first sales volume data is not in the first target sales volume data interval, that is, the incremental value of the first sales volume predicted by the first model does not fall within the interval in which the incremental value of the target sales volume at the t-th moment is most likely to fall, it indicates that the incremental value of the first sales volume predicted by the first model at the t-th moment deviates from the incremental value of the actual sales volume of the product to be predicted. In this case, it is necessary to use the second model to adjust the incremental value of the first sales volume predicted by the first model. Specifically, the second model can be used to perform a correction calculation on the incremental value of the first sales volume to obtain the corrected incremental value of the first sales volume. The corrected incremental value of the first sales volume represents the target sales increment at the t-th moment relative to the previous moment. The second model is used to correct the deviation of the incremental value of the first sales volume relative to the incremental value of the actual sales volume of the product to be predicted. The corrected incremental value of the first sales volume is close to or the same as the incremental value of the actual sales volume of the product to be predicted.
[0079] S520, obtaining the target sales value at the tth moment based on the target sales value at the previous moment and the incremental value of the corrected first sales volume.
[0080] In this embodiment, the second model is used to perform a correction calculation on the incremental value of the first sales volume, and after obtaining the corrected incremental value of the first sales volume, the target sales volume value at the tth moment is obtained based on the target sales volume value at the previous moment and the corrected incremental value of the first sales volume. Specifically, the corrected incremental value of the first sales volume is close to or the same as the incremental value of the actual sales volume of the product to be predicted at the tth moment, and the actual sales volume value of the product to be predicted at the previous moment and the corrected incremental value of the first sales volume are added together to obtain the target sales volume value at the tth moment, that is, the actual sales volume value of the product to be predicted at the tth moment.
[0081] In one embodiment of the present application, the method of using the second model to perform correction calculation on the incremental value of the first sales volume to obtain the corrected incremental value of the first sales volume includes:
[0082] Based on the N first probabilities of the incremental value of the target sales volume at the t-th moment in the N target sales volume data intervals and the average value of the target sales volume data intervals corresponding to each of the first probabilities, the corrected incremental value of the first sales volume is obtained.
[0083] In this embodiment, in the process of using the second model to correct the incremental value of the first sales volume, first determine the N first probabilities that the incremental value of the target sales volume at the t-th moment falls within the N target sales volume data intervals, and determine the average value of the target sales volume data interval corresponding to each first probability based on the N first probabilities. Specifically, multiply each first probability except the maximum probability among the N first probabilities by the average value of the corresponding target sales volume data interval, and multiply the maximum probability among the N first probabilities by the sales volume forecast value at the t-th moment predicted by the first model; then add the results of multiplying each first probability except the maximum probability among the N first probabilities by the average value of the corresponding target sales volume data interval, and the results of multiplying the maximum probability among the N first probabilities by the sales volume forecast value at the t-th moment predicted by the first model, and the corrected incremental value of the first sales volume can be obtained. The corrected incremental value of the first sales volume is close to or the same as the incremental value of the actual sales volume of the product to be predicted. Based on the corrected incremental value of the first sales volume, the actual sales volume of the product to be predicted can be obtained.
[0084] In one embodiment of the present application, determining the first sales data at time t by using the first model based on the historical sales data includes:
[0085] The first model is used to perform time series forecasting calculation on the historical sales data to obtain first time series forecasting data, where the first time series data is the first sales data at the tth moment.
[0086] In this embodiment, the process of analyzing the historical sales data using the first model to determine the first sales data at the tth moment may include: using the first model to perform time series forecasting calculations on the historical sales data to obtain first time series forecasting data, and the first time series data is the first sales data at the tth moment. The first model may be a time series model SARIMA, and the historical sales data may be historical time series data. The time series model SARIMA may be used to perform time series forecasting calculations on the historical time series data to obtain first time series forecasting data at a future moment. The first time series data may represent sales forecasting data of the product to be forecasted at the tth moment. The sales forecasting data may include the sales forecast value corresponding to the product to be forecasted at the tth moment, and the forecast sales increment at the tth moment relative to the previous moment.
[0087] In one embodiment of the present application, the method further includes:
[0088] Based on the historical sales data, the first model is trained, and the trained first model is used to perform prediction calculations on the historical sales data to obtain corresponding sales prediction values.
[0089] In this embodiment, the first model can be trained based on historical sales data to improve the prediction accuracy of the first model. Specifically, the trend of historical sales of the product to be predicted in the past period of time can be determined based on historical time series data, and the first model can be trained by analyzing the regularity of periodic sales reflected in the historical time series data. The trained first model is more accurate in predicting and calculating the historical sales data, and the trained first model can be used to predict and calculate the historical time series data to obtain the corresponding sales forecast value.
[0090] In one embodiment of the present application, the second model can be trained based on historical sales data and sales influencing factors, so as to improve the prediction accuracy of the second model. Specifically, based on historical time series data, the trend of historical sales of the product to be predicted in the past period of time can be determined, and the second model can be trained by analyzing the regularity of periodic sales reflected in the historical time series data and the factors affecting sales fluctuations. The trained second model is more accurate in predicting and calculating historical sales data and related sales influencing factors. The trained second model can be used to predict and calculate historical time series data and related sales influencing factors to obtain the change range of the predicted sales of the product to be predicted.
[0091] The following is a detailed description of the prediction method of the present application integrating the time series model and the classifier in conjunction with a specific embodiment, as shown in Table 1:
[0092] First, based on the historical sales trend of the product to be predicted in the past period of time, the time series model SARIMA is used to perform time series calculation on the historical sales data of the product to be predicted, and the sales forecast value of the product to be predicted in the future period of time is obtained. Specifically, the time series forecast value of the product to be predicted from time t+1 to time t+n is obtained: is the time series prediction value at time t+1, is the time series prediction value at time t+2, It is the time series prediction value at time t+n.
[0093] Based on the historical sales trend of the product to be predicted in the past period of time and the sales influencing factors of the product to be predicted, the sales of the product to be predicted are predicted and classified using the TF-DF classifier to obtain the predicted sales variation range of the product to be predicted. Specifically, the probability that the sales increments of S-1 products to be predicted fall within S sales variation ranges is obtained, for example: p1(delta PO∈(-4000,-2000]), p2(delta PO∈(-2000,0]), …, p s-1(delta PO∈(8000,10000]); p1(delta PO∈(-4000,-2000]) is the probability that the incremental value of the sales volume of the product to be predicted falls between 2000 and 4000, p2(delta PO∈(-2000,0]) is the probability that the incremental value of the sales volume of the predicted product falls between 0 and 2000, p s-1 (delta PO∈(8000,10000]) is the probability that the incremental value of the predicted product sales will fall between 8000 and 10000.
[0094] Use the TF-DF classifier to determine the incremental value delta PO of the actual sales volume of the product to be predicted at time t+k t+k The probability of falling into S sales volume change intervals is S-1, p1 = P (delta PO t+k ∈(-4000,-2000]), p2=P(delta PO t+k ∈(-2000,0]),…,p s-1 =P(delta PO t+k ∈(8000,10000), and determine delta PO t+k The maximum probability among the S-1 probabilities falling within the S sales volume change intervals.
[0095] Time series prediction value based on time t+k And the actual sales value PO of the product to be predicted at time t+k-1 t+k-1 , get the incremental value of the time series prediction at time t+k for and PO t+k-1 Determine the incremental value of the time series prediction at time t+k Whether it falls within delta PO t+k The interval corresponding to the maximum probability among the S sales volume change intervals.
[0096] If the time series prediction increment value at time t+k Fall in delta PO t+k The interval corresponding to the maximum probability of the S sales volume change intervals indicates the time series forecast value at time t+k With the adjusted time series forecast value Same, adjusted time series forecast value It can be regarded as the actual sales value of the product to be predicted at time t+k. Therefore, the time series prediction value at time t+k It can be used as the actual sales value of the product to be predicted at time t+k.
[0097] If the time series prediction increment value at time t+k Not in delta PO t+k The interval corresponding to the maximum probability of the S sales volume change intervals indicates the time series forecast value at time t+k Compared with the actual sales value of the product to be predicted, the TF-DF classifier is needed to predict the incremental value of the time series. Specifically, the maximum probability p is divided by S-1 probabilities. x Each probability other than x Multiply them together to get the maximum probability p x and Multiply them; then divide the maximum probability p by S-1 probabilities x Each probability other than x The result of multiplication, and the maximum probability p x and The multiplication results are added to obtain the adjusted timing prediction increment value The adjusted time series forecast increment value The actual sales value PO of the product to be predicted at time t+k-1 t+k-1 By adding them together, we can get the adjusted time series prediction value at time t+k Adjusted time series forecast value It can be regarded as the actual sales value of the product to be predicted at time t+k.
[0098] Through the above method, the adjusted time series forecast value of the product to be predicted from time t+1 to time t+n can be obtained: like Figure 6 As shown, the prediction method of the present application which integrates the time series model and the classifier is closer to the actual sales volume of the product than the prediction method of the traditional time series model.
[0099]
[0100] Table 1: Prediction methods of fusion time series model and classifier
[0101] Based on the same inventive concept, the second aspect of the present application also provides a data processing device corresponding to a data processing method. Since the principle of solving the problem by the data processing device in the present application is similar to the above-mentioned data processing method of the present application, the implementation of the data processing device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0102] Figure 4 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown, which may include:
[0103] A first acquisition module is configured to determine first sales data at time t based on historical sales data using a first model;
[0104] A second acquisition module is configured to determine N target sales data intervals at the tth time using a second model based on the historical sales data and sales influencing factors;
[0105] a determination module configured to determine whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0106] A first processing module configured to determine that the first sales data is target sales data if the first sales data is within the first target sales data interval;
[0107] The second processing module is configured to adjust the first sales data using the second model to obtain the target sales data if the first sales data is not within the first target sales data interval.
[0108] In one embodiment of the present application, the determination module is further configured to:
[0109] Using the second model, N first probabilities of the incremental value of the target sales volume at the tth moment in N target sales volume data intervals are determined, and the first target sales volume data interval is the interval corresponding to the maximum probability among the N first probabilities.
[0110] In one embodiment of the present application, the second acquisition module is further configured as follows:
[0111] Obtaining an incremental value of a first sales volume in the first sales volume data, wherein the incremental value of the first sales volume represents a predicted sales increment at the tth moment relative to the previous moment;
[0112] Determine whether the incremental value of the first sales volume is within the first target sales volume data interval.
[0113] In one embodiment of the present application, the determination module is further configured to:
[0114] If the incremental value of the first sales volume in the first sales volume data is within the first target sales volume data interval, the sales volume forecast value corresponding to the incremental value of the first sales volume at the tth moment is determined to be the target sales volume value at the tth moment.
[0115] In one embodiment of the present application, the second processing module is further configured as follows:
[0116] Using the second model to perform correction calculation on the incremental value of the first sales volume, to obtain a corrected incremental value of the first sales volume; wherein the corrected incremental value of the first sales volume represents the target sales increment at the tth moment relative to the previous moment;
[0117] The target sales value at the last moment is obtained based on the target sales value at the previous moment and the incremental value of the corrected first sales value.
[0118] In one embodiment of the present application, the second processing module is further configured as follows:
[0119] Based on the N first probabilities of the incremental value of the target sales volume at the t-th moment in the N target sales volume data intervals and the average value of the target sales volume data intervals corresponding to each of the first probabilities, the corrected incremental value of the first sales volume is obtained.
[0120] In one embodiment of the present application, the first processing module is further configured as follows:
[0121] The first model is used to perform time series forecasting calculation on the historical sales data to obtain first time series forecasting data, where the first time series data is the first sales data at the tth moment.
[0122] In one embodiment of the present application, the first processing module is further configured as follows:
[0123] Based on the historical sales data, the first model is trained, and the trained first model is used to perform prediction calculations on the historical sales data to obtain corresponding sales prediction values.
[0124] Based on the same inventive concept, Figure 5 As shown, this embodiment also includes an electronic device, including:
[0125] A memory for storing executable programs;
[0126] The processor is used to execute the executable program to implement the following steps:
[0127] Based on the historical sales data, using the first model, determine the first sales data at time t;
[0128] Based on the historical sales data and sales influencing factors, using the second model, determine N target sales data intervals at time t;
[0129] determining whether the first sales data is in a first target sales data interval among N target sales data intervals;
[0130] If the first sales data is within the first target sales data interval, determining the first sales data as the target sales data;
[0131] If the first sales data is not within the first target sales data interval, the second model is used to adjust the first sales data to obtain the target sales data.
[0132] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.
Claims
1. A data processing method, comprising: Based on the historical sales data, using the first model, determine the first sales data at time t; Based on the historical sales data and sales influencing factors, using the second model, determine N target sales data intervals at time t; determining whether the first sales data is in a first target sales data interval among N target sales data intervals; If the first sales data is within the first target sales data interval, determining the first sales data as the target sales data; If the first sales data is not within the first target sales data interval, the second model is used to adjust the first sales data to obtain the target sales data.
2. The method according to claim 1, further comprising: The second model is used to determine N first probabilities of the incremental value of the target sales volume at the tth moment in N target sales volume data intervals, where the first target sales volume data interval is the interval corresponding to the maximum probability among the N first probabilities.
3. The method according to claim 1, wherein determining whether the first sales data is in a first target sales data interval among N target sales data intervals comprises: Obtaining an incremental value of a first sales volume in the first sales volume data, wherein the incremental value of the first sales volume represents a predicted sales increment at the tth moment relative to the previous moment; Determine whether the incremental value of the first sales volume is within the first target sales volume data interval.
4. The method according to claim 1, wherein if the first sales data is within the first target sales data interval, determining that the first sales data is the target sales data comprises: If the incremental value of the first sales volume in the first sales volume data is within the first target sales volume data interval, the sales volume forecast value corresponding to the incremental value of the first sales volume at the tth moment is determined to be the target sales volume value at the tth moment.
5. The method according to claim 1, wherein if the first sales data is not within the first target sales data interval, adjusting the first sales data using the second model to obtain the target sales data comprises: Using the second model to perform correction calculation on the incremental value of the first sales volume, to obtain a corrected incremental value of the first sales volume; wherein the corrected incremental value of the first sales volume represents the target sales increment at the tth moment relative to the previous moment; The target sales value at the last moment is obtained based on the target sales value at the previous moment and the incremental value of the corrected first sales value.
6. The method according to claim 5, wherein the using the second model to perform correction calculation on the incremental value of the first sales volume to obtain the corrected incremental value of the first sales volume comprises: Based on the N first probabilities of the incremental value of the target sales volume at the t-th moment in the N target sales volume data intervals and the average value of the target sales volume data intervals corresponding to each of the first probabilities, the corrected incremental value of the first sales volume is obtained.
7. The method according to claim 1, wherein determining the first sales data at time t by using the first model based on the historical sales data comprises: The first model is used to perform time series forecasting calculation on the historical sales data to obtain first time series forecasting data, where the first time series data is the first sales data at the tth moment.
8. The method according to claim 1, further comprising: Based on the historical sales data, the first model is trained, and the trained first model is used to perform prediction calculations on the historical sales data to obtain corresponding sales prediction values.
9. A data processing device, comprising: A first acquisition module is configured to determine first sales data at time t based on historical sales data using a first model; A second acquisition module is configured to determine N target sales data intervals at the tth time using a second model based on the historical sales data and sales influencing factors; a determination module configured to determine whether the first sales data is in a first target sales data interval among N target sales data intervals; A first processing module configured to determine that the first sales data is target sales data if the first sales data is within the first target sales data interval; The second processing module is configured to adjust the first sales data using the second model to obtain the target sales data if the first sales data is not within the first target sales data interval.
10. An electronic device, comprising: A memory for storing executable programs; The processor is used to execute the executable program to implement the following steps: Based on the historical sales data, using the first model, determine the first sales data at time t; Based on the historical sales data and sales influencing factors, using the second model, determine N target sales data intervals at time t; determining whether the first sales data is in a first target sales data interval among N target sales data intervals; If the first sales data is within the first target sales data interval, determining the first sales data as the target sales data; If the first sales data is not within the first target sales data interval, the second model is used to adjust the first sales data to obtain the target sales data.
