Short-term power prediction method, device, computer equipment and storage medium

By acquiring and processing relevant data samples and reference data samples of power generation enterprises, and using classification models and power prediction models to generate accurate predicted power data sequences, the problem of inaccurate short-term power prediction of power generation enterprises in the prior art is solved, and the prediction accuracy is improved and resource utilization efficiency.

CN112529262BActive Publication Date: 2025-02-14BEIJING JINGNENG GAOANTUN GAS THERMAL POWER CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011359506.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-27
Publication Date
2025-02-14
Estimated Expiration
2040-11-27

AI Technical Summary

Technical Problem

The existing short-term power prediction methods are mainly aimed at the power grid side, and the failure to effectively consider the power generation forecasts made by power generation companies based on their own situations, resulting in inaccurate power predictions for power generation companies during specific power generation, resulting in waste of resources.

Method used

By obtaining the relevant data samples and reference data samples on the day to be predicted, using the preset classification model and power prediction model, calculate the weight coefficients of the environment attribute data and regular attribute data, and combining the reference predicted power data sequence to generate accurate predicted power data sequence.

Benefits of technology

It improves the accuracy of short-term power prediction of power generation companies, helps power generation companies to plan power generation more accurately and reduce resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112529262B_ABST
    Figure CN112529262B_ABST
Patent Text Reader

Abstract

The present application relates to a short-term power forecasting method, device, computer equipment and storage medium. The method comprises: obtaining relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, the relevant data samples of the day to be predicted contain environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include the daily power data sequence of the day before the day to be predicted; inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted according to the classification processing of the classification model; obtaining the benchmark predicted power data sequence according to the reference data samples and the preset power forecasting model; obtaining the predicted power data sequence of the day to be predicted according to the weight coefficient and the benchmark predicted power data sequence. The adoption of this method can improve the power forecasting accuracy at the power plant side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of load forecasting, and in particular to a short-term power forecasting method, apparatus, computer equipment and storage medium. Background Art

[0002] As the reform of the electricity market deepens, power generation companies increasingly need to participate in electricity market ancillary services in a targeted and accurate manner.

[0003] However, the current short-term power forecast is only a power forecast method for the grid side, and does not take into account the actual power generation forecast of each power generation enterprise (i.e., the power plant side) during operation based on its own situation. Therefore, when the power generation enterprise performs specific power generation based on the power index value allocated by the grid side, technical personnel often make power estimates and generate electricity based on experience. The power forecast results are not accurate, resulting in a waste of resources. Summary of the invention

[0004] Based on this, it is necessary to provide a short-term power prediction method, device, computer equipment and storage medium to address the above technical problems.

[0005] A short-term power prediction method, the method comprising:

[0006] Acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0007] Inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0008] Obtaining a reference predicted power data sequence according to the reference data sample and a preset power prediction model;

[0009] The predicted power data sequence of the day to be predicted is obtained according to the weight coefficient and the reference predicted power data sequence.

[0010] In one embodiment, obtaining the relevant data samples of the day to be predicted and the reference data samples corresponding to the day to be predicted includes:

[0011] Taking the power to be predicted based on the time series of the day to be predicted as the target variable, obtaining relevant data samples of the day to be predicted, wherein the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted;

[0012] A daily power data sequence based on a time series one day before the day to be predicted and an importance ranking result of environmental attribute data and regular attribute data corresponding to the daily power data sequence are obtained as the first reference data sample.

[0013] In one embodiment, the relevant data samples of the day to be predicted are input into a preset classification model, and the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted are obtained according to the classification processing of the classification model, including:

[0014] Taking the power to be predicted based on the time series of the day to be predicted as the target variable, the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted as input data, and inputting them into the trained random forest model;

[0015] The input data is classified and voted according to the tree classifier in the random forest model to determine the classification interval of the input data, and the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval are obtained as the weight coefficients of the day to be predicted.

[0016] In one embodiment, obtaining a reference predicted power data sequence according to the reference data sample and a preset power prediction model includes:

[0017] Draw a time series-based line graph according to the reference data sample, and determine trend information of the daily power data sequence of the day before the day to be predicted in the reference data sample according to the time series line graph;

[0018] According to the trend information and the daily power data sequence of the day before the day to be predicted, an exponential smoothing algorithm is used to establish a power prediction model, and a reference prediction power data sequence of the day to be predicted is obtained through weighted calculation of the power prediction model.

[0019] In one embodiment, the method further comprises:

[0020] For each set of predicted power data sequences of the day to be predicted, calculating the mean square error of the predicted power data sequences;

[0021] The predicted power data sequence with the smallest mean square error is selected from the multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0022] In one of the embodiments, before obtaining the data sample related to the day to be predicted and the reference data sample corresponding to the day to be predicted, the method includes:

[0023] Acquire historical training data samples within a preset time period, wherein the historical training data samples include a historical daily power data sequence;

[0024] Dividing the historical daily power data sequence according to a preset power interval to obtain a reference division result of the historical training data sample;

[0025] Inputting the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence into a random forest model, and obtaining interval classification results of the historical training data samples divided based on the environmental attribute data and the regular attribute data;

[0026] The reference division result is compared with the interval classification result to obtain a comparison result, and the parameters in the random forest model are trained and adjusted according to the comparison result to obtain a trained random forest model.

[0027] In one embodiment, the acquiring of historical training data samples within a preset time period, wherein the historical training data samples include a historical daily power data sequence, includes:

[0028] Acquire historical data samples within a preset time period, wherein each piece of historical data in the historical data samples includes a historical daily power data sequence based on a time series for a historical day, and the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence;

[0029] The moving average and moving average ratio of the daily power data sequence of the historical day are calculated to obtain the seasonal characteristic index, and the ratio of the daily power data sequence of the historical day to the seasonal characteristic index is calculated to obtain the daily power data sequence of the historical day with the seasonal characteristics removed as the historical training data sample.

[0030] A short-term power prediction device, comprising:

[0031] An acquisition module, used to acquire relevant data samples of a day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0032] A classification and discrimination module, for inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0033] A prediction module, used to obtain a reference prediction power data sequence according to the reference data sample and a preset power prediction model;

[0034] The determination module is used to obtain the predicted power data sequence of the day to be predicted according to the weight coefficient and the reference predicted power data sequence.

[0035] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0036] Acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0037] Inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0038] Obtaining a reference predicted power data sequence according to the reference data sample and a preset power prediction model;

[0039] The predicted power data sequence of the day to be predicted is obtained according to the weight coefficient and the reference predicted power data sequence.

[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0041] Acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0042] Inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0043] Obtaining a reference predicted power data sequence according to the reference data sample and a preset power prediction model;

[0044] The predicted power data sequence of the day to be predicted is obtained according to the weight coefficient and the reference predicted power data sequence.

[0045] The above-mentioned short-term power prediction method, device, computer equipment and storage medium obtain relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include the daily power data sequence of the day before the day to be predicted; the relevant data samples of the day to be predicted are input into a preset classification model, and according to the classification processing of the classification model, the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted are obtained; according to the reference data samples and the preset power prediction model, a benchmark prediction power data sequence is obtained; according to the weight coefficient and the benchmark prediction power data sequence, the predicted power data sequence of the day to be predicted is obtained. By adopting this method, the short-term power prediction of the power supply on the power plant side can be obtained by using the reference data samples and relevant data samples provided by the power plant side, and at the same time, multiple relevant factors are considered in the power prediction, thereby improving the accuracy of power prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A diagram showing an application environment of a short-term power prediction method in an embodiment;

[0047] Figure 2 A flowchart of the steps of obtaining a data sample to be predicted and a reference data sample in one embodiment;

[0048] Figure 3 A flowchart of a random forest model performing classification prediction steps in one embodiment;

[0049] Figure 4 A flowchart of a method for calculating benchmark predicted power data for a day to be predicted in one embodiment;

[0050] Figure 5 A flowchart of a method for calculating a predicted mean square error for deviation feedback in one embodiment;

[0051] Figure 6 A flowchart of a method for training a random forest model using training data samples in one embodiment;

[0052] Figure 7 is a flow chart of a method for obtaining historical training data samples through preprocessing in one embodiment;

[0053] Figure 8 is an example flow chart of a short-term power prediction method in one embodiment;

[0054] Fig. 9 is a structural block diagram of a short-term power prediction device in an embodiment;

[0055] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] In one embodiment, Figure 1 As shown, a short-term power prediction method is provided. This embodiment uses the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0058] Step 101, obtain relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include the daily power data sequence of the day before the day to be predicted.

[0059] In implementation, the computer device obtains relevant data samples of the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted. The computer device also obtains reference data samples corresponding to the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted.

[0060] Specifically, the environmental attribute data and regular attribute data included in the relevant data samples of the day to be predicted can be the capacity of newly added power generation equipment on the grid side (including new energy power generation), the growth rate of social power consumption, weather (sunny, cloudy, rainy and snowy, etc.), temperature, humidity, power transmission capacity on the grid side, date type (holiday or working day), etc., which are not limited in this embodiment. Among them, the regular attributes carried in the regular attribute data are hidden attributes and cannot be reflected by data values, but are reflected by the overall trend of the data sequence. For example, the annual or monthly social power consumption growth rate indicates that social power consumption has obvious periodicity or non-periodic regularity. The reference data sample includes the daily power data sequence of the day before the day to be predicted. The daily power data sequence is power data based on the time series. For example, one day (24 hours) is a prediction unit, and one power data point is output every 15 minutes in one day for power supply. Therefore, the power data sequence of a single day can correspond to 96 power data points based on the order of the time series, which is called the daily power data sequence. In addition, the reference data sample also corresponds to the environmental attribute data and regular attribute data of the previous day.

[0061] Step 102, inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted according to the classification processing of the classification model.

[0062] During implementation, the computer device inputs the relevant data of the day to be predicted into a preset classification model, and obtains the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted based on the classification processing of the classification model.

[0063] For example, the power-related factor data such as the capacity of new power generation equipment on the grid side (including new energy power generation), the growth rate of social electricity consumption, weather (sunny, cloudy, rainy, snowy, etc.), temperature, humidity, grid-side transmission capacity, date type (holiday or working day) on the day to be predicted are input into the random forest model, and classification is performed according to the tree classifier of the random forest to obtain the corresponding classification results (that is, the corresponding classification intervals). According to the classification results, the day with the greatest similarity to the day to be predicted is determined as the target day, and the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day are obtained.

[0064] Step 103: Obtain a reference predicted power data sequence according to the reference data sample and a preset power prediction model.

[0065] In implementation, the computer device obtains a reference prediction power data sequence based on the reference data sample and the preset power prediction model. Specifically, the preset power prediction model is a model constructed according to an exponential smoothing algorithm, and the specific calculation formula of the model is:

[0066] F t+1 =αY t +(1-α)F t

[0067] Among them, F t+1 is the benchmark power data for the day to be predicted, Y t F is the actual power data of the day before the forecast date. t is the predicted power data of the day before the prediction day, α is the exponential smoothing coefficient, the closer α is to 1, the more timely the model responds to the changes in the time series, and the closer α is to 0, the greater the weight given to the current prediction value, and the slower the model responds to the changes in the time series. Therefore, when the power data sequence in the reference data sample has a large random fluctuation, a larger smoothing coefficient α is selected, and when the power data sequence in the reference data sample is relatively flat, a smaller smoothing coefficient α is selected.

[0068] Step 104, obtaining the predicted power data sequence of the day to be predicted according to the weight coefficient and the reference predicted power data sequence.

[0069] During implementation, the computer device performs weighted calculation based on the weight coefficient and the corresponding benchmark predicted power data sequence to obtain the predicted power data sequence for the day to be predicted.

[0070] In the above short-term power forecasting method, relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted are obtained; the relevant data samples of the day to be predicted are input into a preset classification model, and the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted are obtained according to the classification processing of the classification model; then, according to the reference data samples and the preset power forecasting model, a benchmark forecast power data sequence is obtained; finally, according to the weight coefficient and the benchmark forecast power data sequence, a forecast power data sequence of the day to be predicted is obtained. By adopting this method, the reference data samples and relevant data samples provided by the power plant side can be used to obtain the short-term power forecast of the power plant side, and at the same time, a variety of relevant factors are considered in the power forecast, thereby improving the accuracy of power forecast.

[0071] In one embodiment, Figure 2 As shown, the specific processing process of step 101 is as follows:

[0072] Step 1011, taking the power to be predicted based on the time series of the day to be predicted as the target variable, obtaining relevant data samples of the day to be predicted, wherein the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted.

[0073] During implementation, the computer device uses the power of the day to be predicted as the target variable to obtain the influencing factor data related to the power as the relevant data sample, wherein the relevant data sample includes the environmental attribute data and regular attribute data related to the power of the day to be predicted (specific examples of the environmental attribute data and regular attribute data are detailed in step 101, which will not be repeated in this embodiment).

[0074] Step 1012, obtaining a daily power data sequence based on a time series one day before the day to be predicted, and an importance ranking result of environmental attribute data and regular attribute data corresponding to the daily power data sequence as the first reference data sample.

[0075] During implementation, the computer equipment obtains the time series-based daily power data sequence of the day before the day to be predicted, as well as the importance ranking results of the environmental attribute data and regular attribute data corresponding to the daily power data sequence, and uses them as reference data samples required to obtain the daily power data sequence of the day to be predicted.

[0076] In one embodiment, Figure 3 As shown, the specific processing process of step 102 is as follows:

[0077] Step 1021, taking the power to be predicted based on the time series of the day to be predicted as the target variable, and taking the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted as the input data, and inputting them into the trained random forest model.

[0078] During implementation, the computer device uses the time series-based power to be predicted on the day to be predicted as the target variable, and inputs the target variable and related data corresponding to the target variable (i.e., environmental attribute data and regular attribute data corresponding to the target variable) as input data into a pre-trained random forest model.

[0079] Step 1022, classify and vote on the input data according to the tree classifier in the random forest model, determine the classification interval of the input data, and obtain the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval as the weight coefficients of the day to be predicted.

[0080] Among them, random forest is a classifier integrated by multiple decision trees. If the decision tree is regarded as a unit in the classification task, random forest is a model composed of multiple classification units to classify or regress a certain task.

[0081] During implementation, the computer equipment classifies and votes on the input data according to the tree classifier in the random forest model to determine the classification interval of the input data. After determining the classification interval, the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted in the interval are obtained, and they are used as the weight coefficients of the power data required for the day to be predicted.

[0082] Specifically, the power to be predicted is used as the target variable, and the relevant data: date, week, weather, working day (holiday), temperature, humidity, etc. are input into the random forest model to obtain the importance ranking results of each parameter variable. The multivariate nonlinear equation of the predicted quantity (power) and related factors is used to achieve the quantitative processing of the influence of each factor on the power. For example: (date, Monday, sunny, working day, temperature 31℃, humidity 85%...) The corresponding weight coefficients are (0.12, 0.18, 0.11, 0.24, 0.15...).

[0083] In one embodiment, Figure 4 As shown, the specific processing process of step 103 is as follows:

[0084] Step 1031 , drawing a line graph based on the time series according to the reference data sample, and determining the trend information of the daily power data series of the day before the day to be predicted in the reference data sample according to the line graph of the time series.

[0085] During implementation, the computer equipment draws a line graph based on the time series according to the reference data sample. Specifically, the trend curve of the power data based on the time series is fitted using the regression analysis method, and the regression coefficient contained in the trend curve is tested for significance, so as to determine the trend information of the daily power data series of the day before the day to be predicted in the reference data sample.

[0086] Step 1032, based on the trend information and the daily power data sequence of the day before the day to be predicted, an exponential smoothing algorithm is used to establish a power prediction model, and a reference prediction power data sequence of the day to be predicted is obtained through weighted calculation of the power prediction model.

[0087] Among them, the exponential smoothing algorithm is to make the predicted value of period t+1 equal to the weighted average of the actual observed value of period t and the predicted value of period t by weighted averaging the observed value of period t. The exponential smoothing method is developed from the moving average method and is an improved weighted average method. Under the premise of not discarding historical data, a larger weight is given to the historical data closer to the prediction period, and the weight decreases exponentially from near to far, so it is called exponential smoothing. Exponential smoothing can include: single exponential smoothing method, double exponential smoothing method, triple exponential smoothing method, etc. This embodiment takes the single smoothing algorithm as an example. The single exponential smoothing method is also called single exponential smoothing. There is only one smoothing coefficient, and the longer the observed value is from the prediction period, the smaller the weight becomes.

[0088] In implementation, the computer device determines the size of the exponential smoothing coefficient in the power prediction model (i.e., the exponential smoothing prediction model) according to the trend information, and then obtains the reference prediction power data sequence of the day to be predicted through weighted calculation according to the daily power data sequence of the day before the day to be predicted. The daily power data sequence of the day before the day to be predicted includes the daily actual power data sequence of the previous day and the daily prediction power data sequence of the previous day.

[0089] Optionally, when there is no daily predicted power data sequence for the previous day, it is assumed that the daily predicted power data sequence is equal to the daily actual power data sequence, indicating that the prediction accuracy of the previous day is 100%.

[0090] In one embodiment, Figure 5 As shown, the short-term power prediction method also includes:

[0091] Step 501, for each group of predicted power data sequence of the day to be predicted, calculate the mean square error of the predicted power data sequence.

[0092] In the implementation, the computer device calculates the mean square error of the predicted power data sequence for each set of predicted power data sequence for the day to be predicted. Specifically, the prediction accuracy of the exponential smoothing algorithm model is measured by the mean square error: the calculation formula of the exponential smoothing algorithm model is transformed to obtain

[0093] F t+1 =αY t +(1-α)F t =F t +α(Y t -F T )

[0094] The forecast value of period t (i.e. the day before the forecast date) plus the forecast error of period t after the formula transformation (Y t -F T ). Then, the mean square error formula can be used to treat the benchmark forecast power data series (i.e., F t+1 The mean square error is calculated for the benchmark predicted power data of the day to be predicted. Optionally, the mean square error can also be calculated for the obtained predicted power data sequence of the day to be predicted. The calculation process is the same and will not be repeated in this embodiment.

[0095] Step 502: Select a predicted power data sequence with the smallest mean square error from among multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0096] In implementation, the computer device selects a predicted power data sequence with the smallest mean square error among multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0097] In one embodiment, Figure 6 As shown, before step 101, the method further includes:

[0098] Step 601, obtaining historical training data samples within a preset time period, wherein the historical training data samples include historical daily power data sequences.

[0099] During implementation, a computer device obtains historical training data samples within a preset time period, wherein each piece of historical data in the historical training data samples includes a historical daily power data sequence based on a time series for a historical day and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence.

[0100] Specifically, the historical training data for the preset time period can be historical training data samples of power-related data corresponding to the year before the day to be predicted, or can be historical training data samples within ten years or ten months. The time span covered by the specific historical data is selected based on the relevant attribute characteristics of the day to be predicted and the prediction accuracy requirements. Therefore, the embodiment of the present application is not limited to this.

[0101] Step 602: divide the historical daily power data sequence into preset power intervals to obtain a reference division result of the historical training data samples.

[0102] During implementation, the computer device divides the historical daily power data series according to preset power intervals to obtain a reference division result of the historical training data samples.

[0103] Specifically, the computer equipment collects and organizes the data of power-related factors, and converts various types of related factor data, such as day type (including working days, weekends, holidays, etc.), weather type (rainfall, snow, wind level, etc.); original quantitative indicators: temperature, humidity, historical load, social electricity consumption growth rate, regional unit capacity change rate, etc. A large number of sample intervals are formed by classification, and various types of indicators are processed as feature quantities. For example: (date, Monday, sunny, working day, temperature 31°C, humidity 85%...); (date, Monday, sunny, holiday, temperature 31°C, humidity 85%...);

[0104] Optionally, various types of related factor data are stored in a sample database according to the classified intervals of each related factor in combination with corresponding power data, so as to be used as training data samples for training the random forest model later.

[0105] Step 603: Input the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence into the random forest model to obtain the interval classification results of the historical training data samples divided based on the environmental attribute data and the regular attribute data.

[0106] During implementation, the computer device inputs the environmental attribute data and regular attribute data sequence data corresponding to the historical daily power data sequence into the random forest model to obtain the interval classification results of the historical training data samples based on the division of the environmental attribute data and the regular attribute data.

[0107] Specifically, the process of training the random forest model on the historical daily training data samples is as follows:

[0108] (1) From the training data set, K new bootstrap sample sets are randomly selected with replacement using the bootstrap method, and K classification and regression trees are constructed based on them. The samples that are not selected each time constitute K out-of-bag data (OOB).

[0109] (2) If there are n features, then m features (m ≤ n) are randomly extracted from each node of each tree. By calculating the amount of information contained in each feature, a feature with the greatest classification ability is selected from the m features for node splitting.

[0110] (3) Each tree is allowed to grow to its maximum potential without any pruning.

[0111] (4) The generated multiple trees are organized into a random forest, and the new data is classified using the random forest. The classification result is determined by the number of votes of the tree classifier; or for regression problems, the prediction result is determined by the average value of the prediction results of the decision tree.

[0112] In the above process, the importance evaluation of the relevant factor variables in the random forest is based on the out-of-bag data classification accuracy. Therefore, the variable importance measurement for the out-of-bag data classification accuracy in this embodiment is the average reduction in the classification accuracy after a slight disturbance of the out-of-bag data independent variable value and the classification accuracy before the disturbance:

[0113] Assuming that there are bootstrap samples b = 1, 2, ..., B, where B represents the number of training samples, the variable importance measure Dj based on classification accuracy of feature Xj is calculated according to the following steps:

[0114] (1) Set b = 1, create a decision tree T b on the training sample, and mark the out-of-bag data as

[0115] (2) Using T b on out-of-bag data The data is classified and the number of correct classifications is counted, recorded as

[0116] (3) For feature Xj, j = 1, 2, ..., N, The value of feature Xj in is disturbed, and the perturbed data set is recorded as Use T b to The data is classified and the number of correct classifications is counted, recorded as

[0117] (4) For b = 2, 3, …, B, repeat steps (1) to (3).

[0118] (5) The variable importance measure Dj of feature Xj is calculated by the following formula:

[0119]

[0120] Step 604, compare the reference partition result with the interval classification result to obtain a comparison result, and train and adjust the parameters in the random forest model according to the comparison result to obtain a trained random forest model.

[0121] During implementation, the computer equipment compares the pre-divided reference division results with the interval classification results output by the random forest to obtain a comparison result, and trains and adjusts the parameters in the random forest model based on the comparison result to obtain a trained random forest model, which can be used in the subsequent prediction application process to use the trained random forest model to match the target day with the greatest similarity to the day to be predicted.

[0122] In one embodiment, Figure 7 As shown, the specific processing process of step 601 is as follows:

[0123] Step 701, obtaining historical data samples within a preset time period, wherein each piece of historical data in the historical data samples includes a historical daily power data sequence based on a time series of a historical day, and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence.

[0124] In implementation, historical training data samples input into the random forest model need to be preprocessed from the original data. Therefore, the computer device first obtains historical data samples within a preset time period so as to obtain historical training data samples through preprocessing of the historical data samples.

[0125] Optionally, the acquired historical data samples need to determine the similarity with the day to be predicted. By selecting data samples with high similarity with the day to be predicted for random forest model training, more accurate random forest model prediction results can be obtained. Therefore, (1) select the reference time series of the day to be predicted. First, treat the 96 points of power data per day as a time series, find the date features of the day to be predicted, and then select the time series of the same date type as it, Y = (y1, y2, y3, ..., y 95 ,y 96 ) as the trend type of the day to be predicted. (2) Standardization of power data series. Perform maximum and minimum conversion on Y and the time series in the sample set, such as Then we get the standardized time series. (3) Set the rule that the weight of similar points is small and the weight of dissimilar points is large. Among them, the standardized reference time series and the control time series are Map each point to two-dimensional space, that is and Then calculate the slope of each corresponding point, that is Finally, according to the rule that "the greater the difference in slopes, the greater the distance between numbers", different numbers are used to represent the slope levels, that is, label(x,y) = {lab1,lab2,lab3,…,lab 96 (4) Calculate the sign distance between the reference load sequence and each comparison historical load sequence, that is, The smaller the marker distance is, the more similar the control load time series is to the reference load time series. In summary, data are selected as historical data samples based on the marker distance and the preset sample size threshold.

[0126] Step 702, calculate the moving average and moving average ratio of the daily power data sequence of historical days to obtain the seasonal characteristic index, and calculate the ratio of the daily power data sequence of historical days to the seasonal characteristic index to obtain the daily power data sequence of historical days with seasonal characteristics removed as the historical training data sample.

[0127] During implementation, the computer equipment calculates the moving average and moving average ratio of the daily power data sequence of historical days to obtain the seasonal characteristic index, and calculates the ratio of the daily power data sequence of historical days to the seasonal characteristic index to obtain the daily power data sequence of historical days with seasonal characteristics removed, thereby obtaining historical training data samples.

[0128] Specifically, seasonal factor analysis uses seasonal indices to represent the seasonal components of each year, thereby describing the seasonal variation patterns of each year. Power data and the corresponding environmental attribute data need to be recorded by quarter, month, week or day. A folded annual time series plot can be drawn. The data samples of each year need to be drawn separately on the graph. The horizontal axis is only one year long, and the data samples of each year correspond to the vertical axis respectively. Calculate the seasonal index in the historical data sample to determine the seasonal component in the power data based on the time series. Then separate the seasonal component from the time series, that is, divide each time series power data observation by the corresponding seasonal index to eliminate seasonality.

[0129] (1) Identify and separate seasonal components,

[0130] i: calculate seasonal index

[0131] The seasonal index describes the typical seasonal characteristics of the power data series in each month or quarter within a year. In the multiplicative model, the seasonal index is constructed with its mean equal to 100%, reflecting the value of a certain month or quarter in the average value of the whole year. If there is no seasonal change in the development of the phenomenon, the seasonal index of each period should be equal to 100%; if there is a significant seasonal change in a certain month or quarter, the seasonal index of each period should be greater than or less than 100%. Therefore, the degree of seasonal change is measured based on the degree of deviation of each seasonal index from its mean (100%).

[0132] There are many methods for calculating seasonal index. This embodiment takes the moving average trend elimination method as an example for explanation. The specific steps are as follows:

[0133] Step 1: Calculate the moving average (if it is seasonal data, use 4-term moving average, if it is monthly data, use 12-term moving average) and center the result, that is, perform a binomial moving average on the result of the moving average to obtain the centered moving average (CMA).

[0134] Step 2: Calculate the ratio of moving averages, that is, the seasonal ratio, by dividing each observation of the power data series by the corresponding centralized moving average, and then calculate the quarterly or monthly average of each ratio.

[0135] Step 3: Seasonal index adjustment. Since the average of each seasonal index should be equal to 1 or 100%, if the average of the seasonal ratios calculated in step 2 is not equal to 1, an adjustment is required. Specific method: Divide the average of each seasonal ratio calculated in step 2 by their total average.

[0136] ii: Separating seasonal components

[0137] After calculating the seasonal index, each actual observation can be divided by the corresponding seasonal index to separate the seasonal component from the time series: Among them, Y represents the actual power data (i.e., the actual observed value), T represents the trend index, S represents the seasonal index, and I represents the stochastic index.

[0138] The result is the sequence after the seasonal components are separated, which reflects the changing pattern of the time series without the influence of seasonal factors.

[0139] This is used as the historical training data sample for the input random forest model, so that when the random forest model is used to predict the power data series on the prediction day, the fluctuation of the power series will not be affected by seasonal characteristics.

[0140] Optionally, after establishing a prediction model (random forest model) to predict the power data of the predicted day, the final prediction value is obtained (i.e., the output result of the random forest: the weight coefficient of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the predicted day), and the weight coefficient is multiplied by the corresponding seasonal index to obtain the final prediction value, i.e., the final weight coefficient.

[0141] Alternatively, if Figure 8 As shown, the load is the power in the above embodiment. Figure 8This is an example diagram of a method for short-term power prediction for a day to be predicted. The random forest model is used to classify the influencing factors of power data (environmental attribute data and regular attribute data), and then the target day with the greatest similarity to the day to be measured is matched, and the weight coefficient of the influencing factors of the matched target day is obtained as the weight coefficient of the relevant influencing factors of the day to be predicted, and then the benchmark load is obtained (that is, the benchmark predicted power data for the day to be predicted calculated using the daily power data sequence of the previous day), and then the predicted power data sequence for the day to be predicted is obtained based on the weight coefficient and the benchmark predicted power data. Through multiple groups of short-term power prediction experiments, the predicted power data sequence is obtained, and the deviation (mean square error) is calculated for it. In the deviation feedback, the one with the smallest mean square error is selected as the final predicted power data sequence for the day to be predicted.

[0142] It should be understood that although Figure 1-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0143] In one embodiment, Fig. 9 As shown, a short-term power prediction device is provided, including: an acquisition module 910, a classification and discrimination module 920, a prediction module 930 and a determination module 940, wherein:

[0144] An acquisition module 910 is used to acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0145] The classification and discrimination module 920 is used to input the relevant data samples of the day to be predicted into the preset classification model, and obtain the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0146] The prediction module 930 is used to obtain a reference prediction power data sequence according to the reference data sample and a preset power prediction model;

[0147] The determination module 940 is used to obtain the predicted power data sequence of the day to be predicted according to the weight coefficient and the benchmark predicted power data sequence.

[0148] In one embodiment, the acquisition module 910 is specifically used to use the power to be predicted based on the time series of the day to be predicted as the target variable, and acquire relevant data samples of the day to be predicted, where the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted;

[0149] A daily power data sequence based on a time series one day before the day to be predicted, and importance ranking results of environmental attribute data and regular attribute data corresponding to the daily power data sequence are obtained as the first reference data sample.

[0150] In one embodiment, the classification and discrimination module 920 is specifically used to use the power to be predicted based on the time series of the day to be predicted as the target variable, and input the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted as input data into the trained random forest model;

[0151] The input data is classified and voted according to the tree classifier in the random forest model to determine the classification interval of the input data, and the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval are obtained as the weight coefficients of the day to be predicted.

[0152] In one embodiment, the prediction module 930 is specifically used to draw a line graph based on a time series according to the reference data sample, and determine the trend information of the daily power data series one day before the day to be predicted in the reference data sample according to the line graph of the time series;

[0153] According to the trend information and the daily power data sequence of the day before the day to be predicted, the power prediction model is established using the exponential smoothing algorithm. Through the weighted calculation of the power prediction model, the benchmark prediction power data sequence of the day to be predicted is obtained.

[0154] In one embodiment, the apparatus 900 further includes:

[0155] A calculation module, used for calculating the mean square error of the predicted power data sequence for each group of predicted power data sequence of the day to be predicted;

[0156] The determination module is used to select a predicted power data sequence with the smallest mean square error from multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0157] In one embodiment, the apparatus further comprises:

[0158] A second acquisition module is used to acquire historical training data samples within a preset time period, wherein the historical training data samples include historical daily power data sequences;

[0159] The first division module is used to divide the historical daily power data sequence into preset power intervals to obtain a reference division result of the historical training data sample;

[0160] The second division module is used to input the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence into the random forest model to obtain the interval classification results of the historical training data samples based on the division of the environmental attribute data and the regular attribute data;

[0161] The training module is used to compare the reference partition result with the interval classification result to obtain the comparison result, and to train and adjust the parameters in the random forest model according to the comparison result to obtain a trained random forest model.

[0162] In one embodiment, the second acquisition module is specifically used to acquire historical data samples within a preset time period, and each piece of historical data in the historical data sample includes a historical daily power data sequence based on a time series of a historical day, and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence;

[0163] The moving average and moving average ratio of the daily power data sequence of historical days are calculated to obtain the seasonal characteristic index, and the ratio of the daily power data sequence of historical days to the seasonal characteristic index is calculated to obtain the daily power data sequence of historical days without seasonal characteristics as the historical training data sample.

[0164] For the specific definition of the short-term power prediction device, please refer to the definition of the short-term power prediction method in the above text, which will not be repeated here. Each module in the above-mentioned short-term power prediction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0165] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10As shown. The computer device includes a processor, a memory, a communication 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 a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a short-term power prediction method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0166] Those skilled in the art will understand that Fig.10 The structure shown in the figure 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 device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0167] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0168] Obtain relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0169] Input the relevant data samples of the day to be predicted into the preset classification model, and obtain the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0170] According to the reference data sample and the preset power prediction model, a benchmark prediction power data sequence is obtained;

[0171] According to the weight coefficient and the benchmark predicted power data sequence, the predicted power data sequence of the day to be predicted is obtained.

[0172] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0173] Taking the power to be predicted based on the time series of the day to be predicted as the target variable, obtaining relevant data samples of the day to be predicted, wherein the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted;

[0174] A daily power data sequence based on a time series one day before the day to be predicted, and importance ranking results of environmental attribute data and regular attribute data corresponding to the daily power data sequence are obtained as the first reference data sample.

[0175] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0176] The power to be predicted based on the time series on the day to be predicted is used as the target variable, and the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted are used as input data and input into the trained random forest model;

[0177] The input data is classified and voted according to the tree classifier in the random forest model to determine the classification interval of the input data, and the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval are obtained as the weight coefficients of the day to be predicted.

[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0179] Draw a time series-based line graph according to the reference data sample, and determine the trend information of the daily power data sequence one day before the day to be predicted in the reference data sample according to the time series line graph;

[0180] According to the trend information and the daily power data sequence of the day before the day to be predicted, the power prediction model is established using the exponential smoothing algorithm. Through the weighted calculation of the power prediction model, the benchmark prediction power data sequence of the day to be predicted is obtained.

[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0182] For each set of predicted power data sequence of the day to be predicted, calculate the mean square error of the predicted power data sequence;

[0183] The predicted power data sequence with the smallest mean square error is selected from multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0185] Obtaining historical training data samples within a preset time period, wherein the historical training data samples include historical daily power data sequences;

[0186] Divide the historical daily power data series into preset power intervals to obtain a reference division result of the historical training data samples;

[0187] The environmental attribute data and regular attribute data corresponding to the historical daily power data series are input into the random forest model to obtain the interval classification results of the historical training data samples divided based on the environmental attribute data and the regular attribute data;

[0188] The reference partition result is compared with the interval classification result to obtain a comparison result, and the parameters in the random forest model are trained and adjusted according to the comparison result to obtain a trained random forest model.

[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0190] Obtain historical data samples within a preset time period, where each piece of historical data in the historical data samples includes a historical daily power data sequence based on a time series for a historical day, and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence;

[0191] The moving average and moving average ratio of the daily power data sequence of historical days are calculated to obtain the seasonal characteristic index, and the ratio of the daily power data sequence of historical days to the seasonal characteristic index is calculated to obtain the daily power data sequence of historical days without seasonal characteristics as the historical training data sample.

[0192] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0193] Obtain relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted;

[0194] Input the relevant data samples of the day to be predicted into the preset classification model, and obtain the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted according to the classification processing of the classification model;

[0195] According to the reference data sample and the preset power prediction model, a benchmark prediction power data sequence is obtained;

[0196] According to the weight coefficient and the benchmark predicted power data sequence, the predicted power data sequence of the day to be predicted is obtained.

[0197] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0198] Taking the power to be predicted based on the time series of the day to be predicted as the target variable, obtaining relevant data samples of the day to be predicted, wherein the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted;

[0199] A daily power data sequence based on a time series one day before the day to be predicted, and importance ranking results of environmental attribute data and regular attribute data corresponding to the daily power data sequence are obtained as the first reference data sample.

[0200] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0201] The power to be predicted based on the time series on the day to be predicted is used as the target variable, and the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted are used as input data and input into the trained random forest model;

[0202] The input data is classified and voted according to the tree classifier in the random forest model to determine the classification interval of the input data, and the weight coefficients of the environmental attribute data and regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval are obtained as the weight coefficients of the day to be predicted.

[0203] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0204] Draw a time series-based line graph according to the reference data sample, and determine the trend information of the daily power data sequence one day before the day to be predicted in the reference data sample according to the time series line graph;

[0205] According to the trend information and the daily power data sequence of the day before the day to be predicted, the power prediction model is established using the exponential smoothing algorithm. Through the weighted calculation of the power prediction model, the benchmark prediction power data sequence of the day to be predicted is obtained.

[0206] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0207] For each set of predicted power data sequence of the day to be predicted, calculate the mean square error of the predicted power data sequence;

[0208] The predicted power data sequence with the smallest mean square error is selected from multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

[0209] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0210] Obtaining historical training data samples within a preset time period, wherein the historical training data samples include historical daily power data sequences;

[0211] Divide the historical daily power data series into preset power intervals to obtain a reference division result of the historical training data samples;

[0212] The environmental attribute data and regular attribute data corresponding to the historical daily power data series are input into the random forest model to obtain the interval classification results of the historical training data samples divided based on the environmental attribute data and the regular attribute data;

[0213] The reference partition result is compared with the interval classification result to obtain a comparison result, and the parameters in the random forest model are trained and adjusted according to the comparison result to obtain a trained random forest model.

[0214] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0215] Obtain historical data samples within a preset time period, where each piece of historical data in the historical data samples includes a historical daily power data sequence based on a time series for a historical day, and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence;

[0216] The moving average and moving average ratio of the daily power data sequence of historical days are calculated to obtain the seasonal characteristic index, and the ratio of the daily power data sequence of historical days to the seasonal characteristic index is calculated to obtain the daily power data sequence of historical days without seasonal characteristics as the historical training data sample.

[0217] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0218] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0219] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A short-term power prediction method, characterized in that: The method comprises: Acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted; The environmental attribute data and regular attribute data included in the relevant data samples of the day to be predicted may include the capacity of newly added power generation equipment on the power plant side, the growth rate of social power consumption, weather, temperature, humidity, power transmission capacity on the power plant side, and date type; Inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model; According to the reference data sample and the preset power prediction model, a benchmark prediction power data sequence is obtained, including: drawing a line graph based on a time series according to the reference data sample, and determining the trend information of the daily power data sequence of the day before the day to be predicted in the reference data sample according to the line graph of the time series; according to the trend information and the daily power data sequence of the day before the day to be predicted, using an exponential smoothing algorithm to establish a power prediction model, and obtaining the benchmark prediction power data sequence of the day to be predicted through weighted calculation of the power prediction model; Obtaining the predicted power data sequence of the day to be predicted according to the weight coefficient and the reference predicted power data sequence; The method also includes: obtaining historical data samples within a preset time period, each piece of historical data in the historical data samples includes a historical daily power data sequence based on a time series of a historical day, and the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence; calculating a moving average and a moving average ratio of the daily power data sequence of the historical day to obtain a seasonal characteristic index, and performing a ratio calculation on the daily power data sequence of the historical day and the seasonal characteristic index to obtain a daily power data sequence of the historical day with the seasonal characteristic removed as a historical training data sample; the historical training data sample includes the historical daily power data sequence The historical daily power data sequence is divided into a preset power interval to obtain a reference division result of the historical training data sample; the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence are input into the random forest model to obtain an interval classification result of the historical training data sample divided based on the environmental attribute data and the regular attribute data; the reference division result is compared with the interval classification result to obtain a comparison result, and the parameters in the random forest model are trained and adjusted according to the comparison result to obtain a trained random forest model, and the trained random forest model is a preset classification model.

2. The method according to claim 1, characterized in that The obtaining of the relevant data samples of the day to be predicted and the reference data samples corresponding to the day to be predicted includes: Taking the power to be predicted based on the time series of the day to be predicted as the target variable, obtaining relevant data samples of the day to be predicted, wherein the relevant data samples include environmental attribute data and regular attribute data related to the power of the day to be predicted; A daily power data sequence based on a time series one day before the day to be predicted and an importance ranking result of environmental attribute data and regular attribute data corresponding to the daily power data sequence are obtained as the first reference data sample.

3. The method according to claim 1, characterized in that The step of inputting the data samples related to the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model, comprises: Taking the power to be predicted based on the time series of the day to be predicted as the target variable, the target variable, the environmental attribute data and the regular attribute data in the data sample of the day to be predicted as input data, and inputting them into the trained random forest model; The input data is classified and voted according to the tree classifier in the random forest model to determine the classification interval of the input data, and the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day with the greatest similarity to the day to be predicted within the classification interval are obtained as the weight coefficients of the day to be predicted.

4. The method according to claim 1 or 3, characterized in that: The method further comprises: For each set of predicted power data sequences of the day to be predicted, calculating the mean square error of the predicted power data sequences; The predicted power data sequence with the smallest mean square error is selected from the multiple predicted power data sequences as the final predicted power data sequence for the day to be predicted.

5. A short-term power prediction device, characterized in that: The device comprises: An acquisition module is used to acquire relevant data samples of the day to be predicted and reference data samples corresponding to the day to be predicted, wherein the relevant data samples of the day to be predicted include environmental attribute data and regular attribute data related to the power of the day to be predicted, and the reference data samples include a daily power data sequence one day before the day to be predicted; the environmental attribute data and regular attribute data included in the relevant data samples of the day to be predicted may be the capacity of newly added power generation equipment on the power plant side, the growth rate of social power consumption, weather, temperature, humidity, power transmission capacity on the power plant side, and date type; A classification and discrimination module, for inputting the relevant data samples of the day to be predicted into a preset classification model, and obtaining the weight coefficients of the environmental attribute data and the regular attribute data corresponding to the target day having the greatest similarity to the day to be predicted according to the classification processing of the classification model; A prediction module, used to obtain a benchmark prediction power data sequence according to the reference data sample and a preset power prediction model, including: drawing a line graph based on a time series according to the reference data sample, and determining the trend information of the daily power data sequence of the day before the day to be predicted in the reference data sample according to the line graph of the time series; establishing a power prediction model by using an exponential smoothing algorithm according to the trend information and the daily power data sequence of the day before the day to be predicted, and obtaining the benchmark prediction power data sequence of the day to be predicted through weighted calculation of the power prediction model; A determination module, configured to obtain the predicted power data sequence of the day to be predicted according to the weight coefficient and the reference predicted power data sequence; A second acquisition module is used to acquire historical data samples within a preset time period, wherein each piece of historical data in the historical data sample includes a historical daily power data sequence based on a time series of a historical day, and environmental attribute data and regular attribute data corresponding to the historical daily power data sequence; a moving average and a moving average ratio of the daily power data sequence of the historical day are calculated to obtain a seasonal characteristic index, and a ratio calculation is performed between the daily power data sequence of the historical day and the seasonal characteristic index to obtain a daily power data sequence of the historical day with the seasonal characteristics removed, as a historical training data sample, wherein the historical training data sample includes the historical daily power data sequence; The first division module is used to divide the historical daily power data sequence into preset power intervals to obtain a reference division result of the historical training data sample; The second division module is used to input the environmental attribute data and regular attribute data corresponding to the historical daily power data sequence into the random forest model to obtain the interval classification results of the historical training data samples based on the division of the environmental attribute data and the regular attribute data; The training module is used to compare the reference partition result with the interval classification result to obtain a comparison result, and to train and adjust the parameters in the random forest model according to the comparison result to obtain a trained random forest model, wherein the trained random forest model is a preset classification model.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Bus load prediction method

    CN106485262A

  • Short-term power load forecasting method

    CN108830418A

  • Photovoltaic power station short-term power prediction method

    CN110705789A