Distributed source load resource transferability probability interval prediction method based on feature enhancement
By adopting a feature enhancement method in distributed source and load resource prediction, combining the gated residual network and timing fusion prediction model, the problem of insufficient information on the limitations and uncertainties of prediction tasks in the existing technology is solved, and efficient and accurate power generation and use prediction of distributed source and load resource is achieved, improving the reliability and scheduling optimization capabilities of the system.
Patent Information
- Application Number
- CN202510437065.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-09
AI Technical Summary
The existing distributed source-load resource power generation prediction methods are poor in multiple types, multiple scenarios, and multi-region tasks, and it is difficult to provide sufficient uncertainty information, making it difficult to evaluate the reliability of the prediction results.
The distributed source-load resource migration probability interval prediction method is adopted based on feature enhancement, and efficient and accurate prediction of distributed source-load resource generation and consumption through gated residual network (GRN), two-layer feature enhancement model, timing fusion prediction model and probability interval prediction model are achieved.
By enhancing the expression ability and feature extraction ability of the model, this method realizes migration prediction of multi-type, multi-scenario, and multi-region distributed source and load resources, significantly improving the system's reliability and scheduling optimization capabilities.
Smart Images

Figure CN119961886A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a prediction technology for a distributed energy system, and in particular to a method for predicting a probability interval of distributed source-load resource migration based on feature enhancement. Background Art
[0002] Compared with the traditional power system, one of the notable features of the new power system is the shift from the "source follows load" mode to the "source and load interaction" mode. In this context, in order to ensure the safe and stable operation of the power system, it is necessary to improve the prediction accuracy of the power generation and consumption of distributed source and load resources, thereby improving the utilization rate of load resources to meet the needs of larger-scale new energy consumption.
[0003] The core problem of distributed source-load resource generation and consumption prediction is how to use historical data to build a prediction model to accurately predict the changes of distributed resources in the future or in a time period. This capability is crucial for multiple business scenarios such as power grid dispatching, maintenance planning, stability analysis, and new energy consumption analysis. Traditional distributed source-load resource prediction technology is mainly based on physical modeling and mathematical statistics methods. With the development of intelligent measurement equipment and the rapid progress of artificial intelligence technology, data-driven artificial intelligence methods have gradually become the mainstream research direction. In particular, the load forecasting method based on deep learning, with its advantages in pattern recognition and nonlinear modeling, improves the prediction accuracy while optimizing the computational efficiency. Compared with traditional methods, the prediction method based on deep learning can better cope with the problems of large-scale data and multi-source data, can realize real-time prediction and automatic feature extraction, and can also realize the continuous optimization of the prediction model.
[0004] In existing technical research, the field of data-driven prediction methods can be further divided into two categories: deterministic prediction methods and probability interval prediction methods. Among them, the deterministic point prediction method focuses more on providing specific numerical prediction results without considering its fluctuation range. This type of method is suitable for scenarios where errors in prediction results are acceptable. In contrast, the probability interval prediction method can not only give numerical prediction results, but also provide a range of possibilities, namely the prediction interval. This method quantifies the uncertainty in the prediction process and is suitable for complex working conditions where prediction uncertainty needs to be considered. Existing technologies include machine learning models such as long short-term memory neural networks, convolutional neural networks, and Transformer. However, in the prediction of distributed resource generation and consumption, due to the wide variety of resource types and the influence of multiple uncertainty factors, traditional prediction models are difficult to provide sufficient uncertainty information to comprehensively evaluate the prediction results. In addition, existing models are usually pre-trained for specific resource types, and have limitations in generalization capabilities. There is still a lack of general prediction models that can adapt to multi-type, multi-scenario, and multi-region migration needs.
[0005] At present, the distributed source and load resource generation and consumption prediction methods need to adjust a large number of hyperparameters for optimization when dealing with multi-type, multi-scenario, and multi-region prediction tasks, and the poor performance is a major technical problem. At present, the distributed resource generation and consumption prediction methods usually have good results after pre-training on specific resource types in specific scenarios. As more and more flexible distributed resources participate in the construction of new power systems, it is necessary to design a distributed source and load resource probability interval prediction method that does not require large-scale hyperparameter optimization and has strong portability for the different operating characteristics of multi-type, multi-scenario, and multi-region distributed resources. In addition, the operation of distributed source and load resources is affected by multiple uncertain factors, which is another important issue in power load forecasting. Existing models usually do not take these uncertain factors into consideration, or only predict the generation and consumption of distributed resources based on stable conditions, which makes it difficult for their prediction methods to provide sufficient uncertainty information, making it impossible for users to fully evaluate the reliability of the prediction results. When facing different types of distributed source and load resources, different resources have different impact characteristics. How to design a feature extraction mechanism that is both universal and efficient is another important issue in power generation and consumption forecasting. Most of the existing feature extraction methods rely on correlation analysis, have limited feature characterization capabilities, cannot effectively isolate the correlation between features, and find it difficult to accurately extract and utilize the impact characteristics of different types of distributed source and load resources.
[0006] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0007] The main purpose of the present invention is to overcome the defects existing in the above-mentioned background technology and provide a method for predicting the probability interval of the migration of distributed source and load resources based on feature enhancement.
[0008] To achieve the above object, the present invention adopts the following technical solutions: A method for predicting the probability interval of distributed source and load resource migration based on feature enhancement includes the following steps: S1. Preprocessing the time series data of power generation and consumption data of distributed source and load resources and their related characteristic variables; S2. Establish a gated residual network (GRN) that combines the gating mechanism and residual connection to measure the nonlinear correlation between external input and prediction target, thereby enhancing the model's expressiveness and training stability. S3. Based on the output of the gated residual network model, a two-layer feature enhancement model is constructed. The correlation between features is quantified through statistical high-order partial correlation analysis. In combination with the nonlinear feature processing capability of machine learning, the weight of each feature is dynamically adjusted to achieve end-to-end automatic feature extraction and enhance data expression capability. S4. Based on the output of the two-layer feature enhancement model, a time series fusion prediction model is constructed. The time series fusion prediction model uses a long short-term memory network (LSTM) encoder and decoder to re-encode multi-source data, and introduces a masked self-attention mechanism to capture the long-range dependency between time series features; the time series fusion prediction model also learns the correlation between external features through the gated residual network (GRN) and outputs a prediction result; S5. Based on the output of the time series fusion prediction model, a probability interval prediction model is constructed, and the quantile regression method is used to simulate the prediction intervals under different confidence levels, quantify the uncertainty of the prediction, and provide more comprehensive uncertainty information for the scheduling of distributed source and load resources.
[0009] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for predicting the probability interval of distributed source and load resource migration based on feature enhancement.
[0010] A computer program product includes a computer program, wherein when the computer program is executed by a processor, the method for predicting the probability interval of distributed source and load resource migration based on feature enhancement is implemented.
[0011] The present invention has the following beneficial effects: The present invention proposes a distributed source and load resource migration probability interval prediction method based on feature enhancement. Aiming at the limitations of the distributed source and load resource prediction model in the prior art in multi-type, multi-scenario, and multi-region tasks, as well as the problem of insufficient consideration of uncertainty factors, the method realizes efficient and accurate prediction of the generation and consumption of distributed source and load resources by fusing the gated residual network (GRN), the two-layer feature enhancement model, the time series fusion prediction model and the probability interval prediction model. The method effectively measures the nonlinear correlation between the external input and the prediction target through GRN to enhance the model expression ability; the two-layer feature enhancement model is combined with the statistical high-order partial correlation analysis and the nonlinear feature processing ability of machine learning to achieve end-to-end automatic feature extraction and improve the accuracy of feature selection; with the help of the LSTM codec and the masked self-attention mechanism in the time series fusion prediction model, the multi-source data is re-encoded and the long-range dependency of the time series features is captured, so as to enhance the adaptability and migration ability of the model to different scenarios; finally, the probability interval prediction model is used to simulate the prediction interval under different confidence levels, quantify the prediction uncertainty, and provide more comprehensive uncertainty information for the scheduling of distributed source and load resources in the new power system, which significantly improves the reliability and scheduling optimization ability of the system.
[0012] Other beneficial effects of the embodiments of the present invention will be further described below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 The present invention is a flowchart of a method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to an embodiment of the present invention.
[0014] Figure 2 The present invention is a framework diagram of a distributed source-load resource migration probability interval prediction method based on feature enhancement in an embodiment of the present invention.
[0015] Figure 3 This is a result diagram of a method for predicting the probability interval of distributed source and load resource migration based on feature enhancement in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.
[0017] See also Figure 1 The embodiment of the present invention provides a method for predicting the probability interval of distributed source and load resource migration based on feature enhancement, comprising the following steps: Step S1, data preprocessing: preprocess the time series data of distributed source and load resource power generation and consumption data and related characteristic variables, which may include missing value filling, outlier replacement and data smoothing to ensure data quality and improve the convergence of the model.
[0018] In a preferred embodiment, the data preprocessing in step S1 includes: filling missing values in the time series data of the distributed source and load resource power generation and consumption data and its related characteristic variables, using the data of the previous timestamp to fill the current missing values to maintain the time series continuity of the data; replacing abnormal values that exceed the reasonable value range, and replacing the abnormal values with the data of the previous timestamp; smoothing the power generation and consumption data by calculating the average value of the observed values at the current time and the timestamps before and after it, so as to reduce the impact of data fluctuations on prediction accuracy.
[0019] Step S2, establish a gated residual network model: establish a gated residual network (GRN), which measures the nonlinear correlation between external input and prediction target by combining the gating mechanism and residual connection, and enhances the expression ability and training stability of the model.
[0020] In a preferred embodiment, the specific process of establishing a gated residual network model (GRN) in step S2 includes: combining the preprocessed data with the context vector and generating an intermediate layer through an activation function; applying a weight transformation to the intermediate layer to obtain a further processed intermediate layer; inputting the intermediate layer into a gated linear unit (GLU), and combining it with the initial features, and obtaining the output of the GRN through regularization processing; wherein the gated residual network model measures the nonlinear correlation between the external input and the target variable by introducing a gating mechanism and a residual connection, thereby enhancing the expressive power of the model; the gated linear unit is used to flexibly suppress the influence of negative values, alleviate the gradient vanishing problem, and improve the stability of network training.
[0021] Step S3, establishing a double-layer feature enhancement model: Based on the output of the gated residual network model established in step S2, a double-layer feature enhancement model is constructed, the correlation between features is quantified through statistical high-order partial correlation analysis, and the nonlinear feature processing capability of machine learning is combined to dynamically adjust the weight of each feature to achieve end-to-end automatic feature extraction and enhance data expression capabilities; In a preferred embodiment, the specific process of establishing a double-layer feature enhancement model in step S3 includes: calculating the high-order partial correlation coefficients between each feature, quantifying the correlation between features by statistical methods; combining the high-order partial correlation coefficients with the features processed by the gated residual network (GRN), inputting the Softmax activation function, and obtaining a feature weight matrix; in the same time step, inputting each initial feature into the corresponding GRN for nonlinear transformation to obtain a feature vector; using the feature weight matrix to weight the feature vector to obtain a feature matrix with correlation weights as the input of the subsequent model. Among them, the double-layer feature enhancement model dynamically adjusts the weight value of each feature by integrating the statistical high-order partial correlation analysis and the nonlinear feature processing capabilities of machine learning, thereby enhancing the model's ability to select key features and reducing its dependence on large-scale data.
[0022] Step S4, establishing a time series fusion prediction model: Based on the output of the two-layer feature enhancement model established in step S3, a time series fusion prediction model is constructed. The time series fusion prediction model uses the encoder and decoder of the long short-term memory network (LSTM) to re-encode multi-source data, and introduces a masked self-attention mechanism to capture the long-range dependency between time series features; the time series fusion prediction model also learns the correlation between external features through the gated residual network (GRN) and outputs the prediction result.
[0023] In a preferred embodiment, the specific process of establishing a time series fusion prediction model in step S4 includes: inputting a feature matrix with correlation weights into the encoder and decoder of a long short-term memory network (LSTM), re-encoding multi-source data to process the differences in data from different scenarios; learning the re-encoded time series features through a masked self-attention mechanism to capture the long-range dependencies between features and prevent the attention mechanism from being interfered by future information during prediction; inputting the extracted time series features into a gated residual network (GRN) module to learn the correlation between external features and output prediction results; wherein the time series fusion prediction model enhances the expressiveness of features through an LSTM encoder-decoder and a masked self-attention mechanism, and uses a multi-head attention mechanism to further capture complex relationships across time steps, thereby realizing migration prediction of multi-type, multi-scenario, and multi-region distributed source and load resources.
[0024] Step S5, establish a probability interval prediction model: Based on the output of the time series fusion prediction model established in step S4, construct a probability interval prediction model, use the quantile regression method to simulate the prediction interval under different confidence levels, quantify the uncertainty of the prediction, and provide more comprehensive uncertainty information for the scheduling of distributed source and load resources.
[0025] In a preferred embodiment, the specific process of establishing a probability interval prediction model in step S5 includes: using the quantile regression method to estimate the conditional quantile of the target variable at different quantile levels based on the input characteristics; estimating the quantile regression coefficient through the least squares optimization problem, and constructing the probability distribution function of the target variable; based on the quantile regression results, simulating the prediction intervals at different confidence levels, and quantifying the uncertainty of the prediction; wherein the probability interval prediction model provides the probability distribution of the target variable through quantile regression, and expresses the prediction uncertainty in the form of a prediction interval, thereby providing more comprehensive decision support for the scheduling of distributed source and load resources.
[0026] In a further embodiment, the method further comprises the following steps: Step S6: Establish a prediction result evaluation index system: Evaluate the prediction results through deterministic indicators and probabilistic prediction indicators to verify the prediction accuracy, stability and transferability of the model.
[0027] In a preferred embodiment, the specific process of establishing the prediction result evaluation index system in step S6 includes: using the symmetric mean absolute percentage error (SMAPE), the coefficient of determination ( ) and normalized root mean square error (NRMSE) as deterministic indicators to evaluate the accuracy of the prediction results; the accuracy rate ( ) and pass rate ( ) indicators to further measure the closeness of the prediction results to the true value; prediction interval coverage probability (PICP), average interval width (AIW) and true coverage width index (TCWI) are used as probabilistic prediction indicators to evaluate the coverage of the prediction interval to the true value and the effectiveness of the interval width. The evaluation indicator system comprehensively verifies the prediction accuracy, stability and transferability of the model by combining deterministic indicators and probabilistic prediction indicators.
[0028] The present invention proposes a distributed source-load resource migration probability interval prediction method based on feature enhancement, in which the gated residual network (GRN) model can effectively measure the nonlinear correlation between external input and prediction target, significantly improving the model's expressive power; the two-layer feature enhancement model integrates statistical and machine learning methods, and realizes end-to-end automatic feature extraction while ensuring the independence between features, thereby enhancing the data's expressive power. In addition, the time series fusion prediction model re-encodes multi-source data through the encoder-decoder of the long short-term memory network (LSTM), and introduces a masked self-attention mechanism to learn deep feature correlations, thereby realizing the migration prediction of distributed source-load resources of multiple types, multiple scenarios, and multiple regions. The probability interval prediction model comprehensively considers multiple uncertainty factors, simulates prediction intervals at different confidence levels, and effectively quantifies the uncertainty information of the prediction.
[0029] Figure 2 The framework of a distributed source-load resource migration probability interval prediction method based on feature enhancement according to an embodiment of the present invention is shown.
[0030] The double-layer feature enhancement model of the present invention can achieve end-to-end automatic feature extraction while isolating the correlation between each feature, effectively improving the accuracy of feature selection. The LSTM codec's ability to re-encode multi-source data enables the model to be applicable to distributed source and load resource prediction tasks of multiple types, multiple scenarios, and multiple regions. The masked self-attention mechanism ensures that when predicting the output at the next moment, the model will not be affected by the input beyond the current moment, thereby enhancing the model's ability to learn the correlation between different time steps. In addition, the Monte Carlo-based probability interval prediction model can simulate prediction intervals at different confidence levels while considering multiple uncertainty factors. This provides more comprehensive uncertainty information for the dispatch of distributed source and load resources in new power systems, further enhancing the reliability and dispatch optimization capabilities of the system.
[0031] The following further describes specific embodiments of the present invention, its algorithm examples and experimental verification.
[0032] A distributed source-load resource migration probability interval prediction method based on feature enhancement, which effectively measures the nonlinear correlation between external input and prediction target through the gated residual network model, and improves the model's expressiveness; the two-layer feature enhancement model integrates statistical and machine learning methods, and realizes end-to-end automatic feature extraction while ensuring the independence between features, and enhances data expression capabilities; the time series fusion prediction model can re-encode the input data of different scenarios, and then realize the migration prediction of distributed source-load resources of multiple types, multiple scenarios and multiple regions, and introduces a masked self-attention mechanism to learn deep feature correlations; the probability interval prediction model can comprehensively consider multiple uncertainty factors, simulate prediction intervals at different confidence levels, and effectively quantify the uncertainty information of the prediction. Specifically, the method includes the following steps: (1) Preprocessing of distributed resource power generation and consumption data and their characteristic variables: The characteristic variables include temperature, humidity, wind speed, working days, holidays and seasons, etc. However, due to intermittent failures or statistical errors of sensors, there may be missing values and outliers in the original data set. To ensure data quality, data preprocessing is first performed, including missing value completion and outlier replacement. The data of the previous timestamp is used to fill the missing values to maintain the temporal continuity of the data, and a reasonable value range is set for each feature, and the data outside the acceptable range is replaced with the data of the previous timestamp. In addition, since the internal environment is affected by various uncontrollable factors and the time lag of distributed resource loads, the power generation and consumption data may fluctuate greatly, thereby affecting the prediction accuracy. To this end, data smoothing is performed to improve the convergence of the model. The specific data smoothing formula is as follows:
[0033] in, express The smoothing result of the moment, express The observed value at time, Indicates the moving window radius. In order to preserve the original information as much as possible, the moving window radius is set to 1. The average value is calculated using the data at the current moment and the timestamps before and after (a total of 15 minutes).
[0034] (2) Establish a gated residual network model: The exact relationship between the external characteristics of distributed source-load resource operation and its generation and consumption load is still unclear, so it is difficult to directly determine which variables are related to it. To this end, a gated residual network model (Gated Residual Network, GRN) is proposed to measure the correlation between external inputs and target variables. GRN combines the ideas of gating mechanism and residual connection, which can flexibly capture nonlinear correlations and enhance the expressiveness of the model.
[0035] The main steps of building a GRN model are: 1. Combine the preprocessed data with the context vector, add a bias term, and generate an intermediate layer through an activation function ; 2. For the middle layer Applying the weight transformation and adding the bias term, we get ; 3. The input is sent to the gated linear unit, combined with the initial features, and passed through the regularization layer to obtain the output of the GRN.
[0036] The input of GRN is the initial features and an optional context vector :
[0037] in, is the exponential linear unit activation function, and It is the middle layer. is the regularization layer, is an index representing weight sharing. When ELU acts as a feature recognition function, When , the ELU acts as an activation function and produces a constant output, thus exhibiting linear layer behavior.
[0038] When constructing the GRN model, we also introduced the Gated Linear Units (GLU) to flexibly suppress the impact of negative values, alleviate the gradient vanishing problem, and improve the stability of network training. is the input of GLU, and the response formula of its gating mechanism is as follows:
[0039] in, is the weight matrix, is the deviation term, is the sigmoid activation function, is the Hadamard product.
[0040] GLU enables the prediction model to dynamically control the initial features of GRN This layer has the ability to adaptively adjust and can output approximately zero when necessary, thereby effectively suppressing nonlinear contributions and enabling GRN to skip this layer directly when no additional transformation is required. In addition, for instances without context vectors, GRN only converts Treated as zero.
[0041] The gated residual network model established in step (2) is used to establish the double-layer feature enhancement model in step (3) and the time series fusion prediction model in step (4).
[0042] (3) Establish a two-layer feature enhancement model: In the prediction of power generation and consumption of distributed source and load resources, the impact of input variables on the prediction results is often unclear, and the contribution of different features may vary greatly. To solve this problem, a two-layer feature enhancement model is proposed to assign weights to each variable through feature engineering. In this model, statistics and machine learning are combined, and high-order partial correlation analysis is introduced as prior knowledge. The high-order partial correlation coefficients between variables are calculated before each round of machine learning training. Under the premise of excluding the correlation between the features, the model can dynamically adjust the weight value of each feature.
[0043] The main steps of establishing a two-layer feature enhancement model are: 1. Calculate the high-order partial correlation coefficient of each feature and input it into the Softmax activation function together with the features processed by GRN to obtain the feature weight matrix of the first stage ; 2. In the same time step, each initial feature is input into its corresponding GRN to obtain the feature vector after nonlinear transformation ; 3. Using the weight matrix For the feature vector Weighted to obtain a feature matrix with correlation weights .
[0044] The partial correlation coefficient of any two variables among the three variables is calculated after excluding the influence of the remaining variable, which is called the first-order partial correlation coefficient. The calculation formula is as follows:
[0045] in, is a variable and The simple correlation coefficient between is a variable and The simple correlation coefficient between is a variable and The simple correlation coefficient between .
[0046] If you have variables , then for any two orders Variables and , and its high-order partial correlation coefficient calculation formula is:
[0047] The right side of the equal sign is The higher-order partial correlation coefficient of . It is excluding variables After the influence of i and j The partial correlation coefficient between . It is excluding variables After the influence of i and j The partial correlation coefficient between . It is excluding variables After the influence of i and The partial correlation coefficient between . It is excluding variables After the influence of j and The partial correlation coefficient between . The higher-order partial correlation coefficient after taking the absolute value is It is irrelevant when When is weakly correlated, The correlation is moderate when When is strongly correlated.
[0048] Then, the calculated higher-order partial correlation coefficient The features after GRN nonlinear transformation are used as the initial input and normalized after activation by Softmax function:
[0049] in, is the weight matrix after the first layer feature selection mechanism.
[0050] At each time step, each original feature is also input into its corresponding GRN for additional nonlinear feature capture:
[0051] in, is the original variable After GRN processing and nonlinear capture of the feature vector, each The weights of are shared across all time steps.
[0052] Finally, according to the weight matrix For the feature vector Weighted and merged, a feature matrix with correlation weights is obtained : .
[0053] The proposed two-layer feature enhancement model combines the advantages of statistics and machine learning. It quantifies the correlation between features at the statistical level through high-order partial correlation analysis, and uses GRN to flexibly process complex features and effectively resist noise interference. In addition, the model also integrates the correlation coefficient into the end-to-end neural network framework, which not only enhances the model's ability to select key features, but also reduces its dependence on large-scale data.
[0054] The two-layer feature enhancement model established in step (3) is used to weight the original features and is used as an input variable in step (4).
[0055] (4) Establishing a time series fusion prediction model: In the time series prediction task of distributed source and load resources, although there are certain differences in power generation and consumption data in different scenarios, they often have strong similarities in external influencing factors and pattern characteristics. To address this phenomenon, a time series fusion prediction model is proposed, which automatically processes the differences between data through the encoder and decoder of the Long Short-Term Memory (LSTM) network, and then introduces a masked self-attention mechanism to learn the association between features, so as to achieve efficient end-to-end distributed source and load resource power generation and consumption prediction.
[0056] The main steps of establishing a time series fusion prediction model are: 1. Input the feature matrix with correlation weights into the LSTM encoder and decoder respectively to re-encode the data from multiple sources; 2. Learn the re-encoded time series features through the masked self-attention mechanism to capture the long-range dependencies between features; 3. Input the extracted time series features into the GRN for further learning and output the predicted power load value.
[0057] First, use LSTM encoder and decoder as the core module to convert historical time periods Input encoder, and will predict the future time period is input into the decoder, thereby generating a set of uniform temporal features as the input of the masked self-attention mechanism. These features are Indicates that is the position index. In addition, in order to enhance the expressiveness of features, a gated jump connection is used in each layer of the model, and is implemented by the following formula:
[0058] in, represents the features processed by the gating mechanism, , represents the number of time steps ahead to predict at time t.
[0059] Then, the re-encoded features are input into the self-attention mechanism to learn the correlation between the features. In order to improve the "distraction" problem in the traditional self-attention mechanism and learn the relationship between different time steps more accurately, a masked self-attention mechanism is proposed. Generally speaking, the attention mechanism scales the value (V) by the relationship between the key (K) and the query (Q), which is calculated as follows:
[0060] in, is a normalization function. The traditional normalization function causes the attention mechanism to see the complete input when predicting. In order to prevent it from being "distracted", the mask matrix M is introduced so that it cannot see the input beyond the next moment when predicting the output of the next moment:
[0061] in, is the dimension of the key K, which is used to scale the calculation to prevent the gradient from disappearing due to the inner product value being too large. When No attention ;when When focus on .
[0062] In order to further enhance the model's ability to capture complex relationships across time steps, the self-attention mechanism is extended to the multi-head attention framework. Specifically, the value weight matrix is shared among all attention heads. , and uses additive aggregation to merge the attention outputs of each head. The calculation method of the multi-head attention mechanism is as follows:
[0063] in, is the aggregated attention output, is the output weight matrix, is the shared value weight matrix. It can be seen that the final output of the interpretable multi-head attention is similar to that of the single-layer attention layer. The key difference is the calculation of the attention weights. The method is defined as follows:
[0064] in, is the number of attention heads, and It is The weight matrix of the query and key corresponding to the attention head. Finally, the calculation formula of the self-attention mechanism with mask is obtained: .
[0065] After the above feature re-encoding and feature extraction of the self-attention mechanism, the aggregated output Input into the GRN module, use GRN to learn the correlation between external features, and output the corresponding prediction results.
[0066] The time series fusion prediction model established in step (4) is used to establish the probability interval prediction model in step (5).
[0067] (5) Establish a probability interval prediction model: Since distributed load resources are affected by multiple uncertain factors such as weather conditions, user behavior and holidays, it is proposed to establish a probability interval prediction model to provide the probability distribution function of the target variable and simulate the prediction intervals (PI) at different confidence levels, so as to effectively quantify the uncertainty of the prediction.
[0068] Quantile regression is a method that considers the probability distribution of samples. It can provide regression results at specific quantile points. The uncertainty of the prediction results is usually expressed by a bounded closed interval. For a given bounded closed interval real variable, the symbol is used to represent the value range of the variable, which is defined as follows:
[0069] in, and denote the lower and upper bounds of interval variables, respectively. Represents the set of real numbers.
[0070] Assumptions represents the power load demand of distributed resources, represents the input features, when The value is When , the quantile regression estimates The value at the corresponding quantile point This approach can provide , and express the forecast uncertainty through intervals, thus forming confidence intervals for probabilistic forecasts. For example, if the forecast error Obey the Gaussian distribution and calculate At the 0.05 quantile and 0.95 quantile, we can establish The 90% confidence interval of . The quantile regression model can be expressed as:
[0071] in, Represents a given hour In quantile The conditional quantile at . The parameter vector The regression coefficients for a specific quantile are defined, represents the quantile level. The parameter vector The estimation problem can be transformed into a least squares optimization problem:
[0072] in, is the sample number. This formula is embedded in the prediction model as the loss function to achieve regression prediction for a specific quantile and calculate the confidence interval of the load probability prediction of distributed resources.
[0073] (6) Establish a prediction result evaluation indicator system: (6-1) Certainty indicators: This method uses the symmetric mean absolute percentage error (SMAPE), the coefficient of determination ( ) and normalized root mean square error (NRMSE) to evaluate the accuracy of the prediction results. The definitions and calculations of these evaluation indicators are as follows:
[0074] in, is the predicted value, is the true value, is the mean of the true values.
[0075] We also introduced the accuracy ( ) and pass rate ( ) indicators, as follows:
[0076] in, It is a judgment indicator. is the maximum output of distributed resources in this time period, is the threshold coefficient.
[0077] (6-2) Probability prediction indicators: This method introduces the prediction interval coverage probability (PICP), average interval width (AIW) and true coverage width index (TCWI) to evaluate the effectiveness of the probability interval. The definitions and calculations of these evaluation indicators are as follows:
[0078]
[0079] in, is the indicator function, is the true value, is the predicted value, is the number of predicted samples, and represent the upper and lower bounds of the prediction interval, respectively.
[0080] To evaluate the performance, tests were conducted in four different scenarios: photovoltaic power generation, wind power generation, electric vehicle charging stations, and integrated energy systems. The time interval of each data set is 15 minutes, involving complex external influencing factors such as weather and equipment status. The data set is divided into 80% training set and 20% test set in chronological order. Table 1 shows that when the model migration after large-scale optimization only for photovoltaic power generation scenarios is applied to load forecasting for wind power generation, electric vehicle charging stations, and integrated energy systems, its prediction performance only shows a slight decrease, showing good stability and migration. In all scenarios, More than 85%, The PICP (90%) is higher than 90%, and the core indicators fully verify the portability and robustness of the proposed method in the prediction of power generation and consumption of distributed source and load resources in multiple types, multiple scenarios and multiple regions.
[0081] Table 1 Evaluation indicators of the method of the present invention transferred to different scenarios
[0082] Figure 3 The prediction results of the method of the present invention in four different scenarios are shown. 70%PI, 80%PI and 90%PI represent the prediction interval PI generated by the prediction model at the confidence levels of 70%, 80% and 90%, respectively. It can be seen that without adjusting the hyperparameters, the prediction intervals at different confidence levels can cover the true values well (the aforementioned prediction interval coverage probability PICP is used to evaluate the proportion of the true value that actually falls within the prediction interval. The PICP (90%) data in Table 1 is a quantitative evaluation of the prediction interval coverage capability at a 90% confidence level). This proves that the method proposed in the present invention successfully extracts time and external influence features through its unique components, thereby providing a more reliable, more robust and more mobile probability prediction of distributed source and load resources for power generation and consumption.
[0083] An embodiment of the present invention further provides a storage medium for storing a computer program, which at least performs the above method when executed.
[0084] An embodiment of the present invention further provides a control device, comprising a processor and a storage medium for storing a computer program; wherein the processor is configured to execute at least the method described above when executing the computer program.
[0085] An embodiment of the present invention further provides a processor, wherein the processor executes a computer program and at least executes the method described above.
[0086] The storage medium can be implemented by any type of non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The storage medium described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.
[0087] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0088] The units described above 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 distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0089] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0090] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.
[0091] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
[0092] The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0093] The features disclosed in several product embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new product embodiments.
[0094] The features disclosed in several method or device embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0095] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art of the present invention, several equivalent substitutions or obvious variations can be made without departing from the concept of the present invention, and the performance or use is the same, which should be regarded as belonging to the protection scope of the present invention.
Claims
1. A distributed source-load resource migration probability interval prediction method based on feature enhancement, characterized in that: The following steps are involved: S1. Preprocessing the time series data of power generation and consumption data of distributed source and load resources and their related characteristic variables; S2. Establish a gated residual network (GRN) that combines the gating mechanism and residual connection to measure the nonlinear correlation between external input and prediction target, thereby enhancing the model's expressiveness and training stability. S3. Based on the output of the gated residual network model, a two-layer feature enhancement model is constructed. The correlation between features is quantified through statistical high-order partial correlation analysis. In combination with the nonlinear feature processing capability of machine learning, the weight of each feature is dynamically adjusted to achieve end-to-end automatic feature extraction and enhance data expression capability. S4. Based on the output of the two-layer feature enhancement model, a time series fusion prediction model is constructed. The time series fusion prediction model uses a long short-term memory network (LSTM) encoder and decoder to re-encode multi-source data, and introduces a masked self-attention mechanism to capture the long-range dependency between time series features; the time series fusion prediction model also learns the correlation between external features through the gated residual network (GRN) and outputs a prediction result; S5. Based on the output of the time series fusion prediction model, a probability interval prediction model is constructed, and the quantile regression method is used to simulate the prediction intervals under different confidence levels, quantify the uncertainty of the prediction, and provide more comprehensive uncertainty information for the scheduling of distributed source and load resources.
2. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The data preprocessing in step S1 includes: Fill missing values in the time series data of distributed source and load resource power generation and consumption data and related characteristic variables, and use the data of the previous timestamp to fill the current missing values to maintain the temporal continuity of the data; Replace the outliers that are beyond the reasonable value range with the data of the previous timestamp; The power generation and consumption data is smoothed by calculating the average value of the observations at the current time and its previous and subsequent timestamps to reduce the impact of data fluctuations on prediction accuracy.
3. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The specific process of establishing the gated residual network model (GRN) in step S2 includes: Combine the preprocessed data with the context vector and generate the intermediate layer through the activation function; Apply weight transformation to the intermediate layer to obtain the further processed intermediate layer; The intermediate layer is input into the gated linear unit (GLU) and combined with the initial features to obtain the output of the GRN through regularization. Among them, the gated residual network model measures the nonlinear correlation between external input and target variables by introducing gating mechanism and residual connection, thereby enhancing the expressive power of the model; the gated linear unit is used to flexibly suppress the influence of negative values, alleviate the gradient vanishing problem, and improve the stability of network training.
4. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The specific process of establishing the double-layer feature enhancement model in step S3 includes: Calculate the high-order partial correlation coefficients between each feature and quantify the correlation between features through statistical methods; Combine the high-order partial correlation coefficient with the features processed by the gated residual network (GRN), input the Softmax activation function, and obtain the feature weight matrix; In the same time step, each initial feature is input into the corresponding GRN for nonlinear transformation to obtain the feature vector; The feature vectors are weighted using the feature weight matrix to obtain a feature matrix with correlation weights as the input of the subsequent model.
5. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The specific process of establishing the time series fusion prediction model in step S4 includes: The feature matrix with correlation weights is input into the encoder and decoder of the long short-term memory network (LSTM) to re-encode the multi-source data to handle the differences in data from different scenarios; The re-encoded temporal features are learned through a masked self-attention mechanism to capture the long-range dependencies between features and prevent the attention mechanism from being disturbed by future information during prediction. The extracted temporal features are input into the gated residual network (GRN) module to learn the correlation between the external features and output the prediction results.
6. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The specific process of establishing the probability interval prediction model in step S5 includes: The quantile regression method is used to estimate the conditional quantile of the target variable at different quantile levels based on the input features; The quantile regression coefficients are estimated through the least squares optimization problem and the probability distribution function of the target variable is constructed; Based on the quantile regression results, prediction intervals at different confidence levels are simulated to quantify the uncertainty of the prediction.
7. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 1 is characterized in that: The following steps are also included: S6. Establish a prediction result evaluation index system: Evaluate the prediction results through deterministic indicators and probabilistic prediction indicators to verify the prediction accuracy, stability and transferability of the model.
8. The method for predicting the probability interval of distributed source and load resource migration based on feature enhancement according to claim 7 is characterized in that: The specific process of establishing the prediction result evaluation index system in step S6 includes: The symmetric mean absolute percentage error SMAPE and the coefficient of determination are used. and normalized root mean square error NRMSE as deterministic indicators to evaluate the accuracy of the prediction results; Introducing accuracy and pass rate Indicators, further measure the closeness of the predicted results to the true value; The prediction interval coverage probability PICP, average interval width AIW and true coverage width index TCWI are used as probability prediction indicators to evaluate the coverage ability of the prediction interval for the true value and the effectiveness of the interval width.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting the probability interval of distributed source and load resource migration based on feature enhancement as described in any one of claims 1 to 8 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting the probability interval of distributed source and load resource migration based on feature enhancement as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Multi-feature multi-modal fusion tight gas reservoir yield deep learning prediction method
CN119129648A
Combined learning method and apparatus using deepening neural network based feature enhancement and modified loss function for speaker recognition robust to noisy environments
US20220208198A1