WO2021204176A1 - 业务数据预测方法、装置、电子设备及计算机可读存储介质 - Google Patents

业务数据预测方法、装置、电子设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021204176A1
WO2021204176A1 PCT/CN2021/085880 CN2021085880W WO2021204176A1 WO 2021204176 A1 WO2021204176 A1 WO 2021204176A1 CN 2021085880 W CN2021085880 W CN 2021085880W WO 2021204176 A1 WO2021204176 A1 WO 2021204176A1
Authority
WO
WIPO (PCT)
Prior art keywords
historical
prediction
business data
data
model
Prior art date
Application number
PCT/CN2021/085880
Other languages
English (en)
French (fr)
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 WO2021204176A1 publication Critical patent/WO2021204176A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Definitions

  • the present disclosure relates to the field of data processing technology, and in particular, to a business data prediction method, device, electronic equipment, and computer-readable storage medium.
  • Data prediction analysis is a method of using historical data to predict future data and trends. It has a wide range of applications in the development of modern science and technology and the improvement of productivity.
  • ARIMA model Autoregressive Integrated Moving Average model
  • moving can also be called sliding
  • ARIMA Autoregressive Integrated Moving Average model
  • MA moving average
  • q the number of moving average terms
  • d the number of moving average terms
  • d the number of differences (order) made by the sequence.
  • the characteristic of the ARIMA model is that it does not directly consider the changes of other related random variables.
  • the present disclosure provides a business data prediction method, device, electronic equipment, and computer-readable storage medium.
  • the present disclosure provides a business data prediction method, including:
  • the prediction data corresponding to the specified time period is determined.
  • the service data is enterprise user load.
  • the acquiring historical business data of the same period corresponding to the designated time period includes:
  • the filtering the initial historical business data to obtain the historical business data includes:
  • the preset threshold is a product value of the standard deviation and a preset multiple.
  • the determining the initial model parameters corresponding to the prediction model according to the historical business data includes:
  • the order processing is performed on the historical service data to obtain the second model parameter and the third model parameter corresponding to the prediction model.
  • the performing differential processing on the historical service data to obtain the first model parameter corresponding to the prediction model includes:
  • n-th order differential processing on the historical business data; where n is a positive integer greater than or equal to 1;
  • the n is used as the first model parameter.
  • the determining the data stability of the historical business data includes:
  • the determining the data stability of the historical business data includes:
  • the unit root test model is invoked to perform a stationarity test on the historical business data, and when the probability value corresponding to the test statistic is less than 0.05, it is determined that the historical business data is a stationary sequence.
  • the stepping processing of the historical business data to obtain the second model parameter and the third model parameter corresponding to the prediction model includes:
  • the second model parameter and the third model parameter are obtained.
  • the stepping processing of the historical business data to obtain the second model parameter and the third model parameter corresponding to the prediction model includes:
  • the order processing is performed according to the information criterion to obtain the second model parameter and the third model parameter.
  • the historical period includes a first historical period and a second historical period, the time of the first historical period is earlier than the second historical period, and the invoking of the prediction model is based on the initial model parameters and
  • the historical service data predicting the first prediction result and the prediction residual value corresponding to the specified time period includes:
  • the prediction model is invoked to predict the service data within the specified time period according to the initial model parameters, the first historical service data, and the second historical service data, to obtain the first prediction result.
  • calculating the predicted residual value according to the predicted service data and second historical service data of the second historical period includes:
  • the determining the prediction data corresponding to the specified time period according to the first prediction result and the second prediction result includes:
  • the sum value between the first prediction result and the second prediction result is obtained, and the sum value is used as the prediction data of the specified time period.
  • the present disclosure provides a business data prediction device, including:
  • the historical data acquisition module is used to acquire historical business data of the same period corresponding to the specified time period
  • the model parameter determination module is used to determine the initial model parameters corresponding to the prediction model according to the historical business data
  • the first result prediction module is configured to call the prediction model to obtain the first prediction result and the prediction residual value corresponding to the specified time period according to the initial model parameters and the historical service data;
  • the target parameter determination module is configured to determine the target model parameter corresponding to the prediction model according to the prediction residual value
  • the second result prediction module is configured to call the prediction model to process the prediction residual value according to the target model parameters and the historical business data to obtain the second prediction result corresponding to the specified time period;
  • the prediction data determining module is configured to determine the prediction data corresponding to the specified time period according to the first prediction result and the second prediction result.
  • the historical data acquisition module includes:
  • An initial business data acquisition unit for acquiring the initial historical business data of the same historical period
  • the historical business data screening unit is used to filter the initial historical business data to obtain the historical business data.
  • model parameter determination module includes:
  • the first model parameter obtaining unit is configured to perform differential processing on the historical service data to obtain the first model parameter corresponding to the prediction model;
  • the second model parameter acquisition unit is configured to perform order processing on the historical service data to obtain the second model parameter and the third model parameter corresponding to the prediction model.
  • the historical period includes a first historical period and a second historical period, the first historical period is earlier than the second historical period, and the first result prediction module includes:
  • a predictive business data acquisition unit configured to call the predictive model to predict the business data of the second historical period based on the initial model parameters and the first historical business data of the first historical period to obtain the second Forecast business data for the same period in history;
  • a predicted residual value calculation unit configured to calculate the predicted residual value based on the predicted business data and the second historical business data in the same period of the second history
  • the first prediction result obtaining unit is configured to call the prediction model to predict the service data within the specified time period based on the initial model parameters, the first historical service data, and the second historical service data to obtain all The first prediction result.
  • the present disclosure provides an electronic device, including:
  • the present disclosure provides a computer-readable storage medium.
  • the electronic device can execute the business data prediction method described in any one of the above.
  • the present disclosure provides a computer program, including computer-readable code, which, when the computer-readable code runs on an electronic device, causes the electronic device to execute the above-mentioned business data prediction method.
  • Figure 1 shows a flow chart of the steps of a business data prediction method provided by an embodiment of the present disclosure
  • Figure 2 shows a flow chart of the steps of another business data prediction method provided by an embodiment of the present disclosure
  • FIG. 3 shows a sequence diagram for checking data stationarity provided by an embodiment of the present disclosure
  • FIG. 4 shows a schematic diagram of an autocorrelation function provided by an embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of a partial autocorrelation function provided by an embodiment of the present disclosure
  • FIG. 6 shows a schematic diagram of a predicted value and a true value provided by an embodiment of the present disclosure
  • FIG. 7 shows a schematic structural diagram of a service data prediction apparatus provided by an embodiment of the present disclosure
  • FIG. 8 shows a schematic structural diagram of another service data prediction apparatus provided by an embodiment of the present disclosure.
  • Fig. 9 schematically shows a block diagram of an electronic device for performing the method according to the present disclosure.
  • Fig. 10 schematically shows a storage unit for holding or carrying program codes for implementing the method according to the present disclosure.
  • the method for predicting business data may specifically include the following steps:
  • Step 101 Obtain historical business data of the same period corresponding to a specified time period.
  • the embodiments of the present disclosure can be applied to a scenario in which an ARIMA model is used to predict business data in a certain period of time in the future.
  • the business data can be stock prices, house prices, sales, visits, gross domestic product (Gross Domestic Product, GDP), enterprise user load, temperature and other data.
  • the business data can be one or more of the above. Specifically, it can be determined according to business requirements, which is not limited in this embodiment.
  • the load of enterprise users can be the load of electricity, water, and resources undertaken by the enterprise.
  • ARIMA AR is "autoregressive"
  • p is the number of autoregressive terms
  • MA is "moving average”
  • q is the number of moving average terms
  • d is the number of differences made to make it a stationary series (Order).
  • the model needs to determine the order p, which means to predict the current value with the historical value of several periods.
  • the model formula is:
  • y t is the current value
  • u is a constant
  • p is the order
  • ⁇ t is the error value
  • the moving average model focuses on the accumulation of error terms in the autoregressive model.
  • the formula for the q-order autoregressive process is:
  • y t is the current value
  • u is a constant
  • q is the order
  • ⁇ i is the error coefficient
  • ⁇ t is the error.
  • the autoregressive model AR and the moving average model MA are combined to get the autoregressive moving average model ARMA(p, q), the calculation formula is as follows:
  • the order of difference in data stationarity processing that is, non-stationary data is stationary after several orders of difference.
  • the designated time period refers to a certain time period in the future that requires business data prediction. If the stock price of the whole day is predicted tomorrow, the whole day tomorrow will be the designated time period, or the power consumption between 9:00 and 12:00 tomorrow will be Today 9:00 ⁇ 12:00 as the designated time and so on.
  • Historical business data refers to the historical data that belongs to the same period with the specified time period, that is, the business data of the same historical period. For example, if the electricity consumption between 9:00 and 12:00 tomorrow is needed, then 9:00 to 12 tomorrow: 00 is the designated time period.
  • the historical period can be from 9:00 to 12:00 yesterday, 9:00 to 12:00 the day before yesterday, and so on.
  • the historical business data corresponding to the specified time period can be obtained.
  • the historical business database can be stored in advance to filter out the historical business data in the specified time period from the database.
  • the business data of the same period is used as historical business data.
  • step 102 After acquiring the historical business data corresponding to the specified time period in the same period of time, step 102 is executed.
  • Step 102 Determine the initial model parameters corresponding to the prediction model according to the historical service data.
  • the prediction model refers to a model used to predict future business data.
  • the prediction model is preferably an ARIMA model.
  • the ARIMA model is used to describe this embodiment.
  • the initial model parameters refer to the parameters required to run the prediction model.
  • the necessary parameters are d, p, and q (that is, the parameters described in step 101 above).
  • the second-order prediction method is adopted, and the initial model parameters are the model parameters required for the operation of the prediction model during the first-order prediction.
  • the initial model parameters corresponding to the ARIMA model can be determined based on the historical business data. After the model parameters are available, the ARIMA model can be run normally. The process of how to determine the initial model parameters will be described in detail in the following embodiments, which will not be repeated in this embodiment.
  • step 103 is executed.
  • Step 103 Invoke the prediction model to obtain a first prediction result and a prediction residual value corresponding to the specified time period according to the initial model parameters and the historical service data.
  • This embodiment adopts a two-level prediction method, and the first prediction result is the result obtained by the first-level prediction.
  • the prediction residual value refers to the residual value obtained when predicting the prediction result for a specified period of time.
  • the ARIMA model can be called to predict the business data within a specified period of time based on the initial model parameters and historical business data, so as to obtain the first prediction result and the predicted residual value.
  • the prediction process can be described in detail in the following embodiments, and this embodiment will not be repeated here.
  • step 104 After the prediction model is invoked to predict the first prediction result and the prediction residual value corresponding to the specified time period according to the initial model parameters and historical service data, step 104 is performed.
  • Step 104 Determine the target model parameter corresponding to the prediction model according to the prediction residual value.
  • the target model parameters refer to the model parameters of the operational prediction model obtained by retraining the prediction model through the initial prediction residual value obtained by the first-order prediction.
  • an initial prediction residual value is generated, and the initial prediction residual value can be used to re-determine the model parameters of the prediction model, that is, the target model parameters.
  • the process is similar to the process of determining the initial model parameters, and will not be repeated in this embodiment.
  • step 105 is further executed.
  • Step 105 Invoke the prediction model to process the prediction residual value according to the target model parameters and the historical service data to obtain a second prediction result corresponding to the specified time period.
  • the second prediction result refers to the prediction result obtained by calling the ARIMA model to perform a second-order prediction on the prediction residual value generated in the first-order prediction process.
  • ARIMA When the ARIMA model is called to predict the business data for a specified period of time, a predicted residual value is generated, and then ARIMA can be called to perform a second-order prediction of the predicted residual value based on the retrieved target model parameters and historical business data, and further, the specified The second prediction result corresponding to the time period.
  • the process will be described in detail in the following embodiments, and will not be repeated in this embodiment.
  • the prediction residual value is processed according to the target model parameters and the historical service data to obtain the second prediction result corresponding to the specified time period, and then step 106 is performed.
  • Step 106 Determine the prediction data corresponding to the specified time period according to the first prediction result and the second prediction result.
  • Predicted data refers to the predicted business data in the specified time period in the future obtained by using the ARIMA model.
  • the prediction data corresponding to the specified time period can be determined by combining the first prediction result and the second prediction result, that is, the second prediction result is used.
  • the prediction result corrects the first prediction result, so as to obtain the final predicted service data in the specified time period.
  • the business data prediction method obtaineds the historical business data corresponding to the designated period of time when the business data in a designated period of time in the future needs to be predicted, and determines the corresponding prediction model based on the historical business data.
  • Initial model parameters call the prediction model.
  • the first prediction result and prediction residual value corresponding to the specified time period are predicted, and the target model parameters corresponding to the prediction model are determined according to the prediction residual value.
  • the prediction model is called according to
  • the target model parameters and historical business data are processed to predict residual values to obtain the second prediction result corresponding to the specified time period, and the prediction data corresponding to the specified time period is determined according to the first prediction result and the second prediction result.
  • the embodiment of the present disclosure can improve the accuracy of data prediction by adopting a two-stage prediction method.
  • the method for predicting service data may specifically include the following steps:
  • Step 201 Obtain the initial historical business data of the same historical period.
  • the embodiments of the present disclosure can be applied to a scenario in which an ARIMA model is used to predict business data in a certain period of time in the future.
  • the business data may be data such as stock price, house price, sales, visits, GDP (Gross Domestic Product), temperature, etc.
  • the business data may be at least one of the foregoing data. Specifically, it can be determined according to business requirements, which is not limited in this embodiment.
  • ARIMA AR is "autoregressive"
  • p is the number of autoregressive terms
  • MA is "moving average”
  • q is the number of moving average terms
  • d is the number of differences made to make it a stationary series (Order).
  • the model needs to determine the order p, which means to predict the current value with the historical value of several periods.
  • the model formula is:
  • y t is the current value
  • u is a constant
  • p is the order
  • ⁇ t is the error value
  • the moving average model focuses on the accumulation of error terms in the autoregressive model.
  • the formula for the q-order autoregressive process is:
  • y t is the current value
  • u is a constant
  • q is the order
  • ⁇ i is the error coefficient
  • ⁇ t is the error.
  • the autoregressive model AR and the moving average model MA are combined to get the autoregressive moving average model ARMA(p, q), the calculation formula is as follows:
  • the order of difference in data stationarity processing that is, non-stationary data is stationary after several orders of difference.
  • the core function of short-term load forecasting is to predict the future short-term (15 minutes, daily) electricity load based on the historical electricity load of enterprise-level users, and provide a reference for the electricity sales business in the electric spot transaction for transaction declaration and deviation price difference calculation. in accordance with.
  • the electricity load is used as business data for prediction.
  • the designated time period refers to a certain time period in the future that requires business data prediction. If the stock price of the whole day is predicted tomorrow, the whole day tomorrow will be the designated time period, or the power consumption between 9:00 and 12:00 tomorrow will be Today 9:00 ⁇ 12:00 as the designated time and so on.
  • the historical period refers to the past simultaneous period corresponding to the specified time period. For example, if the electricity consumption between 9:00 and 12:00 tomorrow is required, then tomorrow 9:00 to 12:00 will be the specified time period.
  • the historical period can be It is from 9:00 to 12:00 yesterday, 9:00 to 12:00 the day before yesterday, and so on.
  • the initial historical business data refers to the acquired business data of the same historical period that has not yet been screened.
  • the initial historical business data corresponding to the specified time period can be obtained.
  • the historical business database can be stored in advance to filter out the data that is in the same historical period with the specified time period.
  • Business data as initial historical business data.
  • step 202 is executed.
  • Step 202 Filter the initial historical business data to obtain the historical business data.
  • the initial historical business data can be screened to obtain the historical business data.
  • the specific screening process can be described in detail in conjunction with the following specific implementation manners.
  • the foregoing step 202 may include:
  • Sub-step S1 Calculate the average value and standard deviation corresponding to the initial historical service data.
  • the average value refers to the average value of the initial historical business data.
  • the initial historical business data is 10 pieces of data
  • the 10 pieces of data can be added together, and then divided by 10 to obtain the average value. .
  • the standard deviation also known as the mean square deviation, refers to the standard deviation of the initial historical business data. It is most commonly used as a measure of the degree of statistical distribution in probability statistics.
  • the definition of standard deviation is the square root of the square root of the square of the deviation of the standard value of each unit of the population from its mean.
  • the average value and standard deviation corresponding to the initial historical business data can be calculated.
  • the specific calculation process is not described in detail in this embodiment.
  • the sub-step S2 is executed.
  • Sub-step S2 Calculate the difference between the initial historical business data and the average value, and if the difference is greater than a preset threshold, remove the initial historical business data corresponding to the difference to obtain the historical business data.
  • the preset threshold may be a product value of the standard deviation and a preset multiple, and the preset multiple refers to a multiple preset by business personnel for screening initial historical business data.
  • the preset multiple is preferably 3 times.
  • the difference between the initial historical business data and the average value can be calculated. Then, the initial historical business data whose difference is greater than the preset multiple is eliminated, and the remaining is the historical business data that needs to be subsequently predicted.
  • step 203 and step 204 are executed.
  • Step 203 Perform differential processing on the historical service data to obtain the first model parameter corresponding to the prediction model.
  • the first model parameter refers to the parameter required for the operation of ARIMA.
  • the first model parameter is the parameter d shown in step 201 above. That is, the first model parameter is the difference order.
  • the historical business data may be subjected to differential processing to obtain the first model parameter. Specifically, it may be described in detail in conjunction with the following specific implementation manners.
  • the foregoing step 203 may include:
  • Sub-step M1 Determine the data stability of the historical business data.
  • data stability refers to the characteristics of whether historical business data is stable.
  • Time sequence diagram if the sequence always fluctuates randomly around a constant value, the fluctuation range is bounded, and there is no obvious trend or periodicity, it can be considered as a stationary sequence. As shown in Figure 3, the left picture is non-stationary, and the right picture is a stationary series.
  • ADF unit root test can accurately judge the stability.
  • sub-step M2 or M3 is executed.
  • Sub-step M2 When the historical service data is stationarity data, determine that the first model parameter is 0.
  • Sub-step M3 In the case that the historical service data is non-stationary data, perform n-th order difference processing on the historical service data; where n is a positive integer greater than or equal to 1.
  • the historical business data can be processed with n-order difference processing. Specifically, when the historical business data is non-stationary data, the historical business data can be sequentially first-differentiated After processing the data with the second-order difference, the third-order difference, or the logarithm, the first-order and second-order difference methods are used to test stationarity until a stationary sequence is obtained.
  • Sub-step M4 In the case that the historical business data after the n-th order difference processing is stationarity data, use the n as the first model parameter.
  • n when performing n-order difference processing on historical service data, and the historical service data after n-order difference processing is flat satellite data, use n as the first model parameter, for example, after performing second-order difference processing on historical service data , When the obtained historical business data is stationarity data, use 2 as the first model parameter.
  • Step 204 Perform order processing on the historical service data to obtain the second model parameter and the third model parameter corresponding to the prediction model.
  • the second model parameter and the third model parameter are the p and q shown in step 201 above, that is, the order of the best ARIMA model.
  • the third model parameter is q; and when the second model parameter is q, the third model parameter is q.
  • it can be based on business requirements.
  • this embodiment does not impose restrictions on this.
  • the historical business data can be subjected to order processing to obtain the second model parameter and the third model parameter. Specifically, the following two methods can be used to obtain the second model parameter and the third model parameter.
  • Method 1 Determine the values of p and q according to the autocorrelation function and the partial autocorrelation function.
  • the autocorrelation function ACF describes the linear correlation between time series observations and their past observations.
  • the partial autocorrelation function PACF describes the linear correlation between the time series observations and the past observations given the intermediate observations.
  • ACF diagram shown in Figure 4
  • PACF diagram shown in 2c
  • Method 2 Information criterion setting. At present, the following criteria are commonly used in selecting models: (where L is the likelihood function, k is the number of parameters, and n is the number of observations).
  • AIC -2ln(L)+2k: Akaike information volume, akaike information criterion
  • BIC -2ln(L)+ln(n)*k: Bayesian information amount, bayesian information criterion
  • the AIC criterion is commonly used, and it is necessary to avoid overfitting as much as possible. Therefore, the preferred model should be the one with the smallest AIC value. You can also try each criterion in turn and choose the best.
  • the ARIMA model After determining the parameters d, p, and q, use the ARIMA model to make predictions. If d is not equal to 0, the difference or logarithmic operation is used in the stationarity processing, and the predicted load value needs to be inversely calculated to obtain the predicted load value. As shown in Figure 6, the results of the predicted value and the true value are displayed. Among them, the curve at the top when the time is 30 is the curve corresponding to the true value, and the curve at the bottom when the time is 30 is the predicted value. Curve.
  • step 205 is executed.
  • Step 205 Invoke the prediction model to predict the business data of the second historical period according to the initial model parameters and the first historical business data of the first historical period to obtain the predicted business of the second historical period data.
  • the historical period may include the first historical period and the second historical period.
  • the first historical period is earlier than the second historical period.
  • the specified time period is tomorrow morning from 9:00 to 12:00.
  • the second historical period can be from 9:00 to 12:00 yesterday morning
  • the third historical period can be from 9:00 to 12:00 the day before yesterday.
  • the first historical business data refers to the business data obtained from the first historical period in the same period.
  • the second historical business data refers to the business data obtained during the same period in the second history.
  • the predicted business data in the second historical period refers to the predicted business data obtained by predicting the business data in the second historical period. That is, the predicted business data of the second historical period.
  • the ARIMA model can be invoked to predict the business data of the second historical period based on the initial model parameters and the first historical business data of the first historical period to obtain predicted business data.
  • Step 206 Calculate the predicted residual value according to the predicted service data and the second historical service data of the second historical period.
  • the predicted residual value can be obtained based on the predicted business data and the second historical business data of the second historical period. Specifically, the predicted residual value can be obtained based on the predicted business data and the real first 2.
  • the historical business data is used to calculate the predicted residual value. For example, taking the forecast of 15 minutes of electricity consumption in the next day as an example, y 1 , y 2 ,..., y n are the true values, and p 1 , p 2 ,.
  • step 207 is executed.
  • Step 207 Invoke the prediction model to predict the service data within the specified time period according to the initial model parameters, the first historical service data and the second historical service data, to obtain the first prediction result.
  • This embodiment adopts a two-level prediction method, and the first prediction result is the result obtained by the first-level prediction.
  • the prediction residual value refers to the residual value obtained when predicting the prediction result for a specified period of time.
  • the ARIMA model can be called according to the model parameters and the first historical business data and the second historical business data Predict the business data in the specified time period to obtain the first prediction result.
  • step 208 is executed.
  • Step 208 Determine the target model parameter corresponding to the prediction model according to the prediction residual value.
  • the target model parameters refer to the model parameters of the operational prediction model obtained by retraining the prediction model through the initial prediction residual value obtained by the first-order prediction.
  • an initial prediction residual value is generated, and the initial prediction residual value can be used to re-determine the model parameters of the prediction model, that is, the target model parameters.
  • the process is similar to the process of determining the initial model parameters, and will not be repeated in this embodiment.
  • step 209 is further executed.
  • Step 209 Invoke the prediction model to process the prediction residual value according to the target model parameters and the historical service data to obtain a second prediction result corresponding to the specified time period.
  • the second prediction result refers to the prediction result obtained by calling the ARIMA model to perform a second-order prediction on the prediction residual value generated in the first-order prediction process.
  • the ARIMA model When the ARIMA model is called to predict the business data for a specified period of time, a predicted residual value is generated, and then ARIMA can be called to perform a second-order prediction of the predicted residual value based on the re-determined target model parameters and historical business data, and then the specified The second prediction result corresponding to the time period.
  • the obtained residual sequence can be predicted to obtain the second prediction result.
  • the specific prediction method may be: if d is not equal to 0, difference or logarithmic operation is used in the stationarity processing, and the predicted load value needs to be inversely calculated on the prediction result.
  • the second prediction result is the correction parameter of the first prediction result, that is, the second prediction result is used to correct the first prediction result, so as to obtain the required predicted service data.
  • step 210 is executed.
  • Step 210 Obtain the sum value between the first prediction result and the second prediction result, and use the sum value as the prediction data for the specified time period.
  • the first prediction result and the second prediction result can be added, so that the prediction data of a specified time period can be obtained.
  • the business data prediction method obtaineds the historical business data corresponding to the designated period of time when the business data in a designated period of time in the future needs to be predicted, and determines the corresponding prediction model based on the historical business data.
  • Initial model parameters call the prediction model.
  • the first prediction result and prediction residual value corresponding to the specified time period are predicted, and the target model parameters corresponding to the prediction model are determined according to the prediction residual value.
  • the prediction model is called according to
  • the target model parameters and historical business data are processed to predict residual values to obtain the second prediction result corresponding to the specified time period, and the prediction data corresponding to the specified time period is determined according to the first prediction result and the second prediction result.
  • the embodiment of the present disclosure can improve the accuracy of data prediction by adopting a two-stage prediction method.
  • the service data prediction device may specifically include the following modules:
  • the historical data obtaining module 310 is used to obtain historical business data of the same period corresponding to a specified time period
  • the model parameter determination module 320 is configured to determine the initial model parameters corresponding to the prediction model according to the historical business data
  • the first result prediction module 330 is configured to call the prediction model to obtain the first prediction result and the prediction residual value corresponding to the specified time period according to the initial model parameters and the historical service data;
  • the target parameter determination module 340 is configured to determine the target model parameter corresponding to the prediction model according to the prediction residual value
  • the second result prediction module 350 is configured to call the target prediction model to process the prediction residual value according to the model parameters and the historical business data to obtain the second prediction result corresponding to the specified time period;
  • the prediction data determining module 360 is configured to determine the prediction data corresponding to the specified time period according to the first prediction result and the second prediction result.
  • the business data prediction device obtains historical business data corresponding to the specified time period and determines the corresponding prediction model based on the historical business data when the business data in the specified time period in the future needs to be predicted.
  • Initial model parameters call the prediction model.
  • the first prediction result and prediction residual value corresponding to the specified time period are predicted, and the target model parameters corresponding to the prediction model are determined according to the prediction residual value.
  • the prediction model is called according to The target model parameters and historical business data are processed to predict residual values to obtain the second prediction result corresponding to the specified time period, and the prediction data corresponding to the specified time period is determined according to the first prediction result and the second prediction result.
  • the embodiment of the present disclosure can improve the accuracy of data prediction by adopting a two-stage prediction method.
  • the service data prediction device may specifically include the following modules:
  • the historical data obtaining module 410 is used to obtain historical business data corresponding to a specified period of time in the same period of history;
  • the model parameter determination module 420 is configured to determine the initial model parameters corresponding to the prediction model according to the historical business data
  • the first result prediction module 430 is configured to call the prediction model to obtain the first prediction result and the prediction residual value corresponding to the specified time period according to the initial model parameters and the historical service data;
  • the target parameter determination model 440 is used to determine the target model parameter corresponding to the prediction model according to the prediction residual value
  • the second result prediction module 450 is configured to call the prediction model to process the prediction residual value according to the target model parameters and the historical business data to obtain the second prediction result corresponding to the specified time period;
  • the prediction data determining module 460 is configured to determine the prediction data corresponding to the specified time period according to the first prediction result and the second prediction result.
  • the service data is enterprise user load
  • the historical data acquisition module 410 includes:
  • the historical load obtaining unit is used to obtain the historical enterprise user load corresponding to the specified period of time in the same period when the enterprise user load needs to be predicted in the specified period in the future;
  • the model parameter determination module 420 includes:
  • An initial parameter determining unit configured to determine initial model parameters corresponding to the prediction model according to the historical enterprise user load
  • the first result prediction module 430 includes:
  • the first result prediction unit is configured to call the prediction model to obtain the first prediction result and the prediction residual value corresponding to the specified time period according to the initial model parameters and the historical enterprise user load;
  • the second result prediction module 450 includes:
  • a second result obtaining unit configured to call the prediction model to process the prediction residual value according to the target model parameter and the historical enterprise user load to obtain the second prediction result corresponding to the specified time period;
  • the prediction data determining module 460 includes:
  • the predicted load determining unit is configured to determine the predicted enterprise user load corresponding to the specified time period according to the first predicted result and the second predicted result.
  • the historical data acquisition module 410 includes:
  • the initial business data acquiring unit 411 is configured to acquire the initial historical business data of the same historical period
  • the historical business data screening unit 412 is configured to filter the initial historical business data to obtain the historical business data.
  • the historical service data screening unit 412 includes:
  • the standard deviation calculation subunit is used to calculate the average value and standard deviation corresponding to the initial historical business data
  • the historical data acquisition subunit is used to calculate the difference between the initial historical business data and the average value, and if the difference is greater than a preset threshold, remove the initial historical business data corresponding to the difference to obtain The historical business data.
  • the model parameter determination module 420 includes:
  • the first model parameter obtaining unit 421 is configured to perform differential processing on the historical service data to obtain the first model parameter corresponding to the prediction model;
  • the second model parameter obtaining unit 422 is configured to perform order processing on the historical service data to obtain the second model parameter and the third model parameter corresponding to the prediction model.
  • the first model parameter obtaining unit 421 includes:
  • a data stationarity determination subunit for determining the data stationarity of the historical business data
  • the model parameter determination subunit is configured to determine that the first model parameter is 0 when the historical business data is stationarity data;
  • the data difference processing subunit is configured to perform n-th order difference processing on the historical business data when the historical business data is non-stationary data; where n is a positive integer greater than or equal to 1;
  • the first parameter acquisition subunit is configured to use the n as the first model parameter when the historical business data after the n-th order difference processing is stationarity data.
  • the historical period includes a first historical period and a second historical period, the first historical period is earlier than the second historical period, and the first result prediction module 430 includes:
  • the predicted service data obtaining unit 431 is configured to call the prediction model to predict the service data of the second historical period according to the initial model parameters and the first historical service data of the first historical period to obtain the first historical period. 2. Forecast business data for the same period in history;
  • a predicted residual value calculation unit 432 configured to calculate the predicted residual value according to the predicted service data and the second historical service data in the same period of the second history;
  • the first prediction result obtaining unit 433 is configured to call the prediction model to predict the service data within the specified time period according to the initial model parameters, the first historical service data, and the second historical service data, to obtain The first prediction result.
  • the prediction data determining module 460 includes:
  • the prediction data obtaining unit 461 is configured to obtain the sum value between the first prediction result and the second prediction result, and use the sum value as the prediction data for the specified time period.
  • the business data prediction device obtains historical business data corresponding to the specified time period and determines the corresponding prediction model based on the historical business data when the business data in the specified time period in the future needs to be predicted.
  • Initial model parameters call the prediction model.
  • the first prediction result and prediction residual value corresponding to the specified time period are predicted, and the target model parameters corresponding to the prediction model are determined according to the prediction residual value.
  • the prediction model is called according to The target model parameters and historical business data are processed to predict residual values to obtain the second prediction result corresponding to the specified time period, and the prediction data corresponding to the specified time period is determined according to the first prediction result and the second prediction result.
  • the embodiment of the present disclosure can improve the accuracy of data prediction by adopting a two-stage prediction method.
  • an embodiment of the present disclosure also provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and capable of running on the processor.
  • a processor executes the program, Realize the business data prediction method described in any one of the above.
  • the embodiments of the present disclosure also provide a computer-readable storage medium, which when the instructions in the storage medium are executed by the processor of the electronic device, enables the electronic device to execute the business data prediction method described in any one of the above.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units.
  • Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement it without creative work.
  • the various component embodiments of the present disclosure may be implemented by hardware, or by software modules running on one or more processors, or by a combination of them.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the electronic device according to the embodiments of the present disclosure.
  • DSP digital signal processor
  • the present disclosure can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein.
  • Such a program for realizing the present disclosure may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
  • FIG. 9 shows an electronic device that can implement the method according to the present disclosure.
  • the electronic device traditionally includes a processor 1010 and a computer program product in the form of a memory 1020 or a computer-readable medium.
  • the memory 1020 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 1020 has a storage space 1030 for executing program codes 1031 of any method steps in the above methods.
  • the storage space 1030 for program codes may include various program codes 1031 respectively used to implement various steps in the above method. These program codes can be read from or written into one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks.
  • Such a computer program product is usually a portable or fixed storage unit as described with reference to FIG. 10.
  • the storage unit may have storage segments, storage spaces, etc. arranged similarly to the storage 1020 in the electronic device of FIG. 9.
  • the program code can be compressed in an appropriate form, for example.
  • the storage unit includes computer-readable codes 1031', that is, codes that can be read by, for example, a processor such as 1010. These codes, when run by an electronic device, cause the electronic device to execute each of the methods described above. step.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Algebra (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

业务数据预测方法、装置、电子设备及计算机可读存储介质,涉及数据处理技术领域。该方法包括:获取与指定时段对应的历史同期的历史业务数据;根据历史业务数据,确定预测模型对应的初始模型参数;调用预测模型根据初始模型参数和历史业务数据,预测得到指定时段对应的第一预测结果和预测残差值,根据预测残差值确定预测模型对应的目标模型参数;调用预测模型根据目标模型参数和历史业务数据,对预测残差值进行处理,得到指定时段对应的第二预测结果;根据第一预测结果和第二预测结果,确定指定时段对应的预测数据。

Description

业务数据预测方法、装置、电子设备及计算机可读存储介质
相关申请的交叉引用
本公开要求在2020年04月09日提交中国专利局、申请号为202010276366.7、名称为“业务数据预测方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及数据处理技术领域,特别是涉及一种业务数据预测方法、装置、电子设备及计算机可读存储介质。
背景技术
数据预测分析是利用历史的数据对未来的数据和趋势进行预测的方法,在现代科技发展和生产力提高中有广泛的应用。
差分整合移动平均自回归模型(Autoregressive Integrated Moving Average model,ARIMA模型),又称整合移动平均自回归模型(移动也可称作滑动),是当前的时间序列预测分析方法之一,在预测场景有广泛的应用。在ARIMA模型的表示方式ARIMA(p,d,q)中,AR是“自回归”,p为自回归项数;MA为“滑动平均”,q为滑动平均项数,d为使之成为平稳序列所做的差分次数(阶数)。ARIMA模型的特点是不直接考虑其他相关随机变量的变化。
概述
本公开提供了一种业务数据预测方法、装置、电子设备及计算机可读存储介质。
本公开提供了一种业务数据预测方法,包括:
获取与指定时段对应的历史同期的历史业务数据;
根据所述历史业务数据,确定预测模型对应的初始模型参数;
调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
根据所述预测残差值,确定所述预测模型对应的目标模型参数;
调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
可选地,所述业务数据为企业用户负荷。
可选地,所述获取与所述指定时段对应的历史同期的历史业务数据,包括:
获取所述历史同期的初始历史业务数据;
对所述初始历史业务数据进行筛选,得到所述历史业务数据。
可选地,所述对所述初始历史业务数据进行筛选,得到所述历史业务数据,包括:
计算所述初始历史业务数据对应的平均值和标准差;
计算所述初始历史业务数据与平均值的差值,在所述差值大于预设阈值的情况下,剔除所述差值对应的初始历史业务数据,得到所述历史业务数据。
可选地,所述预设阈值为所述标准差与预设倍数的乘积值。
可选地,所述根据所述历史业务数据,确定预测模型对应的初始模型参数,包括:
对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数;
对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
可选地,所述对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数,包括:
确定所述历史业务数据的数据平稳性;
在所述历史业务数据为平稳性数据的情况下,确定所述第一模型参数为0;
在所述历史业务数据为非平稳性数据的情况下,对所述历史业务数据进行n阶差分处理;其中,n为大于等于1的正整数;
在进行所述n阶差分处理后的历史业务数据为平稳性数据的情况下,将所述n作为所述第一模型参数。
可选地,所述确定所述历史业务数据的数据平稳性,包括:
调用所述历史业务数据的时序图,在所述历史业务数据在时间序列上围绕一个常数值随机波动,且波动范围小于预设范围的情况下,则确定所述历史业务数据为平稳序列。
可选地,所述确定所述历史业务数据的数据平稳性,包括:
调用单位根检验模型对所述历史业务数据进行平稳性检验,在检验统计量对应的概率值小于0.05的情况下,确定所述历史业务数据为平稳序列。
可选地,所述对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数,包括:
根据自相关函数和偏自相关函数,得到所述第二模型参数和所述第三模型参数。
可选地,所述对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数,包括:
根据信息准则进行定阶处理,得到所述第二模型参数和所述第三模型参数。
可选地,所述历史同期包括第一历史同期和第二历史同期,所述第一历史同期的时间早于所述第二历史同期,所述调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值,包括:
调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据;
根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值;
调用所述预测模型根据所述初始模型参数、所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
可选地,根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值,包括:
计算所述第二历史业务数据与对应的所述预测业务数据的差值,将所述差值确定为所述预测残差值。
可选地,所述根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据,包括:
获取所述第一预测结果和所述第二预测结果之间的和值,并将所述和值作为所述指定时段的预测数据。
本公开提供了一种业务数据预测装置,包括:
历史数据获取模块,用于获取与指定时段对应的历史同期的历史业务数据;
模型参数确定模块,用于根据所述历史业务数据,确定预测模型对应的初始模型参数;
第一结果预测模块,用于调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
目标参数确定模块,用于根据所述预测残差值,确定所述预测模型对应的目标模型参数;
第二结果预测模块,用于调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
预测数据确定模块,用于根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
可选地,所述历史数据获取模块包括:
初始业务数据获取单元,用于获取所述历史同期的初始历史业务数据;
历史业务数据筛选单元,用于对所述初始历史业务数据进行筛选,得到所述历史业务数据。
可选地,所述模型参数确定模块包括:
第一模型参数获取单元,用于对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数;
第二模型参数获取单元,用于对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
可选地,所述历史同期包括第一历史同期和第二历史同期,所述第一历史同期的时间早于所述第二历史同期,所述第一结果预测模块包括:
预测业务数据获取单元,用于调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据;
预测残差值计算单元,用于根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值;
第一预测结果获取单元,用于调用所述预测模型根据所述初始模型参数、所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
本公开提供了一种电子设备,包括:
处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述任一项所述的业务数据预测方法。
本公开提供了一种计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一项所述的业务数据预测方法。
本公开提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备上运行时,导致所述电子设备执行上述的业务数据预测方法。
上述说明仅是本公开技术方案的概述,为了能够更清楚了解本公开的技术手段,而可依照说明书的内容予以实施,并且为了让本公开的上述和其它目的、特征和优点能够更明显易懂,以下特举本公开的具体实施方式。
附图简述
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本公开实施例提供的一种业务数据预测方法的步骤流程图;
图2示出了本公开实施例提供的另一种业务数据预测方法的步骤流程图;
图3示出了本公开实施例提供的一种检验数据平稳性的时序图;
图4示出了本公开实施例提供的一种自相关函数的示意图;
图5示出了本公开实施例提供的一种偏自相关函数的示意图;
图6示出了本公开实施例提供的一种预测值和真实值的示意图;
图7示出了本公开实施例提供的一种业务数据预测装置的结构示意图;
图8示出了本公开实施例提供的另一种业务数据预测装置的结构示意图;
图9示意性地示出了用于执行根据本公开的方法的电子设备的框图;并且
图10示意性地示出了用于保持或者携带实现根据本公开的方法的程序代码的存储单元。
详细描述
为使本公开的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本公开作进一步详细的说明。
参照图1,示出了本公开实施例提供的一种业务数据预测方法的步骤流程图,该业务数据预测方法具体可以包括如下步骤:
步骤101:获取与指定时段对应的历史同期的历史业务数据。
本公开实施例可以应用于采用ARIMA模型对未来某个时段内的业务数据进行预测的场景中。
业务数据可以为股价、房价、销售额、访问量、国内生产总值(Gross Domestic Product,GDP)、企业用户负荷、气温等数据,业务数据可以为上述的一者或多者。具体地,可以根据业务需求而定,本实施例对此不加以限制。其中,企业用户负荷可以为企业承担的用电、用水、用资源等负荷。
ARIMA(p,d,q)中,AR是“自回归”,p为自回归项数;MA为“滑动平均”,q为滑动平均项数,d为使之成为平稳序列所做的差分次数(阶数)。对于ARIMA模型进行如下描述:
1、AR自回归模型
模型需要确定阶数p,表示用几期的历史值预测当前值,模型公式为:
Figure PCTCN2021085880-appb-000001
上述公式(1)中,y t为当前值,u是常数,p是阶数,ε t是误差值。
2、移动平均MA
移动平均模型关注的是自回归模型中的误差项的累加,q阶自回归过程的公式为:
Figure PCTCN2021085880-appb-000002
上述公式(2)中,y t为当前值,u是常数,q是阶数,θ i是误差系数,ε t是误差。
3、自回归移动平均模型ARMA
自回归模型AR和移动平均模型MA模型结合,就可以得到自回归移动平均模型ARMA(p,q),计算公式如下:
Figure PCTCN2021085880-appb-000003
4、差分的阶数d
数据平稳性处理时的差分阶数,即非平稳数据经过几阶差分后是平稳的。
5、差分自回归移动平均模型ARIMA
将自回归模型、移动平均模型和差分法结合,就可以得到差分自回归移动平均模型ARIMA(p,d,q),其中d是需要对数据进行差分的阶数。
可以理解地,上述仅是为了理解差分自回归移动平均模型而列举的方案。
指定时段是指未来某个需要进行业务数据预测的时段,如预测明天全天的股价,则将明天全天作为指定时段,或明天9:00~12:00之间的用电量,则将明天9:00~12:00作为指定时段等等。
历史业务数据是指与指定时段属于同期的历史数据,即历史同期的业务数据,例如,在需要对明天9:00~12:00之间的用电量,则将明天9:00~12:00作为指定时段,历史同期可以为昨天9:00~12:00,前天9:00~12:00等等。
在需要对未来的指定时段内的业务数据进行预测时,可以获取与指定时段对应的历史同期的历史业务数据,具体地,可以根据预先保存历史业务数据库,从数据库中筛选出与指定时段处于历史同期的业务数据,以作为历史业务数据。
当然,在本实施例中,还可以采用其它方式获取与指定时段对应的历史同期的历史业务数据,本实施例对此不加以限制。
在获取与指定时段对应的历史同期的历史业务数据之后,执行步骤102。
步骤102:根据所述历史业务数据,确定预测模型对应的初始模型参数。
预测模型是指用于对未来的业务数据进行预测的模型,在本实施例中,预测模型优选为ARIMA模型,在后续示例中,以ARIMA模型对本实施例进行描述。
初始模型参数是指运行预测模型所需的参数,例如,在运行ARIMA模型时,所必须的参数为d、p、q(即上述步骤101中所述的参数)。本实施例中,采用二阶预测的方式,初始模型参数即为一阶预测时,预测模型运行时所需的模型参数。
在获取与指定时段对应的历史同期的历史业务数据之后,则可以根据历史业务数据确定出ARIMA模型对应的初始模型参数,在有了模型参数之后,才可以正常运行ARIMA模型。而对于如何确定初始模型参数的过程将在下述实施例中进行详细描述,本实施例在此不再加以赘述。
在根据历史业务数据确定出预测模型对应的初始模型参数之后,执行步骤103。
步骤103:调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值。
本实施例采用了两阶预测的方式,第一预测结果即为一阶预测所得到的结果。预测残差值是指在对指定时段的预测结果进行预测时所得到的残差值。
在确定出预测模型对应的初始模型参数之后,则可以调用ARIMA模型根据初始模型参数和历史业务数据对指定时段内的业务数据进行预测,以得到第一预测结果和预测残差值,对于具体地预测过程可以在下述实施例中进行详细描述,本实施例在此不再加以赘述。
在调用预测模型根据初始模型参数和历史业务数据预测得到指定时段对应的第一预测结果和预测残差值之后,执行步骤104。
步骤104:根据所述预测残差值,确定所述预测模型对应的目标模型参数。
目标模型参数是指通过一阶预测得到的初始预测残差值,重新对预测模型进行训练而得到的运行预测模型的模型参数。
在调用ARIMA模型对指定时段进行业务数据预测时,产生了初始预测残差值,则可以初始预测残差值重新确定预测模型的模型参数,即目标模型参数。对于该过程类似于确定初始模型参数的过程,本实施例在此不再加以赘述。
在调用预测模型根据初始预测残差值确定出预测模型的目标模型参数之后,进而,执行步骤105。
步骤105:调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果。
第二预测结果是指调用ARIMA模型对一阶预测过程中产生的预测残差值进行二阶预测,所得到的预测结果。
在调用ARIMA模型对指定时段进行业务数据预测时,产生了预测残差值,则可以调用ARIMA根据重新获取的目标模型参数和历史业务数据对预测残差值进行二阶预测,进而,可以得到指定时段对应的第二预测结果。对于该 过程将在下述实施例中进行详细描述,本实施例在此不再加以赘述。
在调用预测模型根据目标模型参数和历史业务数据对预测残差值进行处理,以得到指定时段对应的第二预测结果,进而,执行步骤106。
步骤106:根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
预测数据是指采用ARIMA模型预测得到的在未来指定时段内的预测业务数据。
在对指定时段进行了二阶预测,得到了相应的第一预测结果和第二预测结果之后,则可以结合第一预测结果和第二预测结果确定出指定时段对应的预测数据,即采用第二预测结果对第一预测结果进行校正,从而得到最终的指定时段内的预测业务数据。
本实施例通过在采用ARIMA模型预测的过程中,采用二次预测的方式,能够使得数据预测的准确率得到大幅提升。
本公开实施例提供的业务数据预测方法,通过在需要对未来的指定时段内的业务数据进行预测时,获取与指定时段对应的历史同期的历史业务数据,根据历史业务数据,确定预测模型对应的初始模型参数,调用预测模型根据初始模型参数和历史业务数据,预测得到指定时段对应的第一预测结果和预测残差值,根据预测残差值确定预测模型对应的目标模型参数,调用预测模型根据目标模型参数和历史业务数据,对预测残差值进行处理,得到指定时段对应的第二预测结果,根据第一预测结果和第二预测结果,确定指定时段对应的预测数据。本公开实施例通过采用二阶段的预测方式,可以提升数据预测的准确率。
参照图2,示出了本公开实施例提供的另一种业务数据预测方法的步骤流程图,该业务数据预测方法具体可以包括如下步骤:
步骤201:获取所述历史同期的初始历史业务数据。
本公开实施例可以应用于采用ARIMA模型对未来某个时段内的业务数据进行预测的场景中。
业务数据可以为股价、房价、销售额、访问量、GDP(Gross Domestic Product,国内生产总值)、气温等数据,业务数据可以为上述数据的至少一种。具体地,可以根据业务需求而定,本实施例对此不加以限制。
ARIMA(p,d,q)中,AR是“自回归”,p为自回归项数;MA为“滑动平均”,q为滑动平均项数,d为使之成为平稳序列所做的差分次数(阶数)。对于ARIMA模型进行如下描述:
1、AR自回归模型
模型需要确定阶数p,表示用几期的历史值预测当前值,模型公式为:
Figure PCTCN2021085880-appb-000004
上述公式(1)中,y t为当前值,u是常数,p是阶数,ε t是误差值。
2、移动平均MA
移动平均模型关注的是自回归模型中的误差项的累加,q阶自回归过程的公式为:
Figure PCTCN2021085880-appb-000005
上述公式(2)中,y t为当前值,u是常数,q是阶数,θ i是误差系数,ε t是误差。
3、自回归移动平均模型ARMA
自回归模型AR和移动平均模型MA模型结合,就可以得到自回归移动平均模型ARMA(p,q),计算公式如下:
Figure PCTCN2021085880-appb-000006
4、差分的阶数d
数据平稳性处理时的差分阶数,即非平稳数据经过几阶差分后是平稳的。
5、差分自回归移动平均模型ARIMA
将自回归模型、移动平均模型和差分法结合,就可以得到差分自回归移动平均模型ARIMA(p,d,q),其中d是需要对数据进行差分的阶数。
可以理解地,上述仅是为了理解差分自回归移动平均模型而列举的方案。
短期负荷预测的核心功能是根据企业级用户的历史用电负荷,预测未来短期(15分钟、日)的用电负荷,为售电业务在电力现货交易中进行交易申报、偏差价差收益计算提供参考依据。本实施例以用电负荷作为业务数据进行预测。
指定时段是指未来某个需要进行业务数据预测的时段,如预测明天全天的股价,则将明天全天作为指定时段,或明天9:00~12:00之间的用电量,则将明天9:00~12:00作为指定时段等等。
历史同期是指与指定时段对应的过往同时段,例如,在需要对明天9:00~12:00之间的用电量,则将明天9:00~12:00作为指定时段,历史同期可以为昨天9:00~12:00,前天9:00~12:00等等。
初始历史业务数据是指获取的历史同期的还未进行筛选的业务数据。
在需要对未来的指定时段内的业务数据进行预测时,可以获取与指定时段对应的历史同期的初始历史业务数据,可以根据预先保存历史业务数据库,从数据库中筛选出与指定时段处于历史同期的业务数据,以作为初始历史业务数据。
当然,在本实施例中,还可以采用其它方式获取与指定时段对应的历史同期的初始历史业务数据,本实施例对此不加以限制。
在获取初始历史业务数据之后,执行步骤202。
步骤202:对所述初始历史业务数据进行筛选,得到所述历史业务数据。
在获取初始历史业务数据之后,则可以对初始历史业务数据进行筛选,以得到历史业务数据,具体地筛选过程可以结合下述具体实现方式进行详细描述。
在本实施例的一种具体实现方式中,上述步骤202可以包括:
子步骤S1:计算所述初始历史业务数据对应的平均值和标准差。
在本实施例中,平均值是指初始历史业务数据的平均值,例如,在初始历史业务数据为10条数据时,则可以将这10条数据相加,然后除以10即得到得到平均值。
标准差又称为均方差,是指初始历史业务数据的标准差,在概率统计中最常使用作为统计分布程度(statistical dispersion)上的测量。标准差定义是总体各单位标准值与其平均数离差平方的算术平均数的平方根。
在获取到初始历史业务数据之后,则可以计算初始历史业务数据对应的平均值和标准差,具体的计算过程本实施例不加以详细描述。
在计算得到初始历史业务数据对应的平均值和标准差之后,执行子步骤S2。
子步骤S2:计算所述初始历史业务数据与所述平均值的差值,在所述差值大于预设阈值的情况下,剔除所述差值对应的初始历史业务数据,得到所述历史业务数据。
预设阈值可以为标准差与预设倍数的乘积值,预设倍数是指由业务人员预先设置的用于筛选初始历史业务数据的倍数。在本实施例中,预设倍数优选为3倍。
在计算得到初始历史业务数据对应的平均值和标准差之后,则可以计算初始历史业务数据与平均值之间的差值。然后将差值大于预设倍数的初始历史业务数据剔除,剩余的即为需要进行后续预测的历史业务数据。
在获取历史业务数据之后,执行步骤203,和步骤204。
步骤203:对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数。
第一模型参数是指ARIMA运行所需的参数,在本实施例中,第一模型参数即为上述步骤201中所示的参数d。也即第一模型参数为差分阶数。
在本实施例中,在获取历史业务数据之后,可以对历史业务数据进行差分处理,以得到第一模型参数,具体地,可以结合下述具体实现方式进行详细描述。
在本实施例的一种具体实现方式中,上述步骤203可以包括:
子步骤M1:确定所述历史业务数据的数据平稳性。
在本实施例中,数据平稳性是指历史业务数据是否平稳的特性。
在确定ARIMA模型的第一模型参数之前,先确定历史业务数据的数据平稳性,具体地,可以采用如下两种方式:
1、时序图,如果序列始终在一个常数值附近随机波动,波动范围有界,且没有明显的趋势性或周期性,可认为是平稳序列。如图3所示,左图非平稳,右图为平稳序列。
2、ADF单位根检验,可精确判断平稳性。调用python statsmodels模块tsa.stattools.adfuller函数,如果检验统计量对应的P值小于0.05,则可确认为平稳序列。
当然,在具体实现中,还可以采用其它方式对历史业务数据的平稳性进行检测,具体地,可以根据业务需求而定,本实施例对此不加以限制。
在确定历史业务数据的数据平稳性之后,执行子步骤M2或M3。
子步骤M2:在所述历史业务数据为平稳性数据的情况下,确定所述第一模型参数为0。
在确定历史业务数据为平稳性数据的情况下,无需对历史业务数据进行n阶差分处理,则可以将0作为第一模型参数。
子步骤M3:在所述历史业务数据为非平稳性数据的情况下,对所述历史业务数据进行n阶差分处理;其中,n为大于等于1的正整数。
在确定历史业务数据为非平稳性数据的情况下,则可以对历史业务数据进行n阶差分处理,具体地,在历史业务数据为非平稳性数据时,可以依次对历史业务数据进行一阶差分、二阶差分、三阶差分或取对数后一阶、二阶差分方法处理数据后,检验平稳性,直到得到平稳序列。
子步骤M4:在进行所述n阶差分处理后的历史业务数据为平稳性数据的情况下,将所述n作为所述第一模型参数。
在对历史业务数据进行n阶差分处理,且进行n阶差分处理后的历史业务数据为平卫星数据时,则将n作为第一模型参数,例如,在对历史业务数据进行二阶差分处理之后,得到的历史业务数据为平稳性数据时,则将2作为第一模型参数。
步骤204:对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
第二模型参数和第三模型参数即为上述步骤201中所示的p和q,即最佳ARIMA模型的阶次。在本实施例中,在第二模型参数为p时,则第三模型参数即为q;而在第二模型参数为q时,则第三模型参数即为q,具体地,可以根据业务需求而定,本实施例对此不加以限制。
在获取到历史业务数据之后,可以对历史业务数据进行定阶处理,以得到第二模型参数和第三模型参数。具体地,可以采用下述两种方法获取第二模型参数和第三模型参数。
方法一:根据自相关函数和偏自相关函数确定p,q的值。自相关函数ACF描述的是时间序列观测值与其过去的观测值之间的线性相关性。偏自相关函数PACF描述的是在给定中间观测值的条件下,时间序列观测值预期过去的观测值之间的线性相关性。如ACF图(图4所示)和PACF图(如2c所示)。从图中可以看出,自相关系数1阶后截尾,偏自相关系数0阶后截尾,因此p=0,q=1。
方法二:信息准则定阶。目前选择模型常用如下准则:(其中L为似然函数,k为参数数量,n为观察数)。
AIC=-2ln(L)+2k:赤池信息量,akaike information criterion
BIC=-2ln(L)+ln(n)*k:贝叶斯信息量,bayesian information criterion
HQ=-2ln(L)+ln(ln(n))*k:hannan-quinn criterion
常用的是AIC准则,同时需要尽量避免出现过拟合的情况。所以优先考虑的模型应是AIC值最小的那一个模型。也可依次尝试每一种准则,选择最优。
调用python statsmodels模块tsa.arma_order_select_ic函数,设置p、q的阶数范围和模型选则准则,得到最佳ARMA模型的阶次p、q。
确定了参数d、p、q后,运用ARIMA模型做预测。如果d不等于0,平稳性处理时采用了差分或对数运算,需要对预测结果逆运算即可得到预测的负荷值。如图6所示,展示出了预测值和真实值的结果,其中,在time为30时处于上方的曲线为真实值对应的曲线,而在time为30时处于下方的曲线即为预测值对应的曲线。
在确定第二模型参数和第三模型参数之后,执行步骤205。
步骤205:调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据。
在本实施例中,历史同期可以包括第一历史同期和第二历史同期,第一历史同期的时间要早于第二历史同期,例如,在指定时段为明天上午9:00~12:00,则第二历史同期可以为昨天上午9:00~12:00,第三历史同期可以为前天上午9:00~12:00。
可以理解地,上述示例仅是为了更好地理解本公开实施例的技术方案而列举的示例,不作为对本公开实施例的唯一限制。
第一历史业务数据是指从第一历史同期内获取的业务数据。
第二历史业务数据是指从第二历史同期内获取的业务数据。
第二历史同期的预测业务数据是指对第二历史同期内的业务数据进行预测,而得到的预测业务数据。也即预测的第二历史同期的业务数据。
在获取到ARIMA模型运行所需的初始模型参数之后,可以调用ARIMA模型根据初始模型参数和第一历史同期的第一历史业务数据对第二历史同期的业务数据进行预测,以得到预测业务数据。
步骤206:根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值。
在预测得到第二历史同期的预测业务数据之后,则可以根据预测业务数据和第二历史同期的第二历史业务数据,以得到预测残差值,具体地,可以根据预测业务数据和真实的第二历史业务数据来计算预测残差值,例如,以预测未来1天的15分钟用电量为例,y 1,y 2,...,y n为真实值,p 1,p 2,...,p n为预测值,则残差序列为r 1,r 2,...,r n,相应的计算公式为:r i=y i-p i,其中,i=1,2,...,n,n为正整数。
在根据预测业务数据和第二历史同期的第二历史业务数据计算得到预测残差值之后,执行步骤207。
步骤207:调用所述预测模型根据所述初始模型参数、所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
本实施例采用了两阶预测的方式,第一预测结果即为一阶预测所得到的结果。预测残差值是指在对指定时段的预测结果进行预测时所得到的残差值。
在获取到初始模型参数(即上述步骤中提及的第一模型参数、第二模型参数和第三模型参数)之后,可以调用ARIMA模型根据模型参数和第一历史业务数据和第二历史业务数据对指定时段内的业务数据进行预测,以得到第一预测结果。
在得到第一预测结果之后,执行步骤208。
步骤208:根据所述预测残差值,确定所述预测模型对应的目标模型参数。
目标模型参数是指通过一阶预测得到的初始预测残差值,重新对预测模型进行训练而得到的运行预测模型的模型参数。
在调用ARIMA模型对指定时段进行业务数据预测时,产生了初始预测残差值,则可以初始预测残差值重新确定预测模型的模型参数,即目标模型参数。对于该过程类似于确定初始模型参数的过程,本实施例在此不再加以赘述。
在调用预测模型根据初始预测残差值确定出预测模型的目标模型参数之后,进而,执行步骤209。
步骤209:调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果。
第二预测结果是指调用ARIMA模型对一阶预测过程中产生的预测残差值进行二阶预测,所得到的预测结果。
在调用ARIMA模型对指定时段进行业务数据预测时,产生了预测残差值,则可以调用ARIMA根据重新确定的目标模型参数和历史业务数据对预测残差值进行二阶预测,进而,可以得到指定时段对应的第二预测结果。承接上述步骤206中的示例,可以对得到的残差序列进行预测,以得到第二预测结果。具体地预测方式可以为:如果d不等于0,平稳性处理时采用了差分或对数运算,需要对预测结果逆运算即可得到预测的负荷值。
在本实施例中,第二预测结果即为第一预测结果的校正参数,即用第二预测结果对第一预测结果进行校正,从而得到所需的预测业务数据。
在得到第二预测结果之后,执行步骤210。
步骤210:获取所述第一预测结果和所述第二预测结果之间的和值,并将所述和值作为所述指定时段的预测数据。
在得到第一预测结果和第二预测结果之后,可以将第一预测结果和第二预测结果相加,从而,能够得到指定时段的预测数据。
在本实施例中,通过采用二阶段预测的方式,可以达到提升预测数据的准确度的有益效果。
本公开实施例提供的业务数据预测方法,通过在需要对未来的指定时段内的业务数据进行预测时,获取与指定时段对应的历史同期的历史业务数据,根据历史业务数据,确定预测模型对应的初始模型参数,调用预测模型根据初始模型参数和历史业务数据,预测得到指定时段对应的第一预测结果和预测残差值,根据预测残差值确定预测模型对应的目标模型参数,调用预测模型根据目标模型参数和历史业务数据,对预测残差值进行处理,得到指定时段对应的第二预测结果,根据第一预测结果和第二预测结果,确定指定时段对应的预测数据。本公开实施例通过采用二阶段的预测方式,可以提升数据预测的准确率。
参照图7,示出了本公开实施例提供的一种业务数据预测装置的结构示意图,该业务数据预测装置具体可以包括如下模块:
历史数据获取模块310,用于获取与指定时段对应的历史同期的历史业务数据;
模型参数确定模块320,用于根据所述历史业务数据,确定预测模型对应的初始模型参数;
第一结果预测模块330,用于调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
目标参数确定模块340,用于根据所述预测残差值,确定所述预测模型对 应的目标模型参数;
第二结果预测模块350,用于调用所述目标预测模型根据所述模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
预测数据确定模块360,用于根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
本公开实施例提供的业务数据预测装置,通过在需要对未来的指定时段内的业务数据进行预测时,获取与指定时段对应的历史同期的历史业务数据,根据历史业务数据,确定预测模型对应的初始模型参数,调用预测模型根据初始模型参数和历史业务数据,预测得到指定时段对应的第一预测结果和预测残差值,根据预测残差值确定预测模型对应的目标模型参数,调用预测模型根据目标模型参数和历史业务数据,对预测残差值进行处理,得到指定时段对应的第二预测结果,根据第一预测结果和第二预测结果,确定指定时段对应的预测数据。本公开实施例通过采用二阶段的预测方式,可以提升数据预测的准确率。
参照图8,示出了本公开实施例提供的另一种业务数据预测装置的结构示意图,该业务数据预测装置具体可以包括如下模块:
历史数据获取模块410,用于获取与指定时段对应的历史同期的历史业务数据;
模型参数确定模块420,用于根据所述历史业务数据,确定预测模型对应的初始模型参数;
第一结果预测模块430,用于调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
目标参数确定模型440,用于根据所述预测残差值,确定所述预测模型对应的目标模型参数;
第二结果预测模块450,用于调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
预测数据确定模块460,用于根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
可选地,所述业务数据为企业用户负荷,所述历史数据获取模块410包括:
历史负荷获取单元,用于在需要对未来指定时段内的企业用户负荷进行预测时,获取所述指定时段对应的历史同期的历史企业用户负荷;
所述模型参数确定模块420包括:
初始参数确定单元,用于根据所述历史企业用户负荷,确定所述预测模型对应的初始模型参数;
所述第一结果预测模块430包括:
第一结果预测单元,用于调用所述预测模型根据所述初始模型参数和所述历史企业用户负荷,预测得到所述指定时段对应的第一预测结果和预测残差值;
所述第二结果预测模块450包括:
第二结果获取单元,用于调用所述预测模型根据所述目标模型参数和所述历史企业用户负荷,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
所述预测数据确定模块460包括:
预测负荷确定单元,用于根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测企业用户负荷。
可选地,所述历史数据获取模块410包括:
初始业务数据获取单元411,用于获取所述历史同期的初始历史业务数据;
历史业务数据筛选单元412,用于对所述初始历史业务数据进行筛选,得到所述历史业务数据。
可选地,所述历史业务数据筛选单元412包括:
标准差计算子单元,用于计算所述初始历史业务数据对应的平均值和标准差;
历史数据获取子单元,用于计算所述初始历史业务数据与所述平均值的差值,在所述差值大于预设阈值的情况下,剔除所述差值对应的初始历史业务数据,得到所述历史业务数据。
可选地,所述模型参数确定模块420包括:
第一模型参数获取单元421,用于对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数;
第二模型参数获取单元422,用于对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
可选地,所述第一模型参数获取单元421包括:
数据平稳性确定子单元,用于确定所述历史业务数据的数据平稳性;
模型参数确定子单元,用于在所述历史业务数据为平稳性数据的情况下,确定所述第一模型参数为0;
数据差分处理子单元,用于在所述历史业务数据为非平稳性数据的情况下,对所述历史业务数据进行n阶差分处理;其中,n为大于等于1的正整数;
第一参数获取子单元,用于在进行所述n阶差分处理后的历史业务数据为平稳性数据的情况下,将所述n作为所述第一模型参数。
可选地,所述历史同期包括第一历史同期和第二历史同期,所述第一历史同期的时间早于所述第二历史同期,所述第一结果预测模块430包括:
预测业务数据获取单元431,用于调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据;
预测残差值计算单元432,用于根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值;
第一预测结果获取单元433,用于调用所述预测模型根据所述初始模型参数、所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
可选地,所述预测数据确定模块460包括:
预测数据获取单元461,用于获取所述第一预测结果和所述第二预测结果之间的和值,并将所述和值作为所述指定时段的预测数据。
本公开实施例提供的业务数据预测装置,通过在需要对未来的指定时段内的业务数据进行预测时,获取与指定时段对应的历史同期的历史业务数据,根据历史业务数据,确定预测模型对应的初始模型参数,调用预测模型根据初始模型参数和历史业务数据,预测得到指定时段对应的第一预测结果和预测残差值,根据预测残差值确定预测模型对应的目标模型参数,调用预测模型根据目标模型参数和历史业务数据,对预测残差值进行处理,得到指定时段对应的第二预测结果,根据第一预测结果和第二预测结果,确定指定时段对应的预测数据。本公开实施例通过采用二阶段的预测方式,可以提升数据预测的准确率。
对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开并不受所描述的动作顺序的限制,因为依据本公开,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本公开所必须的。
另外地,本公开实施例还提供了一种电子设备,包括:处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述任一项所述的业务数据预测方法。
本公开实施例还提供了一种计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述任一项所述的业务数据预测方法。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
本公开的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本公开实施例的电子设备中的一些或者全部部件的一些或者全部功能。本公开还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本公开的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图9示出了可以实现根据本公开的方法的电子设备。该电子设备传统上包括处理器1010和以存储器1020形式的计算机程序产品或者计算机可读介质。存储器1020可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器1020具有用于执行上述方法中的任何方法步骤的程序代码1031的存储空间1030。例如,用于程序代码的存储空间1030可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1031。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图10所述的便携式或者固定存储单元。该存储单元可以具有与图9的电子设备中的存储器1020类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码1031’,即可以由例如诸如1010之类的处理器读取的代码,这些代码当由电子设备运行时,导致该电子设备执行上面所描述的方法中的各个步骤。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或 者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上对本公开所提供的一种业务数据预测方法、一种业务数据预测装置、一种电子设备和一种计算机可读存储介质,进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。

Claims (21)

  1. 一种业务数据预测方法,包括:
    获取与指定时段对应的历史同期的历史业务数据;
    根据所述历史业务数据,确定预测模型对应的初始模型参数;
    调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
    根据所述预测残差值,确定所述预测模型对应的目标模型参数;
    调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
    根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
  2. 根据权利要求1所述的方法,其中,所述业务数据为企业用户负荷。
  3. 根据权利要求1或2所述的方法,其中,所述获取与所述指定时段对应的历史同期的历史业务数据,包括:
    获取所述历史同期的初始历史业务数据;
    对所述初始历史业务数据进行筛选,得到所述历史业务数据。
  4. 根据权利要求3所述的方法,其中,所述对所述初始历史业务数据进行筛选,得到所述历史业务数据,包括:
    计算所述初始历史业务数据对应的平均值和标准差;
    计算所述初始历史业务数据与所述平均值的差值,在所述差值大于预设阈值的情况下,剔除所述差值对应的初始历史业务数据,得到所述历史业务数据。
  5. 根据权利要求4所述的方法,其中,所述预设阈值为所述标准差与预设倍数的乘积值。
  6. 根据权利要求1或2所述的方法,其中,所述根据所述历史业务数据,确定预测模型对应的初始模型参数,包括:
    对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数;
    对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
  7. 根据权利要求6所述的方法,其中,所述对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数,包括:
    确定所述历史业务数据的数据平稳性;
    在所述历史业务数据为平稳性数据的情况下,确定所述第一模型参数为0;
    在所述历史业务数据为非平稳性数据的情况下,对所述历史业务数据进 行n阶差分处理;其中,n为大于等于1的正整数;
    在进行所述n阶差分处理后的历史业务数据为平稳性数据的情况下,将所述n作为所述第一模型参数。
  8. 根据权利要求7所述的方法,其中,所述确定所述历史业务数据的数据平稳性,包括:
    调用所述历史业务数据的时序图,在所述历史业务数据在时间序列上围绕一个常数值随机波动,且波动范围小于预设范围的情况下,则确定所述历史业务数据为平稳序列。
  9. 根据权利要求7所述的方法,其中,所述确定所述历史业务数据的数据平稳性,包括:
    调用单位根检验模型对所述历史业务数据进行平稳性检验,在检验统计量对应的概率值小于0.05的情况下,确定所述历史业务数据为平稳序列。
  10. 根据权利要求6所述的方法,其中,所述对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数,包括:
    根据自相关函数和偏自相关函数,得到所述第二模型参数和所述第三模型参数。
  11. 根据权利要求6所述的方法,其中,所述对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数,包括:
    根据信息准则进行定阶处理,得到所述第二模型参数和所述第三模型参数。
  12. 根据权利要求1或2所述的方法,其中,所述历史同期包括第一历史同期和第二历史同期,所述第一历史同期的时间早于所述第二历史同期,所述调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值,包括:
    调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据;
    根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值;
    调用所述预测模型根据所述初始模型参数、所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
  13. 根据权利要求12所述的方法,其中,根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值,包括:
    计算所述第二历史业务数据与对应的所述预测业务数据的差值,将所述差值确定为所述预测残差值。
  14. 根据权利要求1-13任一所述的方法,其中,所述根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据,包括:
    获取所述第一预测结果和所述第二预测结果之间的和值,并将所述和值作为所述指定时段的预测数据。
  15. 一种业务数据预测装置,其中,包括:
    历史数据获取模块,用于在需要对未来的指定时段内的业务数据进行预测时,获取与所述指定时段对应的历史同期的历史业务数据;
    模型参数确定模块,用于根据所述历史业务数据,确定预测模型对应的初始模型参数;
    第一结果预测模块,用于调用所述预测模型根据所述初始模型参数和所述历史业务数据,预测得到所述指定时段对应的第一预测结果和预测残差值;
    目标参数确定模块,用于根据所述预测残差值,确定所述预测模型对应的目标模型参数;
    第二结果预测模块,用于调用所述预测模型根据所述目标模型参数和所述历史业务数据,对所述预测残差值进行处理,得到所述指定时段对应的第二预测结果;
    预测数据确定模块,用于根据所述第一预测结果和所述第二预测结果,确定所述指定时段对应的预测数据。
  16. 根据权利要求15所述的装置,其中,所述历史数据获取模块,包括:
    初始业务数据获取单元,用于获取所述历史同期的初始历史业务数据;
    历史业务数据筛选单元,用于对所述初始历史业务数据进行筛选,得到所述历史业务数据。
  17. 根据权利要求15所述的装置,其中,所述模型参数确定模块,包括:
    第一模型参数获取单元,用于对所述历史业务数据进行差分处理,得到所述预测模型对应的第一模型参数;
    第二模型参数获取单元,用于对所述历史业务数据进行定阶处理,得到所述预测模型对应的第二模型参数和第三模型参数。
  18. 根据权利要求15所述的装置,其中,所述历史同期包括第一历史同期和第二历史同期,所述第一历史同期的时间早于所述第二历史同期,所述第一结果预测模块,包括:
    预测业务数据获取单元,用于调用所述预测模型根据所述初始模型参数和所述第一历史同期的第一历史业务数据对所述第二历史同期的业务数据进行预测,得到所述第二历史同期的预测业务数据;
    预测残差值计算单元,用于根据所述预测业务数据和所述第二历史同期的第二历史业务数据,计算得到所述预测残差值;
    第一预测结果获取单元,用于调用所述预测模型根据所述初始模型参数、 所述第一历史业务数据和所述第二历史业务数据对所述指定时段内的业务数据进行预测,得到所述第一预测结果。
  19. 一种电子设备,其中,包括:
    处理器、存储器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至14任一项所述的业务数据预测方法。
  20. 一种计算机可读存储介质,其中,当所述存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行权利要求1至14任一项所述的业务数据预测方法。
  21. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备上运行时,导致所述电子设备执行根据权利要求1至14中任一项所述的业务数据预测方法。
PCT/CN2021/085880 2020-04-09 2021-04-08 业务数据预测方法、装置、电子设备及计算机可读存储介质 WO2021204176A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010276366.7 2020-04-09
CN202010276366.7A CN111523084A (zh) 2020-04-09 2020-04-09 业务数据预测方法、装置、电子设备及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2021204176A1 true WO2021204176A1 (zh) 2021-10-14

Family

ID=71902640

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085880 WO2021204176A1 (zh) 2020-04-09 2021-04-08 业务数据预测方法、装置、电子设备及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN111523084A (zh)
WO (1) WO2021204176A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520773A (zh) * 2022-02-16 2022-05-20 平安科技(深圳)有限公司 一种服务请求的响应方法、装置、服务器及存储介质
CN116366436A (zh) * 2023-04-21 2023-06-30 南京弘竹泰信息技术有限公司 一种基于广域组网提供各种电信增值业务的方法
CN117808325A (zh) * 2024-02-29 2024-04-02 山东浪潮数据库技术有限公司 基于用户供需大数据的电力负荷预测方法

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111523084A (zh) * 2020-04-09 2020-08-11 京东方科技集团股份有限公司 业务数据预测方法、装置、电子设备及计算机可读存储介质
CN112418921A (zh) * 2020-11-11 2021-02-26 深圳力维智联技术有限公司 用电需量预测方法、装置、系统与计算机存储介质
CN112380273A (zh) * 2020-11-11 2021-02-19 北京达佳互联信息技术有限公司 数据预估方法及装置
CN112541635A (zh) * 2020-12-16 2021-03-23 平安养老保险股份有限公司 业务数据统计预测方法、装置、计算机设备及存储介质
CN113181660A (zh) * 2021-04-20 2021-07-30 杭州电魂网络科技股份有限公司 游戏实时活跃人数预测方法、系统、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7039559B2 (en) * 2003-03-10 2006-05-02 International Business Machines Corporation Methods and apparatus for performing adaptive and robust prediction
US20180349928A1 (en) * 2017-06-05 2018-12-06 International Business Machines Corporation Predicting ledger revenue change behavior of clients receiving services
CN110648026A (zh) * 2019-09-27 2020-01-03 京东方科技集团股份有限公司 预测模型构建方法、预测方法、装置、设备及介质
CN110795246A (zh) * 2019-10-25 2020-02-14 新华三大数据技术有限公司 资源利用率的预测方法及装置
CN111523084A (zh) * 2020-04-09 2020-08-11 京东方科技集团股份有限公司 业务数据预测方法、装置、电子设备及计算机可读存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104991939A (zh) * 2015-07-08 2015-10-21 携程计算机技术(上海)有限公司 业务数据监控方法和系统
CN107038167A (zh) * 2016-02-03 2017-08-11 普华诚信信息技术有限公司 基于模型评估的大数据挖掘分析系统及其分析方法
CN110909306B (zh) * 2018-09-17 2023-06-16 阿里巴巴集团控股有限公司 业务异常检测方法、装置、电子设备和存储设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7039559B2 (en) * 2003-03-10 2006-05-02 International Business Machines Corporation Methods and apparatus for performing adaptive and robust prediction
US20180349928A1 (en) * 2017-06-05 2018-12-06 International Business Machines Corporation Predicting ledger revenue change behavior of clients receiving services
CN110648026A (zh) * 2019-09-27 2020-01-03 京东方科技集团股份有限公司 预测模型构建方法、预测方法、装置、设备及介质
CN110795246A (zh) * 2019-10-25 2020-02-14 新华三大数据技术有限公司 资源利用率的预测方法及装置
CN111523084A (zh) * 2020-04-09 2020-08-11 京东方科技集团股份有限公司 业务数据预测方法、装置、电子设备及计算机可读存储介质

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520773A (zh) * 2022-02-16 2022-05-20 平安科技(深圳)有限公司 一种服务请求的响应方法、装置、服务器及存储介质
CN114520773B (zh) * 2022-02-16 2023-09-29 平安科技(深圳)有限公司 一种服务请求的响应方法、装置、服务器及存储介质
CN116366436A (zh) * 2023-04-21 2023-06-30 南京弘竹泰信息技术有限公司 一种基于广域组网提供各种电信增值业务的方法
CN116366436B (zh) * 2023-04-21 2024-03-05 南京弘竹泰信息技术有限公司 一种基于广域组网提供各种电信增值业务的方法
CN117808325A (zh) * 2024-02-29 2024-04-02 山东浪潮数据库技术有限公司 基于用户供需大数据的电力负荷预测方法
CN117808325B (zh) * 2024-02-29 2024-05-14 山东浪潮数据库技术有限公司 基于用户供需大数据的电力负荷预测方法

Also Published As

Publication number Publication date
CN111523084A (zh) 2020-08-11

Similar Documents

Publication Publication Date Title
WO2021204176A1 (zh) 业务数据预测方法、装置、电子设备及计算机可读存储介质
US8010324B1 (en) Computer-implemented system and method for storing data analysis models
CN109697522B (zh) 一种数据预测的方法和装置
Asgharian et al. The importance of the macroeconomic variables in forecasting stock return variance: A GARCH‐MIDAS approach
Carrion-i-Silvestre et al. A guide to the computation of stationarity tests
CN107506868B (zh) 一种短时电力负荷预测的方法及装置
US8374982B2 (en) System and method for constructing forecast models
Chaudhury A review of the key issues in operational risk capital modeling
Ghonghadze et al. Modelling the dynamics of EU economic sentiment indicators: An interaction-based approach
CN114285728B (zh) 一种预测模型训练方法、流量预测方法、装置及存储介质
CN112488396A (zh) 基于小波变换的Holt-Winters和LSTM组合模型的电力负荷预测方法
CN106095895A (zh) 信息推送方法和装置
CN111898247B (zh) 滑坡位移预测方法、设备及存储介质
Gulay et al. Comparison of forecasting performances: Does normalization and variance stabilization method beat GARCH (1, 1)‐type models? Empirical Evidence from the Stock Markets
CN111260142B (zh) 商品指标数据预测方法、装置、存储介质及电子设备
CN116091118A (zh) 电价预测方法、装置、设备、介质及产品
CN113344647B (zh) 一种信息推荐的方法及装置
CN114118570A (zh) 业务数据预测方法及装置、电子设备和存储介质
CN111626898B (zh) 用于实现事件归因的方法、装置、介质和电子设备
Chen et al. Time-varying NoVaS versus GARCH: point prediction, volatility estimation and prediction intervals
CN112308293A (zh) 违约概率预测方法及装置
CN117196665A (zh) 预测对象的价值参数的方法、设备及装置
CN109523296B (zh) 用户行为概率分析方法及装置、电子设备、存储介质
Amrouk et al. Forecasting international sugar prices: A Bayesian model average analysis
CN112256768B (zh) 模型离线训练评估方法、装置、介质和电子设备

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: 21785445

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: 21785445

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21785445

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.04.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21785445

Country of ref document: EP

Kind code of ref document: A1