Power generation capacity prediction method and device based on seasonal trend decomposition, terminal equipment and storage medium

By combining seasonal trend decomposition and machine learning, extracting and predicting the seasonal, trend and residual components of power generation data, the problem of traditional methods being difficult to deal with nonlinear data is solved, and higher prediction accuracy is achieved.

CN119578624AActive Publication Date: 2025-03-07GUANGDONG POWER GRID CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411646666.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-03-07
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Traditional power prediction methods are difficult to deal with complex nonlinear data and variable external factors, which makes them unable to be applicable to current grid scenarios.

Method used

By combining seasonal trend decomposition and machine learning, the seasonal components, trend components and residual components of time series data are extracted, and the residual components are predicted using an integrated neural network model to finally generate predicted power generation data.

Benefits of technology

Improve the accuracy of power generation prediction and overcome the disadvantages of timing decomposition methods that are difficult to mine nonlinear data and machine learning methods that cannot process timing data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578624A_ABST
    Figure CN119578624A_ABST
Patent Text Reader

Abstract

The invention discloses a seasonal trend decomposition-based generating capacity prediction method and device, terminal equipment and a storage medium, and the method comprises the steps: carrying out the seasonal trend decomposition of time series data composed of generating capacity data of a plurality of time periods, and generating a seasonal component, a trend component and a residual component of the time series data; inputting the residual component into a preset residual prediction model to enable the residual prediction model to analyze nonlinear features in the residual component, performing prediction according to the nonlinear features, and generating a predicted residual component of the to-be-predicted time period; and according to the predicted residual component, the seasonal component and the trend component, generating predicted generating capacity data of the to-be-predicted time period. Therefore, two generating capacity prediction methods of seasonal trend decomposition and machine learning are combined, and the accuracy of generating capacity prediction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power technology, and in particular to a method, device, terminal equipment and storage medium for predicting power generation based on seasonal trend decomposition. Background Art

[0002] With the continuous growth of electricity demand and the widespread application of renewable energy, accurate prediction of electricity is crucial for the stable operation of the power grid and the effective management of energy. Traditional electricity forecasting methods, such as time series analysis and regression analysis, can predict power generation based on the relationship between the extracted historical influencing factor data and power generation. However, with the grid connection of large-scale renewable energy power stations, traditional electricity forecasting methods are difficult to handle complex nonlinear data and explore the influence of variable external factors, making them unsuitable for current scenarios.

[0003] In recent years, machine learning methods have made significant progress in electricity forecasting and have attracted widespread attention due to their powerful nonlinear modeling capabilities. Common machine learning methods include support vector machines, decision trees, neural networks, Bayesian learning, etc. Machine learning can solve nonlinear relationships between data, but it has certain limitations for time series data, resulting in less than ideal prediction accuracy. Summary of the invention

[0004] The embodiments of the present invention provide a method, apparatus, terminal device and storage medium for power generation prediction based on seasonal trend decomposition. The present invention effectively improves the accuracy of power generation prediction by combining two power generation prediction methods, namely seasonal trend decomposition and machine learning.

[0005] An embodiment of the present invention provides a method for predicting power generation based on seasonal trend decomposition, comprising:

[0006] Acquire time series data consisting of power generation data of several time periods;

[0007] Performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data;

[0008] The residual component is input into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual component, makes predictions based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model that is pre-trained using historical residual components in historical time series data generated by historical power generation data.

[0009] The predicted power generation data for the time period to be predicted is generated according to the prediction residual component, the seasonal component, and the trend component.

[0010] Furthermore, performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data includes:

[0011] Repeating the seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data;

[0012] The seasonal trend decomposition operation includes:

[0013] Acquire the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0;

[0014] Subtracting the first trend component from the time series data to be processed to generate a detrended sequence;

[0015] According to a preset first smoothing parameter, a smoothing operation is performed on the detrended sequence to generate a second seasonal component;

[0016] Subtract the second seasonal component from the detrended sequence to generate a deseasonalized sequence;

[0017] According to a preset second smoothing parameter, a smoothing operation is performed on the de-seasonalized sequence to generate a second trend component;

[0018] Subtract the second seasonal component and the second trend component from the time series data to generate a first residual component;

[0019] Calculate a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component;

[0020] When the first difference and the second difference are both smaller than a preset difference threshold, the first residual component, the second seasonal component, and the second trend component are used as the residual component, the seasonal component, and the trend component of the time series data;

[0021] When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

[0022] Furthermore, the step of performing a smoothing operation on the detrended sequence according to a preset first smoothing parameter to generate a second seasonal component includes:

[0023] The second seasonal component is generated according to the following formula:

[0024]

[0025] in, is the second seasonal component of the k-th seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, seasonal window is the first smoothing parameter, Y t is time series data, is the first trend component.

[0026] Furthermore, the step of performing a smoothing operation on the de-seasonalized sequence according to a preset second smoothing parameter to generate a second trend component includes:

[0027] The second trend component is generated according to the following formula:

[0028]

[0029] in, is the second trend component of the kth seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, and trend window is the second smoothing parameter.

[0030] Further, the step of subtracting the second seasonal component and the second trend component from the time series data to generate a first residual component includes:

[0031] The first residual component is generated according to the following formula:

[0032]

[0033] in, is the first residual component of the k-th seasonal trend decomposition operation.

[0034] Furthermore, the training process of the residual prediction model includes:

[0035] Obtain historical power generation data for several historical periods;

[0036] Generate a plurality of historical time series data and a historical residual component of each historical time series data according to the historical power generation data;

[0037] Arrange the historical residual components according to the time sequence, and use the next historical residual component as the true prediction value of the next historical residual component;

[0038] Constructing a number of training samples and test samples according to each of the historical residual components and their true predicted values;

[0039] Repeating the model training operation according to the training samples and the test samples until the residual prediction model is generated;

[0040] The model training operation includes:

[0041] Obtain a first decision tree, a second decision tree and a target value; wherein the first decision tree is a preset untrained decision tree, the second decision tree is initially empty, and the target value is initially the average value of all true prediction values ​​in the training samples;

[0042] Training the first decision tree according to the plurality of training samples and the target value;

[0043] Determine whether the second decision tree is empty;

[0044] If yes, the first decision tree is used as the decision tree to be evaluated;

[0045] If not, the first decision tree and the second decision tree are weightedly fused to generate a decision tree to be evaluated;

[0046] Inputting the historical residual components in the test samples into the decision tree to be evaluated, so that the decision tree to be evaluated outputs the predicted value to be evaluated of each test sample;

[0047] Calculate the prediction error of the decision tree to be evaluated based on the predicted value to be evaluated and the true predicted value of each test sample;

[0048] When it is determined that the prediction error is less than a preset error threshold, using the decision tree to be evaluated as the residual prediction model;

[0049] When it is determined that the prediction error is not less than a preset error threshold, the decision tree to be evaluated is used as the second decision tree for the next round of model training operation, and the prediction error is used as the target value for the next round of model training operation.

[0050] Another embodiment of the present invention provides a power generation prediction device based on seasonal trend decomposition, comprising:

[0051] A data acquisition module, used to acquire time series data consisting of power generation data of several time periods;

[0052] A time series decomposition module, used for performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data;

[0053] The residual prediction module is used to input the residual component into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual component, and makes predictions based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model that is pre-trained using historical residual components in historical time series data generated by historical power generation data.

[0054] The data prediction module is used to generate predicted power generation data for a time period to be predicted based on the prediction residual component, the seasonal component, and the trend component.

[0055] Furthermore, the time series decomposition module performs seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data, including:

[0056] Repeating the seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data;

[0057] The seasonal trend decomposition operation includes:

[0058] Acquire the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0;

[0059] Subtracting the first trend component from the time series data to be processed to generate a detrended sequence;

[0060] According to a preset first smoothing parameter, a smoothing operation is performed on the detrended sequence to generate a second seasonal component;

[0061] Subtract the second seasonal component from the detrended sequence to generate a deseasonalized sequence;

[0062] According to a preset second smoothing parameter, a smoothing operation is performed on the deseasonalized sequence to generate a second trend component;

[0063] Subtract the second seasonal component and the second trend component from the time series data to generate a first residual component;

[0064] Calculate a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component;

[0065] When the first difference and the second difference are both smaller than a preset difference threshold, the first residual component, the second seasonal component, and the second trend component are used as the residual component, the seasonal component, and the trend component of the time series data;

[0066] When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

[0067] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a power generation prediction method based on seasonal trend decomposition as described in any one of the embodiments.

[0068] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute a power generation prediction method based on seasonal trend decomposition as described in any of the above embodiments.

[0069] The following beneficial effects are achieved by implementing the present invention:

[0070] The present invention discloses a method, device, terminal equipment and storage medium for predicting power generation based on seasonal trend decomposition. The method generates seasonal components, trend components and residual components of the time series data by performing seasonal trend decomposition on time series data composed of power generation data of several time periods. The present invention uses seasonal trend decomposition to process time series data to identify and extract seasonal components that characterize the periodic changes of power generation data, trend components that characterize the trend of power generation data changes, and residual components that characterize the random fluctuations and nonlinear characteristics of power generation data. The residual components are then input into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual components, and predicts based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; based on the predicted residual components, seasonal components, and trend components, the predicted power generation data for the time period to be predicted is generated. The present invention utilizes the residual prediction model's ability to process nonlinear data, extracts nonlinear features in the residual components, and predicts the predicted residual components of the time period to be predicted based on the nonlinear features. Therefore, the present invention combines the two power generation prediction methods of seasonal trend decomposition and machine learning, while overcoming the shortcomings of the time series decomposition method that is difficult to mine nonlinear data and the disadvantage of the machine learning method that is unable to process time series data, thereby effectively improving the accuracy of power generation prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a flow chart of a method for predicting power generation based on seasonal trend decomposition provided by one embodiment of the present invention.

[0072] Figure 2 It is a structural schematic diagram of a power generation prediction method based on seasonal trend decomposition provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0075] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0076] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0077] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0078] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0079] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0080] See also Figure 1 , is a flow chart of a method for predicting power generation based on seasonal trend decomposition provided by an embodiment of the present invention, comprising:

[0081] S1. Obtaining time series data consisting of power generation data of several time periods;

[0082] In a preferred embodiment of the present invention, the power generation data of each hour in a day is obtained, and the missing value processing, outlier processing and data standardization are performed to optimize the data quality, so as to prevent the subsequent power generation data forecast from being affected by the data quality and resulting in a decrease in the prediction accuracy. And based on the optimized power generation data, the time series data is constructed.

[0083] S2, performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data;

[0084] Preferably, performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data includes:

[0085] S21, repeatedly performing a seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data;

[0086] The seasonal trend decomposition operation includes:

[0087] S211, acquiring the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0;

[0088] S212, subtracting the first trend component from the time series data to be processed to generate a detrended sequence;

[0089] S213, performing a smoothing operation on the detrended sequence according to a preset first smoothing parameter to generate a second seasonal component;

[0090] Preferably, the step of performing a smoothing operation on the detrended sequence according to a preset first smoothing parameter to generate a second seasonal component comprises:

[0091] The second seasonal component is generated according to the following formula:

[0092]

[0093] in, is the second seasonal component of the k-th seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, seasonal window is the first smoothing parameter, Y t is time series data, is the first trend component.

[0094] S214, subtracting the second seasonal component from the detrended sequence to generate a deseasonalized sequence;

[0095] S215, performing a smoothing operation on the de-seasonalized sequence according to a preset second smoothing parameter to generate a second trend component;

[0096] Preferably, the step of performing a smoothing operation on the de-seasonalized sequence according to a preset second smoothing parameter to generate a second trend component includes:

[0097] The second trend component is generated according to the following formula:

[0098]

[0099] in, is the second trend component of the kth seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, and trend window is the second smoothing parameter.

[0100] S216, subtracting the second seasonal component and the second trend component from the time series data to generate a first residual component;

[0101] Preferably, the step of subtracting the second seasonal component and the second trend component from the time series data to generate a first residual component includes:

[0102] The first residual component is generated according to the following formula:

[0103]

[0104] in, is the first residual component of the k-th seasonal trend decomposition operation.

[0105] S217, calculating a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component;

[0106] S218, when the first difference and the second difference are both smaller than a preset difference threshold, taking the first residual component, the second seasonal component, and the second trend component as the residual component, the seasonal component, and the trend component of the time series data;

[0107] S219. When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

[0108] In a preferred embodiment of the present invention, STL (Seasonal and Trend decomposition using Loess) decomposition is a time series analysis method. It decomposes time series data into three parts: seasonality, trend, and residual. The core of STL decomposition is to use Loess (local weighted regression) to estimate the smoothed values ​​of these three components.

[0109] 1. Calculation steps of STL decomposition:

[0110] 1) Initialization: Set seasonal period n p , trend smoothing window n t , seasonal smoothing window n s , initialize the trend and seasonality

[0111] 2) Outer Loop:

[0112] It is understandable that the outer loop is mainly used to adjust the robustness weights to improve the robustness of the algorithm. In the STL algorithm, the robustness weights are used to measure the influence of each data point on the trend and cycle components. By adjusting these weights, the algorithm can better handle outliers or noise in the time series. It is worth noting that if there are no obvious outliers or noise in the time series, the number of outer loops can be set to 0, that is, no outer loop is performed.

[0113] 3) Inner Loop:

[0114] Step 1: Remove the trend component of the previous iteration and calculate the detrended sequence

[0115] Step 2: Perform Loess smoothing on each seasonal subsequence of the detrended series to estimate the seasonal component

[0116] Step 3: Remove the new seasonal component and calculate the deseasonalized series

[0117] Step 4: Perform Loess smoothing on the deseasonalized series to estimate the new trend component

[0118] Step 5: Calculate the residual components

[0119] 4) Iteration: Repeat the inner loop until the change of trend and seasonal components is small enough or the set number of iterations is reached (the change is small enough to be set as Δ≤10 -8 ).

[0120] 5) Output: Final trend component T t , seasonal component S t , and the residual component R t .

[0121] 2. Mathematical expression of STL decomposition:

[0122] Time series Y t It can be expressed as: t =T t +S t +R t ;

[0123] Where: T t is the trend component, S t is the seasonal component, R t is the residual component.

[0124] In each inner loop, the update of trend and seasonal components can be expressed by the following formula:

[0125]

[0126] Trend window: The width of the time window for trend smoothing, which must be an odd number;

[0127] Seasonal window: The time window width for seasonal trend smoothing. It must be an odd number and greater than or equal to 7.

[0128] S3. Input the residual component into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual component, makes predictions based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model that is pre-trained using historical residual components in historical time series data generated by historical power generation data.

[0129] Preferably, the training process of the residual prediction model includes:

[0130] S31, obtaining historical power generation data of several historical periods;

[0131] S32, generating a plurality of historical time series data and a historical residual component of each historical time series data according to the historical power generation data;

[0132] S33, arranging the historical residual components according to the time sequence, and taking the next historical residual component as the true prediction value of the next historical residual component;

[0133] S34, constructing a number of training samples and test samples according to each of the historical residual components and their true prediction values;

[0134] S35, repeating the model training operation according to the training sample and the test sample until the residual prediction model is generated;

[0135] The model training operation includes:

[0136] S351, obtaining a first decision tree, a second decision tree and a target value; wherein the first decision tree is a preset untrained decision tree, the second decision tree is initially empty, and the target value is initially the average value of all true prediction values ​​in the training samples;

[0137] S352: training the first decision tree according to the plurality of training samples and the target value;

[0138] S353, determining whether the second decision tree is empty;

[0139] S354: If yes, use the first decision tree as the decision tree to be evaluated;

[0140] S355, if not, weighted fusion is performed on the first decision tree and the second decision tree to generate a decision tree to be evaluated;

[0141] S356, inputting the historical residual components in the test samples into the decision tree to be evaluated, so that the decision tree to be evaluated outputs the predicted value to be evaluated of each test sample;

[0142] S357, calculating the prediction error of the decision tree to be evaluated according to the predicted value to be evaluated and the true predicted value of each test sample;

[0143] S358. When it is determined that the prediction error is less than a preset error threshold, the decision tree to be evaluated is used as the residual prediction model;

[0144] S359: When it is determined that the prediction error is not less than a preset error threshold, the decision tree to be evaluated is used as the second decision tree for the next round of model training operation, and the prediction error is used as the target value for the next round of model training operation.

[0145] In a preferred embodiment of the present invention, a gradient boosted decision tree (GBDT) is used to construct a residual prediction model. GBDT can capture complex nonlinear relationships in data through the integration of multiple decision trees, which is particularly important for power generation prediction because power data is often affected by multiple factors. GBDT is an ensemble learning algorithm that minimizes the loss function by iteratively training decision trees. The core of GBDT is that each step is trained on the residual of the previous step model, and the performance of the model is improved by gradual adjustment.

[0146] 1. The working principle of GBDT can be summarized into the following steps:

[0147] 1) Initialization: The model starts with a constant value, usually the average of the target values ​​in the training dataset, as the prediction result of the first tree.

[0148] 2) Iterative training: For each round of iteration:

[0149] ① Calculate the residual of the current model, that is, the difference between the true value and the predicted value.

[0150] ②Use the residual as the target value to train a new decision tree.

[0151] ③Determine a learning rate (usually less than 1) to adjust the contribution of the new tree.

[0152] ④Update the model’s prediction value, multiply the new tree’s prediction result by the learning rate and add it to the existing prediction result.

[0153] 3) Termination condition: When the predetermined number of iterations is reached or the performance of the model no longer improves, the iteration is stopped.

[0154] 4) Final model: The final model is the accumulation of all trained decision trees.

[0155] 2. GBDT calculation formula:

[0156] For a given loss function L(y, F(x)) (where y is the true value and F(x) is the predicted value), the goal of GBDT is to minimize the loss function. In each iteration, the model is updated as follows:

[0157] 1) Calculate the residual: Here F t-1 (x) is the model of the previous iteration.

[0158] 2) Train a new decision tree: use the residual r ti For the target value, train a new decision tree h t (x).

[0159] 3) Update model: F(x) = F t-1 (x)+ηh t (x), where η is the learning rate.

[0160] 4) Calculate the new residual: r t =yF t (x).

[0161] S4. Generate predicted power generation data for a time period to be predicted based on the prediction residual component, the seasonal component, and the trend component.

[0162] In a preferred embodiment of the present invention, the predicted residual is recombined with the trend component and the seasonal component to obtain the final electricity quantity prediction result.

[0163] The present embodiment provides a method for predicting power generation based on seasonal trend decomposition, by performing seasonal trend decomposition on time series data consisting of power generation data of several time periods, and generating seasonal components, trend components and residual components of the time series data. The present invention uses seasonal trend decomposition to process time series data to identify and extract seasonal components that characterize the periodic changes of power generation data, trend components that characterize the trend of power generation data changes, and residual components that characterize the random fluctuations and nonlinear characteristics of power generation data. The residual components are then input into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual components, and predicts based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; based on the predicted residual components, seasonal components, and trend components, the predicted power generation data for the time period to be predicted is generated. The present invention utilizes the residual prediction model's ability to process nonlinear data, extracts nonlinear features in the residual components, and predicts the predicted residual components of the time period to be predicted based on the nonlinear features. Therefore, the present invention combines the two power generation prediction methods of seasonal trend decomposition and machine learning, while overcoming the shortcomings of the time series decomposition method that is difficult to mine nonlinear data and the disadvantage of the machine learning method that is unable to process time series data, thereby effectively improving the accuracy of power generation prediction.

[0164] See also Figure 2 , is a structural schematic diagram of a method and device for predicting power generation based on seasonal trend decomposition provided by an embodiment of the present invention, comprising:

[0165] A data acquisition module, used to acquire time series data consisting of power generation data of several time periods;

[0166] A time series decomposition module, used for performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data;

[0167] The residual prediction module is used to input the residual component into a preset residual prediction model so that the residual prediction model analyzes the nonlinear characteristics in the residual component, and makes predictions based on the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model that is pre-trained using historical residual components in historical time series data generated by historical power generation data.

[0168] The data prediction module is used to generate predicted power generation data for a time period to be predicted based on the prediction residual component, the seasonal component, and the trend component.

[0169] Furthermore, the time series decomposition module performs seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data, including:

[0170] Repeating the seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data;

[0171] The seasonal trend decomposition operation includes:

[0172] Acquire the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0;

[0173] Subtracting the first trend component from the time series data to be processed to generate a detrended sequence;

[0174] According to a preset first smoothing parameter, a smoothing operation is performed on the detrended sequence to generate a second seasonal component;

[0175] Subtract the second seasonal component from the detrended sequence to generate a deseasonalized sequence;

[0176] According to a preset second smoothing parameter, a smoothing operation is performed on the de-seasonalized sequence to generate a second trend component;

[0177] Subtract the second seasonal component and the second trend component from the time series data to generate a first residual component;

[0178] Calculate a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component;

[0179] When the first difference and the second difference are both smaller than a preset difference threshold, the first residual component, the second seasonal component, and the second trend component are used as the residual component, the seasonal component, and the trend component of the time series data;

[0180] When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

[0181] It should be noted that the device embodiments described above are merely schematic, wherein 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 they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0182] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0183] Another preferred embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a power generation prediction method based on seasonal trend decomposition as described in any one of the above embodiments.

[0184] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0185] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0186] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0187] Another preferred embodiment of the present invention provides a storage medium, the storage medium is a computer-readable storage medium, the computer program is stored in the computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0188] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for predicting power generation based on seasonal trend decomposition, characterized in that: include: Acquire time series data consisting of power generation data of several time periods; Performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data; The residual component is input into a preset residual prediction model, so that the residual prediction model analyzes the nonlinear characteristics in the residual component, and predicts according to the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model that is pre-trained using historical residual components in historical time series data generated by historical power generation data; The predicted power generation data for the time period to be predicted is generated according to the prediction residual component, the seasonal component, and the trend component.

2. A method for predicting power generation based on seasonal trend decomposition as claimed in claim 1, characterized in that: The step of performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data includes: Repeating the seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data; The seasonal trend decomposition operation includes: Acquire the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0; Subtracting the first trend component from the time series data to generate a detrended sequence; According to a preset first smoothing parameter, a smoothing operation is performed on the detrended sequence to generate a second seasonal component; Subtract the second seasonal component from the detrended sequence to generate a deseasonalized sequence; According to a preset second smoothing parameter, a smoothing operation is performed on the de-seasonalized sequence to generate a second trend component; Subtract the second seasonal component and the second trend component from the time series data to generate a first residual component; Calculate a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component; When the first difference and the second difference are both smaller than a preset difference threshold, the first residual component, the second seasonal component, and the second trend component are used as the residual component, the seasonal component, and the trend component of the time series data; When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

3. A method for predicting power generation based on seasonal trend decomposition as claimed in claim 2, characterized in that: The step of performing a smoothing operation on the detrended sequence according to a preset first smoothing parameter to generate a second seasonal component includes: The second seasonal component is generated according to the following formula: in, is the second seasonal component of the k-th seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, seasonalwindow is the first smoothing parameter, Y t is time series data, is the first trend component.

4. A method for predicting power generation based on seasonal trend decomposition as claimed in claim 3, characterized in that: The step of performing a smoothing operation on the de-seasonalized sequence according to a preset second smoothing parameter to generate a second trend component includes: The second trend component is generated according to the following formula: in, is the second trend component of the kth seasonal trend decomposition operation, Loess() represents the smoothing operation, is the detrended sequence of the kth seasonal trend decomposition operation, and trend window is the second smoothing parameter.

5. The method for predicting power generation based on seasonal trend decomposition according to claim 4, characterized in that: The step of subtracting the second seasonal component and the second trend component from the time series data to generate a first residual component includes: The first residual component is generated according to the following formula: in, is the first residual component of the k-th seasonal trend decomposition operation.

6. The method for predicting power generation based on seasonal trend decomposition according to claim 1, characterized in that: The training process of the residual prediction model includes: Obtain historical power generation data for several historical periods; Generate a plurality of historical time series data and a historical residual component of each historical time series data according to the historical power generation data; Arrange the historical residual components according to the time sequence, and use the next historical residual component as the true prediction value of the next historical residual component; Constructing a number of training samples and test samples according to each of the historical residual components and their true predicted values; Repeating the model training operation according to the training samples and the test samples until the residual prediction model is generated; The model training operation includes: Obtain a first decision tree, a second decision tree and a target value; wherein the first decision tree is a preset untrained decision tree, the second decision tree is initially empty, and the target value is initially the average value of all true prediction values ​​in the training samples; Training the first decision tree according to the plurality of training samples and the target value; Determine whether the second decision tree is empty; If yes, the first decision tree is used as the decision tree to be evaluated; If not, the first decision tree and the second decision tree are weightedly fused to generate a decision tree to be evaluated; Inputting the historical residual components in the test samples into the decision tree to be evaluated, so that the decision tree to be evaluated outputs the predicted value to be evaluated of each test sample; Calculate the prediction error of the decision tree to be evaluated based on the predicted value to be evaluated and the true predicted value of each test sample; When it is determined that the prediction error is less than a preset error threshold, using the decision tree to be evaluated as the residual prediction model; When it is determined that the prediction error is not less than a preset error threshold, the decision tree to be evaluated is used as the second decision tree for the next round of model training operation, and the prediction error is used as the target value for the next round of model training operation.

7. A power generation prediction device based on seasonal trend decomposition, characterized in that: include: A data acquisition module, used to acquire time series data consisting of power generation data of several time periods; A time series decomposition module, used for performing seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data; A residual prediction module, used for inputting the residual component into a preset residual prediction model, so that the residual prediction model analyzes the nonlinear characteristics in the residual component, and predicts according to the nonlinear characteristics, and then generates a predicted residual component for the time period to be predicted; wherein the residual prediction model is an integrated neural network model trained in advance using the historical residual components in the historical time series data generated by the historical power generation data; The data prediction module is used to generate predicted power generation data for a time period to be predicted based on the prediction residual component, the seasonal component, and the trend component.

8. The power generation prediction device based on seasonal trend decomposition according to claim 7, characterized in that: The time series decomposition module performs seasonal trend decomposition on the time series data to generate seasonal components, trend components and residual components of the time series data, including: Repeating the seasonal trend decomposition operation according to the time series data to generate a seasonal component, a trend component and a residual component of the time series data; The seasonal trend decomposition operation includes: Acquire the time series data, the first seasonal component, and the first trend component; wherein, initially, the first trend component is 0 and the first seasonal component is 0; Subtracting the first trend component from the time series data to be processed to generate a detrended sequence; According to a preset first smoothing parameter, a smoothing operation is performed on the detrended sequence to generate a second seasonal component; Subtract the second seasonal component from the detrended sequence to generate a deseasonalized sequence; According to a preset second smoothing parameter, a smoothing operation is performed on the de-seasonalized sequence to generate a second trend component; Subtract the second seasonal component and the second trend component from the time series data to generate a first residual component; Calculate a first difference between the first seasonal component and the second seasonal component, and a second difference between the first trend component and the second trend component; When the first difference and the second difference are both smaller than a preset difference threshold, the first residual component, the second seasonal component, and the second trend component are used as the residual component, the seasonal component, and the trend component of the time series data; When the first difference or the second difference is not less than a preset difference threshold, the second seasonal component and the second trend component are used as the first seasonal component and the first trend component required for the next round of seasonal trend decomposition operation.

9. A terminal device, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a power generation prediction method based on seasonal trend decomposition as described in any one of claims 1 to 6 is implemented.

10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute a power generation prediction method based on seasonal trend decomposition as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Two-stage decomposition wind direction prediction method based on LSTM

    CN114792171A

  • Load prediction method and system based on seasonal trend decomposition and hybrid neural network

    CN115587666A

  • Short-term load prediction method and system fusing time sequence decomposition and machine learning model, and storage medium

    CN118229119A