Power failure prediction method under meteorological disaster based on channel attention mechanism
By applying the channel attention mechanism in weather fault prediction, using convolution and fully connected layers to extract time series features, the problem of insufficient prediction accuracy is solved, and more accurate prediction of power failures is achieved, and the power system is achieved. Provides more accurate warnings.
Patent Information
- Application Number
- CN202411199079.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
AI Technical Summary
Although the existing weather-related fault prediction methods have improved, there is still a problem of insufficient prediction accuracy, especially in the conditions of meteorological disasters, the predictive capacity of power failures needs to be improved.
Using a method based on channel attention mechanism, time series features are extracted through convolution operations, combined with average pooling and full-connection layer learning time and dependencies between channels, feature compression and reweighting are performed to generate the final power failure prediction output. .
It improves the accuracy of power failure prediction, can more effectively utilize the global information and characteristics of the time series, enhances the ability to predict disaster weather failures such as wind, rain, lightning, etc., and provides more accurate early warnings for the power system.
Smart Images

Figure CN119167202A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time series prediction methods, and specifically relates to a method for predicting power failures under meteorological disasters based on a channel attention mechanism. Background Art
[0002] Predicting the number of weather-related faults is very useful for improving the reliability of distribution systems. Different weather-related fault counts represent different weather-related risk levels. Based on the predicted risk level, different operation and maintenance plans can be formulated, such as effective material reserves, personnel arrangements, and inspection plans. The ability to provide preventive operational flexibility before weather-related faults occur is very critical because it provides operators with assets to configure the system to a resilient state, which helps minimize the impact of weather-related faults and resilience degradation. Good prediction performance of weather-related fault counts is the basis for preventive operational flexibility.
[0003] Although the occurrence of weather-related failures is unstable, there is no doubt that the probability of occurrence increases under adverse weather conditions. The Poisson regression model is used to capture the counting nature of failure events caused by lightning and wind. Liu H et al. established a negative binomial regression model to predict hurricane-related failures, proposed a generalized linear mixed model to predict hurricane- and ice storm-related power outages, introduced principal component analysis to explain the discreteness of hurricane-related power outages, and used linear regression models and exponential regression models to model the effects of lightning and wind, respectively. Some scholars have proposed prediction methods based on machine learning and verified their better performance than statistical models. The Bayesian network (BN) prediction model performs better than the Poisson regression model and proposed an integrated learning method to predict failures, which is better than the simple regression model. Although the above-mentioned prediction models based on machine learning have shown acceptable performance, there is still potential for further development of prediction technology. Summary of the invention
[0004] The purpose of the present invention is to provide a method for predicting power failures under meteorological disasters based on a channel attention mechanism, which can predict the failure risks that the power system may encounter in the future.
[0005] The technical solution adopted by the present invention is a method for predicting power failures under meteorological disasters based on a channel attention mechanism, which is specifically implemented according to the following steps:
[0006] Step 1, data collection and preprocessing;
[0007] Step 2, establishment of channel symbol;
[0008] Step 3, adaptive recalibration;
[0009] Step 4, re-weight.
[0010] The present invention is also characterized in that
[0011] In step 1, the time series data is preprocessed. The specific operation is given a time series data x, whose structure is L×D, L represents the length of the time series, D represents the feature dimension of each time point, and channels are established for the D dimension and L dimension respectively. The feature representation is learned through convolution operation, and each channel Xc of the input X is mapped to each channel Uc of the output feature, where Uc is a combination of the local spatial connection patterns of the channels Xc in X.
[0012] The specific convolution operation is:
[0013] Given a learned convolution kernel set V = [v1, v2, ..., vc], where vc represents the parameters of the cth convolution kernel, the output U can be obtained in the following way:
[0014] I=Ftr(X)=[u1,u2,...,uc] The specific formula is:
[0015] * represents the convolution operation, X is the input feature, and u is the output of the convolution operation.
[0016] In step 2, the result of the pre-training in step 1 is compressed by applying an average pooling layer in the channel dimension and the time dimension respectively, and compressed into a time descriptor Xt∈R L×1 and channel descriptor Xc∈R 1×D , feature compression is performed along the channel dimension and time dimension, each two-dimensional feature channel is converted into a real number, and the output dimension matches the number of input feature channels.
[0017] Step 2 is as follows:
[0018] For the time series U∈R after the convolution operation in step 1 L×D , L is the length of the time series, D is the number of channels, and by applying average pooling on the channel dimension, it is compressed into a temporal descriptor: Xt∈R L×1 :
[0019]
[0020] Convert the L×D input into an L×1 output, where all D channel features are compressed into one value, so that the generated channel-level statistics Xt contain contextual information;
[0021] For the time series I∈R after the convolution operation in step 1 L×D , which is compressed into a feature channel descriptor by applying average pooling in the channel dimension: Xc∈R 1×D :
[0022]
[0023] The D feature channel features and L time channels are compressed into a single value, so that the generated channel-level statistics Xt and Xc contain contextual information.
[0024] In step 3, the time descriptor and channel descriptor obtained in step 2 are respectively input into two fully connected layers to learn the dependency between time. The first FC layer compresses the time descriptor into a smaller feature vector, and then performs a nonlinear transformation through the ReLu activation function; the second FC layer expands this feature vector to the same number of channels as the input feature sequence, and generates channel weights through the sigmoid activation function to obtain the correlation between each time point in the sequence.
[0025] Step 3 is as follows:
[0026] After the time descriptor and feature channel descriptor are compressed in step 2, they are placed in two fully connected layers. The first fully connected layer compresses C channels into C / r channels to reduce the amount of calculation, and then passes through a ReLu nonlinear activation layer. The second fully connected layer restores the number of channels to C channels, and then obtains the weight s through Sigmoid activation. The final dimension of s is 1×C, the time descriptor is L×1, and the feature descriptor is 1×D, which is used to characterize the time points of the time series and the weights of each feature.
[0027] In step 4, after the Excitation operation in step 3, the learned temporal weights and channel feature weights are multiplied element by element.
[0028] Step 4 is as follows:
[0029] Multiply the learned time weights and feature weights with the initial time series to recalibrate the entire time series and produce the final output Y∈R L×D , the output probability distribution is obtained, and the corresponding power failure event with the largest output probability is taken as the final prediction output.
[0030] The beneficial effects of the present invention are:
[0031] The power failure prediction method under meteorological disasters based on the channel attention mechanism of the present invention first uses convolution operation to extract features from time series, compresses the time dimension and feature dimension respectively, and then excites to obtain the importance of each time point in the time series and the importance of the features contained in each time point, making full use of the global information of the entire sequence to make the prediction more accurate. It is used to predict related failures caused by disastrous weather such as wind, rain, and lightning to the power system, and by modeling power failures caused by weather reasons at historical time points, it predicts the possible failure risks of the power system in the future, so as to make relevant early warnings for the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the power failure prediction method under meteorological disasters based on the channel attention mechanism of the present invention. DETAILED DESCRIPTION
[0033] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Example 1
[0035] The present invention provides a method for predicting power failures under meteorological disasters based on a channel attention mechanism. Figure 1 As shown, the specific implementation steps are as follows:
[0036] Step 1: Data collection and preprocessing
[0037] Preprocess the time series data. The specific operation is given a time series data x, whose structure is L×D, L represents the length of the time series, D represents the feature dimension of each time point, and channels are established for the D dimension and L dimension respectively. The feature representation is learned through the convolution operation, which maps each channel Xc of the input X to each channel Uc of the output feature, where Uc is the combination of the local spatial connection pattern of the channel Xc in X. The convolution operation learns the local time connection pattern by fusing the information on time and channel in the local receptive field, thereby enhancing the representation ability of the feature;
[0038] Step 2: Create a channel symbol (Squeeze)
[0039] Squeeze the result of the pre-training in step 1 and compress it into a time descriptor Xt∈R by applying an average pooling layer in the channel dimension and the time dimension respectively. L×1 and channel descriptor Xc∈R 1×D , feature compression is performed along the channel dimension and time dimension, each two-dimensional feature channel is converted into a real number, which has a global receptive field to some extent, and the output dimension matches the number of input feature channels;
[0040] Step 3: Adaptive Recalibration (Excitation)
[0041] The time descriptor and channel descriptor obtained in step 2 are respectively input into two fully connected layers (FC) to learn the dependency between time. The first FC layer (called compression layer) compresses the time descriptor into a smaller feature vector, and then performs nonlinear transformation through the ReLu activation function. The second FC layer (called excitation layer) expands this feature vector to the same number of channels as the input feature sequence, and generates channel weights through the sigmoid activation function to obtain the correlation between each time point in the sequence.
[0042] Step 4: Reweight
[0043] After the step 3 Excitation operation, the learned time weights and channel feature weights are multiplied element by element. This process is called the Reweight operation. The purpose of the Reweight operation is to adjust the response of each time step of the time series according to the learned time weights, and to adjust the response of the importance of the features contained in each time point according to the learned feature channel weights, so that the network can more effectively utilize the learned time dependencies. This method can highlight useful time features and suppress unimportant features, thereby improving the performance of the model.
[0044] Example 2
[0045] The present invention provides a method for predicting power failures under meteorological disasters based on a channel attention mechanism, wherein the convolution operation in step 1 is specifically as follows:
[0046] The first step of convolution (Ftr) operation refers to converting the input X into output U through convolution operation. Specifically, given a learned convolution kernel set V = [v1, v2, ..., vc], where vc represents the parameters of the cth convolution kernel, the output U can be obtained in the following way: U = Ftr (X) = [u1, u2, ..., uc] The specific formula is:
[0047] * represents the convolution operation, X is the input feature, and u is the output of the convolution operation.
[0048] Step 2 is as follows:
[0049] For the time series U∈R after the convolution operation in step 1 L×D , L is the length of the time series, D is the number of channels, and by applying average pooling on the channel dimension, it is compressed into a temporal descriptor: Xt∈R L×1 :
[0050]
[0051] Therefore, the L×D input is converted into an L×1 output, and the D channel features are compressed into one value, so that the generated channel-level statistics Xc contains contextual information, alleviating the problem of channel dependency;
[0052] Similarly, for the time series U∈R after the convolution operation in step 1 L×D , which is compressed into a feature channel descriptor by applying average pooling in the channel dimension: Xc∈R 1×D :
[0053]
[0054] The D feature channel features and L time channels are compressed into one value, so that the generated channel-level statistics Xt and Xc contain contextual information and alleviate the problem of channel dependency.
[0055] Step 3 is as follows:
[0056] After the time descriptor and feature channel descriptor are compressed in step 2, they are put into two fully connected layers. The first fully connected layer compresses C channels into C / r channels to reduce the amount of calculation, and then passes through a ReLu nonlinear activation layer. The second fully connected layer restores the number of channels to C channels, and then obtains the weight s through Sigmoid activation. The final dimension of s is 1×C, the time descriptor is L×1, and the feature descriptor is 1×D. They are used to characterize the time points of the time series and the weights of each feature.
[0057] Step 4 is as follows:
[0058] In step 4, the obtained time weight and feature weight are used to perform a reweighting operation, and the previously obtained attention weight is weighted to the features of each channel. Specifically, the learned time weight and feature weight are multiplied with the initial time series to recalibrate the entire time series and generate the final output Y∈R L×D , the output probability distribution is obtained, and the corresponding power failure event with the largest output probability is taken as the final prediction output.
[0059] Example 3
[0060] The prediction algorithm method of multivariate cross-time information based on deep learning of the present invention is specifically implemented according to the following steps:
[0061] Step 1: Data collection and preprocessing
[0062] Read multivariate time series data and preprocess it, use convolutional neural network to extract features from time series data, and learn feature representation through convolution operation, which maps each channel xc of input X to each channel uc of output feature, where uc is the combination of local spatial connection patterns of channels xc in X;
[0063] Among them, the convolution operation extracts features and performs preprocessing as follows:
[0064] Input data: The input data is an L×D time series, where L represents the sequence length and D represents the feature dimension at each time point.
[0065] Convolution operation: Use a set of learnable convolution kernels (or filters). Each convolution kernel slides over a small local area of the input sequence (or called the receptive field) to capture the features of the area. Each convolution kernel only connects to a local area of the input sequence to form a local connection. This means that the number of network parameters is much less than that of a fully connected network, which makes the network lighter and able to capture local features in space. By sliding the convolution kernel over the entire input sequence and repeating the above operations, an output channel can be obtained. Each channel uc of the output feature is composed of the local spatial connection patterns of the channels xc of the input image. That is, each convolution kernel operates on all input channels, and what is learned is the joint features of these channels in the local area;
[0066] Step 2: Create a channel symbol (Squeeze)
[0067] Perform global information compression on the sequence, and perform two compression operations in different dimensions on the output channel obtained in step 1. Specifically:
[0068] By applying average pooling in the temporal dimension, it is compressed into a channel descriptor Xc∈R 1×D We obtain branch 1, which is compressed into a temporal descriptor Xt∈R by applying average pooling in the channel dimension. L×1 , and we get branch 2. Each two-dimensional feature channel is transformed into a real number, which has a global receptive field to some extent, and the output dimension matches the number of input feature channels.
[0069] Step 3: Excitation
[0070] The Excitation operation learns the dependencies between each channel through a self-gating mechanism and adjusts the excitation of each channel based on these dependencies. The specific implementation steps are as follows:
[0071] The time descriptor and channel descriptor obtained in step 2 are respectively subjected to excitation operations.
[0072] Excitation:
[0073] Self-gating mechanism: The dependencies between channels are learned through two fully connected layers (FC). The first FC layer (called compression layer) compresses the channel descriptor into a smaller feature vector, which is then nonlinearly transformed through the ReLu activation function. The second FC layer (called excitation layer) expands this feature vector back to the same number of channels as the input channels, and generates channel weights through the sigmoid activation function;
[0074] Channel weight learning: The channel weights learned by the incentive layer reflect the importance of each channel, and they are used to adjust the importance of each channel;
[0075] Step 4: Reweight
[0076] Multiply the time weight and channel weight learned in step 3 with the initial time series. The specific steps are:
[0077] Learning channel weights: In the Excitation operation, the channel weights learned through the fully connected layer and the sigmoid activation function reflect the importance of each channel. These weights are used to adjust the importance of each channel.
[0078] Element-by-element multiplication operation: The learned time weight and feature weight are multiplied element-by-element with the initial time series, that is, the response of each channel is multiplied by the corresponding weight. This operation makes the response of each channel be amplified or reduced accordingly.
[0079] Output: The output of the Reweight operation is the result of multiplying the sequence by the learned channel weights. This output contains the weighted average of the responses of each channel, which helps the network better utilize useful features and suppress unimportant features. This approach can highlight useful features and suppress unimportant features, thereby improving the performance of the model.
[0080] The reweight operation does not add additional parameters or computation, because it can be implemented by element-by-element multiplication, and its output is still the number of channels of the sequence. This lightweight self-gating mechanism can significantly improve the performance of the network without significantly increasing the computational burden.
[0081] The present invention can make full use of the correlation of each time step in the time series data and the importance of each feature at each time point, and proposes a cross-time information aggregation method for different time receptive fields of multivariate time series to achieve richer feature aggregation. It can effectively improve the prediction accuracy of time series, and be applied to the estimation and detection of the impact of weather factors on power failures. It can predict power failures that may be caused by weather reasons, and provide early warning information for power operators, so that they can take preventive measures in advance and reduce losses caused by power failures.
Claims
1. Power failure prediction method under meteorological disasters based on channel attention mechanism, It is characterized in that Follow the steps below to implement it: Step 1, data collection and preprocessing; Step 2, establishment of channel symbol; Step 3, adaptive recalibration; Step 4, re-weight.
2. According to claim 1, the power failure prediction method under meteorological disasters based on the channel attention mechanism, It is characterized in that In the step 1, the time series data is preprocessed. The specific operation is given a time series data x, whose structure is L×D, L represents the length of the time series, D represents the feature dimension of each time point, and channels are established for the D dimension and the L dimension respectively. The feature representation is learned through the convolution operation, and each channel Xc of the input X is mapped to each channel Uc of the output feature, where Uc is a combination of the local spatial connection patterns of the channels Xc in X.
3. According to claim 2, the power failure prediction method under meteorological disasters based on the channel attention mechanism, It is characterized in that The specific convolution operation is: Given a learned convolution kernel set V = [v1, v2, ..., vc], where vc represents the parameters of the cth convolution kernel, the output U can be obtained as follows: U=Ftr(X)=[u1,u2,...,uc] The specific formula is: * represents the convolution operation, X is the input feature, and u is the output of the convolution operation.
4. The power failure prediction method under meteorological disasters based on channel attention mechanism according to claim 1, It is characterized in that In step 2, the result of the pre-training in step 1 is compressed by applying an average pooling layer in the channel dimension and the time dimension respectively to compress it into a time descriptor Xt∈R L×1 and channel descriptor Xc∈R 1×D , feature compression is performed along the channel dimension and time dimension, each two-dimensional feature channel is converted into a real number, and the output dimension matches the number of input feature channels.
5. According to claim 4, the power failure prediction method under meteorological disasters based on the channel attention mechanism, It is characterized in that The step 2 is specifically as follows: For the time series U∈R after the convolution operation in step 1 L×D , L is the length of the time series, D is the number of channels, and by applying average pooling on the channel dimension, it is compressed into a temporal descriptor: Xt∈R L×1 : Convert the L×D input to an L×1 output, where all D channel features are compressed into one value, so that the generated channel-level statistics Xc contain contextual information; For the time series I∈R after the convolution operation in step 1 L×D , which is compressed into a feature channel descriptor by applying average pooling in the channel dimension: Xc∈R 1×D : The D feature channel features and L time channels are compressed into a single value, so that the generated channel-level statistics Xc and Yc contain contextual information.
6. The power failure prediction method under meteorological disasters based on channel attention mechanism according to claim 1, It is characterized in that In the step 3, the time descriptor and channel descriptor obtained in step 2 are respectively input into two fully connected layers to learn the dependency between time. The first FC layer compresses the time descriptor into a smaller feature vector, and then performs a nonlinear transformation through the ReLu activation function; the second FC layer expands this feature vector to the same number of channels as the input feature sequence, and generates channel weights through the sigmoid activation function to obtain the correlation between each time point in the sequence.
7. The method for predicting power failures under meteorological disasters based on the channel attention mechanism according to claim 3, It is characterized in that The step 3 is specifically as follows: After the time descriptor and feature channel descriptor are compressed in step 2, they are placed in two fully connected layers. The first fully connected layer compresses C channels into C / r channels to reduce the amount of calculation, and then passes through a ReLu nonlinear activation layer. The second fully connected layer restores the number of channels to C channels, and then obtains the weight s through Sigmoid activation. The final dimension of s is 1×C, the time descriptor is L×1, and the feature descriptor is 1×D, which is used to characterize the time points of the time series and the weights of each feature.
8. The method for predicting power failures under meteorological disasters based on the channel attention mechanism according to claim 1, It is characterized in that In step 4, after the Excitation operation in step 3, the learned time weight and channel feature weight are multiplied element by element.
9. The method for predicting power failures under meteorological disasters based on the channel attention mechanism according to claim 8, It is characterized in that The step 4 is specifically as follows: Multiply the learned time weights and feature weights with the initial time series to recalibrate the entire time series and produce the final output Y∈R L×D , the output probability distribution is obtained, and the corresponding power failure event with the largest output probability is taken as the final prediction output.
Citation Information
Cited By
Method for predicting AD conversion probability through deep learning method based on attention
CN119993535A
