Construction method and device of substation anomaly detection network, equipment and storage medium
By using the method of frequency domain feature extraction and classification in substations, the problem of difficulty in detecting multi-classification abnormalities with high accuracy in the prior art is solved, and efficient abnormal identification and detection of substation equipment is achieved.
Patent Information
- Application Number
- CN202411695393.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art is difficult to detect multi-classification anomalies with high accuracy in substation environments, especially when facing complex and changeable practical application scenarios, it is difficult to maintain high accuracy and high recall rates at the same time.
By obtaining the abnormal image samples and labels of the substation equipment, the substation abnormality detection network to be trained is used to extract and classify frequency domain features, calculate model losses and adjust network parameters until the training stop condition is reached, and a training completion network for substation abnormality detection is obtained.
It improves the detection accuracy of multi-classified anomalies in the substation environment, can fully capture the features in the image samples, improve the network's discrimination ability, and enhance the ability to identify abnormalities in the substation equipment.
Smart Images

Figure CN119579989A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and in particular to a method, device, equipment and storage medium for constructing a substation anomaly detection network. Background Art
[0002] As the core hub of the power system, substations play a key role in the transmission, distribution and conversion of electric energy. With the increasing number, variety and complexity of modern substation equipment, its operating environment is also becoming increasingly complex, which puts higher requirements on the monitoring and maintenance of equipment. Therefore, it is crucial to ensure the normal operation of substation equipment. However, the traditional manual inspection method is not only time-consuming and laborious, but also difficult to ensure the inspection efficiency and accuracy due to the large number of equipment and complex structure. This has prompted intelligent detection methods to become an inevitable trend to improve the safety and reliability of substation operation.
[0003] Object detection technology plays a key role in the maintenance and management of power facilities, especially in identifying anomalies of large power equipment. In the specific application of substations, in addition to monitoring large equipment, object detection technology is also used to identify and classify the status of smaller components in substations, such as insulators, grounding wires and other small equipment. These classification tasks are crucial to ensure the safety and efficiency of the entire substation operation. At present, object detection algorithms are mainly optimized for specific types of anomalies and lack the ability to detect multi-classified targets in substation environments. These technologies perform well when dealing with single anomalies, but when faced with the coexistence of multiple types of anomalies that are common in actual substation operations, it is often difficult to maintain high precision and high recall at the same time, resulting in limited performance in complex and changeable actual application scenarios. Summary of the invention
[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for constructing a substation anomaly detection network to address the above technical problems, which can improve the detection accuracy of multi-classification anomalies in a substation environment.
[0005] In a first aspect, the present application provides a method for constructing a substation anomaly detection network, comprising:
[0006] Obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample;
[0007] Select a target abnormal image sample from multiple abnormal image samples, use the substation abnormality detection network to be trained to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, and classify based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample;
[0008] Calculate the model loss based on the anomaly labels and predicted anomalies corresponding to the target anomaly image samples;
[0009] When the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and based on the remaining abnormal image samples in the multiple abnormal image samples, the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0010] In one embodiment, the substation anomaly detection network to be trained is used to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, including:
[0011] The substation anomaly detection network to be trained is used to perform frequency decomposition on the target anomaly image sample to obtain multiple frequency domain feature components with different frequencies;
[0012] The frequency domain feature components of multiple different frequencies are fused to obtain the frequency domain feature.
[0013] In one embodiment, a plurality of frequency domain feature components of different frequencies are fused to obtain frequency domain features, including:
[0014] Determine a low-frequency component and multiple high-frequency components from multiple frequency domain feature components of different frequencies; perform channel decomposition on the low-frequency component to obtain a low-frequency feature map after channel decomposition; fuse multiple high-frequency components, and perform channel decomposition on the fused features to obtain a high-frequency feature map after channel decomposition;
[0015] Channel exchange is performed based on the low-frequency feature map after channel decomposition and the high-frequency feature map after channel decomposition to obtain a low-frequency feature map after channel exchange and a high-frequency feature map after channel exchange;
[0016] Feature fusion is performed based on the low-frequency feature map after channel exchange and the high-frequency feature map after channel exchange to obtain frequency domain features.
[0017] In one embodiment, feature fusion is performed based on the low-frequency feature map after channel exchange and the high-frequency feature map after channel exchange to obtain frequency domain features, including:
[0018] Performing convolution processing on the low-frequency feature map after channel exchange to obtain a processed low-frequency feature map; performing multiple convolution processing on the high-frequency feature map after channel exchange to obtain multiple processed high-frequency feature maps;
[0019] Based on the low-frequency feature map after channel decomposition, the processed low-frequency feature map is enhanced, and based on the high-frequency feature map after channel decomposition, multiple processed high-frequency feature maps are enhanced respectively to obtain multiple enhanced feature maps;
[0020] Based on multiple enhanced feature maps, frequency domain features are obtained.
[0021] In one embodiment, classification is performed based on frequency domain features to obtain predicted abnormalities corresponding to target abnormal image samples, including:
[0022] Perform inverse wavelet transform on the frequency domain features to obtain the spatial domain features;
[0023] Classification is performed based on spatial domain features to obtain the predicted anomaly corresponding to the target abnormal image sample.
[0024] In one embodiment, calculating a model loss based on anomaly labels corresponding to target abnormal image samples and predicted anomalies includes:
[0025] Based on the first loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the first model loss is calculated; based on the second loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the second model loss is calculated; based on the third loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the third model loss is calculated;
[0026] The first model loss, the second model loss and the third model loss are weighted to obtain the model loss.
[0027] In a second aspect, the present application also provides a device for constructing a substation abnormality detection network, including:
[0028] An acquisition module is used to acquire multiple abnormal image samples of substation equipment and an abnormal label corresponding to each abnormal image sample;
[0029] A processing module is used to select a target abnormal image sample from multiple abnormal image samples, extract frequency domain features of the target abnormal image sample using the substation abnormality detection network to be trained, obtain frequency domain features, and classify based on the frequency domain features to obtain predicted anomalies corresponding to the target abnormal image sample;
[0030] A calculation module, used for calculating the model loss based on the abnormal labels corresponding to the target abnormal image samples and the predicted abnormalities;
[0031] The training module is used to adjust the network parameters of the substation anomaly detection network to be trained based on the model loss when the model loss does not meet the training stop condition, and continue to train the substation anomaly detection network to be trained after the network parameters are adjusted based on the remaining abnormal image samples in the multiple abnormal image samples until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample;
[0034] Select a target abnormal image sample from multiple abnormal image samples, use the substation abnormality detection network to be trained to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, and classify based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample;
[0035] Calculate the model loss based on the anomaly labels and predicted anomalies corresponding to the target anomaly image samples;
[0036] When the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and based on the remaining abnormal image samples in the multiple abnormal image samples, the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0038] Obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample;
[0039] Select a target abnormal image sample from multiple abnormal image samples, use the substation abnormality detection network to be trained to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, and classify based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample;
[0040] Calculate the model loss based on the anomaly labels and predicted anomalies corresponding to the target anomaly image samples;
[0041] When the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and based on the remaining abnormal image samples in the multiple abnormal image samples, the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0042] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0043] Obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample;
[0044] Select a target abnormal image sample from multiple abnormal image samples, use the substation abnormality detection network to be trained to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, and classify based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample;
[0045] Calculate the model loss based on the anomaly labels and predicted anomalies corresponding to the target anomaly image samples;
[0046] When the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and based on the remaining abnormal image samples in the multiple abnormal image samples, the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0047] The above-mentioned substation anomaly detection network construction method, device, computer equipment, computer-readable storage medium and computer program product obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample, use the substation anomaly detection network to be trained to extract frequency domain features of the target abnormal image samples, and classify them based on the extracted frequency domain features to obtain the predicted anomaly corresponding to the target abnormal image samples. This method of using the frequency domain features of image samples for anomaly identification can comprehensively capture the features in the image samples compared to the traditional method that mainly relies on the spatial domain features of image samples, which is beneficial to improving the network's discrimination ability. The trained substation anomaly detection network is used for substation anomaly detection, which is beneficial to improving the accuracy of multi-classification anomaly detection in the substation environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 An application environment diagram of a method for constructing a substation abnormality detection network in one embodiment;
[0050] Figure 2 A schematic diagram of a process of constructing a substation abnormality detection network in one embodiment;
[0051] Figure 3 A schematic diagram of the network structure of a substation anomaly detection network to be trained in an embodiment;
[0052] Figure 4 is a schematic diagram of the structure of a feature extraction module in another embodiment;
[0053] Figure 5 It is a structural block diagram of a device for constructing a substation abnormality detection network in one embodiment;
[0054] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The method for constructing a substation abnormality detection network provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. This embodiment is illustrated by applying the method to the server 104. It can be understood that the method can also be applied to the terminal 102, and can also be applied to a system including the terminal 102 and the server 104, and is implemented through the interaction between the terminal 102 and the server 104. The server 104 obtains a plurality of abnormal image samples of substation equipment and an abnormal label corresponding to each abnormal image sample; selects a target abnormal image sample from the plurality of abnormal image samples, extracts frequency domain features of the target abnormal image sample using the substation abnormal detection network to be trained, obtains frequency domain features, and classifies based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample; calculates the model loss based on the abnormal label and predicted abnormality corresponding to the target abnormal image sample; when the model loss does not meet the training stop condition, adjusts the network parameters of the substation abnormal detection network to be trained based on the model loss, and continues to train the substation abnormal detection network to be trained after the network parameters are adjusted based on the remaining abnormal image samples in the plurality of abnormal image samples, until the calculated model loss reaches the training stop condition, and stops, and obtains the trained substation abnormal detection network; the trained substation abnormal detection network is used for substation abnormality detection. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0057] In an exemplary embodiment, Figure 2 As shown in FIG, a method for constructing a substation abnormality detection network is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate, including the following steps 202 to 208. Among them:
[0058] Step 202: Acquire multiple abnormal image samples of substation equipment and an abnormal label corresponding to each abnormal image sample.
[0059] Among them, the substation is a power facility in the power system that transforms voltage, receives and distributes electric energy, controls the flow of electricity and adjusts voltage. It connects power grids of various voltage levels through its transformers. Various components are required in the substation. These equipment types are many, including transformers, switches, four small devices, reactive devices, and other equipment and auxiliary devices, such as surge arresters, insulators, high-voltage bushings, guide wires, grounding devices, secondary equipment, high-voltage DC equipment, etc. These equipment are collectively referred to as substation equipment.
[0060] Abnormal image samples refer to images of substation equipment with abnormalities. Abnormal labels are used to characterize the abnormal types in abnormal image samples. Each abnormal image sample can correspond to at least one abnormal label. For example, the abnormal types include blurred dials or broken insulators.
[0061] The abnormal image samples and abnormal labels are used to construct the substation anomaly detection network. In some embodiments, the multiple abnormal image samples can be divided into a training set and a test set. According to the network type of the substation anomaly detection network, the multiple abnormal image samples can be converted into a format that matches the network type. For example, if the network type of the substation anomaly detection network is a YOLO (You Only Look Once, a target detection algorithm based on a deep neural network) network, the multiple abnormal image samples are converted into a YOLO training format.
[0062] Step 204, select a target abnormal image sample from the multiple abnormal image samples, use the substation abnormality detection network to be trained to extract frequency domain features of the target abnormal image sample to obtain frequency domain features, and classify based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample.
[0063] The target abnormal image sample is any image sample among the multiple abnormal image samples. The substation abnormality detection network to be trained is based on a neural network model of deep learning. Exemplarily, the substation abnormality detection network to be trained can be a YOLOv8 network, or an improved YOLOv8 network.
[0064] In some embodiments, multiple frequency-domain-dominated feature extraction modules FDFE are added to the YOLOv8 backbone network to extract richer frequency-domain features from target abnormal image samples by introducing the frequency-domain perspective. Figure 3 The diagram is a schematic diagram of the network structure of a substation anomaly detection network to be trained in one embodiment. The substation anomaly detection network to be trained includes a backbone network (Backbone), a neck network (Neck) and multiple detection heads (Head), and the backbone network includes multiple feature extraction modules FDFE.
[0065] Based on the frequency domain features, the predicted anomaly corresponding to the target abnormal image sample can be obtained, and the predicted anomaly may include at least one anomaly type.
[0066] Step 206 , calculating the model loss based on the abnormal label corresponding to the target abnormal image sample and the predicted abnormality.
[0067] In the process of training the substation anomaly detection network to be trained based on the target abnormal image sample, the model loss is used to constrain the training process to ensure that the trained substation anomaly detection network has good detection performance. In some embodiments, the server can obtain the difference between the abnormal label corresponding to the target abnormal image sample and the predicted abnormality, and calculate the model loss based on the difference and a preset loss function.
[0068] Step 208, when the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and based on the remaining abnormal image samples in the multiple abnormal image samples, the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0069] Among them, the training stop condition refers to the stop condition for training the substation anomaly detection network to be trained. When the model loss does not meet the training stop condition, it is necessary to adjust the network parameters of the substation anomaly detection network to be trained until the model loss obtained by training the substation anomaly detection network to be trained with multiple abnormal image samples reaches the training stop condition, thereby obtaining a trained substation anomaly detection network.
[0070] The substation anomaly detection network trained by multiple abnormal image samples is used for substation anomaly detection. The image of the substation equipment to be detected is input into the trained substation anomaly detection network to obtain anomaly detection results. The anomaly detection results may include at least one anomaly type of the substation equipment to be detected.
[0071] In the above-mentioned method for constructing a substation anomaly detection network, by obtaining multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample, the substation anomaly detection network to be trained is used to extract frequency domain features of the target abnormal image samples, and classification is performed based on the extracted frequency domain features to obtain the predicted anomaly corresponding to the target abnormal image samples. This method of using the frequency domain features of image samples for anomaly identification can comprehensively capture the features in the image samples, compared with the traditional method that mainly relies on the spatial domain features of image samples, which is beneficial to improving the network's discrimination ability. The trained substation anomaly detection network is used for substation anomaly detection, which is beneficial to improving the accuracy of multi-classification anomaly detection in the substation environment.
[0072] In an exemplary embodiment, a substation anomaly detection network to be trained is used to extract frequency domain features of target abnormal image samples to obtain frequency domain features, including: using the substation anomaly detection network to be trained to perform frequency decomposition on the target abnormal image samples to obtain multiple frequency domain feature components of different frequencies; fusing multiple frequency domain feature components of different frequencies to obtain frequency domain features.
[0073] Among them, the feature extraction module FDFE of the substation anomaly detection network to be trained can perform frequency decomposition on the target abnormal image sample. Exemplarily, the feature extraction module FDFE includes a frequency domain feature enhancement module DFSE dominated by wavelet transform, which performs wavelet transform on the target abnormal image sample to obtain multiple frequency domain feature components of different frequencies.
[0074] The method of fusing multiple frequency domain feature components of different frequencies includes channel exchange, convolution processing, concatenation, etc. Through the fusion processing, the frequency domain features of the target abnormal image sample are obtained.
[0075] In this embodiment, the substation anomaly detection network to be trained is used to perform frequency decomposition on the target abnormal image samples to obtain frequency domain feature components of multiple different frequencies. Through the fusion and interaction of high-frequency and low-frequency feature components, the features can be enhanced, thereby improving the network's discrimination ability.
[0076] In one embodiment, a plurality of frequency domain feature components of different frequencies are fused to obtain frequency domain features, including: determining a low-frequency component and a plurality of high-frequency components from the frequency domain feature components of different frequencies; performing channel decomposition on the low-frequency component to obtain a low-frequency feature map after channel decomposition; fusing a plurality of high-frequency components and performing channel decomposition on the fused features to obtain a high-frequency feature map after channel decomposition; performing channel exchange based on the low-frequency feature map after channel decomposition and the high-frequency feature map after channel decomposition to obtain a low-frequency feature map after channel exchange and a high-frequency feature map after channel exchange; performing feature fusion based on the low-frequency feature map after channel exchange and the high-frequency feature map after channel exchange to obtain a frequency domain feature.
[0077] Among them, the low-frequency component is a component with a lower frequency among multiple frequency domain feature components of different frequencies, which is used to characterize the large-scale information in the target abnormal image sample, such as the overall structure; the high-frequency component is a component with a higher frequency among multiple frequency domain feature components of different frequencies, which is used to characterize the detail information in the target abnormal image sample, such as local details.
[0078] Channel decomposition refers to splitting the feature components of multiple channels according to channels to obtain multiple feature maps after channel decomposition. For example, a low-frequency component has 40 channels, which can be split into two feature maps with 20 channels through channel decomposition. In some embodiments, a Spilt operation can be used for channel decomposition.
[0079] For low-frequency components, channel decomposition can be performed directly to obtain a low-frequency feature map after channel decomposition. For high-frequency components, fusion can be performed first, and then channel decomposition can be performed to obtain a high-frequency feature map after channel decomposition.
[0080] Exemplarily, the frequency domain characteristic components of multiple different frequencies include a low frequency component and three high frequency components .
[0081] For low frequency components Perform channel decomposition to obtain the low-frequency feature map after channel decomposition, including two channel parts, namely and , for the three high frequency components Concatenate (concat) and perform convolution on the concatenated features to obtain the fused features , and then the fused features Perform channel decomposition to obtain the high-frequency feature map after channel decomposition, including two channel parts, namely and .
[0082] The low-frequency feature map after channel decomposition and the high-frequency feature map after channel decomposition can be exchanged and combined into a new feature component, thereby reconfiguring the channel information. , , high-frequency feature map after channel decomposition , Channel exchange, low-frequency feature map after channel decomposition And the high-frequency feature map after channel decomposition Combined into new low-frequency components ; Low-frequency feature map after channel decomposition And the high-frequency feature map after channel decomposition Combined into new high-frequency components , and then the combined frequency domain feature components and The fusion is performed to obtain the frequency domain features.
[0083] In this embodiment, channel decomposition and channel exchange are performed on low-frequency components and high-frequency components in frequency domain feature components of multiple different frequencies, so as to reconfigure the channel information, and the frequency domain features are obtained by fusing the frequency domain feature components after the reconfiguration of the channel information, which is beneficial to the interaction of high and low frequency features, thereby facilitating the enhancement of features.
[0084] In one embodiment, feature fusion is performed based on a low-frequency feature map after channel exchange and a high-frequency feature map after channel exchange to obtain frequency domain features, including: performing convolution processing on the low-frequency feature map after channel exchange to obtain a processed low-frequency feature map; performing multiple convolution processing on the high-frequency feature map after channel exchange to obtain multiple processed high-frequency feature maps; enhancing the processed low-frequency feature map based on the low-frequency feature map after channel decomposition, and enhancing the multiple processed high-frequency feature maps based on the high-frequency feature map after channel decomposition to obtain multiple enhanced feature maps; and obtaining frequency domain features based on the multiple enhanced feature maps.
[0085] Among them, for the high-frequency feature map after channel exchange, multiple convolution processes can be performed, and a processed high-frequency feature map is obtained after each convolution process, so that multiple feature components corresponding to the high-frequency feature map after channel exchange can be obtained. Then, the processed low-frequency feature map and multiple high-frequency feature maps are enhanced respectively, and frequency domain features are obtained based on multiple enhanced feature maps, which is conducive to enhancing frequency domain features.
[0086] Exemplarily, the combined low-frequency feature component obtained based on the low-frequency feature map after channel exchange Through 3*3 convolution , get the processed low-frequency feature map , the combined high-frequency feature components obtained based on the high-frequency feature map after channel exchange Through convolution , , , and obtain three processed high-frequency feature maps The whole process can be expressed as:
[0087]
[0088]
[0089] The enhancement process may include: obtaining the processed low-frequency feature map And the processed high-frequency feature map Perform global average pooling to obtain multiple channel indicators, and then combine the channel indicators and low-frequency components and high frequency components Multiply element by element to get multiple enhanced feature maps and , can be expressed by the following formula.
[0090]
[0091]
[0092] The process of obtaining frequency domain features based on multiple enhanced feature maps includes: Input the HIN (Half Instance Normalization) module to extract features and convert them into high-frequency features. Perform concat processing to obtain features , the features extracted by the HIN module are combined with the features obtained after concat Subtraction, this is to obtain the refined high-frequency information through the difference information . Then Input HIN module for feature extraction and conversion into low-frequency components, and feature This is to use high-frequency features to supplement low-frequency features to obtain richer low-frequency features. . Similarly, Input HIN module for feature extraction and conversion into high-frequency features. After subtraction, we get . Similarly, Input HIN module for feature extraction and conversion into low-frequency features and Add together and get , which is the frequency domain feature.
[0093]
[0094]
[0095]
[0096]
[0097] In this embodiment, convolution processing and enhancement processing are performed on the low-frequency feature map after channel exchange and the high-frequency feature map after channel exchange, and then the frequency domain features are obtained based on the feature map after the enhancement processing. The frequency domain features are enhanced through the interaction of high and low frequency features, which is beneficial to improving the discrimination ability of the network.
[0098] In one of the embodiments, classification is performed based on frequency domain features to obtain predicted anomalies corresponding to target abnormal image samples, including: performing inverse wavelet transform processing on frequency domain features to obtain spatial domain features; and classification is performed based on spatial domain features to obtain predicted anomalies corresponding to target abnormal image samples.
[0099] Among them, the inverse wavelet transform (IDWT) can convert frequency domain features into spatial domain features, so as to perform classification based on spatial domain features and obtain predicted anomalies.
[0100] For example, the server and Through inverse wavelet transform processing, the feature map containing frequency domain information is output, that is, the frequency domain feature :
[0101]
[0102] In this embodiment, by performing inverse wavelet transform processing on the frequency domain features, it is beneficial to obtain a feature map containing frequency domain information, and introduce a frequency domain perspective to extract richer frequency domain features, which is beneficial to improving the network's discrimination ability.
[0103] In one of the embodiments, the model loss is calculated based on the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, including: calculating the first model loss based on the first loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples; calculating the second model loss based on the second loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples; calculating the third model loss based on the third loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples; and weighting the first model loss, the second model loss, and the third model loss to obtain the model loss.
[0104] The server uses a variety of loss functions to constrain the training process. For example, the first loss function can use binary cross entropy loss BCE, which quantifies the difference between the model prediction probability and the actual label. By minimizing the BCE loss, the classification performance of the model can be optimized. The specific formula is:
[0105]
[0106] The second loss function can be the bounding box regression loss CIoU, which is used to fully reflect the similarity between the predicted box and the true box. The specific formula is:
[0107]
[0108] Among them, IoU is the inter-unit union between the predicted bounding box b and the real bounding box The intersection-and-union ratio between them; ) represents the predicted bounding box b and the true bounding box The Euclidean distance between the center points; c is the diagonal length of the minimum closed area containing the two boxes; 𝑣 is a term used to measure the consistency of the aspect ratio; is a weight parameter used to balance the importance of the proportional term and other parts.
[0109] The third loss function can be the distribution focus loss DFL, which is used to deal with the regression problem when predicting continuous variables. The specific formula is:
[0110]
[0111] in, is the true continuous target value; and is in the discretized space, and the true value The closest two adjacent discrete points; and is the true value predicted by the model Drop discrete points and probability or score.
[0112] The overall model loss It can be obtained by weighting the first model loss, the second model loss and the third model loss, which can be expressed as:
[0113]
[0114] in, , , is a hyperparameter that balances between different losses. For example, =7.5, =0.5, =1.5.
[0115] In this embodiment, the corresponding model loss is calculated through multiple loss functions, and then the weighted sum of the multiple model losses is obtained to obtain the final model loss, which is conducive to obtaining a comprehensive model loss from multiple angles, thereby helping to improve the network's discrimination ability.
[0116] To explain in detail the construction method and effect of the substation abnormality detection network in this solution, the following is a most detailed embodiment:
[0117] S1. Obtain multiple abnormal image samples of substation equipment and the abnormal labels corresponding to each abnormal image sample, and convert them into YOLO training format as the substation equipment abnormality data set, and divide them into training set and test set;
[0118] S2. Build an improved YOLOv8 overall architecture, add multiple frequency-domain-dominated feature extraction modules FDFE to the YOLOv8 backbone network, and extract richer frequency-domain features by introducing the frequency-domain perspective.
[0119] S3. Construct multiple high- and low-frequency feature collaborative enhancement modules DFSE dominated by wavelet transform, add them to the feature extraction module dominated by frequency domain, and effectively improve the discrimination ability of the model through the effective interaction of high and low frequency components.
[0120] S4. Input the substation equipment anomaly data set into the substation anomaly detection network to be trained, use the loss constraint training process, and finally output the trained substation anomaly detection network. The trained substation anomaly detection network is used for substation anomaly detection.
[0121] Step S1 specifically includes:
[0122] Create a substation equipment anomaly dataset in YOLO format And the corresponding tags .
[0123] Step S2 specifically includes:
[0124] Build an improved YOLOv8 overall architecture, refer to Figure 3 , the structure of adding multiple frequency-domain-dominated feature extraction modules FDFE to the YOLOv8 backbone network is as follows:
[0125] The first layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0126] The second layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0127] The third layer is the frequency domain-dominated feature extraction module FDFE1;
[0128] The fourth layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0129] The fifth layer is the frequency domain-dominated feature extraction module FDFE2;
[0130] The sixth layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0131] The seventh layer is the frequency domain-dominated feature extraction module FDFE3;
[0132] The eighth layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0133] The ninth spatial pyramid pooling layer SPPF module;
[0134] The tenth layer upsampling Upsample module;
[0135] The eleventh layer concat operation;
[0136] The twelfth layer C2F module;
[0137] The thirteenth layer upsample Upsample module;
[0138] The fourteenth layer is concat operation;
[0139] The fifteenth layer C2F module;
[0140] The sixteenth layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0141] The seventeenth layer is concat operation;
[0142] The eighteenth layer C2F module;
[0143] The nineteenth layer is a standard convolution Conv module with a convolution kernel size of 3*3 and a step size of 2;
[0144] The twentieth layer of concat operation;
[0145] 21st floor C2F module;
[0146] 22nd layer detection head 1;
[0147] The twenty-third layer detection head 2;
[0148] The twenty-fourth layer detection head 3;
[0149] Among them, the specific operation of the third layer FDSE1 is: the feature map output by the second layer →1*1 standard convolution Conv module→Spilt module→High and low frequency feature collaborative enhancement module DFSE→concat connection→1*1 standard convolution Conv module→output a feature map ;
[0150] The specific operation of the fifth layer FDSE2 is: the feature map output by the fourth layer →1*1 standard convolution Conv module→Spilt module→High and low frequency feature collaborative enhancement module DFSE→concat connection→1*1 standard convolution Conv module→output a feature map ;
[0151] The specific operation of the seventh layer FDSE3 is: the feature map output by the fourth layer →1*1 standard convolution Conv module→Spilt module→High and low frequency feature collaborative enhancement module DFSE→concat connection→1*1 standard convolution Conv module→output a feature map ;
[0152] That is, the backbone network uses 5 convolutions for 32-fold downsampling, and the feature maps of the second, third, and fourth downsampling are sent to the FDFE module to extract features and output respectively , , , the feature map of the last downsampling is sent to SPPF and output , the specific formula is as follows.
[0153]
[0154]
[0155]
[0156]
[0157] Step S3 specifically includes:
[0158] like Figure 4 The figure is a schematic diagram of the structure of a feature extraction module in one embodiment. In the DFSE module, it first passes through a 1*1 convolution block , and then the feature map is divided into two parts through the Spilt operation and .
[0159]
[0160] Secondly It will be sent to the DFSE module for processing and the processed output Finally, and Splice and then pass through a 1*1 convolution block Output feature map.
[0161]
[0162]
[0163] Construct the DFSE module. First, use the wavelet transform convolution DWT (Discrete Wavelet Transform) to convolve the downsampled feature map after spilt Perform frequency domain decomposition and decompose it into a low-frequency component and three high frequency components , this is to prepare for subsequent high and low frequency interactions.
[0164]
[0165] At the same time, the low-frequency component is decomposed into two channel parts, namely and ; Concatenate the three high-frequency components through a 3*3 convolution Fusion, and then the fused high-frequency components It is decomposed into two channel parts, namely and , this is for subsequent channel exchange, as shown in the following formula.
[0166]
[0167]
[0168] Secondly, , , , Channel Swapping, Features and Combined into new low-frequency components ;feature and Combined into new high-frequency components , this is to reconfigure the channel information. Then the two combined components and Through 3*3 convolution respectively , , which is the feature fusion obtained by convolution .in, Another 3*3 convolution is required. , this time is to convert the fused high-frequency components into three new high-frequency components The whole process can be expressed as:
[0169]
[0170]
[0171] Then, the obtained high and low frequency components are and Perform global average pooling to obtain the channel representation. Then multiply the representation and the original high and low frequency features element by element to obtain the new enhanced features. and .
[0172]
[0173]
[0174] Next, the features Input the HIN module to extract features and convert them into high-frequency features. The extracted features are combined with the concat features. Subtraction, this is to obtain the refined high-frequency information through the difference information . Then Input HIN module for feature extraction and conversion into low-frequency components, and feature This is to use high-frequency features to supplement low-frequency features to obtain richer low-frequency features. . Similarly, As mentioned above, the low frequency treatment is consistent with the high frequency. Input HIN module for feature extraction and conversion into high-frequency features and Subtract, and we get . Just like the above high frequency processing low frequency, Input HIN module for feature extraction and conversion into low-frequency features and Add together and get .
[0175]
[0176]
[0177]
[0178]
[0179] Finally, and The inverse wavelet transform process outputs a feature map containing frequency domain information.
[0180]
[0181] Step S4 specifically includes:
[0182] The loss-constrained training process is used to output the anomaly detection results. During the training, three loss-constrained network training processes are used, as follows: For example, the first loss function can use the binary cross entropy loss BCE, which quantifies the difference between the model's predicted probability and the actual label. By minimizing the BCE loss, the classification performance of the model can be optimized. The specific formula is:
[0183]
[0184] The second loss function can be the bounding box regression loss CIoU, which is used to fully reflect the similarity between the predicted box and the true box. The specific formula is:
[0185]
[0186] Among them, IoU is the inter-unit union between the predicted bounding box b and the real bounding box The intersection-and-union ratio between them; ) represents the predicted bounding box b and the true bounding box The Euclidean distance between the center points; c is the diagonal length of the minimum closed area containing the two boxes; 𝑣 is a term used to measure the consistency of the aspect ratio; is a weight parameter used to balance the importance of the proportional term and other parts.
[0187] The third loss function can be the distribution focus loss DFL, which is used to deal with the regression problem when predicting continuous variables. The specific formula is:
[0188]
[0189] in, is the true continuous target value; and is in the discretized space, and the true value The closest two adjacent discrete points; and is the true value predicted by the model Drop discrete points and probability or score.
[0190] The overall model loss It can be obtained by weighting the first model loss, the second model loss and the third model loss, which can be expressed as:
[0191]
[0192] in, , , is a hyperparameter that balances between different losses. For example, =7.5, =0.5, =1.5.
[0193] In some embodiments, a total of 6646 abnormal substation images were collected by themselves. These images are divided into training sets and test sets, of which the training set contains 4653 images and the test set contains 1993 images. In this experiment, the division ratio of the training set and the test set is 7:3. In the experiment, the input image size is set to 640*640, and the proposed network is optimized using the Adam optimizer, with momentum decay exponents β1=0.9 and β2=0.999. The learning rate is set to 0.01, and considering the memory size of the hardware device, the batchsize is set to 16. And in order to better evaluate the proposed method, precision P, recall rate R, MAP50, and MAP50-95 are used as evaluation indicators. The substation anomaly detection network is compared with four other excellent algorithms. The compared algorithms are mainly Yolov5n, Yolov7-tiny, Yolov8n, and Yolov10n.
[0194] Table 1 Comparison results of substation anomaly detection network with other excellent algorithms
[0195]
[0196] Table 1 shows the average P, R, MAP50 and MAP50-95 values of the test method. It can be seen that on the substation anomaly data set, the substation anomaly detection network proposed in the embodiment of the present application is higher than other algorithms in all numerical values. Therefore, the substation anomaly detection network proposed in the embodiment of the present application has good detection performance in the substation scenario. Through the substation anomaly detection network, anomalies in the image can be effectively identified and accurate classification can be achieved.
[0197] The above-mentioned method for constructing the substation anomaly detection network obtains multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample, uses the substation anomaly detection network to be trained to extract frequency domain features of the target abnormal image samples, and classifies them based on the extracted frequency domain features to obtain the predicted anomaly corresponding to the target abnormal image samples. This method of using the frequency domain features of image samples for anomaly identification can comprehensively capture the features in the image samples, compared with the traditional method that mainly relies on the spatial domain features of image samples, which is beneficial to improving the network's discrimination ability. The trained substation anomaly detection network is used for substation anomaly detection, which is beneficial to improving the accuracy of multi-classification anomaly detection in the substation environment.
[0198] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0199] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a substation abnormality detection network for implementing the method for constructing a substation abnormality detection network involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more substation abnormality detection network construction devices provided below can refer to the limitations of the substation abnormality detection network construction method above, and will not be repeated here.
[0200] In an exemplary embodiment, Figure 5 As shown, a device 100 for constructing a substation abnormality detection network is provided, comprising: an acquisition module 120, a processing module 140, a calculation module 160 and a training module 180, wherein:
[0201] An acquisition module 120 is used to acquire a plurality of abnormal image samples of substation equipment and an abnormal label corresponding to each abnormal image sample;
[0202] The processing module 140 is used to select a target abnormal image sample from the multiple abnormal image samples, extract frequency domain features of the target abnormal image sample using the substation abnormality detection network to be trained to obtain frequency domain features, and classify based on the frequency domain features to obtain predicted abnormalities corresponding to the target abnormal image sample;
[0203] A calculation module 160, configured to calculate a model loss based on anomaly labels corresponding to target abnormal image samples and predicted anomalies;
[0204] The training module 180 is used to adjust the network parameters of the substation anomaly detection network to be trained based on the model loss when the model loss does not meet the training stop condition, and continue to train the substation anomaly detection network to be trained after the network parameters are adjusted based on the remaining abnormal image samples in the multiple abnormal image samples until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
[0205] The above-mentioned substation anomaly detection network construction device obtains multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample, uses the substation anomaly detection network to be trained to extract frequency domain features of the target abnormal image samples, and classifies them based on the extracted frequency domain features to obtain the predicted anomaly corresponding to the target abnormal image samples. Compared with the traditional method that mainly relies on the spatial domain features of image samples, this method of using the frequency domain features of image samples for anomaly identification can comprehensively capture the features in the image samples, which is beneficial to improving the network's discrimination ability. The trained substation anomaly detection network is used for substation anomaly detection, which is beneficial to improving the accuracy of multi-classification anomaly detection in the substation environment.
[0206] Each module in the above-mentioned substation abnormality detection network construction device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0207] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store abnormal image samples, network parameters of the substation anomaly detection network to be trained, and the substation anomaly detection network that has been trained. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for constructing a substation anomaly detection network is implemented.
[0208] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0209] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0210] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0211] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0212] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0213] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0214] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0215] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for constructing a substation anomaly detection network, characterized in that: The method comprises: Obtain multiple abnormal image samples of substation equipment and the abnormal label corresponding to each abnormal image sample; Selecting a target abnormal image sample from a plurality of abnormal image samples, extracting frequency domain features of the target abnormal image sample using the substation abnormality detection network to be trained to obtain frequency domain features, and performing classification based on the frequency domain features to obtain a predicted abnormality corresponding to the target abnormal image sample; Calculate the model loss based on the abnormal label corresponding to the target abnormal image sample and the predicted abnormality; When the model loss does not meet the training stop condition, the network parameters of the substation anomaly detection network to be trained are adjusted based on the model loss, and the substation anomaly detection network to be trained with the adjusted network parameters is continuously trained based on the remaining abnormal image samples in the multiple abnormal image samples until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
2. The method according to claim 1, characterized in that The method of extracting frequency domain features of the target abnormal image samples using the substation abnormality detection network to be trained to obtain frequency domain features includes: Using the substation anomaly detection network to be trained to perform frequency decomposition on the target abnormal image sample to obtain a plurality of frequency domain feature components with different frequencies; The frequency domain feature components of multiple different frequencies are fused to obtain the frequency domain feature.
3. The method according to claim 2, characterized in that The fusing of multiple frequency domain feature components of different frequencies to obtain frequency domain features includes: Determine a low-frequency component and multiple high-frequency components from multiple frequency domain feature components of different frequencies; perform channel decomposition on the low-frequency component to obtain a low-frequency feature map after channel decomposition; fuse multiple high-frequency components, and perform channel decomposition on the fused features to obtain a high-frequency feature map after channel decomposition; Perform channel exchange based on the low-frequency feature map after channel decomposition and the high-frequency feature map after channel decomposition to obtain a low-frequency feature map after channel exchange and a high-frequency feature map after channel exchange; Feature fusion is performed based on the low-frequency feature map after the channel exchange and the high-frequency feature map after the channel exchange to obtain frequency domain features.
4. The method according to claim 3, characterized in that The step of performing feature fusion based on the low-frequency feature map after the channel exchange and the high-frequency feature map after the channel exchange to obtain frequency domain features includes: Performing convolution processing on the low-frequency feature map after the channel exchange to obtain a processed low-frequency feature map; performing multiple convolution processing on the high-frequency feature map after the channel exchange to obtain multiple processed high-frequency feature maps; Based on the low-frequency feature map after channel decomposition, the processed low-frequency feature map is enhanced, and based on the high-frequency feature map after channel decomposition, multiple processed high-frequency feature maps are enhanced respectively to obtain multiple enhanced feature maps; Based on multiple enhanced feature maps, frequency domain features are obtained.
5. The method according to claim 1, characterized in that The classifying based on the frequency domain features to obtain the predicted abnormality corresponding to the target abnormal image sample includes: Performing inverse wavelet transform processing on the frequency domain features to obtain spatial domain features; Classification is performed based on the spatial domain features to obtain predicted anomalies corresponding to the target abnormal image samples.
6. The method according to claim 1, characterized in that The abnormal label corresponding to the target abnormal image sample and the predicted abnormality calculation model loss include: Based on the first loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the first model loss is calculated; based on the second loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the second model loss is calculated; based on the third loss function, the abnormal labels and predicted abnormalities corresponding to the target abnormal image samples, the third model loss is calculated; The first model loss, the second model loss and the third model loss are weighted to obtain a model loss.
7. A device for constructing a substation abnormality detection network, characterized in that: The device comprises: An acquisition module is used to acquire multiple abnormal image samples of substation equipment and an abnormal label corresponding to each abnormal image sample; A processing module is used to select a target abnormal image sample from multiple abnormal image samples, extract frequency domain features of the target abnormal image sample using the substation abnormality detection network to be trained to obtain frequency domain features, and classify based on the frequency domain features to obtain predicted abnormalities corresponding to the target abnormal image sample; A calculation module, used for calculating a model loss based on anomaly labels and predicted anomalies corresponding to the target abnormal image samples; A training module is used to adjust the network parameters of the substation anomaly detection network to be trained based on the model loss when the model loss does not meet the training stop condition, and continue to train the substation anomaly detection network to be trained after the network parameters are adjusted based on the remaining abnormal image samples in the multiple abnormal image samples until the calculated model loss reaches the training stop condition, thereby obtaining a trained substation anomaly detection network; the trained substation anomaly detection network is used for substation anomaly detection.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Power transmission line small sample abnormal data generation method and system based on diffusion model and feature migration
CN120673192A