WO2020124977A1 - Method and apparatus for processing production data, computer device, and storage medium - Google Patents

Method and apparatus for processing production data, computer device, and storage medium Download PDF

Info

Publication number
WO2020124977A1
WO2020124977A1 PCT/CN2019/093146 CN2019093146W WO2020124977A1 WO 2020124977 A1 WO2020124977 A1 WO 2020124977A1 CN 2019093146 W CN2019093146 W CN 2019093146W WO 2020124977 A1 WO2020124977 A1 WO 2020124977A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
production data
prediction
historical production
predicted
Prior art date
Application number
PCT/CN2019/093146
Other languages
French (fr)
Chinese (zh)
Inventor
张春玲
项舒畅
罗傲雪
汪伟
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020124977A1 publication Critical patent/WO2020124977A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling

Definitions

  • the present application relates to a production data processing method, device, computer equipment and storage medium.
  • operating income refers to the various incomes obtained by the sale of products or the provision of labor services in the production and operation activities of the enterprise. It is related to the survival and development of the enterprise and is of great significance to the operation of the enterprise. Therefore, accurately predict the enterprise Revenue is an important part of investment analysis.
  • the inventor realized that the current production data, that is, the operating income data is processed according to a single model, that is, the historical production data is input into the single model so that the predicted production data corresponding to the historical production data can be obtained, but
  • This processing method is only based on a single model.
  • Such a predicted single model is easy to ignore certain special factors or lead to extreme predictions. Therefore, the accuracy of the model is not enough, resulting in inaccurate production data processing results.
  • a production data processing method, apparatus, computer equipment, and storage medium are provided.
  • a production data processing method including:
  • the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
  • a production data processing device including:
  • the receiving module is used to receive the input predicted time, and obtain corresponding historical production data from the server according to the predicted time;
  • a processing module configured to input the predicted time and historical production data to a model classifier to obtain predicted production data corresponding to the predicted time, the predicted production data is the model classifier based on the predicted time and historical production Obtained by the single model prediction result of the optimal prediction single model selected by the data, or the predicted production data is the weight corresponding to each of the predicted single models generated according to the prediction time and historical production data and the corresponding single Calculated by the model prediction results;
  • the sending module is used to obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors are executed The following steps:
  • the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
  • the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
  • FIG. 1 is an application scenario diagram of a production data processing method according to one or more embodiments.
  • FIG. 2 is a schematic flowchart of a production data processing method according to one or more embodiments.
  • FIG. 3 is a block diagram of a production data processing device according to one or more embodiments.
  • Figure 4 is a block diagram of a computer device in accordance with one or more embodiments.
  • the production data processing method provided by this application can be applied to the application environment shown in FIG. 1.
  • the terminal 102 communicates with the server 104 via the network.
  • the terminal 102 can obtain historical production data from the server 104, so that it can be trained according to the production data to obtain multiple predicted single models, and then trained according to the multiple predicted single models and historical production data to obtain a model classifier, which can be based on the model
  • the classifier obtains the most accurate prediction single model or integrates the prediction results of multiple prediction single models to obtain the most accurate prediction result, which improves the accuracy of the prediction result.
  • the terminal 102 can obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain a single model prediction result, so that the first model selection feature can be obtained according to the single model prediction result and historical production data ,
  • the first model selection feature fully takes into account the prediction error of each prediction single model, and in order to fully take into account the characteristics of historical production data, the terminal 102 can also obtain the second model selection feature based only on the historical production data, so that the terminal 102 can
  • the first model selection feature, the second model selection feature, and the prediction single model are trained to obtain a model classifier, so that the trained model classifier can be used to predict the production data at the prediction time, that is, the most accurate prediction is obtained according to the model classifier
  • the prediction single model or the prediction results of multiple prediction single models are combined to obtain the most accurate prediction result, which improves the accuracy of the prediction result.
  • the terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • multiple forecast single models are generated in advance in this application, and the production forecast data can be predicted through the multiple forecast single models, for example, revenue data; however, the single model prediction results of the forecast single model may be biased.
  • This application has generated multiple targets based on historical production data and the single-model prediction results of each predicted single model in advance Model selection features.
  • the target model selection features may include features for measuring the accuracy of prediction results of individual models and features of historical production data's own attributes.
  • the present application can select features and predict single models according to the multiple target models for training to obtain the best prediction results of production data, for example, select features according to the target model to select the best predictive single model, or select according to the target model Feature to obtain the weight of each prediction single model, so that the prediction result of production data can be obtained according to the weight and the single model prediction result of each prediction single model.
  • a production data processing method is provided.
  • the method is applied to the terminal in FIG. 1 as an example for description, including the following steps:
  • the historical production data is data generated by an enterprise in past transactions or production and life, for example, it may be historical revenue data of various enterprises.
  • the terminal may first send a historical revenue data acquisition instruction to the financial server corresponding to each enterprise, so that after receiving the historical revenue data acquisition instruction, the financial service of each enterprise sends the historical revenue data to the corresponding terminal, and the terminal is receiving After reaching the historical revenue data, store the historical revenue data, for example, in a secure database or server.
  • the financial servers of each enterprise can also periodically submit historical revenue data of each enterprise to the terminal in the most recent period to ensure the timeliness of the historical revenue data stored on the terminal side.
  • the historical production data can also be pre-processed to improve the accuracy of model training.
  • the terminal may delete abnormal data or process historical production data to obtain historical production data needed for model training. Deleting the abnormal data may include the terminal determining whether there is incomplete data, zero or empty data in the historical production data, and if there is, deleting the abnormal data.
  • the terminal processes the historical production data to obtain the historical production data required for model training.
  • the historical production data can be differentiated. For example, after deleting the abnormal data, the terminal can judge that the obtained historical production data needs to be differentiated. For example, when the obtained history When the production data is half a year of historical production data, the terminal can subtract the historical production data of the first quarter from the historical production data of the half year, so that the historical production data of the second quarter can be obtained.
  • S204 Obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain a single model prediction result.
  • the prediction single model is obtained by pre-training.
  • the prediction single model may include multiple categories, such as a time series model, a trend fitting model, a time series fitting comprehensive model, and a multi-factor model.
  • the time series model can be the arima model, which is a model built using the time series data itself.
  • the historical production data mainly includes two fields, one is the time field, and the other is the revenue data field, so that the two Field to build the arima model;
  • the trend-fitting model can be a polyfit model, which builds discrete points based on known revenue data, that is, time is on the x-axis, and historical revenue data is on the y-axis, and then based on discrete points
  • the combined construction function is used as the trend-fitting model, that is, the obtained fitting function is the trend-fitting model;
  • the time-series fitting comprehensive model may be a prophet model, which generates a segmented model based on the continuous growth of revenue data in segments , Where the revenue data can be segmented according to different growth rates, and then the function corresponding to each segment can be obtained, and all functions can be combined to obtain a single prediction model;
  • the multi-factor model can be the xgboost model, which is based on the classifier The idea is to build a forecasting single model, that is,
  • the training prediction time is also the historical time, that is, the time that has passed.
  • the historical production data needs to be divided into sample data and verification data according to the training prediction time, where the sample data is used for prediction, verification The data is used to adjust the prediction model or to check whether the prediction result is accurate.
  • the terminal can use the historical production data corresponding to the training prediction time as verification data; and the historical production data before the training prediction time as sample data; the terminal inputs the sample data and training prediction time into the prediction single model to obtain each prediction The single model prediction result output by the single model.
  • the training prediction time is the third quarter of 2018, you can obtain historical production data before 2018 as sample data, and enter the sample data into the prediction single model to obtain the single model prediction result corresponding to the training prediction time.
  • the prediction results of the arima model, the prediction results of the polyfit model, the prediction results of the prophet model, and the prediction results of the xgboost model can be obtained.
  • S206 The comprehensive single-model prediction results and the historical production data's own attributes are constructed to characterize the error between the single-model prediction results and the historical production data and the target model selection characteristics that characterize the historical production data's essential characteristics.
  • the target model selection feature may include a feature for measuring the accuracy of each single model prediction result and the feature of historical production data's own attributes, for example, the target model selection feature may include a first model selection feature and a second model selection feature , Where the first model selection feature fully takes into account the error between the prediction results of the single model and the actual results in the historical production data, and the second model selection feature is a feature used to identify the essence of the historical production data.
  • the first model selection feature fully considers the error between the prediction results of the single model and the real results in the historical production data, so that the prediction accuracy of each prediction single model can be considered.
  • the single-model prediction result is the prediction result
  • the historical production data is a representation of the real result, so the first model selection feature can be constructed by the prediction result and the real result, for example, the corresponding training in the single-model prediction result and the historical production data can be selected.
  • the ratio of the real result of the prediction time is used as the first model selection feature.
  • the first model selection feature may be the prediction error of each prediction single model from the previous cycle and/or the prediction error of each prediction single model from the previous year.
  • the second model selection feature is a feature used to identify the essence of historical production data.
  • the second model selection feature may be calculated based on historical production data before the training prediction time, which may include periodic strength indicators and/or Trend strength indicator.
  • the cyclical strength indicator is used to represent the periodicity in the historical production data
  • the trend strength indicator is used to represent the trend of the historical production data, such as growth or decline.
  • S208 Train the target model selection feature and the prediction single model to obtain a model classifier.
  • the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or to select the feature based on the target model for each
  • a corresponding weight of the prediction single model is established, and a prediction model is obtained according to the weight and the prediction result of the corresponding single model.
  • the training process of the model classifier may be to use the predicted single model as the Y value, and then use the constructed first model selection feature and the second model selection feature as the X value, and the corresponding relationship between the Y value and the X value Learn to get the model classifier.
  • the terminal first determines the training prediction time, and then determines the Y value corresponding to the training prediction time based on the single model prediction value and the historical production data corresponding to the training prediction time, so that the correspondence between the Y value and the X value can be established, and all the Y values can be established. Mark the X value in the coordinate system to obtain multiple discrete points, and then fit the multiple discrete points to obtain the model classifier.
  • S210 The model classifier obtained by training predicts the production data at the prediction time.
  • the terminal After obtaining the model classifier, the terminal can input the prediction time, so that the terminal can obtain the corresponding historical production data from the server according to the prediction time, and then input the prediction time and the historical production data into the model classifier to obtain the prediction production corresponding to the prediction time Data, and after obtaining the predicted production data corresponding to the predicted time, the server can obtain the corresponding investment file according to the predicted production data, and send the investment file to the investment terminal, so that the terminal can determine the corresponding investment plan according to the investment file .
  • the forecast production data is obtained by the single model prediction result of the optimal forecast single model selected by the model classifier according to the forecast time and historical production data, or the forecast production data is generated according to the forecast time and historical production data
  • the weight corresponding to the model and the corresponding prediction result of the single model are calculated.
  • the above production data processing method fully considers the single model prediction results and historical production data of multiple single models when building the model classifier, and constructs the first model selection feature based on the single model prediction results and historical production data.
  • the second model selection feature is constructed based on historical production data, and the model classifier is obtained by training based on the first model selection feature and the second model selection feature, so that the model classifier fully considers the characteristics of each model and the characteristics of historical production data , Which can improve the accuracy of model prediction.
  • training target model selection features and predicting a single model to obtain a model classifier may include: extracting real results from historical production data; calculating the difference between the real results and the single model prediction results to obtain the difference The smallest predictive single model is used as the optimal predictive single model; the optimal predictive single model and the target model are trained to select features to obtain the model classifier.
  • training target model selection features and predicting a single model to obtain a model classifier may include: extracting real results from historical production data; calculating the ratio of the single model prediction results to the real results, and obtaining predictions based on the ratios Single model weights; train the weights of the predicted single model and the target model selection features to obtain the model classifier.
  • the model classifier can be divided into two types, which are different according to the Y value, where the Y value can predict a single model, or the weight of each predicted single model, where the Y value is a predicted single model, Then, the optimal single prediction model is selected through the model classifier, and the Y value is the weight of each prediction single model. The weight of each prediction single model is obtained through the model classifier, so that each prediction single model is fully considered Forecast results.
  • the terminal can extract the real results from the historical production data, that is, the real results corresponding to the training prediction time, and then compare the real results with the single model prediction results to obtain the real results The closest single model prediction result, and use the predicted single model corresponding to the single model prediction result as the Y value, and then learn the Y value and the corresponding X value, such as fitting the Y value and the X value to get each The weight corresponding to the X value, so that a model selector can be established.
  • the terminal can extract the real results from the historical production data, that is, the real results corresponding to the training prediction time, and then compare the real results with the single model prediction results, through each The ratio of the prediction result of the single model to the true result can obtain the probability of each prediction single model as the optimal single model, that is, the weight, and optionally, the terminal can classify the possibility of a prediction single model as the optimal single model.
  • One normalization can obtain the weights corresponding to each prediction single model, so that the terminal can learn these weights and the corresponding X value to obtain the model classifier.
  • the model classifier when the first model selection feature and the second model selection feature are input into the model selector, the model classifier outputs the weight of each predicted single model, for example, the first predicted single model weight is 0.25, and the second predicted single model weight It is 0.15, the weight of the third prediction model is 0.2, and the weight of the fourth model is 0.4. Therefore, the terminal can calculate the final prediction result based on the single-model prediction results and weights of the prediction single models, that is, the revenue data corresponding to the prediction time.
  • the Y value can predict a single model, or the weight of each predicted single model; when the Y value is a predicted single model, it can choose an optimal single model; when the Y value is each prediction
  • the weight of the single model fully considers the prediction result of each prediction single model, and can guarantee the accuracy of the prediction result obtained by the model classifier.
  • inputting the training prediction time and historical production data into the prediction single model to obtain a single model prediction result may include: obtaining the feature period corresponding to the training prediction time; calculating the corresponding period corresponding to the feature period through the prediction single model Predicted value; constructing the first model selection feature based on the single model prediction result and historical production data, which may include: extracting the true value corresponding to the feature period from the historical production data; calculating the first model selection feature based on the predicted value and the true value.
  • the characteristic period can be the previous period or the previous period. When the previous period is the first period, the first model selection feature is the forecast error. When the first period is the last period, the first model selection feature is the previous period. cycle.
  • constructing a second model selection feature based on historical production data may include: obtaining a preset cycle length and interval, segmenting the historical production data according to the preset cycle length; obtaining the corresponding score in each interval The historical production data of the segment, and sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the deviation value of the sequence value of the segmented historical production data corresponding to each interval; calculate the deviation The average of the values gives the periodic strength indicator as the second model selection feature.
  • constructing a second model selection feature based on historical production data may include: obtaining a preset period length, segmenting the historical production data according to the preset period length; according to the historical production data of each segment The historical production data of the previous section is calculated to obtain the increase and decrease range; according to the increase and decrease range, the increase and decrease range mark value of each section of the historical production data is calculated; the average value of the increase and decrease range mark value is calculated to obtain the trend strength indicator as The second model selects features.
  • the first model selection feature and the second model selection feature are involved in the above model classifier, and for convenience, the two features are hereinafter referred to as model selection features for description. That is, the model selection characteristics may include the prediction error of the previous cycle prediction result, the prediction error of the previous cycle prediction result, the periodic strength index, and the trend strength index.
  • the period in the forecast error of the previous cycle’s forecast results can refer to a quarter or a year
  • the forecast error of the previous cycle’s forecast results is for each forecast model and training forecast time.
  • the models all correspond to a prediction error of the prediction result of the previous period.
  • the terminal can obtain the training prediction time, and then obtain the previous period of the previous period, and calculate the first prediction value corresponding to the previous period of the previous period by calculating the single model of the prediction, and extract the first prediction value corresponding to the previous period of the previous period from the historical production data For the real value, the terminal then obtains the prediction error of the prediction result of the previous period based on the ratio of the first predicted value and the first true value, that is, the first model selection feature described above.
  • a training prediction time of one prediction single model is used for explanation. Assuming that the training prediction time is the fourth quarter of 2018, the terminal first obtains the first prediction value corresponding to the prediction single model in the third quarter of 2018, Then the terminal extracts the first true value of the forecasted single model from the historical production data in the third quarter of 2018, and uses the ratio of the first predicted value and the first true value as the prediction error of the previous cycle's prediction result.
  • the period of the forecast error of the forecast result of the previous period of the previous year can refer to a quarter or a year.
  • the forecast error of the forecast result of the previous period of the previous period is for each forecast single model and training prediction time.
  • the models all correspond to a forecast error compared to the forecast result of the previous period.
  • the terminal can obtain the training prediction time, and then obtain the previous period of the previous year, and calculate the second prediction value corresponding to the previous period of the previous year by calculating the single model of the prediction, and extract the second prediction value corresponding to the previous period of the previous year from the historical production data. For the true value, the terminal then obtains the prediction error of the prediction result of the previous period based on the ratio of the second predicted value and the second true value, that is, the above-mentioned first model selection feature.
  • a training prediction time of one of the prediction single models is used for explanation. Assuming that the training prediction time is the fourth quarter of 2018, the terminal first obtains the second prediction value corresponding to the prediction single model in the fourth quarter of 2017, Then the terminal extracts the second true value of the forecasted single model from the historical production data in the fourth quarter of 2017, and uses the ratio of the second predicted value and the second true value as the forecast error of the previous year’s forecast results.
  • the periodic strength index is used to characterize the periodic characteristics in historical production data.
  • the terminal After acquiring the historical production data, the terminal obtains a preset cycle length and interval, for example, the preset cycle length is quarter, and the interval may be a year, that is, an interval may include multiple cycles.
  • the terminal can segment the historical production data according to the cycle length, and then obtain and sort the historical production data in the corresponding segment in each interval, and mark the sorted historical production data to obtain the sequence value, and then calculate each The deviation value of the sequence value of the historical production data corresponding to the segment in an interval, and calculating the average value of the deviation values to obtain the periodic strength index, that is, the above-mentioned second model selection feature.
  • the terminal first divides the revenue data according to the cycle length
  • the segment is divided into the first quarter, second quarter, third quarter and fourth quarter of 2015, the first quarter, second quarter, third quarter and fourth quarter of 2016 and the first quarter and second quarter of 2017 ,
  • the third quarter and the fourth quarter and then sort the corresponding segments in each interval, and mark the sequence value of the sorted segments, as shown in Table 1 below:
  • 2015 is the first interval
  • 2016 is the second interval
  • 2017 is the third interval.
  • the corresponding segment in each interval is the first quarter of 2015, the first quarter of 2016, and
  • the terminal can sort the historical production data of the three segments, that is, sort the historical revenue data, and mark the sequence value of each segment after sorting, for example, the maximum value is 1, followed by For 2, mark it in turn. In this way, the corresponding segments of each interval are sorted and completed.
  • the terminal After the sorting is completed, the terminal obtains the sequence value in each interval, and calculates the deviation value according to the sequence value.
  • the sequence value of the first interval corresponding to 2015 includes 1, 2, 3, and 2, and the terminal calculates 1.
  • the deviation values of 2, 3, and 2, for example, the standard deviations of 1, 2, 3, and 2 can be calculated.
  • the terminal can also calculate the standard deviations of other intervals, and finally use the average value of all standard deviations as the periodic strength indicator .
  • the trend strength index is used to characterize the trend characteristics of historical production data.
  • the terminal After acquiring historical production data, the terminal acquires a preset period length, for example, the preset period length is quarter.
  • the terminal can segment the historical production data according to the length of the cycle, and then calculate the increase and decrease range according to the historical production data of the current segment and the historical production data of the previous segment, and can determine the increase and decrease of each segment according to the increase and decrease
  • the historical production data is marked to obtain the increase-decrease amplitude mark value, and the terminal finally calculates the average value of the increase-decrease amplitude mark value to obtain the trend strength index, that is, the above-mentioned second model selection feature.
  • the terminal first segments the revenue data according to the cycle length, divided into 2015 Q1, Q2, Q3 and Q4 of 2016, Q1, Q2, Q3 and Q4 of 2016 and Q1, Q2, Q3 and Q1 of 2017
  • the fourth quarter and then calculate the increase and decrease value for each segment, for example, the slope of the connection between the first quarter of 2015 revenue data and the second quarter of 2015 revenue data can be used as the second quarter of 2015
  • the increase and decrease amplitude values can also be calculated for other segments, that is, the increase and decrease amplitude values for other periods.
  • the terminal calculates the increase and decrease amplitude mark value according to the increase and decrease amplitude value, for example, when the increase and decrease amplitude value is greater than 0, the increase and decrease amplitude value is +1, when the increase and decrease amplitude value is less than When 0, the increase and decrease amplitude tag value is -1, when the increase and decrease amplitude is equal to 0, the increase and decrease amplitude tag value is 0.
  • the terminal may calculate the average value of the mark amplitude mark values, and these average values are the trend strength index, that is, the above-mentioned second model selection feature.
  • the prediction error of the previous-period forecast results, the forecast error of the previous-period forecast results, the periodic strength index, and the trend strength index can be calculated. Then the model classifier is trained to ensure the accuracy of the model classifier's prediction.
  • the model classifier Y a1*A+b1*B+c1*C+d1*D+e1*E+f1*F+m1*M+n1 *N+p1*P+q1*Q, where a1, b1, c1, d1, e1, f1, m1, n1, p1, and q1 are the weights for selecting features for each model, and a1, b1, c1 can be obtained by fitting training , D1, e1, f1, m1, n1, p1, and q1, after the values of a1, b1, c1, d1, e1, f1, m1, n1, p1, and q1 are determined, the model classifier can be obtained, and After obtaining the model classifier, when the user enters the predicted time, the terminal can obtain
  • the single-model prediction results and historical production data of multiple single models are fully considered, and the first model selection feature is constructed based on the single-model prediction results and historical production data.
  • the historical production data is constructed to obtain the second model selection feature, so that the model classifier is obtained by training according to the first model selection feature and the second model selection feature, so that the model classifier fully considers the characteristics of each model and the characteristics of historical production data, Therefore, the accuracy of model prediction can be improved.
  • steps in the flowchart of FIG. 2 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps may be executed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is not necessarily sequential, but may be performed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a production data processing device including: a receiving module 100, a processing module 200, and a sending module 300, wherein:
  • the receiving module 100 is configured to receive the input predicted time, and obtain corresponding historical production data from the server according to the predicted time.
  • the processing module 200 is configured to input the predicted time and historical production data to a model classifier to obtain predicted production data corresponding to the predicted time, the predicted production data is the model classifier according to the predicted time and history Obtained from the single-model prediction result of the optimal prediction single model selected by the production data, or the predicted production data is the weight corresponding to each of the predicted single models and the corresponding Single model prediction results are calculated.
  • the sending module 300 is configured to obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  • the above production data processing device further includes:
  • the historical data acquisition module is used to acquire historical production data.
  • the single model prediction result obtaining module is used to obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain the single model prediction result, and the prediction single model is obtained by pre-training.
  • the feature construction module is used to synthesize the single-model prediction results and the self-attributes of historical production data to construct the target model selection characteristics that characterize the errors between the single-model prediction results and the real results in the historical production data and the essential characteristics of the historical production data.
  • the training module is used to train the first model selection feature, the second model selection feature and the prediction single model to obtain a model classifier, and the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or It is used to establish corresponding weights for each of the prediction single models according to the target model selection characteristics, and obtain a prediction model according to the weights and the corresponding single model prediction results.
  • the training module may include:
  • the first extraction unit is used to extract real results from historical production data.
  • the first determining unit is used to calculate the difference between the real result and the prediction result of the single model, and obtain the prediction single model with the smallest difference as the optimal prediction single model.
  • the first training unit is used to train the optimal prediction single model and the target model selection features to obtain a model classifier.
  • the training module may include:
  • the second extraction unit is used to extract real results from historical production data.
  • the second determining unit is used to calculate the ratio between the prediction result of the single model and the real result, and obtain the weight of the prediction single model according to the ratio.
  • the second training unit is used to train the weights of the predicted single model and the selected features of the target model to obtain a model classifier.
  • the feature building module may include:
  • the first feature construction unit is used to construct a first model selection feature based on the single model prediction results and historical production data;
  • the second feature construction unit is used to construct a second model selection feature based on historical production data.
  • the single-model prediction result acquisition module may include:
  • the first period obtaining unit is used to obtain a characteristic period corresponding to the training prediction time.
  • the first prediction value calculation unit is used to obtain the prediction value corresponding to the characteristic period through calculation of the prediction single model.
  • the first feature building unit may include:
  • the real value acquisition unit is used to extract the real value corresponding to the characteristic period from the historical production data
  • the calculation unit is configured to calculate the first model selection feature according to the first predicted value and the true value.
  • the second feature construction unit may include:
  • the first segmenting unit is used to obtain a preset period length and interval, and segment the historical production data according to the preset period length.
  • the first marking unit is used to obtain the corresponding segmented historical production data in each section, sort the acquired historical production data, and mark the sequence value of the sorted historical production data.
  • the deviation value calculation unit is used to calculate the deviation value of the sequence value of the historical production data of the segment corresponding to each section.
  • the periodic strength index calculation unit is used to calculate the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
  • the second feature construction unit may include:
  • the second segmenting unit is used to obtain a preset period length, and segment the historical production data according to the preset period length.
  • the second marking unit is used to calculate the increase and decrease range according to the historical production data of each segment and the historical production data of the previous segment.
  • the calculation unit of the increase/decrease amplitude value is used to obtain the increase/decrease amplitude mark value of the historical production data of each segment according to the increase/decrease amplitude.
  • the trend strength index calculation unit is used to calculate the average value of the increase and decrease amplitude marker values to obtain the trend strength index as the second model selection feature.
  • the trend strength index calculation unit is used to calculate the average value of the increase and decrease amplitude marker values to obtain the trend strength index as the second model selection feature.
  • Each module in the above model classifier building device may be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a terminal, and an internal structure diagram thereof may be shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer-readable instructions.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer readable instructions are executed by the processor to implement a model classifier building method.
  • the display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball, or a touchpad provided on the computer device housing , Can also be an external keyboard, touchpad or mouse.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors perform the following steps: receiving an input predicted time And obtain the corresponding historical production data from the server according to the predicted time; input the predicted time and historical production data into the model classifier to obtain the predicted production data corresponding to the predicted time.
  • the predicted production data is the model classifier based on the predicted time and The single-model prediction result of the best-predicted single model selected by historical production data, or the predicted production data is calculated based on the prediction time and the weight corresponding to each predicted single model generated by the historical production data and the corresponding single-model prediction result .
  • the training method of the model classifier involved in the execution of the computer-readable instructions by the processor includes: obtaining historical production data; obtaining training prediction time, and inputting the training prediction time and historical production data into the prediction single model
  • the single-model prediction results are obtained in.
  • the single-model prediction is pre-trained.
  • the comprehensive single-model prediction results and the self-attribute construction of historical production data characterize the error between the single-model prediction results and the real results in the historical production data and characterize the history.
  • the model classifier is used to select the optimal prediction single model or the prediction single model from the prediction single model according to the target model selection feature. It is used to select a feature according to the target model to establish a corresponding weight for each of the prediction single models, and obtain a prediction model according to the weight and the corresponding single model prediction result.
  • the target class model selection feature and the predicted single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the real results and the single The difference between the prediction results of the model, the prediction single model with the smallest difference is obtained as the optimal prediction single model; and the model classifier is obtained by training the selection characteristics of the optimal prediction single model and the target model.
  • the target class model selection feature and the prediction single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the single model prediction results The ratio with the real result is used to obtain the weight of the predicted single model; and the weight of the predicted single model and the selection characteristics of the target model are trained to obtain the model classifier.
  • the target model selection feature constructed based on the single model prediction result and historical production data may include: constructing the first model based on the single model prediction result and historical production data Model selection features; and constructing a second model selection feature based on historical production data.
  • the selection feature of constructing the second model based on the historical production data may include: obtaining a preset cycle length and interval, and dividing the historical production data according to the preset cycle length Segment; obtain the historical production data of the corresponding segment in each interval, and sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the historical production of the segment corresponding to each interval The deviation value of the sequence value of the data; and calculating the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
  • the selection feature of the second model constructed from the historical production data implemented by the processor when executing the computer-readable instructions may include: obtaining a preset cycle length, and segmenting the historical production data according to the preset cycle length; Calculate the increase/decrease range based on the historical production data of each segment and the historical production data of the previous segment; obtain the increase/decrease amplitude tag value of each segment's historical production data based on the increase/decrease range; and calculate the increase/decrease amplitude tag The average of the values gives the trend strength indicator as the second model selection feature.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps: receive input predictions Time, and obtain the corresponding historical production data from the server according to the predicted time; input the predicted time and historical production data into the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the model classifier according to the predicted time
  • the single-model prediction result of the optimal single-model model selected from the historical production data, or the predicted production data is calculated according to the weight of each predicted single model generated according to the prediction time and historical production data and the corresponding single-model prediction result of.
  • the training method of the model classifier involved in the execution of the computer-readable instructions by the processor includes: acquiring historical production data; acquiring training prediction time, and inputting the training prediction time and historical production data to the prediction sheet
  • the single-model prediction results are obtained from the model, and the predicted single-model prediction is obtained in advance; the comprehensive single-model prediction results and the self-attribute construction of the historical production data characterize the error between the single-model prediction results and the real results in the historical production data and characterize
  • the target model selection feature of the essential characteristics of historical production data and training the target model selection feature and the prediction single model to obtain a model classifier.
  • the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or It is used to establish corresponding weights for each of the prediction single models according to the target model selection characteristics, and obtain a prediction model according to the weights and the corresponding single model prediction results.
  • the target class model selection feature and the predicted single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the real results and The difference between the prediction results of the single model, the prediction single model with the smallest difference is obtained as the optimal prediction single model; and the model classifier is obtained by training the selection features of the optimal prediction single model and the target model.
  • the target class model selection feature and the prediction single model are trained to obtain a model classifier, which may include: extracting real results from historical production data; calculating the single model prediction The ratio between the result and the real result is the weight of the predicted single model according to the ratio; and the model classifier is obtained by training the weight of the predicted single model and the selection characteristics of the target model.
  • the target model selection feature constructed based on the single model prediction result and historical production data may include: constructing the first model based on the single model prediction result and historical production data A model selection feature; and constructing a second model selection feature based on historical production data.
  • inputting the training prediction time and historical production data into the prediction single model to obtain a single-model prediction result may include: acquiring a characteristic period corresponding to the training prediction time; The predicted value corresponding to the characteristic period is calculated by predicting the single model; and the first model selection feature constructed based on the single model prediction result and historical production data when the processor executes the computer-readable instructions may include: extracting from the historical production data The true value corresponding to the feature period; the first model selection feature is calculated based on the predicted value and the true value.
  • the selection feature of constructing the second model based on historical production data may include: acquiring a preset cycle length and interval, and performing historical production data according to the preset cycle length Segment; obtain the historical production data of the corresponding segment in each interval, sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the history of the segment corresponding to each interval The deviation value of the sequence value of the production data; and calculating the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
  • the selection feature of constructing the second model based on historical production data may include: obtaining a preset period length, and segmenting the historical production data according to the preset period length ; Calculate the increase and decrease range according to the historical production data of each section and the historical production data of the previous section; obtain the increase and decrease range mark value of the historical production data of each section according to the increase and decrease range; and calculate the increase and decrease range
  • the average value of the marker values gives a trend strength indicator as the second model selection feature.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

A method for processing production data comprises: receiving an input prediction time, and obtaining, according to the prediction time, corresponding historical production data from a server; inputting the prediction time and the historical production data into a model classifier to obtain predicted production data corresponding to the prediction time, wherein the predicted production data is obtained by means of a single-model prediction result of an optimal prediction single model, the optimal prediction single model being selected by the model classifier according to the prediction time and the historical production data; or the predicted production data is calculated and obtained by means of a corresponding weight and a corresponding single-model prediction result of each of multiple prediction single models, the prediction single models being generated according to the prediction time and the historical production data; and obtaining an investment file corresponding to the predicted production data, and sending the investment file to an investment terminal.

Description

生产数据处理方法、装置、计算机设备和存储介质Production data processing method, device, computer equipment and storage medium
相关申请的交叉引用Cross-reference of related applications
本申请要求于2018年12月19日提交中国专利局,申请号为2018115552084,申请名称为“模型分类器建立方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 19, 2018, with the application number 2018115552084, and the application name is "Model Classifier Establishment Method, Device, Computer Equipment, and Storage Media", all of which are approved by The reference is incorporated in this application.
技术领域Technical field
本申请涉及一种生产数据处理方法、装置、计算机设备和存储介质。The present application relates to a production data processing method, device, computer equipment and storage medium.
背景技术Background technique
在金融行业中,营业收入是指企业在生产经营活动中,因销售产品或提供劳务取得的各项收入,它关系到企业的生存和发展,对企业经营有重要的意义,因此,准确预测企业营收是投资分析的重要内容。In the financial industry, operating income refers to the various incomes obtained by the sale of products or the provision of labor services in the production and operation activities of the enterprise. It is related to the survival and development of the enterprise and is of great significance to the operation of the enterprise. Therefore, accurately predict the enterprise Revenue is an important part of investment analysis.
然而,发明人意识到,目前的生产数据即营业收入数据的处理是根据某一个单模型进行处理的,即将历史生产数据输入到单模型中从而可以得到与历史生产数据对应的预测生产数据,但是这种处理方式仅是根据某一个单模型得到的,这样一个预测的单模型容易忽略某些特殊因子或者是导致极端预测值,因此模型准确度不够,从而导致生产数据处理结果不准确。However, the inventor realized that the current production data, that is, the operating income data is processed according to a single model, that is, the historical production data is input into the single model so that the predicted production data corresponding to the historical production data can be obtained, but This processing method is only based on a single model. Such a predicted single model is easy to ignore certain special factors or lead to extreme predictions. Therefore, the accuracy of the model is not enough, resulting in inaccurate production data processing results.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种生产数据处理方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, a production data processing method, apparatus, computer equipment, and storage medium are provided.
一种生产数据处理方法,包括:A production data processing method, including:
接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
一种生产数据处理装置,包括:A production data processing device, including:
接收模块,用于接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;The receiving module is used to receive the input predicted time, and obtain corresponding historical production data from the server according to the predicted time;
处理模块,用于将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;A processing module, configured to input the predicted time and historical production data to a model classifier to obtain predicted production data corresponding to the predicted time, the predicted production data is the model classifier based on the predicted time and historical production Obtained by the single model prediction result of the optimal prediction single model selected by the data, or the predicted production data is the weight corresponding to each of the predicted single models generated according to the prediction time and historical production data and the corresponding single Calculated by the model prediction results;
发送模块,用于获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。The sending module is used to obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors are executed The following steps:
接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the drawings and description below. Other features and advantages of this application will become apparent from the description, drawings, and claims.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly explain the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. Those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为根据一个或多个实施例中生产数据处理方法的应用场景图。FIG. 1 is an application scenario diagram of a production data processing method according to one or more embodiments.
图2为根据一个或多个实施例中生产数据处理方法的流程示意图。FIG. 2 is a schematic flowchart of a production data processing method according to one or more embodiments.
图3为根据一个或多个实施例中生产数据处理装置的框图。3 is a block diagram of a production data processing device according to one or more embodiments.
图4为根据一个或多个实施例中计算机设备的框图。Figure 4 is a block diagram of a computer device in accordance with one or more embodiments.
具体实施方式detailed description
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application clearer, the following describes the present application in further detail with reference to 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.
本申请提供的生产数据处理方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104进行通信。终端102可以从服务器104获取到历史生产数据,从而可以根据该生产数据进行训练得到多个预测单模型,然后根据多个预测单模型和历史生产数据进行训练以得到模型分类器,从而可以根据模型分类器得到预测最准确的预测单模型或者是综合多个预测单模型的预测结果以得到最准确的预测结果,提高了预测结果的准确性。具体地,终端102可以获取到训练预测时间,并将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,从而可以根据单模型预测结果以及历史生产数据得到第一模型选择特征,该第一模型选择特征充分考虑到了各个预测单模型的预测误差,且为了充分考虑到历史生产数据的特征,终端102还可以仅根据历史生产数据得到第二模型选择特征,从而终端102可以对第一模型选择特征、第二模型选择特征以及预测单模型进行训练得到模型分类器,从而可以通过训练得到的模型分类器对预测时间的生产数据进行预测,即根据模型分类器得到预测最准确的预测单模型或者是综合多个预测单模型的预测结果以得到最准确的预测结果,提高了预测结果的准确性。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The production data processing method provided by this application can be applied to the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 via the network. The terminal 102 can obtain historical production data from the server 104, so that it can be trained according to the production data to obtain multiple predicted single models, and then trained according to the multiple predicted single models and historical production data to obtain a model classifier, which can be based on the model The classifier obtains the most accurate prediction single model or integrates the prediction results of multiple prediction single models to obtain the most accurate prediction result, which improves the accuracy of the prediction result. Specifically, the terminal 102 can obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain a single model prediction result, so that the first model selection feature can be obtained according to the single model prediction result and historical production data , The first model selection feature fully takes into account the prediction error of each prediction single model, and in order to fully take into account the characteristics of historical production data, the terminal 102 can also obtain the second model selection feature based only on the historical production data, so that the terminal 102 can The first model selection feature, the second model selection feature, and the prediction single model are trained to obtain a model classifier, so that the trained model classifier can be used to predict the production data at the prediction time, that is, the most accurate prediction is obtained according to the model classifier The prediction single model or the prediction results of multiple prediction single models are combined to obtain the most accurate prediction result, which improves the accuracy of the prediction result. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
具体地,本申请中预先生成了多个预测单模型,通过该多个预测单模型可以对生产数据进行预测,例如对营收数据进行预测;但是由于预测单模型的单模型预测结果可能存在偏差,导致最后无法确定哪一个预测单模型的单模型预测结果是准确的,因此为了避免该种情况的发生,本申请预先根据历史生产数据以及各个预测单模型的单模型预测结果生成了多个目标模型选择特征,该目标模型选择特征可以包括用于衡量各个单模型预测结果的准确性的特征以及历史生产数据自身属性的特征。从而本申请可以根据该多个目标模型选择特征以及预测单模型来进行训练得到生产数据的最佳预测结果,例如可以根据目标模型选择特征来选择得到最优预测单模型,或者是根据目标模型选择特征来得到各个预测单模型的权重,从而可以根据该权重以及各个预测单模型的单模型预测结果得到生产数据的预测结果。Specifically, multiple forecast single models are generated in advance in this application, and the production forecast data can be predicted through the multiple forecast single models, for example, revenue data; however, the single model prediction results of the forecast single model may be biased. , Resulting in the final determination of which single-model prediction result of the single-model prediction is accurate, so in order to avoid this situation, this application has generated multiple targets based on historical production data and the single-model prediction results of each predicted single model in advance Model selection features. The target model selection features may include features for measuring the accuracy of prediction results of individual models and features of historical production data's own attributes. Therefore, the present application can select features and predict single models according to the multiple target models for training to obtain the best prediction results of production data, for example, select features according to the target model to select the best predictive single model, or select according to the target model Feature to obtain the weight of each prediction single model, so that the prediction result of production data can be obtained according to the weight and the single model prediction result of each prediction single model.
在其中一个实施例中,如图2所示,提供了一种生产数据处理方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, a production data processing method is provided. The method is applied to the terminal in FIG. 1 as an example for description, including the following steps:
S202:获取历史生产数据。S202: Obtain historical production data.
具体地,历史生产数据是企业在以往的交易或者生产生活中所产生的数据,例如其可以是各个企业的历史营收数据等。终端可以首先向各个企业对应的财务服务器发送历史营收数据获取指令,从而各个企业的财务服务在接收到该历史营收数据获取指令后,将历史营收数据发送到对应的终端,终端在接收到历史营收数据后,将历史营收数据进行存储,例如存储在一个安全的数据库或服务器中。此外,各个企业的财务服务器还可以定期向终端提交各个企业最近一段时间的历史营收数据,以保证存储在终端一侧的历史营收数据的时效性。Specifically, the historical production data is data generated by an enterprise in past transactions or production and life, for example, it may be historical revenue data of various enterprises. The terminal may first send a historical revenue data acquisition instruction to the financial server corresponding to each enterprise, so that after receiving the historical revenue data acquisition instruction, the financial service of each enterprise sends the historical revenue data to the corresponding terminal, and the terminal is receiving After reaching the historical revenue data, store the historical revenue data, for example, in a secure database or server. In addition, the financial servers of each enterprise can also periodically submit historical revenue data of each enterprise to the terminal in the most recent period to ensure the timeliness of the historical revenue data stored on the terminal side.
且可选地,在终端获取到历史生产数据之后,还可以对该历史生产数据进行预处理以提高模型训练的准确性。例如,终端可以删除异常数据或者是对历史生产数据进行处理得到模型训练需要的历史生产数据。其中删除异常数据可以包括终端判断历史生产数据中是否存在数据不全、为0或者是为空的数据,如果存在,则删除该些异常数据。终端对历史生产数据进行处理得到模型训练需要的历史生产数据可以是对历史生产数据进行差分,例如在删除异常数据后,终端可以判断所得到的历史生产数据师傅需要进行差分,例如当所得到的历史生产数据是半年的历史生产数据时,则终端可以通过该半年的历史生产数据减去第一季度的历史生产数据,从而可以得到第二季度的历史生产数据。And optionally, after the terminal obtains the historical production data, the historical production data can also be pre-processed to improve the accuracy of model training. For example, the terminal may delete abnormal data or process historical production data to obtain historical production data needed for model training. Deleting the abnormal data may include the terminal determining whether there is incomplete data, zero or empty data in the historical production data, and if there is, deleting the abnormal data. The terminal processes the historical production data to obtain the historical production data required for model training. The historical production data can be differentiated. For example, after deleting the abnormal data, the terminal can judge that the obtained historical production data needs to be differentiated. For example, when the obtained history When the production data is half a year of historical production data, the terminal can subtract the historical production data of the first quarter from the historical production data of the half year, so that the historical production data of the second quarter can be obtained.
S204:获取训练预测时间,并将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,预测单模型是预先训练得到的。S204: Obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain a single model prediction result. The prediction single model is obtained by pre-training.
具体地,预测单模型可以包括多个类别,例如时间序列类模型、趋势拟合类模型、时序拟合综合类模型和多因子类模型等。其中时间序列类模型可以为arima模型,其是利用时间序列数据本身建立的模型,历史生产数据其中主要包括两个字段,一个是时间字段,另外一个是营收数据字段,从而可以根据该两个字段来建立arima模型;趋势拟合类模型可以为polyfit模型,其是根据已知的营收数据构建离散点,即时间为x轴,历史营收数据为y轴,然后根据离散点来进行拟合构建函数作为趋势拟合模型,即所得到的拟合函数即为趋势拟合模型;时序拟合综合类模型可以是prophet模型,其是根据营收数据分段连续增长来生成分段模型的,其中可以将营收数据按照不同的增长幅度来进行分段,然后得到每一个分段对应的函数,将所有的函数组合得到预测单模型;多因子模型可以是xgboost模型,其是根据分类器的思想来构建的预测单模型,即根据时间和营收数据将历史营收数据进行分类,然后对分类后的历史营收数据进行学习得到预测单模型。Specifically, the prediction single model may include multiple categories, such as a time series model, a trend fitting model, a time series fitting comprehensive model, and a multi-factor model. The time series model can be the arima model, which is a model built using the time series data itself. The historical production data mainly includes two fields, one is the time field, and the other is the revenue data field, so that the two Field to build the arima model; the trend-fitting model can be a polyfit model, which builds discrete points based on known revenue data, that is, time is on the x-axis, and historical revenue data is on the y-axis, and then based on discrete points The combined construction function is used as the trend-fitting model, that is, the obtained fitting function is the trend-fitting model; the time-series fitting comprehensive model may be a prophet model, which generates a segmented model based on the continuous growth of revenue data in segments , Where the revenue data can be segmented according to different growth rates, and then the function corresponding to each segment can be obtained, and all functions can be combined to obtain a single prediction model; the multi-factor model can be the xgboost model, which is based on the classifier The idea is to build a forecasting single model, that is, classify historical revenue data according to time and revenue data, and then learn the classified historical revenue data to obtain a forecasting single model.
具体地,训练预测时间其也是历史时间,即已经过去的时间,在训练模型的时候,需要根据训练预测时间将历史生产数据划分为样本数据和校验数据,其中样本数据用于预测,校验数据用于调整预测模型或者是用于检验预测结果是否准确。Specifically, the training prediction time is also the historical time, that is, the time that has passed. When training the model, the historical production data needs to be divided into sample data and verification data according to the training prediction time, where the sample data is used for prediction, verification The data is used to adjust the prediction model or to check whether the prediction result is accurate.
终端可以将训练预测时间对应的历史生产数据作为校验数据;而将训练预测时间之前的历史生产数据作为样本数据;终端将该样本数据和训练预测时间输入到预测单模型中可以得到每一个预测单模型所输出的单模型预测结果。例如训练预测时间为2018年第三季度,则可以获取到2018年之前的历史生产数据作为样本数据,将该样本数据输入到预测 单模型中即可以得到与训练预测时间对应的单模型预测结果,例如可以得到arima模型的预测结果,polyfit模型的预测结果,prophet模型的预测结果以及xgboost模型的预测结果等。The terminal can use the historical production data corresponding to the training prediction time as verification data; and the historical production data before the training prediction time as sample data; the terminal inputs the sample data and training prediction time into the prediction single model to obtain each prediction The single model prediction result output by the single model. For example, the training prediction time is the third quarter of 2018, you can obtain historical production data before 2018 as sample data, and enter the sample data into the prediction single model to obtain the single model prediction result corresponding to the training prediction time. For example, the prediction results of the arima model, the prediction results of the polyfit model, the prediction results of the prophet model, and the prediction results of the xgboost model can be obtained.
S206:综合单模型预测结果以及历史生产数据的自身属性构建表征了单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征。S206: The comprehensive single-model prediction results and the historical production data's own attributes are constructed to characterize the error between the single-model prediction results and the historical production data and the target model selection characteristics that characterize the historical production data's essential characteristics.
具体地,目标模型选择特征可以包括用于衡量各个单模型预测结果的准确性的特征以及历史生产数据自身属性的特征,例如,目标模型选择特征可以包括第一模型选择特征以及第二模型选择特征,其中第一模型选择特征是充分考虑到了单模型预测结果和历史生产数据中的真实结果之间的误差的,第二模型选择特征是用于标识历史生产数据本质的特征。Specifically, the target model selection feature may include a feature for measuring the accuracy of each single model prediction result and the feature of historical production data's own attributes, for example, the target model selection feature may include a first model selection feature and a second model selection feature , Where the first model selection feature fully takes into account the error between the prediction results of the single model and the actual results in the historical production data, and the second model selection feature is a feature used to identify the essence of the historical production data.
具体地,第一模型选择特征是充分考虑到了单模型预测结果和历史生产数据中的真实结果之间的误差的,从而可以考量每一个预测单模型的预测准确性。其中单模型预测结果即预测结果,而历史生产数据则是真实结果的表征,因此可以通过预测结果和真实结果来构建第一模型选择特征,例如可以选取单模型预测结果与历史生产数据中对应训练预测时间的真实结果的比值作为第一模型选择特征。可选地,该第一模型选择特征可是每个预测单模型的环比上一周期的预测误差和/或每个预测单模型的历史同比周期的预测误差。Specifically, the first model selection feature fully considers the error between the prediction results of the single model and the real results in the historical production data, so that the prediction accuracy of each prediction single model can be considered. The single-model prediction result is the prediction result, and the historical production data is a representation of the real result, so the first model selection feature can be constructed by the prediction result and the real result, for example, the corresponding training in the single-model prediction result and the historical production data can be selected The ratio of the real result of the prediction time is used as the first model selection feature. Optionally, the first model selection feature may be the prediction error of each prediction single model from the previous cycle and/or the prediction error of each prediction single model from the previous year.
具体地,第二模型选择特征是用于标识历史生产数据本质的特征,第二模型选择特征可以是根据训练预测时间之前的历史生产数据计算得到的,其可以包括周期性强弱指标和/或趋势性强弱指标。其中周期性强弱指标是用于表示历史生产数据中的周期性的,趋势性强弱指标是用于表示历史生产数据的趋势性的,例如增长或者是下降等。Specifically, the second model selection feature is a feature used to identify the essence of historical production data. The second model selection feature may be calculated based on historical production data before the training prediction time, which may include periodic strength indicators and/or Trend strength indicator. The cyclical strength indicator is used to represent the periodicity in the historical production data, and the trend strength indicator is used to represent the trend of the historical production data, such as growth or decline.
S208:对目标模型选择特征以及预测单模型进行训练得到模型分类器,模型分类器用于根据目标模型选择特征从预测单模型中选出最优预测单模型或者是用于根据目标模型选择特征为每一所述预测单模型建立对应的权重,并根据权重以及对应的单模型预测结果得到预测模型。S208: Train the target model selection feature and the prediction single model to obtain a model classifier. The model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or to select the feature based on the target model for each A corresponding weight of the prediction single model is established, and a prediction model is obtained according to the weight and the prediction result of the corresponding single model.
具体地,模型分类器的训练过程可以是将预测单模型作为Y值,然后将所构建的第一模型选择特征和第二模型选择特征作为X值,对Y值和X值之间的对应关系进行学习得到模型分类器。终端首先确定训练预测时间,然后根据单模型预测值和训练预测时间对应的历史生产数据确定训练预测时间对应的Y值,从而可以建立Y值和X值之间的对应关系,将所有的Y值和X值标记于坐标系中得到多个离散的点,然后对多个离散的点进行拟合从而可以得到模型分类器。Specifically, the training process of the model classifier may be to use the predicted single model as the Y value, and then use the constructed first model selection feature and the second model selection feature as the X value, and the corresponding relationship between the Y value and the X value Learn to get the model classifier. The terminal first determines the training prediction time, and then determines the Y value corresponding to the training prediction time based on the single model prediction value and the historical production data corresponding to the training prediction time, so that the correspondence between the Y value and the X value can be established, and all the Y values can be established. Mark the X value in the coordinate system to obtain multiple discrete points, and then fit the multiple discrete points to obtain the model classifier.
S210:通过训练得到的模型分类器对预测时间的生产数据进行预测。S210: The model classifier obtained by training predicts the production data at the prediction time.
在得到模型分类器之后,终端可以输入预测时间,从而终端可以根据该预测时间从服务器获取到对应的历史生产数据,然后将预测时间和历史生产数据输入至模型分类器得到预测时间对应的预测生产数据,且在获取到预测时间对应的预测生产数据后,服务器可以 根据该预测生产数据获取到对应的投资文件,并将投资文件发送给投资终端,以便于终端根据该投资文件确定对应的投资方案。其中预测生产数据是模型分类器根据预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者预测生产数据是根据预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的。After obtaining the model classifier, the terminal can input the prediction time, so that the terminal can obtain the corresponding historical production data from the server according to the prediction time, and then input the prediction time and the historical production data into the model classifier to obtain the prediction production corresponding to the prediction time Data, and after obtaining the predicted production data corresponding to the predicted time, the server can obtain the corresponding investment file according to the predicted production data, and send the investment file to the investment terminal, so that the terminal can determine the corresponding investment plan according to the investment file . Where the forecast production data is obtained by the single model prediction result of the optimal forecast single model selected by the model classifier according to the forecast time and historical production data, or the forecast production data is generated according to the forecast time and historical production data The weight corresponding to the model and the corresponding prediction result of the single model are calculated.
上述生产数据处理方法,在建立模型分类器的时候,充分考虑了多个单模型的单模型预测结果以及历史生产数据,并根据单模型预测结果和历史生产数据构建得到了第一模型选择特征,根据历史生产数据构建得到第二模型选择特征,从而根据第一模型选择特征和第二模型选择特征进行训练得到了模型分类器,这样模型分类器充分考虑了各个模型的特点以及历史生产数据的特征,从而可以提高模型预测的准确性。The above production data processing method fully considers the single model prediction results and historical production data of multiple single models when building the model classifier, and constructs the first model selection feature based on the single model prediction results and historical production data. The second model selection feature is constructed based on historical production data, and the model classifier is obtained by training based on the first model selection feature and the second model selection feature, so that the model classifier fully considers the characteristics of each model and the characteristics of historical production data , Which can improve the accuracy of model prediction.
在其中一个实施例中,对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算真实结果和单模型预测结果的差值,获取差值最小的预测单模型作为最优预测单模型;对最优预测单模型、目标模型选择特征进行训练得到模型分类器。In one of the embodiments, training target model selection features and predicting a single model to obtain a model classifier may include: extracting real results from historical production data; calculating the difference between the real results and the single model prediction results to obtain the difference The smallest predictive single model is used as the optimal predictive single model; the optimal predictive single model and the target model are trained to select features to obtain the model classifier.
在其中一个实施例中,对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算单模型预测结果和真实结果的比值,根据比值得到预测单模型的权重;对预测单模型的权重、目标模型选择特征进行训练得到模型分类器。In one of the embodiments, training target model selection features and predicting a single model to obtain a model classifier may include: extracting real results from historical production data; calculating the ratio of the single model prediction results to the real results, and obtaining predictions based on the ratios Single model weights; train the weights of the predicted single model and the target model selection features to obtain the model classifier.
具体地模型分类器可以分为两种,其根据Y值的不同而不同,其中Y值可以预测单模型,也可以是每一个预测单模型的权重,其中Y值是一个预测单模型的时候,则是通过模型分类器选取到最优预测单模型,Y值是每一个预测单模型的权重,则是通过模型分类器获取到每一个预测单模型的权重,从而充分考虑到每一个预测单模型的预测结果。Specifically, the model classifier can be divided into two types, which are different according to the Y value, where the Y value can predict a single model, or the weight of each predicted single model, where the Y value is a predicted single model, Then, the optimal single prediction model is selected through the model classifier, and the Y value is the weight of each prediction single model. The weight of each prediction single model is obtained through the model classifier, so that each prediction single model is fully considered Forecast results.
具体地,当Y值是一个预测单模型时,终端可以从历史生产数据中提取真实结果,即与训练预测时间对应的真实结果,然后将真实结果与单模型预测结果进行比较,获取与真实结果最接近的单模型预测结果,并将该单模型预测结果对应的预测单模型作为Y值,然后对Y值和对应的X值进行学习,例如将Y值和X值进行拟合以得到每一个X值对应的权重,从而可以建立模型选择器。Specifically, when the Y value is a single prediction model, the terminal can extract the real results from the historical production data, that is, the real results corresponding to the training prediction time, and then compare the real results with the single model prediction results to obtain the real results The closest single model prediction result, and use the predicted single model corresponding to the single model prediction result as the Y value, and then learn the Y value and the corresponding X value, such as fitting the Y value and the X value to get each The weight corresponding to the X value, so that a model selector can be established.
当Y值是每一个预测单模型的权重时,终端可以从历史生产数据中提取到真实结果,即与训练预测时间对应的真实结果,然后将真实结果与单模型预测结果进行比较,通过每个单模型预测结果与真实结果的比值可以得到每一个预测单模型作为最优单模型的可能性,即权重,且可选地,终端可以将一个预测单模型作为最优单模型的可能性进行归一化即可以得到上述每个预测单模型对应的权重,从而终端对该些权重和对应的X值进行学习即可以得到模型分类器。这样当模型选择器中输入第一模型选择特征和第二模型选择特征时,模型分类器输出的是每个预测单模型的权重,例如第一预测单模型权重为0.25,第二预测单模型权重为0.15,第三预测单模型权重为0.2,第四单模型权重为0.4。从而终 端可以根据该些预测单模型的单模型预测结果以及权重计算得到最后的预测结果,即预测时间对应的营收数据。When the Y value is the weight of each prediction single model, the terminal can extract the real results from the historical production data, that is, the real results corresponding to the training prediction time, and then compare the real results with the single model prediction results, through each The ratio of the prediction result of the single model to the true result can obtain the probability of each prediction single model as the optimal single model, that is, the weight, and optionally, the terminal can classify the possibility of a prediction single model as the optimal single model. One normalization can obtain the weights corresponding to each prediction single model, so that the terminal can learn these weights and the corresponding X value to obtain the model classifier. In this way, when the first model selection feature and the second model selection feature are input into the model selector, the model classifier outputs the weight of each predicted single model, for example, the first predicted single model weight is 0.25, and the second predicted single model weight It is 0.15, the weight of the third prediction model is 0.2, and the weight of the fourth model is 0.4. Therefore, the terminal can calculate the final prediction result based on the single-model prediction results and weights of the prediction single models, that is, the revenue data corresponding to the prediction time.
上述实施例中,Y值可以预测单模型,也可以是每一个预测单模型的权重;当Y值是一个预测单模型时,则可以是选取一个最优单模型;当Y值是每一个预测单模型的权重,则充分考虑到每一个预测单模型的预测结果,均可以保证通过模型分类器所得到的预测结果的准确性。In the above embodiment, the Y value can predict a single model, or the weight of each predicted single model; when the Y value is a predicted single model, it can choose an optimal single model; when the Y value is each prediction The weight of the single model fully considers the prediction result of each prediction single model, and can guarantee the accuracy of the prediction result obtained by the model classifier.
在其中一个实施例中,将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,可以包括:获取训练预测时间对应的特征周期;通过预测单模型计算得到与特征周期对应的预测值;根据单模型预测结果以及历史生产数据构建第一模型选择特征,可以包括:从历史生产数据提取与特征周期对应的真实值;根据预测值和真实值计算得到第一模型选择特征。其中特征周期可以是环比上一周期或同比上一周期,当是环比上一周期时,第一模型选择特征是环比预测误差,当是同比上一周期时,第一模型选择特征是同比上一周期。In one of the embodiments, inputting the training prediction time and historical production data into the prediction single model to obtain a single model prediction result may include: obtaining the feature period corresponding to the training prediction time; calculating the corresponding period corresponding to the feature period through the prediction single model Predicted value; constructing the first model selection feature based on the single model prediction result and historical production data, which may include: extracting the true value corresponding to the feature period from the historical production data; calculating the first model selection feature based on the predicted value and the true value. The characteristic period can be the previous period or the previous period. When the previous period is the first period, the first model selection feature is the forecast error. When the first period is the last period, the first model selection feature is the previous period. cycle.
在其中一个实施例中,根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度和区间,根据预设周期长度对历史生产数据进行分段;获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值;计算每一区间对应的分段的历史生产数据的顺序值的偏差值;计算偏差值的平均值得到周期性强弱指标作为第二模型选择特征。In one of the embodiments, constructing a second model selection feature based on historical production data may include: obtaining a preset cycle length and interval, segmenting the historical production data according to the preset cycle length; obtaining the corresponding score in each interval The historical production data of the segment, and sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the deviation value of the sequence value of the segmented historical production data corresponding to each interval; calculate the deviation The average of the values gives the periodic strength indicator as the second model selection feature.
在其中一个实施例中,根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度,根据预设周期长度对历史生产数据进行分段;根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度;根据增减幅度得到每一分段的历史生产数据的增减幅度标记值;计算增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。In one of the embodiments, constructing a second model selection feature based on historical production data may include: obtaining a preset period length, segmenting the historical production data according to the preset period length; according to the historical production data of each segment The historical production data of the previous section is calculated to obtain the increase and decrease range; according to the increase and decrease range, the increase and decrease range mark value of each section of the historical production data is calculated; the average value of the increase and decrease range mark value is calculated to obtain the trend strength indicator as The second model selects features.
具体地,上述模型分类器中涉及到第一模型选择特征和第二模型选择特征,且为了方便,在下文中将两个特征并称为模型选择特征进行说明。即模型选择特征可以包括环比上一周期预测结果的预测误差、同比上一周期预测结果的预测误差、周期性强弱指标、趋势性强弱指标。Specifically, the first model selection feature and the second model selection feature are involved in the above model classifier, and for convenience, the two features are hereinafter referred to as model selection features for description. That is, the model selection characteristics may include the prediction error of the previous cycle prediction result, the prediction error of the previous cycle prediction result, the periodic strength index, and the trend strength index.
其中环比上一周期预测结果的预测误差中周期可以是指一个季度或者是一个年份,环比上一周期预测结果的预测误差是针对每一个预测单模型以及训练预测时间来说的,每一个预测单模型均对应一个环比上一周期预测结果的预测误差。终端可以获取到训练预测时间,然后获取到环比上一周期,并通过预测单模型计算得到环比上一周期对应的第一预测值,并从历史生产数据中提取与环比上一周期对应的第一真实值,终端然后根据第一预测值与第一真实值的比值得到环比上一周期预测结果的预测误差,即上述的第一模型选择特征。Among them, the period in the forecast error of the previous cycle’s forecast results can refer to a quarter or a year, and the forecast error of the previous cycle’s forecast results is for each forecast model and training forecast time. Each forecast unit The models all correspond to a prediction error of the prediction result of the previous period. The terminal can obtain the training prediction time, and then obtain the previous period of the previous period, and calculate the first prediction value corresponding to the previous period of the previous period by calculating the single model of the prediction, and extract the first prediction value corresponding to the previous period of the previous period from the historical production data For the real value, the terminal then obtains the prediction error of the prediction result of the previous period based on the ratio of the first predicted value and the first true value, that is, the first model selection feature described above.
具体地,以其中一个预测单模型的一个训练预测时间来进行说明,假设训练预测时间 为2018年第四季度,则终端首先获取到2018年第三季度该预测单模型对应的第一预测值,然后终端从历史生产数据中提取到2018年第三季度该预测单模型的第一真实值,将第一预测值与第一真实值的比值作为环比上一周期预测结果的预测误差。Specifically, a training prediction time of one prediction single model is used for explanation. Assuming that the training prediction time is the fourth quarter of 2018, the terminal first obtains the first prediction value corresponding to the prediction single model in the third quarter of 2018, Then the terminal extracts the first true value of the forecasted single model from the historical production data in the third quarter of 2018, and uses the ratio of the first predicted value and the first true value as the prediction error of the previous cycle's prediction result.
其中同比上一周期预测结果的预测误差中周期可以是指一个季度或者是一个年份,同比上一周期预测结果的预测误差是针对每一个预测单模型以及训练预测时间来说的,每一个预测单模型均对应一个同比上一周期预测结果的预测误差。终端可以获取到训练预测时间,然后获取到同比上一周期,并通过预测单模型计算得到同比上一周期对应的第二预测值,并从历史生产数据中提取与同比上一周期对应的第二真实值,终端然后根据第二预测值与第二真实值的比值得到同比上一周期预测结果的预测误差,即上述的第一模型选择特征。Among them, the period of the forecast error of the forecast result of the previous period of the previous year can refer to a quarter or a year. The forecast error of the forecast result of the previous period of the previous period is for each forecast single model and training prediction time. The models all correspond to a forecast error compared to the forecast result of the previous period. The terminal can obtain the training prediction time, and then obtain the previous period of the previous year, and calculate the second prediction value corresponding to the previous period of the previous year by calculating the single model of the prediction, and extract the second prediction value corresponding to the previous period of the previous year from the historical production data. For the true value, the terminal then obtains the prediction error of the prediction result of the previous period based on the ratio of the second predicted value and the second true value, that is, the above-mentioned first model selection feature.
具体地,以其中一个预测单模型的一个训练预测时间来进行说明,假设训练预测时间为2018年第四季度,则终端首先获取到2017年第四季度该预测单模型对应的第二预测值,然后终端从历史生产数据中提取到2017年第四季度该预测单模型的第二真实值,将第二预测值与第二真实值的比值作为同比上一周期预测结果的预测误差。Specifically, a training prediction time of one of the prediction single models is used for explanation. Assuming that the training prediction time is the fourth quarter of 2018, the terminal first obtains the second prediction value corresponding to the prediction single model in the fourth quarter of 2017, Then the terminal extracts the second true value of the forecasted single model from the historical production data in the fourth quarter of 2017, and uses the ratio of the second predicted value and the second true value as the forecast error of the previous year’s forecast results.
其中,周期性强弱指标是用于表征历史生产数据中的周期性特征的。终端在获取到历史生产数据后,获取到预设周期长度和区间,例如预设周期长度为季度,区间可以为年,即一个区间中可以包括多个周期。终端可以根据周期长度对历史生产数据进行分段,然后获取到每一个区间中对应的分段中的历史生产数据并进行排序,并对排序后的历史生产数据进行标记得到顺序值,然后计算每一区间中的对应分段的历史生产数据的顺序值的偏差值,计算偏差值的平均值得到周期性强弱指标,即上述的第二模型选择特征。Among them, the periodic strength index is used to characterize the periodic characteristics in historical production data. After acquiring the historical production data, the terminal obtains a preset cycle length and interval, for example, the preset cycle length is quarter, and the interval may be a year, that is, an interval may include multiple cycles. The terminal can segment the historical production data according to the cycle length, and then obtain and sort the historical production data in the corresponding segment in each interval, and mark the sorted historical production data to obtain the sequence value, and then calculate each The deviation value of the sequence value of the historical production data corresponding to the segment in an interval, and calculating the average value of the deviation values to obtain the periodic strength index, that is, the above-mentioned second model selection feature.
具体地,以周期长度为季度,区间长度为年份为例进行说明,假设历史生产数据包括2015年、2016年和2017年的营收数据,因此终端首先将该些营收数据按照周期长度进行分段,分为2015年第一季度、第二季度、第三季度和第四季度,2016年第一季度、第二季度、第三季度和第四季度以及2017年的第一季度、第二季度、第三季度和第四季度,然后对每一区间中对应的分段进行排序,并标记排序后的分段的顺序值,具体可以参见下表1所示:Specifically, taking the cycle length as the quarter and the interval length as the year as an example for explanation, it is assumed that the historical production data includes revenue data for 2015, 2016, and 2017, so the terminal first divides the revenue data according to the cycle length The segment is divided into the first quarter, second quarter, third quarter and fourth quarter of 2015, the first quarter, second quarter, third quarter and fourth quarter of 2016 and the first quarter and second quarter of 2017 , The third quarter and the fourth quarter, and then sort the corresponding segments in each interval, and mark the sequence value of the sorted segments, as shown in Table 1 below:
表1排序结果Table 1 Sorting results
顺序值Ordinal value 第一季度the first season 第二季度Second quarter 第三季度the third quater 第四季度Fourth quarter
2015年2015 11 22 33 22
2016年2016 22 11 22 33
2017年2017 33 33 11 11
如上表所示,2015年为第一区间,2016年为第二区间,2017年为第三区间,其中每一区间中的对应分段即2015年的第一季度、2016年的第一季度以及2017年的第一季度,终端可以对该3个分段的历史生产数据进行排序,即对历史营收数据进行排序,并标记排 序后每一个分段的顺序值,例如最大值为1,其次为2,依次标记下去。这样将每一区间的对应分段都排序完成。As shown in the table above, 2015 is the first interval, 2016 is the second interval, and 2017 is the third interval. The corresponding segment in each interval is the first quarter of 2015, the first quarter of 2016, and In the first quarter of 2017, the terminal can sort the historical production data of the three segments, that is, sort the historical revenue data, and mark the sequence value of each segment after sorting, for example, the maximum value is 1, followed by For 2, mark it in turn. In this way, the corresponding segments of each interval are sorted and completed.
在排序完成后,终端获取到每一个区间中的顺序值,根据该顺序值计算得到偏差值,例如上述2015年对应的第一区间的顺序值包括1、2、3、2,终端计算1、2、3、2的偏差值,例如可以计算1、2、3、2的标准差,同样地,终端还可以计算其他区间的标准差,最后将所有标准差的平均值作为周期性强弱指标。After the sorting is completed, the terminal obtains the sequence value in each interval, and calculates the deviation value according to the sequence value. For example, the sequence value of the first interval corresponding to 2015 includes 1, 2, 3, and 2, and the terminal calculates 1. The deviation values of 2, 3, and 2, for example, the standard deviations of 1, 2, 3, and 2 can be calculated. Similarly, the terminal can also calculate the standard deviations of other intervals, and finally use the average value of all standard deviations as the periodic strength indicator .
其中,趋势性强弱指标是用于表征历史生产数据的趋势性特征的。终端在获取到历史生产数据后,获取到预设周期长度,例如预设周期长度为季度。终端可以根据周期长度对历史生产数据进行分段,然后根据当前分段的历史生产数据和上一分段的历史生产数据计算得到增减幅度,并可以根据该增减幅度对每一分段的历史生产数据进行标记得到增减幅度标记值,终端最后计算增减幅度标记值的平均值得到趋势性强弱指标,即上述的第二模型选择特征。Among them, the trend strength index is used to characterize the trend characteristics of historical production data. After acquiring historical production data, the terminal acquires a preset period length, for example, the preset period length is quarter. The terminal can segment the historical production data according to the length of the cycle, and then calculate the increase and decrease range according to the historical production data of the current segment and the historical production data of the previous segment, and can determine the increase and decrease of each segment according to the increase and decrease The historical production data is marked to obtain the increase-decrease amplitude mark value, and the terminal finally calculates the average value of the increase-decrease amplitude mark value to obtain the trend strength index, that is, the above-mentioned second model selection feature.
具体地,以周期长度为季度为例进行说明,假设历史生产数据包括2015年、2016年和2017年的营收数据,因此终端首先将该些营收数据按照周期长度进行分段,分为2015年第一季度、第二季度、第三季度和第四季度,2016年第一季度、第二季度、第三季度和第四季度以及2017年的第一季度、第二季度、第三季度和第四季度,然后针对每一分段计算得到增减幅度值,例如2015年第一季度的营收数据和2015年第二季度的营收数据的连线的斜率可以作为2015年第二季度的增减幅度值,同样地,还可以计算其他分段,即其他的周期的增减幅度值。在计算完增减幅度值后,终端根据增减幅度值计算得到增减幅度标记值,例如当增减幅度值大于0时,则其增减幅度标记值为+1,当增减幅度值小于0时,则增减幅度标记值为-1,当增减幅度等于0时,则增减幅度标记值为0。终端在获取到所有的增减幅度标记值后,可以计算标记幅度标记值的平均值,该些平均值即为趋势性强弱指标,即上述的第二模型选择特征。Specifically, taking the cycle length as a quarter for example, it is assumed that the historical production data includes revenue data for 2015, 2016, and 2017, so the terminal first segments the revenue data according to the cycle length, divided into 2015 Q1, Q2, Q3 and Q4 of 2016, Q1, Q2, Q3 and Q4 of 2016 and Q1, Q2, Q3 and Q1 of 2017 The fourth quarter, and then calculate the increase and decrease value for each segment, for example, the slope of the connection between the first quarter of 2015 revenue data and the second quarter of 2015 revenue data can be used as the second quarter of 2015 The increase and decrease amplitude values can also be calculated for other segments, that is, the increase and decrease amplitude values for other periods. After calculating the increase and decrease amplitude value, the terminal calculates the increase and decrease amplitude mark value according to the increase and decrease amplitude value, for example, when the increase and decrease amplitude value is greater than 0, the increase and decrease amplitude value is +1, when the increase and decrease amplitude value is less than When 0, the increase and decrease amplitude tag value is -1, when the increase and decrease amplitude is equal to 0, the increase and decrease amplitude tag value is 0. After acquiring all the increase and decrease amplitude mark values, the terminal may calculate the average value of the mark amplitude mark values, and these average values are the trend strength index, that is, the above-mentioned second model selection feature.
上述实施例中,根据历史生产数据和各个预测单模型可以计算得到环比上一周期预测结果的预测误差、同比上一周期预测结果的预测误差、周期性强弱指标、趋势性强弱指标,从而再进行模型分类器的训练,保证了模型分类器的预测的准确性。In the above embodiment, based on historical production data and each forecasting single model, the prediction error of the previous-period forecast results, the forecast error of the previous-period forecast results, the periodic strength index, and the trend strength index can be calculated. Then the model classifier is trained to ensure the accuracy of the model classifier's prediction.
具体地,下文中将结合上述模型选择特征来对模型训练器的训练过程进行详细地说明:Specifically, the training process of the model trainer will be described in detail below in conjunction with the above model selection features:
以上述环比上一周期预测结果的预测误差、同比上一周期预测结果的预测误差、周期性强弱指标、趋势性强弱指标作为模型选择特征;以历史数据为2015年-2017年的营收数据为例,例如当所得到的历史生产营收是半年的历史营收数据时,则终端可以通过该半年的历史营收数据减去第一季度的历史营收数据,从而可以得到第二季度的历史营收数据,终端从而可以根据标准化后的历史营收数据计算上述周期性强弱指标A和趋势性强弱指标B,然后根据训练预测时间计算每个预测单模型对应的环比上一周期预测结果的预测误差、同比上一周期预测结果的预测误差,假设存在4个预测单模型,则对应存在4个环 比上一周期预测结果的预测误差C、D、E、F以及4个同比上一周期预测结果的预测误差M、N、P、Q,因此建立模型分类器Y=a1*A+b1*B+c1*C+d1*D+e1*E+f1*F+m1*M+n1*N+p1*P+q1*Q,其中a1、b1、c1、d1、e1、f1、m1、n1、p1以及q1为各个模型选择特征的权重,通过拟合训练可以得到a1、b1、c1、d1、e1、f1、m1、n1、p1以及q1的值,在a1、b1、c1、d1、e1、f1、m1、n1、p1以及q1的值确定后,则可以得到模型分类器,且在得到模型分类器后,当用户输入了预测时间,终端可以获取到该预测时间对应的历史营收数据,然后将预测时间和历史营收数据输入至模型分类器中即可以得到与预测时间对应的预测营收数据。Use the above-mentioned forecast error of the previous cycle forecast results, the forecast error of the previous year’s forecast results, cyclic strength indicators, and trend strength indicators as model selection features; use historical data as revenue from 2015 to 2017 Data as an example, for example, when the obtained historical production revenue is half a year of historical revenue data, the terminal can subtract the historical revenue data of the first quarter from the historical revenue data of the half year, so that the second quarter of the Historical revenue data, so that the terminal can calculate the above periodic strength index A and trend strength index B based on the standardized historical revenue data, and then calculate the chain-on-cycle previous period forecast corresponding to each forecasting single model according to the training forecast time The forecast error of the results and the forecast error of the forecast results of the previous period compared with the previous period. Assuming that there are 4 forecast single models, there are 4 forecast errors C, D, E, F and 4 of the previous period. The prediction errors M, N, P, Q of the period prediction result, so the model classifier Y = a1*A+b1*B+c1*C+d1*D+e1*E+f1*F+m1*M+n1 *N+p1*P+q1*Q, where a1, b1, c1, d1, e1, f1, m1, n1, p1, and q1 are the weights for selecting features for each model, and a1, b1, c1 can be obtained by fitting training , D1, e1, f1, m1, n1, p1, and q1, after the values of a1, b1, c1, d1, e1, f1, m1, n1, p1, and q1 are determined, the model classifier can be obtained, and After obtaining the model classifier, when the user enters the predicted time, the terminal can obtain the historical revenue data corresponding to the predicted time, and then input the predicted time and historical revenue data into the model classifier to obtain the corresponding to the predicted time Forecast revenue data.
上述实施例中,在建立模型分类器的时候,充分考虑了多个单模型的单模型预测结果以及历史生产数据,并根据单模型预测结果和历史生产数据构建得到了第一模型选择特征,根据历史生产数据构建得到第二模型选择特征,从而根据第一模型选择特征和第二模型选择特征进行训练得到了模型分类器,这样模型分类器充分考虑了各个模型的特点以及历史生产数据的特征,从而可以提高模型预测的准确性。In the above embodiment, when building the model classifier, the single-model prediction results and historical production data of multiple single models are fully considered, and the first model selection feature is constructed based on the single-model prediction results and historical production data. The historical production data is constructed to obtain the second model selection feature, so that the model classifier is obtained by training according to the first model selection feature and the second model selection feature, so that the model classifier fully considers the characteristics of each model and the characteristics of historical production data, Therefore, the accuracy of model prediction can be improved.
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowchart of FIG. 2 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps may be executed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is not necessarily sequential, but may be performed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一个实施例中,如图3所示,提供了一种生产数据处理装置,包括:接收模块100、处理模块200以及发送模块300,其中:In one embodiment, as shown in FIG. 3, a production data processing device is provided, including: a receiving module 100, a processing module 200, and a sending module 300, wherein:
接收模块100,用于接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据。The receiving module 100 is configured to receive the input predicted time, and obtain corresponding historical production data from the server according to the predicted time.
处理模块200,用于将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的。The processing module 200 is configured to input the predicted time and historical production data to a model classifier to obtain predicted production data corresponding to the predicted time, the predicted production data is the model classifier according to the predicted time and history Obtained from the single-model prediction result of the optimal prediction single model selected by the production data, or the predicted production data is the weight corresponding to each of the predicted single models and the corresponding Single model prediction results are calculated.
发送模块300,用于获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。The sending module 300 is configured to obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
在其中一个实施例中,上述生产数据处理装置还包括:In one of the embodiments, the above production data processing device further includes:
历史数据获取模块,用于获取历史生产数据。The historical data acquisition module is used to acquire historical production data.
单模型预测结果获取模块,用于获取训练预测时间,并将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,预测单模型是预先训练得到的。The single model prediction result obtaining module is used to obtain the training prediction time, and input the training prediction time and historical production data into the prediction single model to obtain the single model prediction result, and the prediction single model is obtained by pre-training.
特征构建模块,用于综合单模型预测结果以及历史生产数据的自身属性构建表征了单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征。The feature construction module is used to synthesize the single-model prediction results and the self-attributes of historical production data to construct the target model selection characteristics that characterize the errors between the single-model prediction results and the real results in the historical production data and the essential characteristics of the historical production data.
训练模块,用于对第一模型选择特征、第二模型选择特征以及预测单模型进行训练得到模型分类器,模型分类器用于根据目标模型选择特征从预测单模型中选出最优预测单模型或者是用于根据目标模型选择特征为每一所述预测单模型建立对应的权重,并根据权重以及对应的单模型预测结果得到预测模型。在其中一个实施例中,训练模块可以包括:The training module is used to train the first model selection feature, the second model selection feature and the prediction single model to obtain a model classifier, and the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or It is used to establish corresponding weights for each of the prediction single models according to the target model selection characteristics, and obtain a prediction model according to the weights and the corresponding single model prediction results. In one of the embodiments, the training module may include:
第一提取单元,用于从历史生产数据中提取真实结果。The first extraction unit is used to extract real results from historical production data.
第一确定单元,用于计算真实结果和单模型预测结果的差值,获取差值最小的预测单模型作为最优预测单模型。The first determining unit is used to calculate the difference between the real result and the prediction result of the single model, and obtain the prediction single model with the smallest difference as the optimal prediction single model.
第一训练单元,用于对最优预测单模型、目标模型选择特征进行训练得到模型分类器。The first training unit is used to train the optimal prediction single model and the target model selection features to obtain a model classifier.
在其中一个实施例中,训练模块可以包括:In one of the embodiments, the training module may include:
第二提取单元,用于从历史生产数据中提取真实结果。The second extraction unit is used to extract real results from historical production data.
第二确定单元,用于计算单模型预测结果和真实结果的比值,根据比值得到预测单模型的权重。The second determining unit is used to calculate the ratio between the prediction result of the single model and the real result, and obtain the weight of the prediction single model according to the ratio.
第二训练单元,用于对预测单模型的权重、目标模型选择特征进行训练得到模型分类器。The second training unit is used to train the weights of the predicted single model and the selected features of the target model to obtain a model classifier.
在其中一个实施例中,特征构建模块可以包括:In one of the embodiments, the feature building module may include:
第一特征构建单元,用于根据单模型预测结果以及历史生产数据构建第一模型选择特征;The first feature construction unit is used to construct a first model selection feature based on the single model prediction results and historical production data;
第二特征构建单元,用于根据历史生产数据构建第二模型选择特征。The second feature construction unit is used to construct a second model selection feature based on historical production data.
在其中一个实施例中,单模型预测结果获取模块可以包括:In one of the embodiments, the single-model prediction result acquisition module may include:
第一周期获取单元,用于获取训练预测时间对应的特征周期。The first period obtaining unit is used to obtain a characteristic period corresponding to the training prediction time.
第一预测值计算单元,用于通过预测单模型计算得到与特征周期对应的预测值。The first prediction value calculation unit is used to obtain the prediction value corresponding to the characteristic period through calculation of the prediction single model.
第一特征构建单元可以包括:The first feature building unit may include:
真实值获取单元,用于从历史生产数据提取与特征周期对应的真实值;The real value acquisition unit is used to extract the real value corresponding to the characteristic period from the historical production data;
计算单元,用于根据第一预测值和真实值计算得到第一模型选择特征。The calculation unit is configured to calculate the first model selection feature according to the first predicted value and the true value.
在其中一个实施例中,第二特征构建单元可以包括:In one of the embodiments, the second feature construction unit may include:
第一分段单元,用于获取预设周期长度和区间,根据预设周期长度对历史生产数据进行分段。The first segmenting unit is used to obtain a preset period length and interval, and segment the historical production data according to the preset period length.
第一标记单元,用于获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值。The first marking unit is used to obtain the corresponding segmented historical production data in each section, sort the acquired historical production data, and mark the sequence value of the sorted historical production data.
偏差值计算单元,用于计算每一区间对应的分段的历史生产数据的顺序值的偏差值。The deviation value calculation unit is used to calculate the deviation value of the sequence value of the historical production data of the segment corresponding to each section.
周期性强弱指标计算单元,用于计算偏差值的平均值得到周期性强弱指标作为第二模型选择特征。The periodic strength index calculation unit is used to calculate the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
在其中一个实施例中,第二特征构建单元可以包括:In one of the embodiments, the second feature construction unit may include:
第二分段单元,用于获取预设周期长度,根据预设周期长度对历史生产数据进行分段。The second segmenting unit is used to obtain a preset period length, and segment the historical production data according to the preset period length.
第二标记单元,用于根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度。The second marking unit is used to calculate the increase and decrease range according to the historical production data of each segment and the historical production data of the previous segment.
增减幅度值计算单元,用于根据增减幅度得到每一分段的历史生产数据的增减幅度标记值。The calculation unit of the increase/decrease amplitude value is used to obtain the increase/decrease amplitude mark value of the historical production data of each segment according to the increase/decrease amplitude.
趋势性强弱指标计算单元,用于计算增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。关于生产数据处理装置的具体限定可以参见上文中对于模型分类器建立方法的限定,在此不再赘述。上述模型分类器建立装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。The trend strength index calculation unit is used to calculate the average value of the increase and decrease amplitude marker values to obtain the trend strength index as the second model selection feature. For the specific limitation of the production data processing device, please refer to the above limitation on the method of establishing the model classifier, which will not be repeated here. Each module in the above model classifier building device may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种模型分类器建立方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and an internal structure diagram thereof may be shown in FIG. 4. The computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The network interface of the computer device is used to communicate with external terminals through a network connection. The computer readable instructions are executed by the processor to implement a model classifier building method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or may be a button, a trackball, or a touchpad provided on the computer device housing , Can also be an external keyboard, touchpad or mouse.
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art may understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:接收输入的预测时间,并根据预测时间从服务器获取到对应的历史生产数据;将预测时间和历史生产数据输入至模型分类器得到与预测时间对应的预测生产数据,预测生产数据是所述模型分类器根据预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者预测生产数据是根据预测时间和历史生产数据生成的每一预测单模型对应的权重以及对应的单模型预测结果计算得到的。获取预测生产数据对应的投资文件,并将投资文件发送给投资终端。。A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors perform the following steps: receiving an input predicted time And obtain the corresponding historical production data from the server according to the predicted time; input the predicted time and historical production data into the model classifier to obtain the predicted production data corresponding to the predicted time. The predicted production data is the model classifier based on the predicted time and The single-model prediction result of the best-predicted single model selected by historical production data, or the predicted production data is calculated based on the prediction time and the weight corresponding to each predicted single model generated by the historical production data and the corresponding single-model prediction result . Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal. .
在其中一个实施例中,处理器执行计算机可读指令时所涉及的模型分类器的训练方式包括:获取历史生产数据;获取训练预测时间,并将训练预测时间以及历史生产数据输入 至预测单模型中得到单模型预测结果,预测单模型是预先训练得到的;综合单模型预测结果以及历史生产数据的自身属性构建表征了单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征;及对目标模型选择特征以及预测单模型进行训练得到模型分类器,模型分类器用于根据目标模型选择特征从预测单模型中选出最优预测单模型或者是用于根据目标模型选择特征为每一所述预测单模型建立对应的权重,并根据权重以及对应的单模型预测结果得到预测模型。In one of the embodiments, the training method of the model classifier involved in the execution of the computer-readable instructions by the processor includes: obtaining historical production data; obtaining training prediction time, and inputting the training prediction time and historical production data into the prediction single model The single-model prediction results are obtained in. The single-model prediction is pre-trained. The comprehensive single-model prediction results and the self-attribute construction of historical production data characterize the error between the single-model prediction results and the real results in the historical production data and characterize the history. The target model selection feature of the essential characteristics of the production data; and training the target model selection feature and the prediction single model to obtain the model classifier. The model classifier is used to select the optimal prediction single model or the prediction single model from the prediction single model according to the target model selection feature. It is used to select a feature according to the target model to establish a corresponding weight for each of the prediction single models, and obtain a prediction model according to the weight and the corresponding single model prediction result.
在一个实施例中,处理器执行计算机可读指令时所实现的对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算真实结果和单模型预测结果的差值,获取差值最小的预测单模型作为最优预测单模型;及对最优预测单模型、目标模型选择特征进行训练得到模型分类器。In one embodiment, when the processor executes the computer-readable instructions, the target class model selection feature and the predicted single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the real results and the single The difference between the prediction results of the model, the prediction single model with the smallest difference is obtained as the optimal prediction single model; and the model classifier is obtained by training the selection characteristics of the optimal prediction single model and the target model.
在一个实施例中,处理器执行计算机可读指令时所实现的对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算单模型预测结果和真实结果的比值,根据比值得到预测单模型的权重;及对预测单模型的权重、目标模型选择特征进行训练得到模型分类器。In one embodiment, when the processor executes the computer-readable instructions, the target class model selection feature and the prediction single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the single model prediction results The ratio with the real result is used to obtain the weight of the predicted single model; and the weight of the predicted single model and the selection characteristics of the target model are trained to obtain the model classifier.
在其中一个实施例中,处理器执行计算机可读指令时所实现的根据所述单模型预测结果以及历史生产数据构建目标模型选择特征,可以包括:根据单模型预测结果以及历史生产数据构建第一模型选择特征;及根据历史生产数据构建第二模型选择特征。In one of the embodiments, when the processor executes the computer-readable instructions, the target model selection feature constructed based on the single model prediction result and historical production data may include: constructing the first model based on the single model prediction result and historical production data Model selection features; and constructing a second model selection feature based on historical production data.
在一个实施例中,处理器执行计算机可读指令时所实现的将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,可以包括:获取训练预测时间对应的特征周期;通过预测单模型计算得到与特征周期对应的预测值;及处理器执行计算机可读指令时所实现的根据单模型预测结果以及历史生产数据构建第一模型选择特征,可以包括:从历史生产数据提取与特征周期对应的真实值;根据预测值和真实值计算得到第一模型选择特征。In one embodiment, the input of the training prediction time and historical production data into the prediction single model obtained by the processor executing the computer-readable instructions to obtain the single-model prediction result may include: acquiring the characteristic period corresponding to the training prediction time; The prediction single model calculates the prediction value corresponding to the characteristic period; and the first model selection feature constructed based on the single model prediction result and historical production data when the processor executes the computer-readable instructions may include: extracting from historical production data and The true value corresponding to the feature period; the first model selection feature is calculated according to the predicted value and the true value.
在一个实施例中,处理器执行计算机可读指令时所实现的根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度和区间,根据预设周期长度对历史生产数据进行分段;获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值;计算每一区间对应的分段的历史生产数据的顺序值的偏差值;及计算偏差值的平均值得到周期性强弱指标作为第二模型选择特征。In one embodiment, when the processor executes the computer-readable instructions, the selection feature of constructing the second model based on the historical production data may include: obtaining a preset cycle length and interval, and dividing the historical production data according to the preset cycle length Segment; obtain the historical production data of the corresponding segment in each interval, and sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the historical production of the segment corresponding to each interval The deviation value of the sequence value of the data; and calculating the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
在一个实施例中,处理器执行计算机可读指令时所实现的根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度,根据预设周期长度对历史生产数据进行分段;根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度;根据增减幅度得到每一分段的历史生产数据的增减幅度标记值;及计算增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:接收输入的预测时间,并根据预测时间从服务器获取到对应的历史生 产数据;将预测时间和历史生产数据输入至模型分类器得到与预测时间对应的预测生产数据,预测生产数据是所述模型分类器根据预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者预测生产数据是根据预测时间和历史生产数据生成的每一预测单模型对应的权重以及对应的单模型预测结果计算得到的。获取预测生产数据对应的投资文件,并将投资文件发送给投资终端。In one embodiment, the selection feature of the second model constructed from the historical production data implemented by the processor when executing the computer-readable instructions may include: obtaining a preset cycle length, and segmenting the historical production data according to the preset cycle length; Calculate the increase/decrease range based on the historical production data of each segment and the historical production data of the previous segment; obtain the increase/decrease amplitude tag value of each segment's historical production data based on the increase/decrease range; and calculate the increase/decrease amplitude tag The average of the values gives the trend strength indicator as the second model selection feature. One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps: receive input predictions Time, and obtain the corresponding historical production data from the server according to the predicted time; input the predicted time and historical production data into the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the model classifier according to the predicted time The single-model prediction result of the optimal single-model model selected from the historical production data, or the predicted production data is calculated according to the weight of each predicted single model generated according to the prediction time and historical production data and the corresponding single-model prediction result of. Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
在其中一个实施例中,计算机可读指令被处理器执行时所涉及的模型分类器的训练方法包括:获取历史生产数据;获取训练预测时间,并将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,预测单模型是预先训练得到的;综合单模型预测结果以及历史生产数据的自身属性构建表征了单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征;及对目标模型选择特征以及预测单模型进行训练得到模型分类器,模型分类器用于根据目标模型选择特征从预测单模型中选出最优预测单模型或者是用于根据目标模型选择特征为每一所述预测单模型建立对应的权重,并根据权重以及对应的单模型预测结果得到预测模型。In one of the embodiments, the training method of the model classifier involved in the execution of the computer-readable instructions by the processor includes: acquiring historical production data; acquiring training prediction time, and inputting the training prediction time and historical production data to the prediction sheet The single-model prediction results are obtained from the model, and the predicted single-model prediction is obtained in advance; the comprehensive single-model prediction results and the self-attribute construction of the historical production data characterize the error between the single-model prediction results and the real results in the historical production data and characterize The target model selection feature of the essential characteristics of historical production data; and training the target model selection feature and the prediction single model to obtain a model classifier. The model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or It is used to establish corresponding weights for each of the prediction single models according to the target model selection characteristics, and obtain a prediction model according to the weights and the corresponding single model prediction results.
在一个实施例中,计算机可读指令被处理器执行时所实现的对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算真实结果和单模型预测结果的差值,获取差值最小的预测单模型作为最优预测单模型;及对最优预测单模型、目标模型选择特征进行训练得到模型分类器。In one embodiment, when the computer-readable instructions are executed by the processor, the target class model selection feature and the predicted single model are trained to obtain the model classifier, which may include: extracting the real results from the historical production data; calculating the real results and The difference between the prediction results of the single model, the prediction single model with the smallest difference is obtained as the optimal prediction single model; and the model classifier is obtained by training the selection features of the optimal prediction single model and the target model.
在一个实施例中,计算机可读指令被处理器执行时所实现的对目标模型选择特征以及预测单模型进行训练得到模型分类器,可以包括:从历史生产数据中提取真实结果;计算单模型预测结果和真实结果的比值,根据比值得到预测单模型的权重;及对预测单模型的权重、目标模型选择特征进行训练得到模型分类器。In one embodiment, when the computer readable instructions are executed by the processor, the target class model selection feature and the prediction single model are trained to obtain a model classifier, which may include: extracting real results from historical production data; calculating the single model prediction The ratio between the result and the real result is the weight of the predicted single model according to the ratio; and the model classifier is obtained by training the weight of the predicted single model and the selection characteristics of the target model.
在其中一个实施例中,计算机可读指令被处理器执行时所实现的根据所述单模型预测结果以及历史生产数据构建目标模型选择特征,可以包括:根据单模型预测结果以及历史生产数据构建第一模型选择特征;及根据历史生产数据构建第二模型选择特征。In one of the embodiments, when the computer readable instructions are executed by the processor, the target model selection feature constructed based on the single model prediction result and historical production data may include: constructing the first model based on the single model prediction result and historical production data A model selection feature; and constructing a second model selection feature based on historical production data.
在一个实施例中,计算机可读指令被处理器执行时所实现的将训练预测时间以及历史生产数据输入至预测单模型中得到单模型预测结果,可以包括:获取训练预测时间对应的特征周期;通过预测单模型计算得到与特征周期对应的预测值;及处理器执行计算机可读指令时所实现的根据单模型预测结果以及历史生产数据构建第一模型选择特征,可以包括:从历史生产数据提取与特征周期对应的真实值;根据预测值和真实值计算得到第一模型选择特征。In one embodiment, when the computer-readable instructions are executed by the processor, inputting the training prediction time and historical production data into the prediction single model to obtain a single-model prediction result may include: acquiring a characteristic period corresponding to the training prediction time; The predicted value corresponding to the characteristic period is calculated by predicting the single model; and the first model selection feature constructed based on the single model prediction result and historical production data when the processor executes the computer-readable instructions may include: extracting from the historical production data The true value corresponding to the feature period; the first model selection feature is calculated based on the predicted value and the true value.
在一个实施例中,计算机可读指令被处理器执行时所实现的根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度和区间,根据预设周期长度对历史生产数据进行分段;获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值;计算每一区间对应的分段的历史生产数据的顺序值的偏差值;及计算偏差值的平均值得到周期性强弱指标作为第二模型选择特 征。In one embodiment, when the computer-readable instructions are executed by the processor, the selection feature of constructing the second model based on historical production data may include: acquiring a preset cycle length and interval, and performing historical production data according to the preset cycle length Segment; obtain the historical production data of the corresponding segment in each interval, sort the acquired historical production data, and mark the sequence value of the sorted historical production data; calculate the history of the segment corresponding to each interval The deviation value of the sequence value of the production data; and calculating the average value of the deviation values to obtain the periodic strength index as the second model selection feature.
在一个实施例中,计算机可读指令被处理器执行时所实现的根据历史生产数据构建第二模型选择特征,可以包括:获取预设周期长度,根据预设周期长度对历史生产数据进行分段;根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度;根据增减幅度得到每一分段的历史生产数据的增减幅度标记值;及计算增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。In one embodiment, when the computer-readable instructions are executed by the processor, the selection feature of constructing the second model based on historical production data may include: obtaining a preset period length, and segmenting the historical production data according to the preset period length ; Calculate the increase and decrease range according to the historical production data of each section and the historical production data of the previous section; obtain the increase and decrease range mark value of the historical production data of each section according to the increase and decrease range; and calculate the increase and decrease range The average value of the marker values gives a trend strength indicator as the second model selection feature. Those of ordinary skill in the art may understand that all or part of the process in the method of the foregoing embodiments may be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions may be stored in a non-volatile computer In the readable storage medium, when the computer-readable instructions are executed, they may include the processes of the foregoing method embodiments. Wherein, any reference to the memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the scope described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementations of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can also be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种生产数据处理方法,包括:A production data processing method, including:
    接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
    将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
    获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述模型分类器的训练方式包括:The method according to claim 1, wherein the training method of the model classifier includes:
    获取历史生产数据;Obtain historical production data;
    获取训练预测时间,并将所述训练预测时间以及所述历史生产数据输入至预测单模型中得到单模型预测结果,所述预测单模型是预先训练得到的;Obtain the training prediction time, and input the training prediction time and the historical production data into a prediction single model to obtain a single model prediction result, and the prediction single model is obtained by pre-training;
    综合所述单模型预测结果以及所述历史生产数据的自身属性构建表征了所述单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征;Constructing a target model selection characteristic that characterizes the error between the single model prediction result and the real result in the historical production data and characterizes the essential characteristic of the historical production data by synthesizing the single model prediction result and the self-attributes of the historical production data;
    对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,所述模型分类器用于根据所述目标模型选择特征从所述预测单模型中选出最优预测单模型或者是用于根据所述目标模型选择特征为每一所述预测单模型建立对应的权重,并根据所述权重以及对应的所述单模型预测结果得到预测模型。Training the target model selection feature and the prediction single model to obtain a model classifier, the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or use In order to select a feature according to the target model, a corresponding weight is established for each of the prediction single models, and a prediction model is obtained according to the weight and the corresponding prediction result of the single model.
  3. 根据权利要求2所述的方法,其特征在于,所述对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,包括:The method according to claim 2, wherein the training of the target model selection feature and the prediction single model to obtain a model classifier includes:
    从所述历史生产数据中提取真实结果;Extract real results from the historical production data;
    计算所述真实结果和所述单模型预测结果的差值,获取所述差值最小的预测单模型作为最优预测单模型;及Calculating the difference between the real result and the prediction result of the single model, and obtaining the prediction single model with the smallest difference as the optimal prediction single model; and
    对所述最优预测单模型、所述目标模型选择特征进行训练得到模型分类器。Train the optimal prediction single model and the target model selection feature to obtain a model classifier.
  4. 根据权利要求2所述的方法,其特征在于,所述对所述第一模型选择特征、第二模型选择特征以及所述预测单模型进行训练得到模型分类器,包括:The method according to claim 2, wherein the training of the first model selection feature, the second model selection feature, and the predicted single model to obtain a model classifier includes:
    从所述历史生产数据中提取真实结果;Extract real results from the historical production data;
    计算所述单模型预测结果和所述真实结果的比值,根据所述比值得到所述预测单模型的权重;及Calculating the ratio of the prediction result of the single model to the true result, and obtaining the weight of the prediction single model according to the ratio; and
    对所述预测单模型的权重、所述目标模型选择特征进行训练得到模型分类器。Train the weights of the predicted single model and the selected features of the target model to obtain a model classifier.
  5. 根据权利要求2至4任意一项所述的方法,其特征在于,所述根据所述单模型预测结果以及所述历史生产数据构建目标模型选择特征,包括:The method according to any one of claims 2 to 4, wherein the feature selection based on the prediction result of the single-model prediction and the historical production data includes:
    根据所述单模型预测结果以及所述历史生产数据构建第一模型选择特征;及Construct a first model selection feature based on the single model prediction results and the historical production data; and
    根据所述历史生产数据构建第二模型选择特征。A second model selection feature is constructed based on the historical production data.
  6. 根据权利要求5所述的方法,其特征在于,所述将所述训练预测时间以及所述历史生产数据输入至所述预测单模型中得到单模型预测结果,包括:The method according to claim 5, wherein the input of the training prediction time and the historical production data into the prediction single model to obtain a single model prediction result includes:
    获取所述训练预测时间对应的特征周期;及Obtaining a characteristic period corresponding to the training prediction time; and
    通过所述预测单模型计算得到与所述特征周期对应的预测值;Calculating the prediction value corresponding to the characteristic period through the prediction single model calculation;
    所述根据所述单模型预测结果以及所述历史生产数据构建第一模型选择特征,包括:The constructing a first model selection feature based on the prediction result of the single model and the historical production data includes:
    从所述历史生产数据提取与所述特征周期对应的真实值;及Extract the true value corresponding to the characteristic period from the historical production data; and
    根据所述预测值和所述真实值计算得到第一模型选择特征。The first model selection feature is calculated according to the predicted value and the true value.
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述历史生产数据构建第二模型选择特征,包括:The method according to claim 5, characterized in that the selection feature constructed by constructing the second model based on the historical production data includes:
    获取预设周期长度和区间,根据所述预设周期长度对所述历史生产数据进行分段;Acquiring a preset period length and interval, and segmenting the historical production data according to the preset period length;
    获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值;Obtain the corresponding segmented historical production data in each interval, sort the acquired historical production data, and mark the sequence value of the sorted historical production data;
    计算每一区间对应的分段的历史生产数据的顺序值的偏差值;及Calculate the deviation of the sequence value of the historical production data corresponding to each section; and
    计算所述偏差值的平均值得到周期性强弱指标作为第二模型选择特征。The average value of the deviation values is calculated to obtain a periodic strength index as a second model selection feature.
  8. 根据权利要求5所述的方法,其特征在于,所述根据所述历史生产数据构建第二模型选择特征,包括:The method according to claim 5, characterized in that the selection feature constructed by constructing the second model based on the historical production data includes:
    获取预设周期长度,根据所述预设周期长度对所述历史生产数据进行分段;Acquiring a preset period length, and segmenting the historical production data according to the preset period length;
    根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度;Calculate the increase or decrease according to the historical production data of each segment and the historical production data of the previous segment;
    根据所述增减幅度得到每一分段的历史生产数据的增减幅度标记值;及Obtain the increase and decrease range marker value of the historical production data of each segment according to the increase and decrease range; and
    计算所述增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。Calculate the average value of the increase and decrease amplitude marker values to obtain a trend strength indicator as the second model selection feature.
  9. 一种生产数据处理装置,包括:A production data processing device, including:
    接收模块,用于接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;The receiving module is used to receive the input predicted time, and obtain corresponding historical production data from the server according to the predicted time;
    处理模块,用于将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;A processing module, configured to input the predicted time and historical production data to a model classifier to obtain predicted production data corresponding to the predicted time, the predicted production data is the model classifier based on the predicted time and historical production Obtained by the single model prediction result of the optimal prediction single model selected by the data, or the predicted production data is the weight corresponding to each of the predicted single models generated according to the prediction time and historical production data and the corresponding single Calculated by the model prediction results;
    发送模块,用于获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。The sending module is used to obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
    将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
    获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所涉及的模型分类器的生成方式包括:The computer device according to claim 10, wherein the generation method of the model classifier involved in the execution of the computer-readable instructions by the processor includes:
    获取历史生产数据;Obtain historical production data;
    获取训练预测时间,并将所述训练预测时间以及所述历史生产数据输入至预测单模型中得到单模型预测结果,所述预测单模型是预先训练得到的;Obtain the training prediction time, and input the training prediction time and the historical production data into a prediction single model to obtain a single model prediction result, and the prediction single model is obtained by pre-training;
    综合所述单模型预测结果以及所述历史生产数据的自身属性构建表征了所述单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征;及Constructing a target model selection characteristic that characterizes the error between the single model prediction result and the real result in the historical production data and characterizes the essential characteristic of the historical production data by synthesizing the single model prediction result and the self-attributes of the historical production data; and
    对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,所述模型分类器用于根据所述目标模型选择特征从所述预测单模型中选出最优预测单模型或者是用于根据所述目标模型选择特征为每一所述预测单模型建立对应的权重,并根据所述权重以及对应的所述单模型预测结果得到预测模型。Training the target model selection feature and the prediction single model to obtain a model classifier, the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or use In order to select a feature according to the target model, a corresponding weight is established for each of the prediction single models, and a prediction model is obtained according to the weight and the corresponding prediction result of the single model.
  12. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,包括:The computer device according to claim 11, characterized in that the training of the selected feature of the target model and the predicted single model is achieved by the processor when the processor executes the computer-readable instructions to obtain a model classifier ,include:
    从所述历史生产数据中提取真实结果;Extract real results from the historical production data;
    计算所述真实结果和所述单模型预测结果的差值,获取所述差值最小的预测单模型作为最优预测单模型;及Calculating the difference between the real result and the prediction result of the single model, and obtaining the prediction single model with the smallest difference as the optimal prediction single model; and
    对所述最优预测单模型、所述目标模型选择特征进行训练得到模型分类器。Train the optimal prediction single model and the target model selection feature to obtain a model classifier.
  13. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述对所述第一模型选择特征、第二模型选择特征以及所述预测单模型进行训练得到模型分类器,包括:The computer device of claim 11, wherein the pair of the first model selection feature, the second model selection feature, and the prediction list implemented when the processor executes the computer-readable instructions The model is trained to obtain a model classifier, including:
    从所述历史生产数据中提取真实结果;Extract real results from the historical production data;
    计算所述单模型预测结果和所述真实结果的比值,根据所述比值得到所述预测单模型的权重;及Calculating the ratio of the prediction result of the single model to the true result, and obtaining the weight of the prediction single model according to the ratio; and
    对所述预测单模型的权重、所述目标模型选择特征进行训练得到模型分类器。Train the weights of the predicted single model and the selected features of the target model to obtain a model classifier.
  14. 根据权利要求11至13任意一项所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所述单模型预测结果以及所述历史生产数据 构建目标模型选择特征,包括:The computer device according to any one of claims 11 to 13, characterized in that the prediction result based on the single-model prediction and the historical production data implemented when the processor executes the computer-readable instructions Target model selection features, including:
    根据所述单模型预测结果以及所述历史生产数据构建第一模型选择特征;及Construct a first model selection feature based on the single model prediction results and the historical production data; and
    根据所述历史生产数据构建第二模型选择特征。A second model selection feature is constructed based on the historical production data.
  15. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述将所述训练预测时间以及所述历史生产数据输入至所述预测单模型中得到单模型预测结果,包括:The computer device according to claim 14, characterized in that the input of the training prediction time and the historical production data to the prediction list model is realized when the processor executes the computer-readable instructions The single model prediction results are obtained in, including:
    获取所述训练预测时间对应的特征周期;及Obtaining a characteristic period corresponding to the training prediction time; and
    通过所述预测单模型计算得到与所述特征周期对应的预测值;Calculating the prediction value corresponding to the characteristic period through the prediction single model calculation;
    所述处理器执行所述计算机可读指令时所实现的所述根据所述单模型预测结果以及所述历史生产数据构建第一模型选择特征,包括:The first model selection feature constructed based on the single-model prediction result and the historical production data, implemented by the processor executing the computer-readable instructions, includes:
    从所述历史生产数据提取与所述特征周期对应的真实值;及Extract the true value corresponding to the characteristic period from the historical production data; and
    根据所述预测值和所述真实值计算得到第一模型选择特征。The first model selection feature is calculated according to the predicted value and the true value.
  16. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所述历史生产数据构建第二模型选择特征,包括:The computer device according to claim 14, characterized in that the selection feature constructed by the processor when the computer readable instructions are executed to construct the second model based on the historical production data includes:
    获取预设周期长度和区间,根据所述预设周期长度对所述历史生产数据进行分段;Acquiring a preset period length and interval, and segmenting the historical production data according to the preset period length;
    获取每一区间中对应的分段的历史生产数据,并对所获取的历史生产数据进行排序,并标记排序后的历史生产数据的顺序值;Obtain the corresponding segmented historical production data in each interval, sort the acquired historical production data, and mark the sequence value of the sorted historical production data;
    计算每一区间对应的分段的历史生产数据的顺序值的偏差值;及Calculate the deviation of the sequence value of the historical production data corresponding to each section; and
    计算所述偏差值的平均值得到周期性强弱指标作为第二模型选择特征。The average value of the deviation values is calculated to obtain a periodic strength index as a second model selection feature.
  17. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时所实现的所述根据所述历史生产数据构建第二模型选择特征,包括:The computer device according to claim 14, characterized in that the selection feature constructed by the processor when the computer readable instructions are executed to construct the second model based on the historical production data includes:
    获取预设周期长度,根据所述预设周期长度对所述历史生产数据进行分段;Acquiring a preset period length, and segmenting the historical production data according to the preset period length;
    根据每一分段的历史生产数据与上一分段的历史生产数据计算得到增减幅度;Calculate the increase or decrease according to the historical production data of each segment and the historical production data of the previous segment;
    根据所述增减幅度得到每一分段的历史生产数据的增减幅度标记值;及Obtain the increase and decrease range marker value of the historical production data of each segment according to the increase and decrease range; and
    计算所述增减幅度标记值的平均值得到趋势性强弱指标作为第二模型选择特征。Calculate the average value of the increase and decrease amplitude marker values to obtain a trend strength indicator as the second model selection feature.
  18. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    接收输入的预测时间,并根据所述预测时间从服务器中获取到对应的历史生产数据;Receiving the input prediction time, and obtaining corresponding historical production data from the server according to the prediction time;
    将所述预测时间和历史生产数据输入至模型分类器得到与所述预测时间对应的预测生产数据,所述预测生产数据是所述模型分类器根据所述预测时间和历史生产数据选择的最优预测单模型的单模型预测结果得到的,或者所述预测生产数据是根据所述预测时间和历史生产数据生成的每一所述预测单模型对应的权重以及对应的所述单模型预测结果计算得到的;Input the predicted time and historical production data to the model classifier to obtain the predicted production data corresponding to the predicted time, the predicted production data is the optimal selected by the model classifier according to the predicted time and historical production data Obtained by predicting the single model prediction result of the single model, or the predicted production data is calculated according to the weight corresponding to each of the predicted single models and the corresponding single model prediction result generated according to the prediction time and historical production data of;
    获取所述预测生产数据对应的投资文件,并将所述投资文件发送给投资终端。Obtain the investment file corresponding to the predicted production data, and send the investment file to the investment terminal.
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处 理器执行时所涉及的模型分类器的生成方式包括:The storage medium according to claim 18, wherein the generation method of the model classifier involved in the execution of the computer-readable instructions by the processor includes:
    获取历史生产数据;Obtain historical production data;
    获取训练预测时间,并将所述训练预测时间以及所述历史生产数据输入至预测单模型中得到单模型预测结果,所述预测单模型是预先训练得到的;Obtain the training prediction time, and input the training prediction time and the historical production data into a prediction single model to obtain a single model prediction result, and the prediction single model is obtained by pre-training;
    综合所述单模型预测结果以及所述历史生产数据的自身属性构建表征了所述单模型预测结果和历史生产数据中真实结果之间误差的以及表征了历史生产数据本质特征的目标模型选择特征;Constructing a target model selection characteristic that characterizes the error between the single model prediction result and the real result in the historical production data and characterizes the essential characteristic of the historical production data by synthesizing the single model prediction result and the self-attributes of the historical production data;
    对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,所述模型分类器用于根据所述目标模型选择特征从所述预测单模型中选出最优预测单模型或者是用于根据所述目标模型选择特征为每一所述预测单模型建立对应的权重,并根据所述权重以及对应的所述单模型预测结果得到预测模型;及Training the target model selection feature and the prediction single model to obtain a model classifier, the model classifier is used to select the optimal prediction single model from the prediction single model according to the target model selection feature or use Selecting features according to the target model to establish a corresponding weight for each of the prediction single models, and obtaining a prediction model according to the weights and the corresponding prediction results of the single models; and
    通过训练得到的所述模型分类器对预测时间的生产数据进行预测。The model classifier obtained by training predicts the production data at the prediction time.
  20. 根据权利要求19所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时所实现的所述对所述目标模型选择特征以及所述预测单模型进行训练得到模型分类器,包括:The storage medium according to claim 19, wherein the computer-readable instructions are executed by the processor to obtain the model classification by training the target model selection feature and the prediction single model Devices, including:
    从所述历史生产数据中提取真实结果;Extract real results from the historical production data;
    计算所述真实结果和所述单模型预测结果的差值,获取所述差值最小的预测单模型作为最优预测单模型;及Calculating the difference between the real result and the prediction result of the single model, and obtaining the prediction single model with the smallest difference as the optimal prediction single model; and
    对所述最优预测单模型、所述目标模型选择特征进行训练得到模型分类器。Train the optimal prediction single model and the target model selection feature to obtain a model classifier.
PCT/CN2019/093146 2018-12-19 2019-06-27 Method and apparatus for processing production data, computer device, and storage medium WO2020124977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811555208.4A CN109767031A (en) 2018-12-19 2018-12-19 Model classifiers method for building up, device, computer equipment and storage medium
CN201811555208.4 2018-12-19

Publications (1)

Publication Number Publication Date
WO2020124977A1 true WO2020124977A1 (en) 2020-06-25

Family

ID=66450250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093146 WO2020124977A1 (en) 2018-12-19 2019-06-27 Method and apparatus for processing production data, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN109767031A (en)
WO (1) WO2020124977A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109767031A (en) * 2018-12-19 2019-05-17 平安科技(深圳)有限公司 Model classifiers method for building up, device, computer equipment and storage medium
CN110188490B (en) * 2019-06-03 2021-03-23 珠海格力电器股份有限公司 Method and device for improving data simulation efficiency, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968670A (en) * 2012-10-23 2013-03-13 北京京东世纪贸易有限公司 Method and device for predicting data
CN103136638A (en) * 2011-11-22 2013-06-05 上海宝钢钢材贸易有限公司 Adaptive adjustment method of steel production
CN108230049A (en) * 2018-02-09 2018-06-29 新智数字科技有限公司 The Forecasting Methodology and system of order
CN109767031A (en) * 2018-12-19 2019-05-17 平安科技(深圳)有限公司 Model classifiers method for building up, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136638A (en) * 2011-11-22 2013-06-05 上海宝钢钢材贸易有限公司 Adaptive adjustment method of steel production
CN102968670A (en) * 2012-10-23 2013-03-13 北京京东世纪贸易有限公司 Method and device for predicting data
CN108230049A (en) * 2018-02-09 2018-06-29 新智数字科技有限公司 The Forecasting Methodology and system of order
CN109767031A (en) * 2018-12-19 2019-05-17 平安科技(深圳)有限公司 Model classifiers method for building up, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109767031A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
WO2020253358A1 (en) Service data risk control analysis processing method, apparatus and computer device
WO2020107872A1 (en) Company risk analyzing method, apparatus, computer device, and storage medium
CN108364106A (en) A kind of expense report Risk Forecast Method, device, terminal device and storage medium
WO2020125463A1 (en) Report generation method and apparatus, computer device, and computer readable storage medium
WO2020062702A9 (en) Method and device for sending text messages, computer device and storage medium
WO2021098281A1 (en) Project baseline data generation method and device, computer device, and computer readable storage medium
CN109241669A (en) A kind of method for automatic modeling, device and its storage medium
CN111435463A (en) Data processing method and related equipment and system
CN110472114B (en) Abnormal data early warning method and device, computer equipment and storage medium
WO2020124977A1 (en) Method and apparatus for processing production data, computer device, and storage medium
CN112182118B (en) Target object prediction method based on multiple data sources and related equipment thereof
JP2014235654A (en) Risk evaluation device
CN110888625B (en) Method for controlling code quality based on demand change and project risk
WO2023050534A1 (en) Method and device for predicting energy consumption of rail transit station apparatus, and apparatus and storage medium
CN110689230B (en) Regional poverty degree determining method, electronic device and storage medium
CN115545103A (en) Abnormal data identification method, label identification method and abnormal data identification device
CN108764553B (en) User scale prediction method and device and computer equipment
CN114202256A (en) Architecture upgrading early warning method and device, intelligent terminal and readable storage medium
CN113807728A (en) Performance assessment method, device, equipment and storage medium based on neural network
CN111950623B (en) Data stability monitoring method, device, computer equipment and medium
Pevec et al. Prediction intervals in supervised learning for model evaluation and discrimination
CN113516417A (en) Service evaluation method and device based on intelligent modeling, electronic equipment and medium
CN109783876B (en) Time sequence model establishment method, device, computer equipment and storage medium
CN109767263A (en) Business revenue data predication method, device, computer equipment and storage medium
CN109829745A (en) Business revenue data predication method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19897898

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19897898

Country of ref document: EP

Kind code of ref document: A1