A Substation Abnormal Behavior Detection Method Based on Lightweight YOLOv11 Model

By combining a lightweight YOLOv11 model with innovative modules, the problems of high computational resource consumption and missed detections/false judgments in complex scenarios of substation abnormal behavior detection models have been solved, achieving efficient and accurate abnormal behavior detection for edge devices.

CN121392980BActive Publication Date: 2026-04-21GUIZHOU POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUIZHOU POWER GRID CO LTD
Filing Date
2025-12-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing abnormal behavior detection models for substations consume large amounts of computational resources, making them unsuitable for real-time deployment on edge devices with limited computing power. Furthermore, they are prone to missing or misjudging low-frequency abnormal events in complex scenarios.

Method used

A lightweight YOLOv11 model is adopted, combined with the gradient-aware dynamic channel attention (GDCA) module and the spatial-channel dual-domain attention (SCA) mechanism, and reconstructed into a ghost network backbone. The upsampling operator is replaced by depthwise separable convolution and bidirectional interpolation convolution, and a dynamic frequency weighting mechanism and feature contrast regularization strategy are introduced to optimize the loss function.

Benefits of technology

It improves the model's ability to perceive subtle abnormal behaviors in complex scenarios, enables efficient deployment of edge devices, reduces false detections and missed detections, and enhances the early warning effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121392980B_ABST
    Figure CN121392980B_ABST
Patent Text Reader

Abstract

This invention discloses a lightweight YOLOv11 substation abnormal behavior detection method based on QD optimization, belonging to the field of substation abnormal behavior detection technology. The method includes acquiring image data from the substation site, extracting features from the image data, and inputting these features into a behavior detection model. The detection model enhances the features extracted from the image data using a dynamic feature enhancement module that includes a gradient-aware dynamic channel attention module and a spatial-channel dual-domain attention mechanism. The enhanced features are then input into the reconstructed detection model for detection. The method predicts and classifies candidate regions of abnormal behavior detected in the target image, and trains the model using a quality-driven loss function that includes a dynamic frequency weighting mechanism and a feature contrast regularization strategy. This invention effectively enhances the model's ability to perceive subtle abnormal behavior features in complex substation scenarios by introducing a GDCA module and a SCA mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of substation abnormal behavior detection technology, and in particular to a substation abnormal behavior detection method based on a lightweight YOLOv11 model. Background Technology

[0002] As a critical hub in the power system, the stability and safety of substations directly affect the continuity and reliability of the entire power supply network. Power workers performing tasks such as equipment inspection, switching operations, and maintenance in substations often find themselves in environments with dense high-voltage equipment, complex conditions, and numerous hazards. Because these operations involve a large number of high-voltage devices and complex operating procedures, improper operation or abnormal behavior can easily lead to serious consequences such as equipment damage, cascading failures, regional power outages, and even personal injury or death.

[0003] In recent years, with the advancement of video surveillance and artificial intelligence technologies, behavior monitoring systems for substation workers have gradually gained attention. Some existing technical solutions attempt to combine image recognition, human posture estimation, and deep learning algorithms to detect and warn of workers' non-standard behaviors such as falls, not wearing safety helmets, and unauthorized contact with equipment.

[0004] However, existing technologies still have many limitations. On the one hand, in complex scenarios, device occlusion, changes in lighting, and background interference often weaken abnormal posture features, leading to missed detections and misjudgments of key behaviors. On the other hand, existing behavior detection models are mostly based on convolutional neural network architectures with large parameters, which consume a lot of computational resources and are not suitable for real-time deployment on edge devices with limited computing power. In addition, the insufficient learning ability for low-frequency abnormal events further limits the actual early warning effect of the models.

[0005] Therefore, there is an urgent need to propose a model system with stronger ability to capture abnormal features, better lightweight structure and higher specificity for anomaly detection, so as to improve the intelligent identification level of abnormal behavior in substations and provide power workers with safer and more reliable means of operation protection. Summary of the Invention

[0006] In view of the above-mentioned problems, the present invention is proposed.

[0007] Therefore, the problem that this invention aims to solve is that existing behavior detection models are mostly based on convolutional neural network architectures with large parameters, which consume a lot of computing resources and are not suitable for real-time deployment on edge devices with limited computing power.

[0008] To address the aforementioned technical problems, this invention provides the following technical solution: a substation abnormal behavior detection method based on a lightweight YOLOv11 model, comprising: acquiring image data of the substation site; extracting features from the image data; and inputting the extracted features into a behavior detection model; the behavior detection model includes a gradient-aware dynamic channel attention (GDCA) module and a spatial-channel dual-domain attention module. The dynamic feature enhancement module of the Attention (SCA) mechanism enhances the features extracted from the image data. The enhanced features are then input into the reconstructed behavior detection model for detection. The reconstruction includes replacing the original backbone network of the behavior detection model with a ghost network as the backbone, replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution, and combining a dynamic pruning strategy based on channel activation intensity to perform lightweight structural reconstruction of the behavior detection model. The abnormal behavior candidate regions detected in the target image are predicted and classified, and the model is trained using a quality-driven loss function (QD) including a dynamic frequency weighting mechanism and a feature contrast regularization strategy. The detection results are output, identifying the abnormal behavior categories and corresponding location information in the image, and edge inference deployment is completed at the model end.

[0009] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the gradient-aware dynamic channel attention module dynamically adjusts the channel attention weight distribution according to the channel gradient response of the classification loss function; the spatial-channel dual-domain attention mechanism calculates the spatial attention map and the channel attention map based on differential pooling and a lightweight multilayer perceptron (MLP).

[0010] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the dynamic adjustment of channel attention weight distribution includes: a gradient-aware dynamic channel attention module dynamically adjusting the channel attention weight distribution according to the channel gradient response of the classification loss function; the gradient-aware dynamic channel attention module introduces a sensitivity factor to quantify the contribution of each channel to the classification result, expressed by the formula:

[0011] ,

[0012] in, Sensitivity factor; This is the loss function used to distinguish between abnormal and normal behavior. For the first Statistical measure of activation intensity for each channel; For classification loss on the first The gradient of each channel, This represents the total number of channels. For channel indexing;

[0013] The formula is expressed as:

[0014] ,

[0015] in, This represents the number of candidate regions involved in the calculation. For candidate region index, For the first The true category label of each candidate region Indicates abnormal behavior. This indicates normal behavior; For the first The predicted probability that each candidate region belongs to abnormal behavior, and , For the Sigmoid function, The log-odds of the output for the classification branch; the... The formula for the activation intensity statistics of each channel is expressed as:

[0016] ,

[0017] in, The height of the feature map, The width of the feature map. For the feature map The spatial location of each channel eigenvalues, This represents the vertical position in the feature map. The horizontal position in the feature map; combining the channel global average pooling features and the sensitivity factor, dynamic attention weights are generated, expressed by the formula:

[0018] ,

[0019] in, For the first Attention weights for each channel.

[0020] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the spatial attention map is calculated by the difference between max pooling and mean pooling, expressed by the following formula:

[0021] ,

[0022] in, This is a spatial attention map. It is a convolutional layer with a kernel size of 1×1. For max pooling features, The average pooling feature is used; the channel attention map is generated through global pooling and a multilayer perceptron, as expressed by the formula:

[0023] ,

[0024] in, This is a channel attention map. For activation function, It is a multilayer perceptron. For global average pooling, This is the input feature map.

[0025] The beneficial effects of this preferred technical solution are: by introducing the GDCA module and SCA mechanism, it can accurately focus on abnormal behavior characteristics and promptly detect subtle abnormal actions.

[0026] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the method of replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution includes decomposing the standard convolution into a combination of depthwise separable convolution and linear transformation, expressed by the following formula:

[0027] ,

[0028] in, To output the feature map, For depthwise separable convolution kernels, , This represents the total number of depthwise separable convolutional kernels; For the input feature map, The channel compression matrix is ​​used; during the upsampling stage, a bidirectional interpolated convolution (BIC) is designed to replace the original transposed convolution, as expressed by the formula:

[0029] ,

[0030] in, This is the feature map after upsampling; For depth-separable convolutional layers with a kernel size of 3×3; This is an upsampling operation; This is a pixel recombination operation.

[0031] The advantages of this preferred technical solution are: by using a ghost backbone network and a deep separable BIC upsampling operator, the computational load of the model is reduced, and efficient deployment can be achieved on edge devices.

[0032] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the dynamic frequency weighting mechanism dynamically adjusts the weights according to the frequency of occurrence of samples of the abnormal category, as expressed by the formula:

[0033] ,

[0034] in, For abnormal categories The weight, The total number of samples in the training dataset. For abnormal categories The cumulative number of occurrences, As a smoothing factor, This represents the current training iteration number. The threshold for the initial iteration. This represents the rate of increase in weight.

[0035] As a preferred embodiment of the substation abnormal behavior detection method based on the lightweight YOLOv11 model described in this invention, the feature comparison regularization strategy distinguishes between abnormal and normal behaviors by widening the distribution distance in the feature space, as expressed by the formula:

[0036] ,

[0037] in, For feature contrast regularization loss, This represents the number of samples in the current batch. This represents the features of abnormal samples. The centroid of the abnormal sample features. The centroid of the normal sample features. The Hinge function is used; the final total loss function is a weighted sum of the classification, localization, and contrast losses, expressed as follows:

[0038] ,

[0039] in, For bounding box regression loss, The weighting coefficients of the loss function are used to distinguish between abnormal and normal behavior. These are the weighting coefficients for the bounding box regression loss. These are the weighting coefficients for the feature contrast regularization loss.

[0040] The beneficial effects of this invention are as follows: By introducing gradient-aware dynamic channel attention (GDCA) and spatial-channel dual-domain attention (SCA) mechanisms, this invention effectively enhances the model's ability to perceive subtle abnormal behavior features in complex substation scenarios; by combining the ghost backbone network, BIC upsampling operator, and dynamic pruning strategy, it achieves a highly lightweight model structure and significantly improves edge deployment efficiency; at the same time, by optimizing the QD loss function, it enhances the learning effect on low-frequency abnormal behaviors, reduces false detections and false negatives, and can provide early warnings and prevent safety accidents caused by various abnormal behaviors. Attached Figure Description

[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart of a substation abnormal behavior detection method based on a lightweight YOLOv11 model in Example 1.

[0043] Figure 2 This is a GhostNetv3 network architecture diagram of a substation abnormal behavior detection method based on a lightweight YOLOv11 model in Example 1.

[0044] Figure 3 This is a graph showing the changes in model training metrics for a substation abnormal behavior detection method based on a lightweight YOLOv11 model in Example 2.

[0045] Figure 4 This is a model loss diagram for a substation abnormal behavior detection method based on a lightweight YOLOv11 model in Example 2. Detailed Implementation

[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0047] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0048] Example 1, referring to Figure 1 and Figure 2This is the first embodiment of the present invention, which provides a method for detecting abnormal behavior in substations based on a lightweight YOLOv11 model, including, as follows: Figure 1 As shown:

[0049] S1: Acquire image data from the substation site, extract features from the image data, and input them into the behavior detection model.

[0050] S2: The behavior detection model enhances the features extracted from image data through a dynamic feature enhancement module that includes a gradient-aware dynamic channel attention module and a spatial-channel dual-domain attention mechanism.

[0051] S3: Input the enhanced features into the reconstructed behavior detection model for detection; the reconstruction includes replacing the original backbone network of the behavior detection model with a ghost network as the backbone, replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution, and combining a dynamic pruning strategy based on channel activation intensity to perform lightweight structural reconstruction of the behavior detection model.

[0052] S4: Predict and classify candidate regions of abnormal behavior detected in the target image, and train the model using a quality-driven loss function that includes a dynamic frequency weighting mechanism and a feature contrast regularization strategy.

[0053] S5: Output the detection results, identify the categories of abnormal behaviors in the image and the location information corresponding to the abnormal behaviors, and complete the edge inference deployment on the model side.

[0054] It should be noted that the behavior detection model of this invention uses YOLOv11 (You Only Look Once version 11 nano, the 11th version of the target detection nanomodel) to adapt to diverse application scenarios and needs. Considering the limited storage resources of actual edge devices, YOLOv11n is used as the baseline model for improvement, aiming to reduce the number of parameters while improving the model's detection accuracy for abnormal behavior.

[0055] Furthermore, in step S2, at the dynamic feature enhancement level, the gradient-aware dynamic channel attention module (GDCA) and the spatial-channel dual-domain attention mechanism are integrated. The GDCA module dynamically adjusts the channel attention weights with the help of loss gradient feedback, accurately quantifies the contribution of each channel to the detection of abnormal behavior, and enables the model to keenly focus on key abnormal feature channels. The spatial-channel dual-domain attention mechanism, through differential pooling and lightweight MLP interaction, simultaneously improves the spatial positioning accuracy of abnormal behavior and the correlation between channels, solves the problem of insufficient response of traditional attention mechanisms to abnormal features, and ensures that the model can comprehensively and accurately capture subtle abnormal pose features in complex scenes.

[0056] Specifically, this includes a gradient-aware dynamic channel attention module that dynamically adjusts the channel attention weight distribution based on the channel gradient response of the classification loss function. The gradient-aware dynamic channel attention module also introduces a sensitivity factor to quantify the contribution of each channel to the classification result, expressed by the formula:

[0057] ,

[0058] in, Sensitivity factor, sensitivity factor The larger the value, the more critical the channel is for detecting abnormal behavior; This is the loss function used to distinguish between abnormal and normal behavior. For the first The activation intensity statistic of the channel is derived from the . The channel feature values ​​are obtained by global average pooling. For classification loss on the first The gradient of each channel, This represents the total number of channels. For channel indexing.

[0059] in Using binary cross-entropy loss, the formula is expressed as:

[0060] ,

[0061] in, This represents the number of candidate regions involved in the calculation. For candidate region index, For the first The true category label of each candidate region Indicates abnormal behavior. This indicates normal behavior; For the first The predicted probability that each candidate region belongs to abnormal behavior, and , For the Sigmoid function, The logit value output for the classification branch.

[0062] To perform channel-level metrics, the first... The activation intensity statistics for each channel are as follows:

[0063] ,

[0064] in, The height of the feature map, The width of the feature map. For the feature map The spatial location of each channel eigenvalues, This represents the vertical position in the feature map. This represents the horizontal position in the feature map.

[0065] By combining the channel-wide average pooling feature with the sensitivity factor, dynamic attention weights are generated, expressed by the formula:

[0066] ,

[0067] in, For the first The attention weights for each channel are adjusted by fusing channel statistical features with gradient sensitivity, allowing the model to focus on critical channels.

[0068] The spatial-channel dual-domain attention mechanism is based on differential pooling and lightweight multilayer perceptron to compute spatial attention maps and channel attention maps.

[0069] Spatial attention maps are calculated using the difference between max pooling and mean pooling, expressed by the following formula:

[0070] ,

[0071] in, This is a spatial attention map. It is a convolutional layer with a kernel size of 1×1. For max pooling features, This represents the average pooling characteristic.

[0072] The channel attention map is generated through global pooling and a multilayer perceptron, and the formula is expressed as:

[0073] ,

[0074] in, This is a channel attention map. For activation function, It is a multilayer perceptron, containing fully connected layers and activation functions. For global average pooling, This is the input feature map.

[0075] Furthermore, in step S3, the Ghost Network of this invention replaces the traditional network in the YOLOv11 model with the GhostNetv3 (Ghost Network version 3) backbone network. It utilizes feature reparameterization technology to compress the number of parameters, and employs a depth-separable BIC upsampling operator to reduce computation. Simultaneously, it implements dynamic channel pruning based on channel activation intensity statistics. This significantly reduces the number of parameters while maintaining detection accuracy. The architecture of GhostNetv3 is as follows: Figure 2 As shown:

[0076] In this architecture, This represents a depthwise separable convolution layer. For batch normalization; represents a fully connected layer used to map features to the output space; 1×1 indicates a convolutional kernel size of 1×1, and 3×3 indicates a convolutional kernel size of 3×3; the Ghost module is the core component of the Ghost network.

[0077] Specifically, replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution involves decomposing the standard convolution into a combination of depthwise separable convolution and linear transformation, expressed by the following formula:

[0078] ,

[0079] in, To output the feature map, For depthwise separable convolution kernels, , This represents the total number of depthwise separable convolutional kernels; For the input feature map, This is the channel compression matrix, used to perform a linear transformation on the channel dimensions of the input features. , It is a real number matrix (weight matrix). The number of channels after compression and satisfying .

[0080] In the upsampling stage, a bidirectional interpolated convolution (BIC) is designed to replace the original transposed convolution, as expressed by the formula:

[0081] ,

[0082] in, This is the feature map after upsampling; For depth-separable convolutional layers with a kernel size of 3×3; This is an upsampling operation; This is a pixel shuffle operation that improves spatial resolution by rearranging channel data.

[0083] The computational cost is reduced by using depthwise separable convolution and pixel recombination while preserving high-frequency detail features. Furthermore, progressive dynamic pruning is implemented based on channel activation intensity statistics, removing 5% of low-response channels every 10 training epochs, ultimately achieving a 40% parameter compression with a detection accuracy loss of less than 0.5%, as expressed in the formula:

[0084] ,

[0085] in, This is a statistic on channel activation strength. Calculated as an exponential moving average. To correct the linear unit.

[0086] Furthermore, in step S4, a dynamic frequency weighting mechanism and a feature comparison regularization strategy are proposed. The dynamic frequency weighting adaptively adjusts the weights based on the frequency of sample occurrence, thereby increasing the loss weight of low-frequency abnormal samples. The feature comparison regularization constrains the feature space distribution of abnormal and normal behaviors, making the feature distinction between the two more obvious. Finally, Pareto optimization is used to balance detection accuracy and speed, thereby comprehensively improving the model performance.

[0087] Specifically, the dynamic frequency-weighted mechanism dynamically adjusts the weights based on the frequency of occurrence of samples of the anomaly category, as expressed by the formula:

[0088] ,

[0089] in, For abnormal categories The weight, The total number of samples in the training dataset. For abnormal categories The cumulative number of occurrences, A smoothing factor used to smooth out anomaly categories. Cumulative occurrences Smoothing: When a certain anomalous class of samples has not yet appeared or has appeared very infrequently in the early stages of training, if... This will lead to Divergence or excessive weighting can cause gradient oscillations, introducing... This can avoid division by zero and limit the extreme increase of weights, thereby improving the numerical stability of dynamic frequency weighting; This represents the current training iteration number. The threshold for the initial iteration. The weight growth rate is used to increase the weight of low-frequency abnormal losses.

[0090] In this embodiment, Setting it to 1 effectively suppresses weight fluctuations in the early stages of training; when... As training gradually increases, The impact on the weights tends to be negligible, thus not affecting later convergence and final accuracy.

[0091] Feature contrast regularization strategy distinguishes between abnormal and normal behaviors by increasing the distribution distance between them in the feature space. The formula is as follows:

[0092] ,

[0093] in, For feature contrast regularization loss, This represents the number of samples in the current batch. This represents the features of abnormal samples. The centroid of the abnormal sample features. The centroid of the normal sample features. It is a Hinge function that forces outliers to deviate from the normal distribution.

[0094] The final total loss function is a weighted sum of the classification, localization, and contrast losses, expressed by the formula:

[0095] ,

[0096] in, For bounding box regression loss, The weighting coefficients of the loss function are used to distinguish between abnormal and normal behavior. is the weight coefficient of the bounding box regression loss, and is the weight coefficient of the feature contrast regularization loss.

[0097] The Complete Cross-Union Ratio (CIoU) Loss, which measures the overlap area, center point distance, and aspect ratio consistency between the predicted and ground truth bounding boxes, is used as follows:

[0098] ,

[0099] in, For intersection, union, and comparison, For Euclidean distance, and These are the center coordinates of the predicted bounding box and the ground truth bounding box, respectively. It is the diagonal distance of the smallest closed region that simultaneously contains both the predicted bounding box and the ground truth bounding box. The weighting factor for the consistency coefficient is used to balance the loss term. It is usually determined through experiments or Pareto optimization and its value ranges from (0, 1). This is the consistency coefficient, used to measure the consistency between the predicted bounding box and the ground truth bounding box in terms of aspect ratio.

[0100] The formula for calculating the consistency coefficient is as follows:

[0101] ,

[0102] in, and These are the width and height of the predicted bounding box, respectively. and These are the width and height of the actual bounding box, respectively. The value range is [0, ∞), and the smaller the value, the more consistent the aspect ratio.

[0103] To further explain, , , The determination of the weights is based on the Pareto optimization strategy, which aims to balance the three objectives of classification accuracy, localization accuracy, and feature discriminativeness. This strategy treats model training as a multi-objective optimization problem. By monitoring the degree of conflict in the gradient directions of each loss term, it dynamically adjusts the weight coefficients to ensure that the update path of the model parameters follows the Pareto front, thereby obtaining the optimal balance point for overall performance. In a specific embodiment of this invention, after the above optimization process converges, the weight coefficients used are: , , This set of values ​​achieves the best performance balance on the substation abnormal behavior detection dataset provided by this invention, specifically including:

[0104] The training objective is considered as three independent but mutually restraining sub-objectives (i.e., classification accuracy, localization (bounding box) accuracy, and feature separability). The model dynamically adjusts the gradient directions of these three objectives through Pareto front search to minimize conflicts in the gradient space.

[0105] Example 2, refer to Figure 3 and Figure 4 This is the second embodiment of the present invention, which differs from the first embodiment in that: a substation abnormal behavior detection method based on a lightweight YOLOv11 model further includes, in order to verify and explain the technical effects used in this method, this embodiment uses scientific demonstration to verify the real effect of this method.

[0106] The substation abnormal behavior detection dataset contains 5 types of typical substation abnormal behaviors. The dataset contains 2000 labeled images, which are divided into training set, validation set and test set in an 8:1:1 ratio.

[0107] The experimental evaluation metrics include precision (P), recall (R), average precision (AP), mean average precision (mAP), number of parameters, and floating-point computation (GFLOPs). The relevant calculation formulas are as follows:

[0108] ,

[0109] ,

[0110] ,

[0111] ,

[0112] Where TP represents targets correctly detected by the model; FP represents non-targets incorrectly detected by the model; FN represents actual targets that the model failed to detect; and AP is the area under the precision-recall curve, used to measure the accuracy of target detection for a specific category. The average of AP across all categories. The total number of behavior categories. For the index of behavior categories, mAP50 represents the IoU (Intersection over Union) threshold of 0.5. .

[0113] Compared with the performance of mainstream behavior detection models, the trends of key metrics during 200 training rounds are as follows: Figure 3 As shown, during the 200 training rounds, accuracy, recall, and mAP50 all exhibited an upward trend with minor fluctuations. Initially, accuracy was approximately 0.82, eventually reaching 0.922 after various fluctuations as the training rounds increased; recall rose from 0.78 to 0.897 after some fluctuations; and mAP50 gradually increased from 0.85 to 0.942. While the metrics fluctuated, the overall trend was upward. The lightweight YOLOv11 model, optimized based on QD, continuously learned and adapted to the data, gradually enhancing its ability to detect abnormal behavior in substations. This model can more accurately identify abnormal behavior, reducing false positives and false negatives, and providing a more reliable guarantee for the safe operation of substations.

[0114] As shown in the figure, the model loss was 0.8 in the early stages of training. As the training epochs progressed, the loss began to decrease. In the first 125 epochs, the loss showed a significant decreasing trend with considerable fluctuations. This was because the model was rapidly learning data features and adjusting parameters to adapt to the training data. After 125 epochs, the loss gradually stabilized, but still showed slight fluctuations, eventually settling around 0.1. This fluctuating yet stabilizing trend indicates that the model is continuously optimizing and gradually converging to a more ideal state. A stable loss value means that the model fits the training data well, and its generalization ability is constantly improving. It can maintain good performance when facing complex substation abnormal behavior detection tasks, effectively reducing the false negative and false positive rates of abnormal behavior. Comparative experiments were conducted on different models, and the results are shown in Table 1.

[0115] Table 1 Comparison of experimental results for different models

[0116]

[0117] Among them, Faster-R-CNN stands for Faster Region-based Convolutional Neural Network; Yolov5n stands for You Only Look Once version 5nano, the fifth version of the object detection nanomodel; Yolov8n stands for You Only Look Once version 8nano, the eighth version of the object detection nanomodel. Table 1 shows that the model of this invention achieves a 40% reduction in parameters, a 15.8% improvement in inference speed, a 4.7% improvement in mAP50 compared to the baseline, and a 12.3% improvement in recall. Further ablation experiments were conducted, and the results are shown in Table 2.

[0118] Table 2 Ablation Experiment

[0119]

[0120] Based on ablation experiment data, model performance was gradually improved through module combination: the upsampling mAP50 of the GDCA-SCA and BIC modules were 89.8% and 88.2%, respectively, while using the lightweight GhostNetv3 module alone significantly reduced performance to 83.1%. The key synergistic effect is reflected in the joint optimization of modules: when GDCA-SCA, GhostNetv3, and BIC are combined, mAP50 recovers to 91.2%; further introducing the QD module improves performance to 93.6%-94.2%, indicating that QD plays a decisive role in feature quality discrimination. It is worth noting that the cost of lightweighting GhostNetv3 needs to be compensated through the attention mechanism, while the complementarity between modules ultimately drives a 4.7% improvement in mAP50 compared to the baseline, achieving a balance between accuracy and efficiency.

[0121] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for detecting abnormal behavior in substations based on a lightweight YOLOv11 model, characterized in that: include, Acquire image data from the substation site, extract features from the image data, and input them into the behavior detection model; The behavior detection model enhances the features extracted from image data through a dynamic feature enhancement module that includes a gradient-aware dynamic channel attention module and a spatial-channel dual-domain attention mechanism. The enhanced features are input into the reconstructed behavior detection model for detection. The reconstruction includes replacing the original backbone network of the behavior detection model with a ghost network as the backbone, replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution, and combining a dynamic pruning strategy based on channel activation intensity to perform lightweight structural reconstruction of the behavior detection model. The model is trained by predicting and classifying candidate regions of abnormal behavior detected in the target image and using a quality-driven loss function that includes dynamic frequency weighting mechanism and feature contrast regularization strategy. Output the detection results, identify the categories of abnormal behaviors in the image and the location information corresponding to the abnormal behaviors, and complete the edge inference deployment on the model side; The gradient-aware dynamic channel attention module dynamically adjusts the channel attention weight distribution based on the channel gradient response of the classification loss function; The spatial-channel dual-domain attention mechanism is based on differential pooling and lightweight multilayer perceptron to compute spatial attention maps and channel attention maps; The dynamic adjustment of channel attention weight distribution includes: a gradient-aware dynamic channel attention module dynamically adjusting the channel attention weight distribution based on the channel gradient response of the classification loss function; and a sensitivity factor introduced by the gradient-aware dynamic channel attention module to quantify the contribution of each channel to the classification result, expressed by the formula: , in, Sensitivity factor; This is the loss function used to distinguish between abnormal and normal behavior. For the first Statistical measure of activation intensity for each channel; For classification loss on the first The gradient of each channel, This represents the total number of channels. For channel indexing; The formula is expressed as: , in, This represents the number of candidate regions used in the calculation. For candidate region index, For the first The true category label of each candidate region Indicates abnormal behavior. This indicates normal behavior; For the first The predicted probability that each candidate region belongs to abnormal behavior, and , For the Sigmoid function, The log odds output for the classification branch; No. The formula for the activation intensity statistics of each channel is expressed as: , in, The height of the feature map, The width of the feature map. For the feature map The spatial location of each channel eigenvalues, This represents the vertical position in the feature map. The horizontal position in the feature map; combining the channel global average pooling features and the sensitivity factor, dynamic attention weights are generated, expressed by the formula: , in, For the first Attention weights for each channel.

2. The substation abnormal behavior detection method based on a lightweight YOLOv11 model as described in claim 1, characterized in that: The spatial attention map is calculated using the difference between max pooling and mean pooling, expressed by the following formula: , in, This is a spatial attention map. It is a convolutional layer with a kernel size of 1×1. For max pooling features, This represents the characteristics of average pooling. The channel attention map is generated through global pooling and a multilayer perceptron, and the formula is expressed as follows: , in, This is a channel attention map. For activation function, It is a multilayer perceptron. For global average pooling, This is the input feature map.

3. The substation abnormal behavior detection method based on a lightweight YOLOv11 model as described in claim 2, characterized in that: The method of replacing the upsampling operator with depthwise separable convolution and bidirectional interpolation convolution includes decomposing the standard convolution into a combination of depthwise separable convolution and linear transformation, as expressed by the formula: , in, To output the feature map, For depthwise separable convolution kernels, , This represents the total number of depthwise separable convolutional kernels; For the input feature map, This is the channel compression matrix; In the upsampling stage, a bidirectional interpolated convolution (BIC) is designed to replace the original transposed convolution, as expressed by the formula: , in, This is the feature map after upsampling; For depth-separable convolutional layers with a kernel size of 3×3; This is an upsampling operation; This is a pixel recombination operation.

4. The substation abnormal behavior detection method based on a lightweight YOLOv11 model as described in claim 3, characterized in that: The dynamic frequency weighting mechanism dynamically adjusts the weights based on the frequency of occurrence of samples of the anomaly category, as expressed by the formula: , in, For abnormal categories The weight, The total number of samples in the training dataset. For abnormal categories The cumulative number of occurrences, As a smoothing factor, This represents the current training iteration number. The threshold for the initial iteration. This represents the rate of increase in weight.

5. The substation abnormal behavior detection method based on a lightweight YOLOv11 model as described in claim 4, characterized in that: The feature contrast regularization strategy distinguishes between abnormal and normal behaviors by widening the distribution distance in the feature space. The formula is as follows: , in, For feature contrast regularization loss, This represents the number of samples in the current batch. This represents the features of abnormal samples. For the centroid of the abnormal sample features, The centroid of the normal sample features. For Hinge functions; The final total loss function is a weighted sum of the classification, localization, and contrast losses, expressed by the formula: , in, For bounding box regression loss, The weighting coefficients of the loss function are used to distinguish between abnormal and normal behavior. These are the weighting coefficients for the bounding box regression loss. These are the weighting coefficients for the feature contrast regularization loss.

Citation Information

Patent Citations

  • Power transmission line intelligent defect detection method based on improved YOLOv5 network

    CN116843649A

  • Improved YOLOv11s safety helmet wearing detection model and optimization method thereof

    CN120356237A