Transformer substation secondary circuit intelligent identification method based on multi-scale large kernel attention YOLOV8
By introducing a multi-scale large-core attention YOLOV8 model into the secondary circuit of the substation, combining multi-scale attention blocks and gated space attention units, the problem of low recognition accuracy of existing intelligent recognition algorithms in complex backgrounds is solved, and the terminal strip recognition of secondary loops with high precision and low complexity is achieved.
Patent Information
- Application Number
- CN202411789500.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-14
AI Technical Summary
The existing intelligent recognition algorithm has low recognition accuracy in the complex background of the secondary circuit of the substation, making it difficult to effectively utilize multi-scale information, and its performance deteriorates under small sample recognition tasks.
Using an intelligent recognition method based on multi-scale large-core attention YOLOV8, the MLKA-YOLO model is constructed by introducing multi-scale attention block MAB, multi-scale large-core attention MLKA module and gated spatial attention unit GSAU, and combining transfer learning and cyclic convolutional neural network CRNN to realize the identification of the terminal strip of the secondary loop.
It significantly improves recognition accuracy, enhances the model's ability to capture local and global features, reduces model complexity, and ensures adaptability and real-time recognition capabilities on edge devices.
Smart Images

Figure CN119625708A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of substation secondary circuit identification, and in particular to a substation secondary circuit intelligent identification method based on multi-scale large kernel attention YOLOV8. Background Art
[0002] As a core component of smart grid construction, substations are gradually transforming towards automation and intelligence. In this process, the equipment responsible for power transmission in the substation is called primary equipment, while the auxiliary equipment that monitors and protects the primary equipment is secondary equipment. The electrical connection of the secondary equipment constitutes the secondary circuit, and its reliability is directly related to the safe operation of the power system. Therefore, the safety detection and maintenance of the secondary circuit has become an important part of ensuring power supply safety.
[0003] It is a general trend to apply digital technology to the management and operation of the power industry to improve system operation efficiency and emergency response capabilities. As an important component of the power system, the inspection and maintenance of the secondary circuit of the substation has always relied on manual operation. However, the traditional manual inspection mode is inefficient, with a single method and scattered data, which is not conducive to the timely discovery of equipment hidden dangers. In order to meet the transformation needs of the smart grid, the use of artificial intelligence technologies such as deep learning to realize the intelligent inspection of the secondary circuit can not only reduce the workload of grassroots personnel, but also help improve the overall safety level of the power grid. Summary of the invention
[0004] The purpose of this invention is to provide a substation secondary circuit intelligent identification method based on multi-scale large kernel attention YOLOV8, which can not only overcome the problem of performance degradation of existing intelligent recognition algorithms under small sample recognition tasks, but also reduce the complexity of the model while activating local feature information, ensure the adaptability of the model on edge devices, and effectively improve computing efficiency.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions: The intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 includes the following steps: S1. Dataset construction: process and enhance the original drawing images to generate the original image dataset and divide the data into test set and training set; S2. Use the transfer learning model to pre-train and adjust the YOLOV8 model on a large-scale dataset; S3. Introduce the multi-scale attention block MAB, the multi-scale large kernel attention MLKA module, and the gated spatial attention unit GSAU into the YOLOV8 model to build the MLKA-YOLO model; S4, input the training set into the MLKA-YOLO model for training, and after the training is completed, input the test set for secondary circuit terminal block recognition; S5. Based on the Paddle OCR framework, the recurrent convolutional neural network (CRNN) is used to recognize the line names of terminal blocks.
[0006] Furthermore, the feature processing of the multi-scale attention block MAB in step S3 includes the following steps: S301, normalizing the feature map through layers; S302, the normalized feature map is sent to the MLKA module; S303, the MLKA module divides the feature map into multiple groups and applies LKA of different scales on each group to capture attention maps of different scales; S304, the output of MLKA is added element by element to the original feature map X to form a residual connection and then normalized again through the layer.
[0007] Furthermore, the feature map after MLKA and two layer normalization is then sent to the GSAU module to further activate local information through spatial attention and gating mechanisms.
[0008] Furthermore, LKA large kernel attention includes depthwise convolution, dilated convolution and point-wise convolution.
[0009] Further, step S303 includes: The input feature map X is divided into n groups, each with The size of C, H, and W represent the number of channels, height, and width of the feature map, respectively. For the i-th group , apply LKA with different configurations to generate attention maps of different scales: Finally, after gated aggregation, the attention maps of different scales are dynamically adjusted, and the model's ability to capture local information is enhanced. The gated aggregation of is represented as: in, Represents spatial gating, through Deep convolution generation, represents the convolution size, Indicates the LKA of the corresponding scale.
[0010] Furthermore, the design of the MLKA module takes into account computational efficiency. ,Will Decompose into The depth convolution, The total computational complexity of MLKA is expressed as: in, , for decomposition parameters.
[0011] Furthermore, the gated spatial attention unit GSAU is generated by another deep convolution, expressed as: Among them, X is the input feature, is the depth convolution representation; Gating signal Perform element-wise multiplication with the output of spatial attention to obtain the final weighted feature map: in is another transformed feature map.
[0012] Furthermore, the processing and enhancement of the original drawing image includes the following steps: S101, performing ColorJitter processing on the original digital drawing to generate a data set including the original image; S102, increasing the diversity of training data by randomly perturbing the color attributes of the image; S103. Use MakeSense to label the terminal blocks and lines in the image and construct a data set format suitable for model training.
[0013] Furthermore, the step of: saving the identified terminal line information into a json file as an information comparison library for subsequent inspection.
[0014] The advantages of the present invention are: (1) Existing intelligent recognition algorithms have obvious deficiencies in extracting key features of complex scenes and are unable to fully utilize multi-scale information, resulting in a significant decrease in recognition accuracy in the complex background of the secondary circuit of a substation. The multi-scale attention block (MAB) introduced in this paper fuses multi-scale information under the MetaFormer framework and greatly improves recognition accuracy through effective feature aggregation; it also pre-trains and fine-tunes the YOLOV8 model on a large-scale dataset to improve the generalization ability of the model on small sample data and enhance the ability to extract better features in the complex background of the secondary circuit of a substation; (2) When dealing with small samples and complex background tasks, current intelligent recognition algorithms usually face the problem of insufficient fusion of global and local information, which leads to a decrease in the accuracy of the model during the recognition process and makes it difficult to effectively eliminate artifacts. Through a large kernel structure and a multi-scale gating mechanism, the MLKA proposed in this invention captures features at multiple granularity scales, making up for the inability of traditional algorithms to capture the relationship between global and local features, helping to accurately locate secondary circuit terminal blocks and lines, and avoiding common misjudgment problems such as block artifacts; (3) When faced with high-complexity tasks, current intelligent recognition algorithms are often difficult to adapt to resource-constrained environments due to the high computational complexity of the model, resulting in difficulties in real-time detection and edge deployment. This paper combines the gating mechanism with spatial attention and proposes a gated spatial attention unit (GSAU), which reduces the complexity of the model while activating local feature information, ensuring the adaptability of the model on edge devices. It not only effectively improves the computational efficiency, but also realizes real-time recognition of secondary circuits, which is suitable for resource-constrained substation field environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of the present invention; Figure 2 This is a schematic diagram of the MAB module structure of the present invention; Figure 3 This is a schematic diagram of the MLKA module structure of the present invention; Figure 4 This is a schematic diagram of the GSAU module structure of the present invention; Figure 5 This is a diagram of the model iteration process of Example 1 of the present invention; Figure 6 This is a schematic diagram of the model recognition accuracy of Example 1 of the present invention. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0017] Intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8, please refer to Figure 1 , including the steps of: S1. Dataset construction: process and enhance the original drawing images, generate the original image dataset, and divide the data into test set and training set.
[0018] S101, performing ColorJitter processing on the original digital drawings to generate a total of 50 data-enhanced data sets including the original images; S102, increasing the diversity of training data by randomly perturbing the color attributes of the image, thereby improving the robustness and generalization ability of the model; S103. Use MakeSense to label the terminal blocks and lines in the image and construct a data set format suitable for model training.
[0019] S2. During the intelligent inspection of the secondary circuit of the substation, due to the complex environment and the difficulty of manual line identification, the sample volume of the circuit image is insufficient, which makes it difficult for traditional image recognition methods to effectively identify these circuits. To address this problem, this embodiment adopts a transfer learning model. By pre-training and fine-tuning the YOLOV8 model on a large-scale data set, the YOLOV8 model trained on the large-scale data set is migrated to a small sample data set of the secondary circuit terminal block, and initialized based on the weights of the pre-trained model, thereby effectively making up for the deficiency of small sample data and improving the recognition ability of the model on scarce circuit samples.
[0020] The transfer learning model can significantly improve the recognition effect of the target domain tasks, especially the small sample tasks, by pre-training on a large-scale source domain dataset and then migrating the model to the target domain task. Considering the complexity and special needs of the secondary circuit system of the substation, the model not only needs to have an efficient application speed, but also needs to ensure the high reliability of the learned information. Therefore, the present invention introduces a small sample secondary circuit recognition method based on transfer learning. Through the layer migration technology, the parameters and weights of the pre-trained model are loaded into the new model, and a complete model including the fully connected layer is retrained. First, the fully connected layer weights that have been trained in the first stage are loaded to ensure that the learned high-level features are effectively utilized. Then, through the layer freezing technology, the key layers of the convolutional network or the entire model are fine-tuned to achieve adaptation to the small sample data. Finally, the model after transfer learning and fine-tuning can effectively integrate the knowledge learned from the large-scale dataset, and optimize for small sample data to generate an efficient and adaptable secondary circuit terminal block recognition and detection model. The iterative results of the model training process are as follows. Figure 5 shown.
[0021] S3. Introduce the multi-scale attention block MAB, the multi-scale large kernel attention MLKA module, and the gated spatial attention unit GSAU into the YOLOV8 model to build the MLKA-YOLO model.
[0022] S301, Introducing Multi-Scale Attention Block (MAB) MAB combines multi-scale large kernel attention (MLKA) and gated spatial attention unit (GSAU), such as Figure 2 , 3As shown in Figure 4, the goal of MAB is to capture the long-distance dependencies of image features through the attention mechanism and effectively aggregate local and global information. The input of MAB is a feature map , the output is the feature map enhanced by the attention mechanism. First, input the feature map Normalize by layer: in, This represents layer normalization. Next, the feature map It is fed into the MLKA module. The MLKA module builds long-distance relationships by decomposing a large kernel convolution into depth convolution, dilated convolution, and point-by-point convolution. MLKA also combines a multi-scale mechanism to capture attention maps of different scales by splitting the feature map into multiple groups and applying LKA (Large Kernel Attention) of different scales on each group, as follows: in, are learnable scaling factors. The output of the MLKA module is an attention map adjusted by multi-scale and gating mechanisms. This attention map can better capture local and global feature information. Add element by element to form a residual connection, and then normalize it again through the layer .
[0023] Feature map after MLKA and two layer normalization It is then sent to the GSAU module, which further activates local information through spatial attention and gating mechanisms to reduce the complexity of the model.
[0024] in, are learnable scaling factors, and the output of the GSAU module is a feature map enhanced with spatial attention.
[0025] S302, Introducing large kernel structure and multi-scale gating mechanism The long-distance dependencies at different granularity levels are captured by combining large kernel convolution and multi-scale mechanism. The purpose of large kernel attention (LKA) is to establish long-distance dependencies between feature maps, which is achieved by decomposing large kernel convolution into depth convolution, dilated convolution and point-by-point convolution. First, given the input feature map , LKA can be expressed as: in, represents the depthwise convolution, represents the depth-dilated convolution, Represents point-by-point convolution. This decomposition method enables LKA to effectively simulate the effect of large kernel convolution while reducing computational complexity.
[0026] In order to capture features of different scales, a multi-scale mechanism is introduced to convert the input feature map Split into groups, each with The size of C, H, and W represent the number of channels, height, and width of the feature map, respectively. For each group , apply LKA with different configurations to generate attention maps of different scales: In this way, MLKA can consider both local details and global context at the same time, improving the model's ability to capture features of different scales. Finally, after gated aggregation, attention maps of different scales are dynamically adjusted to avoid the block effect caused by dilated convolution and enhance the model's ability to capture local information. , the gated aggregation can be expressed as: in, Represents spatial gating, through Deep convolution generation, Indicates the LKA of the corresponding scale. Spatial gating The attention map of each scale can be adaptively adjusted, so that the model can process different features more flexibly. At the same time, the design of the MLKA module in this step also takes computational efficiency into consideration.
[0027] For input , the total computational complexity of MLKA can be expressed as: This design allows MLKA to flexibly capture features of different scales while maintaining computational efficiency. Through the above design, the MLKA module proposed in the present invention can effectively combine large kernel convolution and multi-scale mechanism to capture long-distance dependencies at different granularity levels, thereby improving the performance of secondary loop super-resolution tasks.
[0028] S303. Design of Gated Spatial Attention Unit (GSAU) The purpose of the gated spatial attention unit is to enhance the network's ability to capture spatial context information while maintaining computational efficiency. This is achieved by introducing spatial attention and gating mechanisms, aiming to improve the quality of feature representation. The core idea is to use spatial attention to weight feature maps and dynamically adjust these weights through a gating mechanism. This approach allows the network to adaptively focus on important spatial regions while ignoring irrelevant information.
[0029] The purpose of spatial attention is to assign a weight to each position in the feature map, which indicates the importance of the position in the overall context. In GSAU, spatial attention is implemented through deep convolution and can be expressed as .
[0030] The gating mechanism is used to dynamically adjust the output of spatial attention. This is achieved by introducing a gating signal that controls the flow of information, enhancing important features while suppressing unimportant features. In GSAU, the gating signal is generated by another deep convolution and can be expressed as: Gating signal Perform element-wise multiplication with the output of spatial attention to obtain the final weighted feature map: in It is another transformed feature map, which can be a different representation of the same feature map, or information passed from other network layers.
[0031] S4. Input the training set into the MLKA-YOLO model for training. After the training is completed, input the test set for secondary circuit terminal block recognition.
[0032] S5. Based on the Paddle OCR framework, the recurrent convolutional neural network CRNN is used to recognize the line name of the terminal block; S6. The identified terminal line information is saved as a json file as an information comparison library for subsequent inspection.
[0033] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent identification method for substation secondary circuits based on multi-scale large kernel attention YOLOV8, characterized by: Includes steps: S1. Dataset construction: process and enhance the original drawing images to generate the original image dataset and divide the data into test set and training set; S2. Use the transfer learning model to pre-train and adjust the YOLOV8 model on a large-scale dataset; S3. Introduce the multi-scale attention block MAB, the multi-scale large kernel attention MLKA module, and the gated spatial attention unit GSAU into the YOLOV8 model to build the MLKA-YOLO model; S4, input the training set into the MLKA-YOLO model for training, and after the training is completed, input the test set for secondary circuit terminal block recognition; S5. Based on the Paddle OCR framework, the recurrent convolutional neural network (CRNN) is used to recognize the line names of terminal blocks.
2. According to claim 1, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The feature processing of the multi-scale attention block MAB in step S3 includes the following steps: S301, normalizing the feature map through layers; S302, the normalized feature map is sent to the MLKA module; S303, the MLKA module divides the feature map into multiple groups and applies LKA of different scales on each group to capture attention maps of different scales; S304, the output of MLKA is added element by element to the original feature map X to form a residual connection and then normalized again through the layer.
3. According to claim 2, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The feature map after MLKA and two layer normalizations is then sent to the GSAU module to further activate local information through spatial attention and gating mechanisms.
4. According to claim 2, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The LKA large kernel attention includes depthwise convolution, dilated convolution and point-wise convolution.
5. According to claim 2, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The step S303 includes: The input feature map X is divided into n groups, each with The size of C, H, and W represent the number of channels, height, and width of the feature map, respectively. For the i-th group , apply LKA with different configurations to generate attention maps of different scales: Finally, after gated aggregation, the attention maps of different scales are dynamically adjusted, and the model's ability to capture local information is enhanced. The gated aggregation is expressed as: in, Represents spatial gating, through Deep convolution generation, represents the convolution size, Indicates the LKA of the corresponding scale.
6. According to claim 5, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The design of the MLKA module takes into account computational efficiency. ,Will Decompose into The depth convolution, The total computational complexity of MLKA is expressed as: in, , for decomposition parameters.
7. According to claim 1, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The gated spatial attention unit GSAU is generated by another deep convolution and is expressed as: Among them, X is the input feature, is the depth convolution representation; Gating signal Perform element-wise multiplication with the output of spatial attention to obtain the final weighted feature map: in is another transformed feature map.
8. According to claim 1, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: The processing and enhancement of the original drawing image includes the following steps: S101, performing ColorJitter processing on the original digital drawing to generate a data set including the original image; S102, increasing the diversity of training data by randomly perturbing the color attributes of the image; S103. Use MakeSense to label the terminal blocks and lines in the image and construct a data set format suitable for model training.
9. According to claim 1, the intelligent identification method of substation secondary circuit based on multi-scale large kernel attention YOLOV8 is characterized in that: It also includes the steps of: saving the identified terminal line information into a json file as an information comparison library for subsequent inspection.
Citation Information
Cited By
Terminal block drawing detection method based on two-stage optimization and multi-stage feature enhancement
CN120260069A
Cow house leaving track identification method
CN120673447A
Method for recognizing cattle leaving their sheds
CN120673447B
Sign language recognition method and device based on improved YOLOv12
CN120748041A