Insulator discharge detection method, device and equipment in thunderstorm environment and storage medium
By using convolutional neural networks and long-term memory networks in thunderstorm environments, combined with channel and time attention mechanisms, the accuracy of insulator discharge detection in thunderstorm environments is solved, and timely and accurate detection of insulator discharge in thunderstorm environments is achieved.
Patent Information
- Application Number
- CN202411592018.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art is difficult to accurately detect insulator discharge in the environment of thunderstorms, which is mainly due to the violent light changes, large dynamic range, complex background and noise influences, which make it difficult to apply traditional image recognition models.
Convolutional neural network (CNN) is used to combine long and short-term memory network (LSTM), and a channel attention mechanism and time attention mechanism are introduced. The target feature vector is extracted through convolution and dimensionality reduction processing, time series modeling and weighting are performed, and the insulator discharge detection results are finally output through the full connection layer.
It realizes timely and accurately detects insulator discharge in a thunderstorm environment, can capture subtle discharge signals and complex background characteristics, highlight areas where discharge phenomena exist, and respond sensitively to short-term discharge phenomena in time.
Smart Images

Figure CN119693726A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power transmission line fault diagnosis, and in particular to a method, device, equipment and storage medium for detecting insulator discharge in a thunderstorm environment. Background Art
[0002] At present, image recognition technology is widely used in the detection of transmission line insulator faults under conventional conditions. It mainly analyzes normal and faulty insulator image data by establishing an intelligent big data model under the framework of deep learning and neural network to give monitoring and identification results.
[0003] However, there is a big difference between insulation discharge in thunderstorm environment and insulation discharge in normal environment. That is, compared with insulation discharge in normal environment, insulator discharge in thunderstorm environment has the following characteristics: (1) Dramatic changes in light, that is, light conditions often change in thunderstorm weather, especially the strong light brought by lightning and the subsequent darkness. This rapid change makes the insulator features in the image unstable, making it difficult for conventional image recognition models to accurately identify them; (2) There is a high dynamic range, that is, there are both bright areas (such as lightning) and dark areas (such as shadows in the rain) in the image, so that conventional image recognition models cannot capture all features; (3) Complex background, that is, under thunderstorm conditions, there may be rain, wind-blown branches and other interfering objects in the background, which will increase the difficulty of insulator recognition and make traditional image segmentation and feature extraction methods difficult to apply; (4) Noise influence, that is, rain and wind in thunderstorm weather will increase the noise in the image, thereby affecting the clarity of the image.
[0004] In addition, conventional image recognition models focus on collecting pictures of faulty insulators for comparative identification after a structural failure occurs in the insulator, and then conducting manual inspections and judgments. It can be seen that it focuses on fault identification after an accident occurs.
[0005] Based on the above reasons, conventional image recognition models are not suitable for the detection of insulator discharge in thunderstorm environments; therefore, how to timely and accurately realize the discharge detection of insulators in thunderstorm environments is a problem that needs to be solved urgently. Summary of the invention
[0006] The present application provides a method, device, equipment and storage medium for detecting discharge of insulators in a thunderstorm environment, which can timely and accurately realize the discharge detection of insulators in a thunderstorm environment.
[0007] In a first aspect, an embodiment of the present application provides a method for detecting insulator discharge in a thunderstorm environment, the method for detecting insulator discharge in a thunderstorm environment comprising:
[0008] The target insulator image data in thunderstorm environment is convolved and dimensionally reduced by convolutional neural network to extract the target feature vector;
[0009] The target feature vector is weighted based on the channel attention mechanism to obtain a weighted feature vector;
[0010] The weighted feature vector is modeled in time series through a long short-term memory network to obtain the target hidden state;
[0011] The target hidden state is weighted based on the temporal attention mechanism to obtain a weighted hidden state;
[0012] The weighted hidden state is linearly transformed and normalized through a fully connected layer to output the insulator discharge detection result.
[0013] In combination with the first aspect, in one implementation, the convolutional neural network includes two groups of spatial feature extraction modules, and the convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector, including:
[0014] The first group of spatial feature extraction modules sequentially perform convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment to obtain an initial feature vector;
[0015] The initial feature vector is sequentially convolved and dimensionally reduced through the second set of spatial feature extraction modules to obtain the target feature vector.
[0016] In combination with the first aspect, in one implementation, the weighted processing of the target feature vector based on the channel attention mechanism to obtain a weighted feature vector includes:
[0017] Based on the channel attention mechanism, the target feature vector is calibrated for feature map channel features to obtain a channel attention weight;
[0018] The target feature vector is weighted according to the channel attention weight to obtain a weighted feature vector.
[0019] In combination with the first aspect, in one implementation, weighted processing is performed on the target hidden state based on the temporal attention mechanism to obtain a weighted hidden state, including:
[0020] For the hidden state corresponding to each time step, the attention score corresponding to the hidden state is calculated based on the temporal attention mechanism;
[0021] Calculate the temporal attention weight of the target hidden state corresponding to the last time step based on the attention score;
[0022] The target hidden state is weighted based on the temporal attention weight to obtain a weighted hidden state.
[0023] In combination with the first aspect, in one implementation, before the step of performing convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment by using a convolutional neural network, the method further includes:
[0024] Acquire initial insulator data in a thunderstorm environment, wherein the initial insulator data includes insulator image data and insulator video data;
[0025] Segmenting the insulator video data to obtain a continuous frame sequence;
[0026] Integrating the frame sequence and the insulator image data in time sequence to obtain an image data set;
[0027] Each image in the image dataset is preprocessed to generate target insulator image data.
[0028] In combination with the first aspect, in one implementation, preprocessing each target image in the image data set to generate target insulator image data includes:
[0029] For each target image, the target image is cropped and scaled to obtain a processed image;
[0030] Performing normalization processing on the processed image to obtain a normalized image;
[0031] The normalized image is subjected to median filtering to enhance the visibility of the discharge phenomenon;
[0032] All images after filtering are used as target insulator image data.
[0033] In combination with the first aspect, in one implementation, the insulator discharge detection result includes an insulator discharge probability and a discharge level.
[0034] In a second aspect, an embodiment of the present application provides an insulator discharge detection device under a thunderstorm environment, wherein the insulator discharge detection device under a thunderstorm environment comprises a convolutional neural network and a long short-term memory network, wherein the convolutional neural network comprises a channel attention module, and the long short-term memory network comprises a time attention module and a fully connected layer;
[0035] The convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector;
[0036] The channel attention module is used to perform weighted processing on the target feature vector based on the channel attention mechanism to obtain a weighted feature vector;
[0037] The long short-term memory network is used to perform time series modeling on the weighted feature vector to obtain the target hidden state;
[0038] The temporal attention module is used to perform weighted processing on the target hidden state based on the temporal attention mechanism to obtain a weighted hidden state;
[0039] The fully connected layer is used to perform linear transformation and normalization processing on the weighted hidden state to output the insulator discharge detection result.
[0040] In combination with the second aspect, in one embodiment, the convolutional neural network includes two groups of spatial feature extraction modules. The first group of spatial feature extraction modules is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment in sequence to obtain an initial feature vector; the second group of spatial feature extraction modules is used to perform convolution and dimensionality reduction processing on the initial feature vector in sequence to obtain a target feature vector.
[0041] In conjunction with the second aspect, in one implementation, the channel attention module is specifically used to:
[0042] Based on the channel attention mechanism, the target feature vector is calibrated for feature map channel features to obtain a channel attention weight;
[0043] The target feature vector is weighted according to the channel attention weight to obtain a weighted feature vector.
[0044] In conjunction with the second aspect, in one implementation, the temporal attention module is specifically used to:
[0045] For the hidden state corresponding to each time step, the attention score corresponding to the hidden state is calculated based on the temporal attention mechanism;
[0046] Calculate the temporal attention weight of the target hidden state corresponding to the last time step based on the attention score;
[0047] The target hidden state is weighted based on the temporal attention weight to obtain a weighted hidden state.
[0048] In conjunction with the second aspect, in one implementation, the device further includes a data processing module, which is used to:
[0049] Acquire initial insulator data in a thunderstorm environment, wherein the initial insulator data includes insulator image data and insulator video data;
[0050] Segmenting the insulator video data to obtain a continuous frame sequence;
[0051] Integrating the frame sequence and the insulator image data in time sequence to obtain an image data set;
[0052] Each image in the image dataset is preprocessed to generate target insulator image data.
[0053] In conjunction with the second aspect, in one implementation, the data processing module is specifically used to:
[0054] For each target image, the target image is cropped and scaled to obtain a processed image;
[0055] Performing normalization processing on the processed image to obtain a normalized image;
[0056] The normalized image is subjected to median filtering to enhance the visibility of the discharge phenomenon;
[0057] All images after filtering are used as target insulator image data.
[0058] In combination with the second aspect, in one implementation, the insulator discharge detection result includes an insulator discharge probability and a discharge level.
[0059] In a third aspect, an embodiment of the present application provides an insulator discharge detection device under a thunderstorm environment, wherein the insulator discharge detection device under a thunderstorm environment comprises a processor, a memory, and an insulator discharge detection program under a thunderstorm environment stored in the memory and executable by the processor, wherein when the insulator discharge detection program under a thunderstorm environment is executed by the processor, the steps of the insulator discharge detection method under a thunderstorm environment as described above are implemented.
[0060] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a program for detecting insulator discharge in a thunderstorm environment. When the program for detecting insulator discharge in a thunderstorm environment is executed by a processor, the steps of the aforementioned method for detecting insulator discharge in a thunderstorm environment are implemented.
[0061] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:
[0062] The target insulator image data in a thunderstorm environment is convolved and dimensionally reduced by a convolutional neural network to capture subtle discharge signals and complex background features, so that the target feature vector can effectively describe the state of the insulator in a thunderstorm environment; the target feature vector is weighted based on the channel attention mechanism to enhance the feature importance on a specific feature channel and suppress irrelevant feature interference, so that the obtained weighted feature vector can highlight the area where the discharge phenomenon exists; then the weighted feature vector is modeled in a time series by a long short-term memory network to capture the temporal dynamic change characteristics of the transient discharge phenomenon in a thunderstorm environment and obtain the target hidden state; the target hidden state is weighted based on the time attention mechanism to capture the instantaneous discharge signal more sensitively in time, realize a sensitive response to the short-term discharge phenomenon, so that the generated weighted hidden state can highlight the characteristics of important time points in the thunderstorm environment; finally, the weighted hidden state is linearly transformed and normalized by the fully connected layer, so that the insulator discharge detection result can be output timely and accurately without waiting for the insulator to fail before fault identification. It can be seen that the present application takes convolutional neural networks and long short-term memory networks as the core, and introduces time attention mechanism and feature channel attention mechanism to realize timely and accurate detection of insulator discharge in thunderstorm environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a flow chart of an embodiment of a method for detecting insulator discharge in a thunderstorm environment of the present application;
[0064] Figure 2 This is a schematic diagram of the architecture of the CNN-LSTM insulator discharge detection model based on the dual attention mechanism involved in the embodiment of the present application;
[0065] Figure 3 A schematic diagram of the process of constructing the model involved in the embodiment of the present application;
[0066] Figure 4 This is a schematic diagram of the hardware structure of an insulator discharge detection device in a thunderstorm environment involved in the embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0069] In a first aspect, an embodiment of the present application provides a method for detecting insulator discharge in a thunderstorm environment.
[0070] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the insulator discharge detection method in a thunderstorm environment of the present application. Figure 1 As shown, the insulator discharge detection method in a thunderstorm environment includes:
[0071] Step S10: performing convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment through a convolutional neural network to extract a target feature vector.
[0072] For example, in this embodiment, in order to effectively realize timely and accurate detection of insulator discharge in a thunderstorm environment, a convolutional neural network (CNN) and a long short-term memory network (LSTM) are used as the core, and a time attention mechanism and a feature channel attention mechanism are introduced to construct a transmission line thunderstorm environment. Figure 2 The CNN-LSTM insulator discharge detection model based on the dual attention mechanism is shown to output the working status of the insulator and complete the identification and early warning of insulator discharge faults.
[0073] It should be noted that the target insulator image data refers to the image data required for insulator discharge detection in a thunderstorm environment, which is used as the input of the model. In this embodiment, CNN is used to extract features and reduce the dimension of the target insulator image data to achieve the extraction of spatial features; specifically, the convolution layer and the pooling layer can be used to capture the subtle discharge signals and complex background features in the target insulator image data, and then the captured features are compressed by reducing the spatial dimension to extract the target feature vector that can effectively describe the state of the insulator in the thunderstorm environment.
[0074] Furthermore, in one embodiment, before the step of performing convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment by using a convolutional neural network, it also includes:
[0075] Acquire initial insulator data in a thunderstorm environment, wherein the initial insulator data includes insulator image data and insulator video data;
[0076] Segmenting the insulator video data to obtain a continuous frame sequence;
[0077] Integrating the frame sequence and the insulator image data in time sequence to obtain an image data set;
[0078] Each image in the image dataset is preprocessed to generate target insulator image data.
[0079] Exemplarily, in this embodiment, high-resolution camera equipment can be used to capture initial insulator data including images and videos of transmission lines and insulators in real time under thunderstorm weather conditions; then the insulator video data is segmented into a continuous frame sequence to ensure that each frame contains sufficient time information; finally, the frame sequence and the insulator image data are integrated, that is, the extracted frames are integrated with the captured images in time sequence to form a unified image data set {I t}.
[0080] It is understandable that the captured images can usually provide relatively complete and static scene information, such as the environmental layout under the entire distribution line, while the extracted frames focus on dynamic information, such as the shaking of insulators as the distribution line shakes. Therefore, integrating the two can cover more types of scenes and behaviors, making the data set richer and more diverse in content, that is, improving the richness and diversity of the data; and the images and extracted frames captured at different times and weather conditions also have their own characteristics. For example, the images may show the appearance of the scene under different lighting angles and weather (sunny, cloudy, rainy, etc.), and the frames record the dynamic behaviors under these environmental changes. It can be seen that after the above integration processing, the integrated data can better reflect the various changes in the actual application scenarios, so as to provide more complete feature information, thereby improving the accuracy of insulator discharge detection.
[0081] It should be understood that in a thunderstorm environment, the stability of image quality is usually relatively poor. Therefore, in order to improve the image quality, this embodiment will pre-process each image in the image data set to generate target insulator image data.
[0082] Furthermore, in one embodiment, the preprocessing of each target image in the image data set to generate target insulator image data includes:
[0083] For each target image, the target image is cropped and scaled to obtain a processed image;
[0084] Performing normalization processing on the processed image to obtain a normalized image;
[0085] The normalized image is subjected to median filtering to enhance the visibility of the discharge phenomenon;
[0086] All images after filtering are used as target insulator image data.
[0087] Exemplarily, in this embodiment, the image data set {I tEach target image corresponding to each time step t in} is cropped to focus on the insulator and its surrounding area and exclude irrelevant background; and the cropped image is scaled to scale all target images to a uniform size (the specific value setting can be determined according to actual needs and is not limited here) to ensure the consistency of the image input to the model, and the processed image I is obtained. t :
[0088] I t ∈R H×W×C
[0089] Among them, H and W are height and width respectively, and C is the number of channels, which is 3 (i.e., including three channels: red R, green G, and blue B).
[0090] Then, the processed image I t Normalize the image so that its pixel values are within the standard range of [0,1]:
[0091]
[0092] Among them, I t ′ is the normalized image; μ and σ represent the mean and standard deviation of the image pixels, respectively.
[0093] Finally, the normalized image is processed by median filtering using the MedianFilter image processing technique to remove the noise caused by thunderstorms and adjust the contrast to enhance the visibility of the discharge phenomenon:
[0094] I t =MedianFilter(I t ′)
[0095] Among them, I t ″ represents the image after filtering; so far, the data preprocessing is completed, and finally the frame sequence {I t ″} is used as the target insulator image data and input into the model for insulator discharge detection.
[0096] Furthermore, in one embodiment, the convolutional neural network includes two groups of spatial feature extraction modules, and the convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector, including:
[0097] The first group of spatial feature extraction modules sequentially perform convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment to obtain an initial feature vector;
[0098] The initial feature vector is sequentially convolved and dimensionally reduced through the second set of spatial feature extraction modules to obtain the target feature vector.
[0099] For example, in this embodiment, two sets of spatial feature extraction modules in CNN are used to perform feature extraction and dimensionality reduction twice to extract more detailed features; wherein each set of spatial feature extraction modules includes a convolution layer and a maximum pooling layer, for example, see Figure 2 As shown, the first group of spatial feature extraction modules includes a convolution layer 1 and a maximum pooling layer 1, and the second group of spatial feature extraction modules includes a convolution layer 2 and a maximum pooling layer 2; it should be noted that the working principle of each group of spatial feature extraction modules is similar, so for the sake of simplicity of description, the following embodiment will take the first group of spatial feature extraction modules as an example to illustrate the working principle: each frame of the target insulator image data is input into the CNN to perform convolution processing through the convolution layer and the maximum pooling layer, and then extract a feature map F including the discharge features of the insulator and its surroundings t :
[0100] F t =CNN(I t ″)
[0101] Among them, F t ∈R C′×H′×W′ , H′ and W′ respectively represent the height and width after processing by the convolution layer and the pooling layer; C′ is the number of feature map channels, and its value is determined by the designed CNN architecture. It can be understood that in the convolutional neural network, many specific features such as color features, edge features, and texture features are extracted through convolution kernels, and each convolution kernel only extracts one feature. Therefore, the number of channels of the feature map is the number of extracted features, which is determined by the number of convolution kernels. The number of convolution kernels usually needs to balance model performance and resource constraints, and is constantly adjusted through experience and experiments. It should be noted that the workflow and principles of the convolution layer and the maximum pooling layer are common knowledge in the field, and for the sake of brevity, they will not be repeated here.
[0102] Then the feature map F t Perform dimensionality reduction compression on the spatial dimension to obtain a one-dimensional feature vector V of length C′ describing the discharge state of the insulator t ∈R C′ :
[0103]
[0104] It should be understood that the eigenvector V t It can effectively describe the state of the insulator in a thunderstorm environment; in addition, for the first group of spatial feature extraction modules, its output V t is the initial feature vector. For the second set of spatial feature extraction modules, its input is the initial feature vector output by the first set of spatial feature extraction modules, and its output V tis the target feature vector.
[0105] Step S20: Perform weighted processing on the target feature vector based on the channel attention mechanism to obtain a weighted feature vector.
[0106] For example, it should be understood that since conventional image processing is usually performed in a relatively stable environment, feature extraction can be relatively direct; however, in a thunderstorm environment, the complex background and lighting changes make it difficult to extract key features, and the traditional CNN treats all areas equally, that is, it is not focused enough on the extraction of discharge phenomena in a thunderstorm environment, which can lead to confusion between the discharge area and the background.
[0107] See also Figure 2 As shown, this embodiment introduces a channel attention mechanism into CNN to focus on different feature channels in the image, so that the model can enhance the feature importance on a specific feature channel, that is, by generating a feature vector weighted by the channel attention to highlight the area where the discharge phenomenon exists; specifically, after generating an attention weight matrix based on the channel attention mechanism, attention is allocated to the target feature vector to obtain a weighted feature vector, so that the model can be more focused on the characteristics of the insulator discharge phenomenon in a complex environment, significantly improving the accuracy of feature extraction; compared with the traditional CNN, this embodiment uses the channel attention mechanism to adjust the attention to different feature channels according to the feature weights, thereby solving the difficulty of traditional models in extracting key features in a complex environment.
[0108] Furthermore, in one embodiment, the weighted processing of the target feature vector based on the channel attention mechanism to obtain a weighted feature vector includes:
[0109] Based on the channel attention mechanism, the target feature vector is calibrated for feature map channel features to obtain a channel attention weight;
[0110] The target feature vector is weighted according to the channel attention weight to obtain a weighted feature vector.
[0111] Exemplarily, in this embodiment, the squeeze excitation module will adaptively adjust the target feature vector V t Recalibrate the channel features of the feature map so that the model can enhance the relevant features of insulator discharge to obtain the channel attention weight:
[0112] A s =S(W s ·V t +b s )
[0113] Among them, A s ∈R C′ represents the channel attention weight, whose size is C′; Ws ∈R C′×C′ is a weight matrix, whose size is C′×C′ and its specific value can be determined according to experimental parameters; b s Represents the bias term, which is the default parameter; S represents the Sigmoid activation function.
[0114] Finally, the target feature vector V is denoted by the channel attention weights. t By weighting, we can get the feature map after attention weighting, that is, the weighted feature vector V t ′:
[0115] V t ′=A s ·V t
[0116] Among them, V t ′∈R C′×H′×W′ .
[0117] Step S30: Perform time series modeling on the weighted feature vector through a long short-term memory network to obtain a target hidden state.
[0118] For example, see Figure 2 As shown, the feature vector sequence {V t ′} is input into the double-layer fully connected layer for feature integration, and then the integration result is input into the LSTM network to perform time series modeling on the weighted feature vector through LSTM to obtain the target hidden state corresponding to the end of the sequence (i.e., the last time step T); it should be understood that LSTM can capture the time series dynamic change characteristics of transient discharge phenomena in thunderstorm environments, process the feature vectors of continuous frames, and thus identify the occurrence time and duration of discharge phenomena. Among them, the time series modeling formula of LSTM is:
[0119] h t ,c t =LSTM(V t ′,h t-1 ,c t-1 )
[0120] In the formula, h t represents the hidden state of LSTM at time step t, whose size is d h , d h represents the dimension of the LSTM hidden state; c t Represents the memory state (i.e., cell state) of LSTM at time step t, with a size of d h ;h t-1 and c t-1 Respectively represent the hidden state and memory state of LSTM at the previous time step.
[0121] Step S40: weighting the target hidden state based on the temporal attention mechanism to obtain a weighted hidden state.
[0122] For example, it is understandable that in a thunderstorm environment, due to the instability of image quality, it is often easy to cause poor data preprocessing effect, resulting in poor robustness of the model, which in turn leads to unsatisfactory recognition accuracy. Figure 2 As shown, in this embodiment, the hidden state of each time step is dynamically weighted by introducing a temporal attention mechanism in LSTM, and finally a weighted hidden state is obtained to emphasize the importance of the discharge phenomenon at different time points. It can be seen that even in the presence of noise or illumination changes, this embodiment can filter out irrelevant timing information through the temporal attention mechanism, so that the problem of insufficient preprocessing can be compensated by the temporal modeling of the model itself; this means that even if the effect of the preprocessing stage is not ideal, this embodiment can still automatically adjust the focus in the spatiotemporal dimension through the attention mechanism, thereby improving the robustness and accuracy of recognition.
[0123] Furthermore, in one embodiment, the weighted processing of the target hidden state based on the temporal attention mechanism to obtain the weighted hidden state includes:
[0124] For the hidden state corresponding to each time step, the attention score corresponding to the hidden state is calculated based on the temporal attention mechanism;
[0125] Calculate the temporal attention weight of the target hidden state corresponding to the last time step based on the attention score;
[0126] The target hidden state is weighted based on the temporal attention weight to obtain a weighted hidden state.
[0127] For example, in this embodiment, a temporal attention mechanism is applied to the hidden state of the LSTM to calculate the attention score e at each time step t. t , and then the attention weight α of the corresponding time step can be obtained by Softmax normalization t , and then get the weighted hidden state h t ′, in order to highlight the characteristics of important time points in thunderstorm environment, so that the model pays more attention to the moment when the insulator discharge phenomenon occurs. The specific calculation formula is as follows:
[0128] e t =score(h t ,h T )
[0129]
[0130] h t′=α t ·h t
[0131] In the formula, score is a function used to calculate the attention score of time step t, which is a dot product or MLP. Through the above processing, the target hidden state h corresponding to the last time step T can be realized. T The weighting of can capture the instantaneous discharge signal more sensitively in time, realize the sensitive response to the short-term discharge phenomenon, so that the generated weighted hidden state h′ T It can highlight the characteristics of important time points in thunderstorm environment.
[0132] Step S50: linearly transform and normalize the weighted hidden state through a fully connected layer to output an insulator discharge detection result; wherein the insulator discharge detection result includes an insulator discharge probability and a discharge level.
[0133] Exemplarily, in this embodiment, the weighted hidden state h′ obtained at the end of the sequence is T Input to the fully connected layer in LSTM for classification, that is, the weighted hidden state h′ is passed through the fully connected layer T Multiply it with the weight matrix and add the bias to get the score of the discharge type; then normalize the score through the softmax function and output the probability distribution y of the discharge:
[0134] y=softmax(W o ·h′ T +b o )
[0135] Among them, W o is the weight matrix of the fully connected layer; b o is the bias term of the fully connected layer.
[0136] It should be understood that, according to the probability distribution y of discharge, it is possible to determine whether the insulator is discharged and to issue an early warning of the discharge result. In addition, for the discharged insulator, the model can further predict the corresponding discharge level, such as high-intensity discharge, medium-intensity discharge and low-intensity discharge; it should be noted that the prediction of the discharge level can be achieved by labeling the training samples with levels and training the model with the labeled training samples until the model can achieve the discharge level prediction.
[0137] It can be seen that this embodiment extracts spatial features from each frame of the image through a convolutional neural network, and introduces a channel attention mechanism to generate feature channel attention weights to enhance the channel features of important feature maps; then, a long short-term memory network is used to model the feature sequence weighted by channel attention, and a temporal attention mechanism is introduced to adjust the focus on key time steps; finally, the features are classified through a classification layer to detect whether the insulator discharge occurs. This embodiment shows high accuracy and robustness in complex thunderstorm environments, can effectively identify and detect insulator discharge, and helps to improve the safety and reliability of the power system.
[0138] In summary, this embodiment can achieve the following effects when implementing insulator discharge detection in a thunderstorm environment:
[0139] (1) Improving algorithm robustness based on deep fusion of channel and time features
[0140] The core principle of the channel attention mechanism in this embodiment is to calculate the weight of a specific feature channel and generate a weight matrix through a squeeze excitation module. The weight matrix will assign higher or lower weights according to the feature channels in the image, thereby highlighting key features (such as the color or texture of the discharge area) and suppressing irrelevant feature interference. It solves the problem of low generalization of the model and enables the model to more effectively distinguish discharge phenomena. Compared with traditional CNN, it no longer treats each feature channel equally, but highlights the key features of the discharge phenomenon through the attention weight mechanism, so that the model focuses more on the extraction of important features of the discharge phenomenon.
[0141] In addition, the insulator discharge phenomenon in a thunderstorm environment usually occurs instantaneously, and this embodiment uses the time attention mechanism to effectively solve this problem; compared with the traditional LSTM that processes each time step individually, the time attention mechanism in this embodiment generates the weight of each time step by calculating the similarity or importance between time steps, where the time step with a larger weight indicates that the image feature at that moment is more important, and the model will pay more attention to it; therefore, these short-term signals can be amplified through the time attention mechanism, thereby improving the recognition accuracy.
[0142] It can be seen that after the dual attention mechanism is introduced in this embodiment, the all-round capture of images in a thunderstorm environment can be achieved through the combination of the channel attention mechanism and the time attention mechanism; specifically, the channel attention mechanism highlights the key feature channels (color, texture, etc. of the picture) in each frame of the image, while the time attention mechanism emphasizes important time points (time period of the discharge phenomenon) in continuous frames, so that the model can more accurately extract important features on the feature channel and more sensitively capture the instantaneous discharge signal in time; the synergistic effect of the two can solve the challenges of complex background, dynamic lighting and instantaneous changes in a thunderstorm environment, and ensure that the model's detection of insulator discharge phenomena is more accurate and stable, and its effect far exceeds traditional image processing methods.
[0143] (2) Real-time monitoring and early warning
[0144] The time attention mechanism can capture the instantaneous changes of the discharge phenomenon, provide a sensitive response to the short-term discharge phenomenon, and realize real-time detection of the discharge signal; therefore, this embodiment combined with the time attention mechanism can realize the rapid response of the insulator discharge, that is, quickly identify the anomaly in the time dimension, and provide real-time insulator discharge monitoring and early warning capabilities in thunderstorm scenarios, thereby improving the safety and reliability of the power system.
[0145] In general, the CNN-LSTM model combined with the dual attention mechanism provided in this embodiment has the ability to quickly process image sequences, can identify discharge phenomena in real time, and issue early warnings in its early stages, rather than only analyzing after a fault occurs. It will effectively fill the gap in insulator discharge detection in thunderstorm environments, provide real-time monitoring and alarm functions, and enhance the safety of the power system.
[0146] The following will be combined Figure 3 right Figure 2 The construction process of the CNN-LSTM insulator discharge detection model based on the dual attention mechanism is explained.
[0147] First, data is collected. Specifically, high-resolution camera equipment can be used to capture images and videos of transmission lines and insulators in real time under thunderstorm weather conditions to obtain sample data under different thunderstorm intensities, and record images of normal states (no discharge) and discharge states (arcs appear). By acquiring multi-angle image sequences, the spatial characteristics of the discharge phenomenon can be fully understood; the video data is then divided into a continuous frame sequence, and the extracted frames are integrated with the captured images in time sequence to form a unified image sample set.
[0148] It can be understood that integrating the extracted frames with the captured images can not only improve the richness and diversity of the samples, but also improve the generalization ability of the model, that is, the integrated sample set contains rich dynamic information and static information, which enables the model to fully learn and be exposed to a wider range of scenes and action combinations during the learning process, so as to better understand the relationship between different factors, so as to improve its generalization ability in various actual environments, and then when facing different environments in actual scenes, it can be more accurately identified, thereby reducing misjudgments and missed judgments; in addition, the model performance can also be optimized to improve training efficiency and accuracy, that is, the integrated sample set provides more complete feature information, so that the model can converge faster during the training process, and the model can simultaneously utilize the global scene features in the image and the local action features in the frame to construct a more effective feature representation, so as to help reduce the time and computing resources required for model training, while improving the accuracy of the model; in addition, using the integrated sample set for training can also optimize the parameters of the model more comprehensively.
[0149] Secondly, each image in the image sample set is preprocessed by cropping, scaling, normalization and median filtering, and all image frame data obtained by preprocessing are divided into a training set, a validation set and a test set according to a certain ratio; it should be noted that the specific implementation methods and principles of preprocessing such as cropping, scaling, normalization and median filtering can be referred to the aforementioned embodiments and will not be repeated here.
[0150] Again, the image frames in the training set are input into CNN to extract spatial features. It should be noted that the method and principle of how to extract spatial features through CNN can be referred to the aforementioned embodiment and will not be repeated here.
[0151] Next, the channel attention mechanism is applied to generate an attention weight matrix for the extracted spatial features, and the feature channels are weighted, that is, the spatial features are weighted through the attention weight matrix to enhance the key features; it should be noted that the implementation method and principle of the channel attention mechanism can refer to the aforementioned embodiment and will not be repeated here.
[0152] Then, the feature vector output by the channel attention mechanism is input into LSTM for time series modeling, and the time attention mechanism is applied to calculate the weight of each time step, and the time series features are weighted to capture important time step information; it should be noted that the implementation method and principle of LSTM and time attention mechanism can refer to the aforementioned embodiments and will not be repeated here.
[0153] Finally, the hidden state output by the temporal attention mechanism is linearly transformed and normalized, and then the insulator discharge detection result is output. At this point, one training is completed. It should be noted that the implementation method and principle of the linear transformation and normalization post-processing can refer to the aforementioned embodiment and will not be repeated here. During the training process, the performance of the model on the validation set is regularly evaluated. If the performance of the model does not meet the preset standard, the spatial feature extraction step is returned to repeat the training and adjust the model parameters or network structure until the maximum number of training times is reached, and then the model training is terminated. The image frames in the test set are input into the trained model to output the insulator discharge recognition result. At this point, the model construction is completed. It can be understood that the above recognition results can be used for real-time monitoring to generate an alarm system, thereby ensuring the safe operation of the power system in thunderstorm weather.
[0154] In addition, the following embodiments also conduct comparative experiments on the CNN-LSTM insulator discharge detection model based on the dual attention mechanism provided in this embodiment and other models (i.e., the CNN-LSTM basic model and the CNN model introducing the spatial attention mechanism).
[0155] First, the comparative experiment collected a total of about 5,000 high-resolution images, of which 2,500 were from the discharge state and the other 2,500 were from the normal state. It should be noted that the images were collected from cameras with different thunderstorm intensities and different angles to ensure the diversity of the data; then, 70% of the data was used for the training set, 20% for the validation set, and 10% for the test set; in addition, multiple video files were obtained, and each video file contained 100 frames of images to capture the dynamic changes of transient discharge phenomena.
[0156] Next, we set up the experiment: the convolutional layer is zero-padded, the Dropout deletion ratio is set to 0.1, the Adam optimizer is selected, the learning rate is set to 0.001, and the learning rate is automatically adjusted during training. The maximum number of model training times is set to 100 times, which can of course be adjusted independently according to the actual training results. The cross entropy loss function is used for the classification task, and L2 regularization is used to prevent overfitting.
[0157] Based on the above experimental settings, comparative experiments were carried out on the CNN-LSTM insulator discharge detection model based on the dual attention mechanism, the CNN-LSTM basic model and the CNN model introducing the spatial attention mechanism, and the experimental results are shown in Table 1.
[0158] Table 1 Comparison of performance indicators of each model
[0159]
[0160] It can be seen from Table 1 that the various evaluation indicators of the CNN-LSTM insulator discharge detection model based on the dual attention mechanism provided in this embodiment are ranked first in the comparison; the above results prove that compared with the traditional model, the model provided in this embodiment is more capable of real-time monitoring and accurate identification of insulator discharge phenomena in thunderstorm environments, and effectively and comprehensively analyze the dynamic changes in image sequences; in addition, through real-time shooting and identification of insulator discharge images in thunderstorm weather, the model significantly improves the timeliness of fault detection and can quickly issue fault warnings, which not only improves work efficiency, but also ensures that faults can be discovered and eliminated in a timely manner, thereby significantly enhancing the safety and reliability of the power system and reducing the risk of potential accidents.
[0161] In summary, the model proposed in this embodiment combines CNN and LSTM, and weights the key features of the feature map channel and time dimension through a dual attention mechanism. This multi-level modeling method has stronger expression ability, feature extraction ability and adaptability to complex data preprocessing than traditional models, so that more detailed feature capture and accurate recognition can be performed in complex scenarios; in addition, through deep feature extraction, time series modeling and attention weight weighting, the problem of inaccurate recognition results caused by the simple structure of traditional models is solved, and the model innovatively combines the attention mechanism of spatiotemporal features, which significantly improves the comprehensiveness and accuracy of recognition, helps to timely detect insulator discharge and troubleshoot as soon as possible, thereby improving the safety and reliability of the power system.
[0162] In a second aspect, an embodiment of the present application also provides an insulator discharge detection device in a thunderstorm environment.
[0163] In one embodiment, an insulator discharge detection device in a thunderstorm environment includes a convolutional neural network and a long short-term memory network, wherein the convolutional neural network includes a channel attention module, and the long short-term memory network includes a time attention module and a fully connected layer;
[0164] The convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector;
[0165] The channel attention module is used to perform weighted processing on the target feature vector based on the channel attention mechanism to obtain a weighted feature vector;
[0166] The long short-term memory network is used to perform time series modeling on the weighted feature vector to obtain the target hidden state;
[0167] The temporal attention module is used to perform weighted processing on the target hidden state based on the temporal attention mechanism to obtain a weighted hidden state;
[0168] The fully connected layer is used to perform linear transformation and normalization processing on the weighted hidden state to output the insulator discharge detection result.
[0169] Furthermore, in one embodiment, the convolutional neural network includes two groups of spatial feature extraction modules. The first group of spatial feature extraction modules is used to sequentially perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to obtain an initial feature vector; the second group of spatial feature extraction modules is used to sequentially perform convolution and dimensionality reduction processing on the initial feature vector to obtain a target feature vector.
[0170] Furthermore, in one embodiment, the channel attention module is specifically used for:
[0171] Based on the channel attention mechanism, the target feature vector is calibrated for feature map channel features to obtain a channel attention weight;
[0172] The target feature vector is weighted according to the channel attention weight to obtain a weighted feature vector.
[0173] Furthermore, in one embodiment, the temporal attention module is specifically used for:
[0174] For the hidden state corresponding to each time step, the attention score corresponding to the hidden state is calculated based on the temporal attention mechanism;
[0175] Calculate the temporal attention weight of the target hidden state corresponding to the last time step based on the attention score;
[0176] The target hidden state is weighted based on the temporal attention weight to obtain a weighted hidden state.
[0177] Furthermore, in one embodiment, the device further includes a data processing module, which is used to:
[0178] Acquire initial insulator data in a thunderstorm environment, wherein the initial insulator data includes insulator image data and insulator video data;
[0179] Segmenting the insulator video data to obtain a continuous frame sequence;
[0180] Integrating the frame sequence and the insulator image data in time sequence to obtain an image data set;
[0181] Each image in the image dataset is preprocessed to generate target insulator image data.
[0182] Furthermore, in one embodiment, the data processing module is specifically used for:
[0183] For each target image, the target image is cropped and scaled to obtain a processed image;
[0184] Performing normalization processing on the processed image to obtain a normalized image;
[0185] The normalized image is subjected to median filtering to enhance the visibility of the discharge phenomenon;
[0186] All images after filtering are used as target insulator image data.
[0187] Furthermore, in one embodiment, the insulator discharge detection result includes an insulator discharge probability and a discharge level.
[0188] Among them, the functional implementation of each module in the above-mentioned insulator discharge detection device under thunderstorm environment corresponds to each step in the above-mentioned insulator discharge detection method embodiment under thunderstorm environment, and its functions and implementation processes are no longer repeated here one by one.
[0189] In a third aspect, an embodiment of the present application provides an insulator discharge detection device in a thunderstorm environment. The insulator discharge detection device in a thunderstorm environment may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0190] Reference Figure 4 , Figure 4 The hardware structure diagram of the insulator discharge detection device under thunderstorm environment involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the insulator discharge detection device under thunderstorm environment may include a processor, a memory, a communication interface and a communication bus.
[0191] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0192] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the insulator discharge detection device under thunderstorm environment, and the interface used to realize the interconnection between the insulator discharge detection device under thunderstorm environment and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display (Display), a keyboard (Keyboard), etc.
[0193] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0194] The processor may be a general-purpose processor, which may call the insulator discharge detection program under thunderstorm environment stored in the memory and execute the insulator discharge detection method under thunderstorm environment provided by the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the insulator discharge detection program under thunderstorm environment is called may refer to the various embodiments of the insulator discharge detection method under thunderstorm environment of the present application, which will not be described in detail here.
[0195] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0196] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0197] The readable storage medium of the present application stores an insulator discharge detection program under a thunderstorm environment, wherein when the insulator discharge detection program under a thunderstorm environment is executed by a processor, the steps of the insulator discharge detection method under a thunderstorm environment as described above are implemented.
[0198] Among them, the method implemented when the insulator discharge detection program in a thunderstorm environment is executed can refer to the various embodiments of the insulator discharge detection method in a thunderstorm environment of the present application, and will not be repeated here.
[0199] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0200] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0201] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0202] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0203] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0205] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for detecting insulator discharge in a thunderstorm environment, characterized in that: The insulator discharge detection method in a thunderstorm environment comprises: The target insulator image data in thunderstorm environment is convolved and dimensionally reduced by convolutional neural network to extract the target feature vector; The target feature vector is weighted based on the channel attention mechanism to obtain a weighted feature vector; The weighted feature vector is modeled in time series through a long short-term memory network to obtain the target hidden state; The target hidden state is weighted based on the temporal attention mechanism to obtain a weighted hidden state; The weighted hidden state is linearly transformed and normalized through a fully connected layer to output the insulator discharge detection result.
2. The method for detecting insulator discharge in a thunderstorm environment according to claim 1, characterized in that: The convolutional neural network includes two groups of spatial feature extraction modules, and the convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector, including: The first group of spatial feature extraction modules sequentially perform convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment to obtain an initial feature vector; The initial feature vector is sequentially convolved and dimensionally reduced through the second set of spatial feature extraction modules to obtain the target feature vector.
3. The method for detecting insulator discharge in a thunderstorm environment according to claim 1, characterized in that: The weighted processing of the target feature vector based on the channel attention mechanism to obtain a weighted feature vector includes: Based on the channel attention mechanism, the target feature vector is calibrated for feature map channel features to obtain a channel attention weight; The target feature vector is weighted according to the channel attention weight to obtain a weighted feature vector.
4. The method for detecting insulator discharge in a thunderstorm environment according to claim 1, characterized in that: The weighted processing of the target hidden state based on the time attention mechanism to obtain the weighted hidden state includes: For the hidden state corresponding to each time step, the attention score corresponding to the hidden state is calculated based on the temporal attention mechanism; Calculate the temporal attention weight of the target hidden state corresponding to the last time step based on the attention score; The target hidden state is weighted based on the temporal attention weight to obtain a weighted hidden state.
5. The method for detecting insulator discharge in a thunderstorm environment according to claim 1, characterized in that: Before the step of performing convolution and dimensionality reduction processing on the target insulator image data in the thunderstorm environment by using a convolutional neural network, the method further includes: Acquire initial insulator data in a thunderstorm environment, wherein the initial insulator data includes insulator image data and insulator video data; Segmenting the insulator video data to obtain a continuous frame sequence; Integrating the frame sequence and the insulator image data in time sequence to obtain an image data set; Each image in the image dataset is preprocessed to generate target insulator image data.
6. The method for detecting insulator discharge in a thunderstorm environment according to claim 5, characterized in that: The preprocessing of each target image in the image data set to generate target insulator image data includes: For each target image, the target image is cropped and scaled to obtain a processed image; Performing normalization processing on the processed image to obtain a normalized image; The normalized image is subjected to median filtering to enhance the visibility of the discharge phenomenon; All images after filtering are used as target insulator image data.
7. The method for detecting insulator discharge in a thunderstorm environment according to claim 1, characterized in that: The insulator discharge detection result includes an insulator discharge probability and a discharge level.
8. An insulator discharge detection device in a thunderstorm environment, characterized in that: The insulator discharge detection device under thunderstorm environment includes a convolutional neural network and a long short-term memory network, the convolutional neural network includes a channel attention module, and the long short-term memory network includes a time attention module and a fully connected layer; The convolutional neural network is used to perform convolution and dimensionality reduction processing on the target insulator image data in a thunderstorm environment to extract the target feature vector; The channel attention module is used to perform weighted processing on the target feature vector based on the channel attention mechanism to obtain a weighted feature vector; The long short-term memory network is used to perform time series modeling on the weighted feature vector to obtain the target hidden state; The temporal attention module is used to perform weighted processing on the target hidden state based on the temporal attention mechanism to obtain a weighted hidden state; The fully connected layer is used to perform linear transformation and normalization processing on the weighted hidden state to output the insulator discharge detection result.
9. An insulator discharge detection device in a thunderstorm environment, characterized in that: The insulator discharge detection device under a thunderstorm environment comprises a processor, a memory, and an insulator discharge detection program under a thunderstorm environment stored in the memory and executable by the processor. When the insulator discharge detection program under a thunderstorm environment is executed by the processor, the steps of the insulator discharge detection method under a thunderstorm environment as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an insulator discharge detection program under a thunderstorm environment, wherein when the insulator discharge detection program under a thunderstorm environment is executed by a processor, the steps of the insulator discharge detection method under a thunderstorm environment according to any one of claims 1 to 7 are implemented.