A distributed energy power generation power prediction method and system based on time-frequency characteristics

By using a prediction method based on time-frequency characteristics, the dependency and time-frequency characteristics of distributed energy are extracted by utilizing the self-attention layer and STFT layer, which solves the problem of poor prediction performance in the existing technology and achieves more efficient and accurate power generation prediction.

CN119990389BActive Publication Date: 2025-12-30STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411836147.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-12-30
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Existing methods for predicting distributed energy generation power, which use models such as one-dimensional convolutional neural networks and recurrent neural networks, have difficulty capturing the dependencies between long-term, large-scale historical distributed energy generation data, resulting in poor prediction performance.

Method used

A prediction method based on time-frequency features is adopted. The self-attention layer and STFT layer of the encoder are used to extract the dependency features and time-frequency features of the sequence. Combined with sparse operations, the power generation sequence of distributed energy nodes is predicted by the decoder. The introduction of self-attention mechanism and STFT effectively captures the dependency relationship between long-term and large-scale data.

Benefits of technology

It improves the accuracy of distributed energy generation power prediction, reduces the risk of data overfitting, and accelerates training and prediction speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990389B_ABST
    Figure CN119990389B_ABST
Patent Text Reader

Abstract

A distributed energy power generation power prediction method and system based on time-frequency characteristics, collect the historical power generation time series data of the distributed energy node to be predicted; input the historical power generation time series data into the encoder, the self-attention layer of the encoder extracts the sequence dependence feature, and the STFT layer of the encoder extracts the sequence time-frequency feature; then add the historical power generation time series data and the sequence dependence feature extracted by the self-attention layer of the encoder and the sequence time-frequency feature extracted by the STFT layer of the encoder, obtain the output encoding result of the encoder through the feedforward layer; finally, based on the output encoding result of the encoder, use the decoder to predict the power generation sequence of the distributed energy node. The application effectively captures the dependence relationship and time-frequency characteristics between long-term and large amount of distributed energy historical power generation data by using the self-attention mechanism and STFT, and introduces the sparse operation, effectively reduces the data operation amount, and improves the accuracy of sequence prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power systems, specifically relating to a method and system for predicting the power generation of distributed energy sources based on time-frequency characteristics. Background Technology

[0002] In recent years, distributed energy generation has become an important part of the power system. Distributed energy power stations such as photovoltaic power stations and wind power stations can not only effectively utilize natural resources and provide a considerable power supply to the power grid, but also reduce carbon emissions and help the power grid transform towards green and low-carbon development.

[0003] The power generation information of distributed energy sources is of great reference value for the planning, dispatching, and maintenance of the power grid. Forecasting the power generation of each distributed energy node in advance can assist managers in making grid dispatching decisions, thus making the forecasting of distributed energy power generation crucial. Existing power generation forecasting methods mainly use models such as one-dimensional convolutional neural networks and recurrent neural networks. These models have difficulty capturing the dependencies between long-term, large-scale historical power generation data of distributed energy sources, resulting in unsatisfactory predictive performance. Summary of the Invention

[0004] The purpose of this invention is to address the aforementioned problems in the existing technology by providing a method and system for predicting the power generation of distributed energy sources based on time-frequency characteristics.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention proposes a method for predicting the power generation of distributed energy sources based on time-frequency characteristics, comprising:

[0007] S1. Collect historical power generation time-series data of the distributed energy nodes that need to be predicted;

[0008] S2. Input the historical power generation time series data into the encoder. The encoder's self-attention layer extracts the sequence dependency features, and the encoder's STFT layer extracts the time-frequency features of the sequence.

[0009] S3. Add the historical power generation time series data, the sequence dependency features extracted by the encoder's self-attention layer, and the sequence time-frequency features extracted by the encoder's STFT layer, and obtain the encoder's output coding result through the feedforward layer.

[0010] S4. Based on the encoder's output encoding results, use the decoder to predict the power generation sequence of distributed energy nodes.

[0011] In S2, the self-attention layer of the encoder includes a one-dimensional convolutional layer and a sparse self-attention layer;

[0012] The encoder's self-attention layer extracts the sequence's dependency features, including:

[0013] A1. Using a one-dimensional convolutional layer, the temporal features of sequence x[n] are extracted using the following formula:

[0014]

[0015] In the above formula, y conv [t] represents the temporal features of the sequence extracted by the one-dimensional convolutional layer, K is the length of the convolutional kernel, wk is the convolutional kernel of length k, and t is time;

[0016] A2. The sparse self-attention layer maps the temporal features of the sequence extracted by the one-dimensional convolutional layer into a query matrix q through a linear layer. t key matrix k t and the value matrix v t Introducing sparse operations to transform matrix q t Sparsification yields a sparse query matrix. The dependency features of sequence x[n] are extracted using the following formula:

[0017]

[0018] In the above formula, Atten represents the sequence-dependent features extracted by the self-attention layer, σ(·) is the activation function, and k T For the key matrix k t transpose, dim t Let q be the query matrix. t The dimension;

[0019] The encoder's STFT layer extracts the time-frequency features of the sequence, including:

[0020] B1. Randomly select several sets of STFT parameters, including the number of points in a first discrete Fourier transform, the window function, and the step size of the window function. Perform a short-time Fourier transform on the sequence x[n] using the following formula to obtain the short-time Fourier transform results of several sequences x[n]:

[0021]

[0022] In the above formula, X[m, k] is the short-time Fourier transform result at the time period index m and the frequency component index k, m is the index of the window function time period, k is the index of the frequency component in the Fourier transform, w[n-mR] is the window function, R is the moving step size of the window function, j is the imaginary number, and N is the number of points in the first discrete Fourier transform in the STFT.

[0023] B2. Compare the short-time Fourier transform results of several sequences x[n], and select the short-time Fourier transform results with frequency resolution higher than the threshold δ or time resolution higher than the threshold ε to concatenate them into a matrix. And for the matrix Perform random sampling to reduce its dimension to a matrix. The time-frequency features of sequence x[n] are extracted using the following formula:

[0024]

[0025] In the above formula, Q represents the sequence time-frequency features extracted by the STFT layer, and STFT... -1 This is the inverse transform of STFT, Padding(·) is the zero-padding operation, and Conv(·) is the convolution operation.

[0026] S3 includes:

[0027] S31. Take the second half of the historical power generation time series data x[n], and pad it with zeros until the length is the same as the original x[n]. Denote this sequence as x. de,in ;

[0028] S32, take sequence x de,in The inputs are respectively fed into the self-attention layer and STFT layer of the decoder for sequence dependency feature extraction and time-frequency feature extraction, to obtain sequence x. de,in Atten de and time-frequency characteristic matrix Q de ;

[0029] S33. Based on the sequence dependency features and time-frequency features extracted from the self-attention layer and STFT layer of the decoder, combined with the historical power generation time series data x[n], the sequence is decomposed using the following formula:

[0030] x t [n]=AvgPool(Padding(x[n]+ReduceDim(Atten de +Q de ));

[0031] x s [n]=Padding(x[n])+ReduceDim(Atten de +Q de )-x t [n];

[0032] In the above formula, x t [n] represents the trend term, AvgPool(·) is the average pooling operation, Padding(·) is the zero-padding operation, ReduceDim(·) is the dimensionality reduction operation, and xs [n] represents the seasonal term;

[0033] S34. Combine the seasonal terms after sequence decomposition with the encoder output x. en The time-frequency feature layer input to the decoder is subjected to sparse operations for time-frequency feature self-attention and sequence self-attention. The time-frequency self-attention output and the sequence self-attention output are then added together to obtain the time-frequency feature layer output.

[0034] y t,f [n] = y s [n]+y f [n];

[0035] In the above formula, y t,f [n] represents the output of the time-frequency feature layer, y f [n] represents the time-frequency feature self-attention output, y s [n] represents the sequence self-attention output;

[0036] S35. Add the output of the time-frequency feature layer and the seasonal term obtained from the sequence decomposition in step S33. Use the following formula to perform sequence decomposition on the result of the addition to obtain the seasonal components:

[0037]

[0038] In the above formula, As a trend component, For seasonal quantities;

[0039] S36. The seasonal components after sequence decomposition are passed through a feedforward neural network to obtain feature sequences of aggregation dependency features and time-frequency features. These feature sequences are then added to the historical power generation time-series data x[n] to obtain the decoder output x. de The decoder output is the predicted power generation sequence of the distributed energy nodes.

[0040] In step S34, the time-frequency feature self-attention operation includes:

[0041] C1. Through a linear layer, the seasonal terms after sequence decomposition are mapped to a query matrix q, and the encoder output x is encoded. en Mapped to a value matrix v and a key matrix k;

[0042] C2. Input matrices q, v, and k into the STFT layer of the decoder for short-time Fourier transform, and introduce sparsity operations to sparsify matrices q, v, and k to obtain the time-frequency matrix. The time-frequency self-attention is calculated using the following formula:

[0043]

[0044] In the above formula, Atten f For time-frequency self-attention, σ(·) is the activation function. For matrix transpose, dim f For matrix The dimension;

[0045] C3. The time-frequency self-attention output y is obtained by performing zero-padding and STFT inverse transformation on the time-frequency self-attention using the following formula. f [n]:

[0046] y f [n] = STFT -1 (Padding(Atten f ));

[0047] Sequence self-attention operations include:

[0048] D1. Pass the seasonal terms after sequence decomposition through a one-dimensional convolutional layer of the decoder to obtain the temporal features of the seasonal terms, and then pass them through a linear layer to map the temporal features of the seasonal terms into a query matrix q. t ′, which encodes the encoder's output result x. en Mapped to the value matrix v t ′、key matrix k t ', Introducing sparse operations to transform matrix q t Sparsification is performed to obtain a sparse query matrix. Sequence self-attention is calculated using the following formula:

[0049]

[0050] In the above formula, Atten s For sequence self-attention, (k t ′) T For matrix k t The transpose of ', dim s For matrix q t The dimension of ′;

[0051] D2. The sequence self-attention input is fed into a one-dimensional convolutional layer and a pooling layer using the following formula to obtain the sequence self-attention output y. s [n]:

[0052] y s [n] = Pooling(Conv1d(Atten) s ));

[0053] In the above formula, Pooling(·) is a one-dimensional convolution operation, and Convld(·) is a pooling operation.

[0054] Secondly, this invention proposes a distributed energy power generation prediction system based on time-frequency characteristics, including a historical power generation time-series data collection module, an encoder feature extraction module, an encoding result output module, and a decoder power prediction module.

[0055] The historical power generation time series data collection module is used to collect historical power generation time series data of distributed energy nodes that need to be predicted.

[0056] The encoder feature extraction module is used to input historical power generation time series data into the encoder. The encoder's self-attention layer extracts the sequence dependency features, and the encoder's STFT layer extracts the time-frequency features of the sequence. The encoder's self-attention layer includes a one-dimensional convolutional layer and a sparse self-attention layer.

[0057] The encoding result output module is used to add the historical power generation time series data and the sequence dependency features extracted by the encoder's self-attention layer and the sequence time-frequency features extracted by the encoder's STFT layer, and obtain the encoder's output encoding result through the feedforward layer;

[0058] The decoder power prediction module is used to predict the power generation sequence of distributed energy nodes based on the encoder's output encoding results.

[0059] The encoder feature extraction module includes a dependency feature extraction unit and a time-frequency feature extraction unit;

[0060] The dependency feature extraction unit is used to extract dependency features of the sequence from the self-attention layer of the encoder, including:

[0061] A1. Using a one-dimensional convolutional layer, the temporal features of sequence x[n] are extracted using the following formula:

[0062]

[0063] In the above formula, y conv [t] represents the temporal features extracted by the one-dimensional convolutional layer, K is the length of the convolutional kernel, and w k Let be a convolution kernel of length k, and t be time.

[0064] A2. The sparse self-attention layer maps the temporal features of the sequence extracted by the one-dimensional convolutional layer into a query matrix q through a linear layer. t key matrix k t and the value matrix v t Introducing sparse operations to transform matrix q t Sparsification yields a sparse query matrix. The dependency features of sequence x[n] are extracted using the following formula:

[0065]

[0066] In the above formula, Atten represents the sequence-dependent features extracted by the self-attention layer, σ(·) is the activation function, and k T For the key matrix k t transpose, dim t Let q be the query matrix. t The dimension;

[0067] The time-frequency feature extraction unit is used to extract the time-frequency features of the sequence from the STFT layer of the encoder, including:

[0068] B1. Randomly select several sets of STFT parameters, including the number of points in a first discrete Fourier transform, the window function, and the step size of the window function. Perform a short-time Fourier transform on the sequence x[n] using the following formula to obtain the short-time Fourier transform results of several sequences x[n]:

[0069]

[0070] In the above formula, X[m, k] is the short-time Fourier transform result at the time period index m and the frequency component index k, m is the index of the window function time period, k is the index of the frequency component in the Fourier transform, w[n-mR] is the window function, R is the moving step size of the window function, j is the imaginary number, and N is the number of points in the first discrete Fourier transform in the STFT.

[0071] B2. Compare the short-time Fourier transform results of several sequences x[n], and select the short-time Fourier transform results with frequency resolution higher than the threshold δ or time resolution higher than the threshold ε to concatenate them into a matrix. And for the matrix Perform random sampling to reduce its dimension to a matrix. The time-frequency features of sequence x[n] are extracted using the following formula:

[0072]

[0073] In the above formula, Q represents the sequence time-frequency features extracted by the STFT layer, and STFT... -1 This is the inverse transform of STFT, Padding(·) is the zero-padding operation, and Conv(·) is the convolution operation.

[0074] The decoder power prediction module includes a sequence zero-padding unit, a feature extraction unit, a sequence decomposition unit, a time-frequency feature layer output unit, a seasonal component calculation unit, and a decoder output unit;

[0075] The sequence zero-padding unit is used to take the second half of the historical power generation time series data x[n] and pad it with zeros until the length is the same as the original x[n]. This sequence is denoted as x. de,in ;

[0076] The feature extraction unit is used to extract sequence x de,in The inputs are respectively fed into the self-attention layer and STFT layer of the decoder for sequence dependency feature extraction and time-frequency feature extraction, to obtain sequence x. de,in Atten de and time-frequency characteristic matrix Q de ;

[0077] The sequence decomposition unit is used to perform sequence decomposition based on the sequence dependency features and time-frequency features extracted from the self-attention layer and STFT layer of the decoder, combined with historical power generation time-series data x[n], using the following formula:

[0078] x t [n]=AvgPool(Padding(x[n])+ReduceDim(Atten de +Q de ));

[0079] x s [n]=Padding(x[n])+ReduceDim(Atten de +Q de )-x t [n];

[0080] In the above formula, x t [n] represents the trend term, AvgPool(·) is the average pooling operation, Padding(·) is the zero-padding operation, ReduceDim(·) is the dimensionality reduction operation, and x s [n] represents the seasonal term;

[0081] The time-frequency feature layer output unit is used to encode the seasonal term after sequence decomposition and the encoder output result x. en The time-frequency feature layer input to the decoder is subjected to sparse operations for time-frequency feature self-attention and sequence self-attention. The time-frequency self-attention output and the sequence self-attention output are then added together to obtain the time-frequency feature layer output.

[0082] y t,f [n] = y s [n]+y f [n];

[0083] In the above formula, y t,f [n] represents the output of the time-frequency feature layer, yf [n] represents the time-frequency feature self-attention output, y s [n] represents the sequence self-attention output;

[0084] The seasonal component calculation unit is used to add the output of the time-frequency feature layer and the seasonal term from the sequence decomposition, and then performs sequence decomposition on the result of the addition using the following formula to obtain the seasonal component:

[0085]

[0086] In the above formula, As a trend component, For seasonal quantities;

[0087] The decoder output unit is used to pass the seasonal components after sequence decomposition through a feedforward neural network to obtain a feature sequence of aggregation dependency features and time-frequency features, and then add this feature sequence to the historical power generation time series data x[n] to obtain the decoder output x. de The decoder output is the predicted power generation sequence of the distributed energy nodes.

[0088] In the time-frequency feature layer output unit, the time-frequency feature self-attention operation includes:

[0089] C1. Through a linear layer, the seasonal terms after sequence decomposition are mapped to a query matrix q, and the encoder output x is encoded. en Mapped to a value matrix v and a key matrix k;

[0090] C2. Input matrices q, v, and k into the STFT layer of the decoder for short-time Fourier transform, and introduce sparsity operations to sparsify matrices q, v, and k to obtain the time-frequency matrix. The time-frequency self-attention is calculated using the following formula:

[0091]

[0092] In the above formula, Atten f For time-frequency self-attention, σ(·) is the activation function. For matrix transpose, dim f For matrix The dimension;

[0093] C3. The time-frequency self-attention output y is obtained by performing zero-padding and STFT inverse transformation on the time-frequency self-attention using the following formula. f [n]:

[0094] y f [n] = STFT -1(Padding(Atten f ));

[0095] Sequence self-attention operations include:

[0096] D1. Pass the seasonal terms after sequence decomposition through a one-dimensional convolutional layer of the decoder to obtain the temporal features of the seasonal terms, and then pass them through a linear layer to map the temporal features of the seasonal terms into a query matrix q. t ′, which encodes the encoder's output result x. en Mapped to the value matrix v t ′、key matrix k t ', Introducing sparse operations to transform matrix q t Sparsification is performed to obtain a sparse query matrix. Sequence self-attention is calculated using the following formula:

[0097]

[0098] In the above formula, Atten s For sequence self-attention, (k t ′)T is a matrix k t The transpose of ', dim s For matrix q t The dimension of ′;

[0099] D2. The sequence self-attention input is fed into a one-dimensional convolutional layer and a pooling layer using the following formula to obtain the sequence self-attention output y. s [n]:

[0100] y s [n] = Pooling(Convld(Atten) s ));

[0101] In the above formula, Pooling(·) is a one-dimensional convolution operation, and Convld(·) is a pooling operation.

[0102] Thirdly, the present invention proposes a distributed energy power generation prediction device based on time-frequency characteristics, including a processor and a memory;

[0103] The memory is used to store computer program code and to transmit the computer program code to the processor;

[0104] The processor is used to execute the aforementioned distributed energy generation power prediction method based on time-frequency characteristics according to the instructions in the computer program code.

[0105] Fourthly, the present invention provides a computer storage medium on which a computer program is stored;

[0106] When the computer program is executed by the processor, it implements the steps of the aforementioned distributed energy generation power prediction method based on time-frequency characteristics.

[0107] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0108] 1. This invention proposes a method and system for predicting distributed energy generation power based on time-frequency features. The method first collects historical power generation time-series data of the distributed energy nodes to be predicted. This historical power generation time-series data is then input into an encoder. The encoder's self-attention layer extracts the sequence dependency features, and its STFT layer extracts the time-frequency features. Next, the historical power generation time-series data, the sequence dependency features extracted by the encoder's self-attention layer, and the sequence time-frequency features extracted by the encoder's STFT layer are added together, and the encoder's output encoding result is obtained through a feedforward layer. Finally, based on the encoder's output encoding result, a decoder is used to predict the power generation sequence of the distributed energy nodes. This method effectively captures the dependencies and time-frequency features between long-term, large-scale historical distributed energy generation data using the self-attention mechanism and STFT, improving the accuracy of sequence prediction.

[0109] 2. This invention proposes a method and system for predicting the power generation of distributed energy sources based on time-frequency characteristics. This method introduces sparse operations in both the encoding and decoding stages of the sequence, which can effectively reduce the amount of data computation and accelerate the training and prediction speed of the sequence while preventing data overfitting. Attached Figure Description

[0110] Figure 1 This is an overall flowchart of the method described in this invention.

[0111] Figure 2 This is a diagram illustrating the computational process of time-frequency feature self-attention as described in Example 1.

[0112] Figure 3 This is a structural diagram of the system described in this invention.

[0113] Figure 4 This is a structural diagram of the device described in Example 3. Detailed Implementation

[0114] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0115] This invention proposes a method and system for predicting the power generation of distributed energy nodes based on time-frequency features. The method involves acquiring and processing historical power generation time-series data of the distributed energy nodes to be predicted. The processed historical power generation time-series data is then input into an encoder module based on a time-frequency feature Transformer for self-attention-based sequence dependency feature extraction and short-time Fourier transform time-frequency feature extraction. Finally, the extracted dependency features and time-frequency features are input into a decoder module based on a time-frequency feature Transformer to obtain the power generation prediction results of the distributed energy nodes.

[0116] Example 1:

[0117] like Figure 1 As shown, a method for predicting the power generation of distributed energy sources based on time-frequency characteristics is performed in the following steps:

[0118] 1. Collect historical power generation time-series data of the distributed energy nodes that need to be predicted;

[0119] The historical power generation data of the distributed energy nodes that need to be predicted are represented in time series as follows: Where x[n] represents the historical power generation time series data, and n is the index of the time series data point. Let be the set of real numbers, and d be the number of points in the historical power generation data.

[0120] 2. Input the historical power generation time series data into the encoder. The encoder's self-attention layer extracts the sequence dependency features, and the encoder's STFT layer extracts the time-frequency features of the sequence.

[0121] The Transformer encoder consists of several different coding layers. Except for the first layer, which takes the original data as input, each coding layer in the encoder takes the output of the previous layer as its input.

[0122] The Transformer encoder's self-attention layer comprises one-dimensional convolutional layers and sparse self-attention layers, used to extract sequence dependency features, including:

[0123] Let the convolution kernel of a one-dimensional convolutional layer be W = [w1, ..., w2]. k ..., w K The temporal features of sequence x[n] are extracted using the following formula through a one-dimensional convolutional layer:

[0124]

[0125] In the above formula, y conv [t] represents the temporal features extracted by the one-dimensional convolutional layer, K is the length of the convolutional kernel, and w k Let be a convolution kernel of length k, and t be time.

[0126] The sparse self-attention layer maps the temporal features of the sequence extracted by the one-dimensional convolutional layer into a query matrix q through a linear layer. t key matrix k t and the value matrix v t To reduce computational cost, sparse operations are introduced to treat matrix q. t Sparsification, i.e., randomly selecting matrix q t By setting some values ​​in the query matrix to zero, we obtain the sparsed query matrix. The dependency features of sequence x[n] are extracted using the following formula:

[0127]

[0128] In the above formula, Atten represents the sequence-dependent features extracted by the self-attention layer, σ(·) is the activation function, and k T For the key matrix k t transpose, dim t Let q be the query matrix. t The dimension;

[0129] The time-frequency features of the sequence extracted by the STFT layer include:

[0130] Several sets of STFT parameters are randomly selected. The STFT parameters include the number of points in the first discrete Fourier transform, the window function, and the step size of the window function. The sequence x[n] is then subjected to a short-time Fourier transform using the following formula:

[0131]

[0132] In the above formula, X[m, k] is the short-time Fourier transform result at the time period index m and the frequency component index k, m is the index of the window function time period, k is the index of the frequency component in the Fourier transform, w[n-mR] is the window function, R is the moving step size of the window function, j is the imaginary number, and N is the number of points in the first discrete Fourier transform in the STFT.

[0133] Comparing the short-time Fourier transform results of several sequences x[n], the short-time Fourier transform results with frequency resolution higher than the threshold δ or time resolution higher than the threshold ε are selected and concatenated into a matrix using the concatenate function. To reduce computation and prevent overfitting, the matrix... Perform random sampling to reduce its dimension to a matrix. The time-frequency features of sequence x[n] are extracted using the following formula:

[0134]

[0135] In the above formula, Q represents the sequence time-frequency features extracted by the STFT layer, and STFT... -1 This is the inverse transform of STFT, Padding(·) is the zero-padding operation, and Conv(·) is the convolution operation.

[0136] 3. The historical power generation time series data x[n] is added together with the sequence dependency features extracted by the self-attention layer and the sequence time-frequency features extracted by the STFT layer. The nonlinear activation function in the feedforward layer is used to introduce nonlinear operations to obtain the encoder output encoding result x. en ;

[0137] The nonlinear activation function in the feedforward layer is the Sigmoid function, and its calculation formula is as follows:

[0138]

[0139] 4. Based on the encoder's output encoding results, use the Transformer decoder to predict the power generation sequence of distributed energy nodes;

[0140] Take the latter half of the historical power generation time series data x[n], and pad it with zeros until the length is the same as the original x[n]. Denote this sequence as x. de,in ;

[0141] The decoder also consists of several identical decoding layers, with the input of the first decoding layer being x. de,in The input to the decoding layer is then the output of the previous decoding layer. The operation of the decoding layer mainly includes the following steps:

[0142] sequence x de,in The inputs are respectively fed into the self-attention layer and STFT layer of the decoder for sequence dependency feature extraction and time-frequency feature extraction, to obtain sequence x. de,in Atten de and time-frequency characteristic matrix Q de The feature extraction methods for the self-attention layer and STFT layer of the decoder are the same as those for the coding layer.

[0143] Based on the sequence dependency features and time-frequency features extracted from the self-attention layer and STFT layer of the decoder, and combined with the historical power generation time series data x[n], the sequence decomposition is performed using the following formula:

[0144] x t [n]=AvgPool(Padding(x[n])+ReduceDim(Atten de +Q de ));

[0145] x s[n]=Padding(x[n])+RediceDim(Atten de +Q de )-x t [n];

[0146] In the above formula, x t [n] represents the trend term, AvgPool(·) is the average pooling operation, Padding(·) is the zero-padding operation, ReduceDim(·) is the dimensionality reduction operation implemented through a linear layer, and x s [n] represents the seasonal term;

[0147] The seasonal term after sequence decomposition and the encoder output x are encoded together. en The time-frequency feature layer is input to the decoder, and sparse operations are introduced to perform time-frequency feature self-attention and sequence self-attention operations to obtain the output of the time-frequency feature layer;

[0148] The computation process of the time-frequency feature self-attention is as follows: Figure 2 As shown, it includes:

[0149] Through a linear layer, the seasonal terms after sequence decomposition are mapped to a query matrix q, and the encoder output x is encoded. en Mapped to a value matrix v and a key matrix k;

[0150] Matrix q, matrix v, and matrix k are input into the STFT layer of the decoder for short-time Fourier transform, and a sparsity operation is introduced to sparsify matrix q, matrix v, and matrix k to obtain the time-frequency matrix. The time-frequency self-attention is calculated using the following formula:

[0151]

[0152] In the above formula, Atten f For time-frequency self-attention, σ(·) is the activation function. For matrix transpose, dim f For matrix The dimension;

[0153] The time-frequency self-attention output y is obtained by performing zero-padding and inverse STFT transformation on the time-frequency self-attention using the following formula. f [n]:

[0154]

[0155] The sequence self-attention operation includes:

[0156] Let the convolution kernel be W de =[w 1,de, ..., w k,de , ..., w K,de The seasonal terms, after being decomposed from the sequence, are passed through a one-dimensional convolutional layer of the decoder to obtain the temporal features of the seasonal terms.

[0157]

[0158] In the above formula, y conv,de [t] represents the temporal characteristics of the seasonal term;

[0159] Subsequently, a linear layer is used to map the temporal features of the seasonal term into a query matrix q. t ′, which encodes the encoder's output result x. en Mapped to the value matrix v t ′、key matrix k t ', Introducing sparse operations to transform matrix q t Sparsification is performed to obtain a sparse query matrix. Sequence self-attention is calculated using the following formula:

[0160]

[0161] In the above formula, Atten s For sequence self-attention, (k t ′) T For matrix k t The transpose of ', dim s For matrix q t The dimension of ′;

[0162] The sequence self-attention input is fed into a one-dimensional convolutional layer and a pooling layer using the following formula to obtain the sequence self-attention output y. s [n]:

[0163] y s [n] = Pooling(Conv1d(Atten) s ));

[0164] In the above formula, Pooling(·) is a one-dimensional convolution operation, and Convld(·) is a pooling operation, which takes the mean of a data point and its neighborhood to replace the original data point to generate the pooling result.

[0165] Add the time-frequency self-attention output and the sequence self-attention output to obtain the time-frequency feature layer output:

[0166] y t,f [n] = y s [n]+y f [n];

[0167] In the above formula, y t,f[n] represents the output of the time-frequency feature layer;

[0168] In summary, by adding the output of the time-frequency feature layer and the seasonal term from the sequence decomposition, and then performing sequence decomposition on the sum using the following formula, the seasonal components are obtained:

[0169]

[0170] In the above formula, As a trend component, For seasonal quantities;

[0171] The seasonal components after sequence decomposition are passed through a feedforward neural network to obtain feature sequences of aggregation dependency features and time-frequency features. These feature sequences are then added to the historical power generation time-series data x[n] to obtain the decoder output x. de The decoder output is the predicted power generation sequence of the distributed energy nodes.

[0172] Example 2:

[0173] like Figure 3 As shown, a distributed energy generation power prediction system based on time-frequency characteristics includes a historical power generation time-series data collection module, an encoder feature extraction module, an encoding result output module, and a decoder power prediction module.

[0174] The historical power generation time series data collection module is used to collect historical power generation time series data of distributed energy nodes that need to be predicted.

[0175] The encoder feature extraction module is used to input historical power generation time series data into the encoder. The encoder's self-attention layer extracts the sequence dependency features, and the encoder's STFT layer extracts the time-frequency features of the sequence. The encoder's self-attention layer includes a one-dimensional convolutional layer and a sparse self-attention layer.

[0176] The encoding result output module is used to add the historical power generation time series data and the sequence dependency features extracted by the encoder's self-attention layer and the sequence time-frequency features extracted by the encoder's STFT layer, and obtain the encoder's output encoding result through the feedforward layer;

[0177] The decoder power prediction module is used to predict the power generation sequence of distributed energy nodes based on the encoder's output encoding results.

[0178] The encoder feature extraction module includes a dependency feature extraction unit and a time-frequency feature extraction unit;

[0179] The dependency feature extraction unit is used to extract dependency features of the sequence from the self-attention layer of the encoder, including:

[0180] A1. Using a one-dimensional convolutional layer, the temporal features of sequence x[n] are extracted using the following formula:

[0181]

[0182] In the above formula, y conv [t] represents the temporal features extracted by the one-dimensional convolutional layer, K is the length of the convolutional kernel, and w k Let be a convolution kernel of length k, and t be time.

[0183] A2. The sparse self-attention layer maps the temporal features of the sequence extracted by the one-dimensional convolutional layer into a query matrix q through a linear layer. t key matrix k t and the value matrix v t Introducing sparse operations to transform matrix q t Sparsification yields a sparse query matrix. The dependency features of sequence x[n] are extracted using the following formula:

[0184]

[0185] In the above formula, Atten represents the sequence-dependent features extracted by the self-attention layer, σ(·) is the activation function, and k T For the key matrix k t transpose, dim t Let q be the query matrix. t The dimension;

[0186] The time-frequency feature extraction unit is used to extract the time-frequency features of the sequence from the STFT layer of the encoder, including:

[0187] B1. Randomly select several sets of STFT parameters, including the number of points in a first discrete Fourier transform, the window function, and the step size of the window function. Perform a short-time Fourier transform on the sequence x[n] using the following formula to obtain the short-time Fourier transform results of several sequences x[n]:

[0188]

[0189] In the above formula, X[m, k] is the short-time Fourier transform result at the time period index m and the frequency component index k, m is the index of the window function time period, k is the index of the frequency component in the Fourier transform, w[n-mR] is the window function, R is the moving step size of the window function, j is the imaginary number, and N is the number of points in the first discrete Fourier transform in the STFT.

[0190] B2. Compare the short-time Fourier transform results of several sequences x[n], and select the short-time Fourier transform results with frequency resolution higher than the threshold δ or time resolution higher than the threshold ε to concatenate them into a matrix. And for the matrix Perform random sampling to reduce its dimension to a matrix. The time-frequency features of sequence x[n] are extracted using the following formula:

[0191]

[0192] In the above formula, Q represents the sequence time-frequency features extracted by the STFT layer, and STFT... -1 This is the inverse transform of STFT, Padding(·) is the zero-padding operation, and Conv(·) is the convolution operation.

[0193] The decoder power prediction module includes a sequence zero-padding unit, a feature extraction unit, a sequence decomposition unit, a time-frequency feature layer output unit, a seasonal component calculation unit, and a decoder output unit;

[0194] The sequence zero-padding unit is used to take the second half of the historical power generation time series data x[n] and pad it with zeros until the length is the same as the original x[n]. This sequence is denoted as x. de,in ;

[0195] The feature extraction unit is used to extract sequence x de,in The inputs are respectively fed into the self-attention layer and STFT layer of the decoder for sequence dependency feature extraction and time-frequency feature extraction, to obtain sequence x. de,in Atten de and time-frequency characteristic matrix Q de ;

[0196] The sequence decomposition unit is used to perform sequence decomposition based on the sequence dependency features and time-frequency features extracted from the self-attention layer and STFT layer of the decoder, combined with historical power generation time-series data x[n], using the following formula:

[0197] x t [n]=AvgPool(Padding(x[n])+ReduceDim(Atten de +Q de ));

[0198] x s [n]=Padding(x[n])+ReduceDim(Atten de +Q de )-x t [n];

[0199] In the above formula, x t [n] represents the trend term, AvgPool(·) is the average pooling operation, Padding(·) is the zero-padding operation, ReduceDim(·) is the dimensionality reduction operation, and xs [n] represents the seasonal term;

[0200] The time-frequency feature layer output unit is used to encode the seasonal term after sequence decomposition and the encoder output result x. en The time-frequency feature layer input to the decoder is subjected to sparse operations for time-frequency feature self-attention and sequence self-attention. The time-frequency self-attention output and the sequence self-attention output are then added together to obtain the time-frequency feature layer output.

[0201] y t,f [n] = y s [n]+y f [n];

[0202] In the above formula, y t,f [n] represents the output of the time-frequency feature layer, y f [n] represents the time-frequency feature self-attention output, y s [n] represents the sequence self-attention output;

[0203] The seasonal component calculation unit is used to add the output of the time-frequency feature layer and the seasonal term from the sequence decomposition, and then performs sequence decomposition on the result of the addition using the following formula to obtain the seasonal component:

[0204]

[0205] In the above formula, As a trend component, For seasonal quantities;

[0206] The decoder output unit is used to pass the seasonal components after sequence decomposition through a feedforward neural network to obtain a feature sequence of aggregation dependency features and time-frequency features, and then add this feature sequence to the historical power generation time series data x[n] to obtain the decoder output x. de The decoder output is the predicted power generation sequence of the distributed energy nodes.

[0207] In the time-frequency feature layer output unit, the time-frequency feature self-attention operation includes:

[0208] C1. Through a linear layer, the seasonal terms after sequence decomposition are mapped to a query matrix q, and the encoder output x is encoded. en Mapped to a value matrix v and a key matrix k;

[0209] C2. Input matrices q, v, and k into the STFT layer of the decoder for short-time Fourier transform, and introduce sparsity operations to sparsify matrices q, v, and k to obtain the time-frequency matrix. The time-frequency self-attention is calculated using the following formula:

[0210]

[0211] In the above formula, Atten f For time-frequency self-attention, σ(·) is the activation function. For matrix transpose, dim f For matrix The dimension;

[0212] C3. The time-frequency self-attention output y is obtained by performing zero-padding and STFT inverse transformation on the time-frequency self-attention using the following formula. f [n]:

[0213] y f [n] = STFT -1 (Padding(Atten f ));

[0214] Sequence self-attention operations include:

[0215] D1. Pass the seasonal terms after sequence decomposition through a one-dimensional convolutional layer of the decoder to obtain the temporal features of the seasonal terms, and then pass them through a linear layer to map the temporal features of the seasonal terms into a query matrix q. t ′, which encodes the encoder's output result x. en Mapped to the value matrix v t ′、key matrix k t ', Introducing sparse operations to transform matrix q t Sparsification is performed to obtain a sparse query matrix. Sequence self-attention is calculated using the following formula:

[0216]

[0217] In the above formula, Atten s For sequence self-attention, (k t ′) T For matrix k t The transpose of ', dim s For matrix q t The dimension of ′;

[0218] D2. The sequence self-attention input is fed into a one-dimensional convolutional layer and a pooling layer using the following formula to obtain the sequence self-attention output y. s [n]:

[0219] y s [n] = Pooling(Cov1d(Atten) s ));

[0220] In the above formula, Pooling(·) is a one-dimensional convolution operation, and Convld(·) is a pooling operation.

[0221] Example 3:

[0222] like Figure 4 As shown, a distributed energy generation power prediction device based on time-frequency characteristics includes a processor and a memory;

[0223] The memory is used to store computer program code and to transmit the computer program code to the processor;

[0224] The processor is used to execute, according to the instructions in the computer program code, the distributed energy generation power prediction method based on time-frequency characteristics described in Embodiment 1.

[0225] Example 4:

[0226] A computer storage medium on which computer programs are stored;

[0227] When the computer program is executed by the processor, it implements the steps of the distributed energy generation power prediction method based on time-frequency characteristics described in this scheme.

Claims

1. A distributed energy power generation prediction method based on time-frequency features, characterized in that, The method comprises: S1, collecting historical power generation time series data of the distributed energy node to be predicted; S2, inputting the historical power generation time series data into an encoder, the self-attention layer of the encoder extracting the sequence dependence feature, and the STFT layer of the encoder extracting the sequence time-frequency feature; S3, adding the historical power generation time series data and the sequence dependence feature extracted by the self-attention layer of the encoder and the sequence time-frequency feature extracted by the STFT layer of the encoder, and obtaining the output encoding result of the encoder through the feedforward layer; S4, based on the output encoding result of the encoder, using the decoder to predict the power generation sequence of the distributed energy node, comprising: S41. Obtain historical power generation time series data The latter half of the sequence is then padded with zeros to a length equal to the original sequence. If they are the same, denote the sequence as... ; S42, input the sequence respectively into the self-attention layer and the STFT layer of the decoder for sequence-dependent feature extraction and time-frequency feature extraction, to obtain the sequence dependent feature matrix and the time-frequency feature matrix of the sequence S43, sequence-dependent features and time-frequency features extracted based on the decoder-based self-attention layer and the STFT layer, combined with historical power generation time series data The sequence decomposition is performed using the following formula: ; ; In the above formula, is a trend term, is an average pooling operation, is a zero padding operation, is a dimension reduction operation, is a seasonality term; S44, encode the sequence decomposed seasonal term and the output of the encoder The time-frequency feature layer input to the decoder introduces a sparse operation to perform time-frequency feature self-attention operation and sequence self-attention operation, and adds the time-frequency self-attention output and the sequence self-attention output obtained by the time-frequency feature self-attention operation and the sequence self-attention operation to obtain a time-frequency feature layer output: ; In the above formula, is a time-frequency feature layer output, is a time-frequency feature self-attention output, is a sequence self-attention output; S45, adding the time-frequency feature layer output and the seasonal term after sequence decomposition in step S33, and performing sequence decomposition on the added result using the following formula to obtain the seasonal component: ; ; In the above formula, is the trend component, is the seasonal component; S46, the seasonal component after sequence decomposition is passed through a feedforward neural network to obtain a feature sequence of aggregated dependence features and time-frequency features, and the feature sequence is combined with historical power generation time series data to obtain the output of the decoder The output of the decoder is the predicted power generation sequence of the distributed energy node.

2. The distributed energy power generation prediction method based on time-frequency features according to claim 1, characterized in that, In S2, the self-attention layer of the encoder includes a one-dimensional convolution layer and a sparse self-attention layer; The self-attention layer of the encoder extracts the sequence dependence feature, comprising: A1, by one-dimensional convolution layer, using the following formula to extract sequence temporal features: ; In the above formula, is a sequence time domain feature extracted by a one-dimensional convolution layer, is a length of a convolution kernel, is a length of a convolution kernel, is time; A2, the sparse self-attention layer maps the sequence time domain features extracted by the one-dimensional convolution layer into a query matrix through a linear layer , a key matrix and a value matrix , introduces a sparse operation to sparsify the matrix , obtains a sparse query matrix , and extracts the dependency features of the sequence using the following formula: ; In the above formula, is a sequence-dependent feature extracted by a self-attention layer, is an activation function, is a key matrix is a transpose of is a query matrix is a dimension of The STFT layer of the encoder extracts the sequence time-frequency feature, comprising: B1. Randomly select several groups of STFT parameters, the STFT parameters including the number of one discrete Fourier transform, window function, moving step of window function, and perform short-time Fourier transform on the sequence using the following formula to obtain the short-time Fourier transform results of several sequences ​ ; In the above formula, is the short-time Fourier transform result at the time segment index and the frequency component index is the index of the window function time segment, is the index of the frequency component in the Fourier transform, is the window function, is the moving step length of the window function, is the imaginary number, is the number of points of a discrete Fourier transform in the STFT;​ B2. Comparison of several sequences The short-time Fourier transform results are selected, and those with frequency resolution higher than the threshold are chosen. Or the time resolution is higher than the threshold The short-time Fourier transform results are concatenated into a matrix. and the matrix Perform random sampling to reduce its dimension to a matrix. The following formula is used to extract the sequence. Time-frequency characteristics: ; In the above formulae, is a sequence time-frequency feature extracted for the STFT layer, is an inverse transform of the STFT, is a zero padding operation, is a convolution operation.

3. The distributed energy power generation prediction method based on time-frequency features according to claim 1, characterized in that, In S44, the time-frequency feature self-attention operation includes: C1, mapping the decomposed seasonal term of the sequence to a query matrix by a linear layer , encoding the output of the encoder into a value matrix , a key matrix ; C2, the matrix , the matrix , the matrix Input to the STFT layer of the decoder Short-time Fourier transform and introduce sparse operation to get the matrix , the matrix , the matrix Sparse, get the time-frequency matrix 、 、 And calculate the time-frequency self-attention using the following formula: ; In the above formula, is a time-frequency self-attention, is an activation function, is a matrix is a transpose of the matrix is a dimension of the matrix is a dimension of the matrix C3, the time-frequency self-attention is zero-padded and inverse transformed by STFT to obtain a time-frequency feature self-attention output using the following formula : ; The sequence self-attention operation includes: D1, the seasonal term after the sequence decomposition passes through the one-dimensional convolution layer of the decoder, the time domain features of the seasonal term are obtained, and the time domain features of the seasonal term are mapped to the query matrix through the linear layer , the output encoding result of the encoder is mapped to the value matrix , the key matrix , the sparse operation is introduced to make the matrix sparse, and the query matrix after sparsification is obtained The following formula is used to calculate the sequence self-attention: ; In the above formula, is a sequence self-attention, is a matrix transpose of the matrix is a matrix dimension of the matrix D2, the sequence self-attention input is input to a one-dimensional convolutional layer and a pooling layer by using the following formula to obtain the sequence self-attention output : ; In the above formulae, is a one-dimensional convolution operation, is a pooling operation.

4. A distributed energy power generation prediction system based on time-frequency features, characterized in that, The system comprises a historical power generation time series data collection module, an encoder feature extraction module, an encoding result output module, and a decoder power prediction module; The historical power generation time series data collection module is used to collect historical power generation time series data of the distributed energy node to be predicted; The encoder feature extraction module is used to input the historical power generation time series data into the encoder, the self-attention layer of the encoder extracts the sequence dependence feature, and the STFT layer of the encoder extracts the sequence time-frequency feature, the self-attention layer of the encoder includes a one-dimensional convolution layer and a sparse self-attention layer; The encoding result output module is used to add the historical power generation time series data and the sequence dependence feature extracted by the self-attention layer of the encoder and the sequence time-frequency feature extracted by the STFT layer of the encoder, and obtain the output encoding result of the encoder through the feedforward layer; The decoder power prediction module is used to predict the power generation sequence of the distributed energy node based on the output encoding result of the encoder using the decoder, comprising a sequence zero filling unit, a feature extraction unit, a sequence decomposition unit, a time-frequency feature layer output unit, a seasonal component calculation unit, and a decoder output unit; The sequence zero padding unit is used to take the latter half of the historical power generation time sequence data , and zero pad after it to the same length as the original , and record the sequence as ; The feature extraction unit is configured to input the sequence to a self-attention layer and an STFT layer of a decoder respectively for sequence-dependent feature extraction and time-frequency feature extraction, to obtain a sequence dependent feature matrix and a time-frequency feature matrix ; The sequence decomposition unit is used to extract sequence-dependent features and time-frequency features based on the self-attention layer of the decoder and the STFT layer, in combination with historical power generation time series data The sequence decomposition is performed using the following formula: ; ; In the above formula, is a trend term, is an average pooling operation, is a zero padding operation, is a dimension reduction operation, is a seasonality term; The time-frequency feature layer output unit is configured to encode the output of the sequence-decomposed seasonal term and the encoder The time-frequency feature layer input into the decoder introduces a sparse operation to perform time-frequency feature self-attention operation and sequence self-attention operation, and adds the time-frequency self-attention output and the sequence self-attention output obtained through the time-frequency feature self-attention operation and the sequence self-attention operation to obtain a time-frequency feature layer output: ; In the above formula, is a time-frequency feature layer output, is a time-frequency feature self-attention output, is a sequence self-attention output; The seasonal component calculation unit is used to add the time-frequency feature layer output and the seasonal term after sequence decomposition, and perform sequence decomposition on the added result using the following formula to obtain the seasonal component: ; ; In the above formula, is the trend component, is the seasonal component; The decoder output unit is configured to pass the sequence-decomposed seasonal component through a feedforward neural network to obtain a feature sequence of aggregated dependency features and time-frequency features, and pass the feature sequence and historical power generation time series data to obtain a predicted power generation sequence of the distributed energy node. The decoder output is the predicted power generation sequence of the distributed energy node.

5. The distributed energy power generation prediction system based on time-frequency features according to claim 4, characterized in that, The encoder feature extraction module comprises a dependency feature extraction unit and a time-frequency feature extraction unit; The dependency feature extraction unit is configured to extract dependency features of a self-attention layer of the encoder, and comprises: A1, by one-dimensional convolution layer, using the following formula to extract sequence temporal features: ; In the above formula, is a sequence time domain feature extracted by a one-dimensional convolution layer, is a length of a convolution kernel, is a length of a convolution kernel, is time; A2, the sparse self-attention layer maps the sequence time domain features extracted by the one-dimensional convolution layer into a query matrix through a linear layer , a key matrix and a value matrix , introduces a sparse operation to sparsify the matrix , obtains a sparse query matrix , and extracts the dependency features of the sequence using the following formula: ; In the above formula, is a sequence-dependent feature extracted by a self-attention layer, is an activation function, is a key matrix is a transpose of the key matrix, is a query matrix is a dimension of the query matrix. The time-frequency feature extraction unit is configured to extract time-frequency features of an STFT layer of the encoder, and comprises: B1. Randomly select several groups of STFT parameters, the STFT parameters including the number of one discrete Fourier transform, window function, moving step of window function, and the following formula is used to sequence Perform short-time Fourier transform to obtain the short-time Fourier transform results of several sequences ​ ; In the above formula, For indexing within a time period and frequency component index The short-time Fourier transform result at the point, The index for the time period of the window function. This is the index of the frequency components in the Fourier transform. For window functions, The step size of the window function. It is an imaginary number. This represents the number of points in a first-order discrete Fourier transform in the STFT. B2. Comparison of several sequences The short-time Fourier transform results are selected, and those with frequency resolution higher than the threshold are chosen. Or the time resolution is higher than the threshold The short-time Fourier transform results are concatenated into a matrix. and the matrix Perform random sampling to reduce its dimension to a matrix. The following formula is used to extract the sequence. Time-frequency characteristics: ; In the above formulae, is a sequence time-frequency feature extracted for the STFT layer, is an inverse transform of the STFT, is a zero padding operation, is a convolution operation.

6. The distributed energy power generation prediction system based on time-frequency features according to claim 4, characterized in that, The time-frequency feature self-attention operation in the time-frequency feature layer output unit comprises: C1, mapping the decomposed seasonal term of the sequence to a query matrix by a linear layer encoding the output of the encoder to a value matrix , a key matrix ; C2, the matrix , the matrix , the matrix Input to the STFT layer of the decoder Short-time Fourier transform, and introduce sparse operation to get the matrix , the matrix , the matrix Sparse, get the time-frequency matrix 、 、 And calculate the time-frequency self-attention using the following formula: ; In the above formula, is a time-frequency self-attention, is an activation function, is a matrix transpose of the matrix is a matrix dimension of the matrix C3, the time-frequency self-attention is zero-padded and inverse transformed by STFT to obtain a time-frequency feature self-attention output using the following formula : ; The sequence self-attention operation comprises: D1, the seasonal term after sequence decomposition passes through a one-dimensional convolution layer of the decoder to obtain the time domain features of the seasonal term, and through a linear layer, the time domain features of the seasonal term are mapped into a query matrix , the output encoding result of the encoder is mapped into a value matrix , a key matrix , a sparse operation is introduced to sparsify the matrix , to obtain the query matrix after sparsification The following formula is used to calculate the sequence self-attention: ; In the above formula, is a sequence self-attention, is a matrix is the transpose of the matrix is a matrix is the dimension of the matrix D2, the sequence self-attention input is input to a one-dimensional convolutional layer and a pooling layer by using the following formula to obtain the sequence self-attention output : ; In the above formulae, is a one-dimensional convolution operation, is a pooling operation.

7. A distributed energy power generation prediction device based on time-frequency features, characterized in that, comprising a processor and a memory; The memory is configured to store computer program code and transmit the computer program code to the processor; The processor is configured to execute the instructions in the computer program code to perform the distributed energy power generation prediction method based on time-frequency features according to any one of claims 1-3.

8. A computer storage medium having a computer program stored thereon, characterized in that: The computer program, when executed by a processor, implements the steps of the distributed energy power generation prediction method based on time-frequency features according to any one of claims 1-3.

Citation Information

Patent Citations

  • Short-term load prediction method and terminal

    CN115481778A

  • Non-Intrusive Load Decomposition Method Based on Informer Model Coding Structure

    US20220397874A1