Substation target detection model determination method and substation defect detection method

By adjusting the activation function and compressing sparse parameters of the substation target detection model, the model structure is simplified, solving the problem of high computational complexity in the substation target detection model and achieving efficient online monitoring of substations.

CN118196077BActive Publication Date: 2026-07-24GUANGZHOU POWER SUPPLY BUREAU GUANGDONG 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
GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
Filing Date
2024-04-28
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing target detection models for substations have high computational complexity, resulting in low efficiency in online monitoring.

Method used

By adjusting the activation function of the initial substation target detection model to the α-ReLU activation function, sparse parameters in the multi-layer reparameterization module are identified and compressed. Combined with sparse training and structural reparameterization, the target reparameterization module is merged to simplify the model structure.

Benefits of technology

This reduces the complexity of the model and the computational resource requirements, improves computational efficiency and accuracy, and enhances the efficiency of online monitoring of substations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118196077B_ABST
    Figure CN118196077B_ABST
Patent Text Reader

Abstract

The application relates to a substation target detection model determination method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining an initial substation target detection model, adjusting an activation function of a multi-layer reparameterization module in the initial substation target detection model, determining a target reparameterization module to be compressed in the initial substation target detection model and a sparse parameter, performing sparse training on the initial substation target detection model until the sparse parameter tends to a target value, obtaining a sparse training initial substation target detection model, and combining the target reparameterization module in the sparse training initial substation target detection model in a structure reparameterization mode to obtain a substation target detection model. The method can improve the online monitoring efficiency of a substation. The application further provides a substation defect detection method and device, computer equipment and a storage medium, and the method can improve the substation defect detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for determining a target detection model for a substation, as well as a method, apparatus, computer equipment, storage medium and computer program product for detecting defects in a substation. Background Technology

[0002] In recent years, with social development and technological advancements, substations have played a crucial role in energy transmission and distribution. However, due to the complex structure and long-term operation of substation equipment, various defects and faults may occur, which can seriously affect power grid operation and even pose safety hazards. Therefore, online monitoring and fault diagnosis of substation equipment have become particularly important.

[0003] Traditional substation defect detection methods typically rely on manual inspections or rule-based automated systems. With the development of deep learning technology, neural network-based target detection models are widely used in substation defect detection, enabling automated and highly efficient defect detection.

[0004] However, these models typically have a large number of parameters and complex computational structures, which leads to low efficiency in online monitoring when computer devices use target detection models due to excessive computational overhead. Summary of the Invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment, storage medium, and computer program product for determining a target detection model in a substation that can improve monitoring efficiency, as well as a method, device, computer equipment, storage medium, and computer program product for detecting defects in a substation, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a method for determining a target detection model for a substation. The method includes:

[0007] Obtain the initial substation target detection model;

[0008] Adjust the activation function of the multi-layer reparameterization module in the initial substation target detection model;

[0009] Determine the target reparameterization module to be compressed and the sparse parameters in the initial substation target detection model;

[0010] The initial substation target detection model is sparsely trained until the sparse parameters tend to the target value, thus obtaining the sparsely trained initial substation target detection model.

[0011] By reparameterizing the structure, the target reparameterization module in the initial substation target detection model after compressed sparse training is merged to obtain the substation target detection model.

[0012] In one embodiment, the adjusted activation function includes an α-ReLU activation function;

[0013] The target reparameterization module to be compressed, and the sparse parameters, are determined in the initial substation target detection model, including:

[0014] For each reparameterization module, obtain the γ coefficient of the batch normalization layer and the α coefficient of the α-ReLU activation function in the reparameterization module, and obtain the importance of the reparameterization module based on the γ coefficient and α coefficient.

[0015] The multi-level reparameterization modules are sorted according to their importance to obtain the sorting results.

[0016] Based on the sorting results, determine the target reparameterization module to be compressed in the initial substation target detection model;

[0017] The α and γ coefficients in the target reparameterization module are determined as sparse parameters.

[0018] In one embodiment, the importance of the reparameterized module is obtained based on the γ coefficient and the α coefficient, including:

[0019] Using the substation defect image data training set, the initial substation target detection model is propagated forward and backward to obtain the gradients of the γ coefficient and the α coefficient.

[0020] The importance of the γ coefficient is determined based on its gradient and weight.

[0021] The importance of the α coefficient is determined based on its gradient and weight.

[0022] The average of the importance of the γ coefficient and the importance of the α coefficient is determined as the importance of the reparameterized module.

[0023] In one embodiment, sparse training is performed on the substation target detection model, including:

[0024] The γ and α coefficients of the target reparameterization module are determined as sparse parameters;

[0025] The weights of the sparse parameters are updated using gradient descent until they approach the target value.

[0026] In one embodiment, the initial substation target detection model is trained on the target YOLOv6 model using a substation defect image data training set. The target YOLOv6 model includes an EfficientRep (EfficientChannel and Spatial Pyramid Re-organization) backbone network and a CSPBepBackbone (Cross Stage Partial Bottleneck with Efficient Pyramid) backbone network. The structure is reparameterized and introduced into the neck network through a RepBiFPAN (Repetition-based Bidirectional Feature Pyramid Attention Network) structure. The distances of the four sides of the bounding box are predicted using an anchor-free paradigm.

[0027] In one embodiment, the target reparameterization module in the sparsely trained substation target detection model is merged through structural reparameterization, including:

[0028] By using structural reparameterization, multiple branches of the first target reparameterization module are merged into a 1×1 convolutional layer, and multiple branches of the second target reparameterization module are equivalently transformed into a 3×3 convolutional layer. The 1×1 convolutional layer and the 3×3 convolutional layer are equivalently transformed into a 3×3 convolutional layer.

[0029] Secondly, this application also provides a device for determining a target detection model for a substation. The device includes:

[0030] The data acquisition module is used to acquire the initial substation target detection model;

[0031] The data adjustment module is used to adjust the activation function of the multi-layer reparameterization module in the initial substation target detection model;

[0032] The data determination module is used to determine the target reparameterization module to be compressed and the sparse parameters in the initial substation target detection model;

[0033] The sparse training module is used to sparsely train the initial substation target detection model until the sparse parameters tend to the target value, thus obtaining the sparsely trained initial substation target detection model.

[0034] The data merging and compression module is used to merge and compress the target reparameterization module in the initial substation target detection model after sparse training by means of structural reparameterization, so as to obtain the target substation target detection model.

[0035] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in any of the above embodiments of the substation target detection model determination method.

[0036] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in any of the above embodiments of the substation target detection model determination method.

[0037] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the substation target detection model determination method.

[0038] The aforementioned method, apparatus, computer equipment, storage medium, and computer program products for determining substation target detection models can alter the nonlinear characteristics of the model by adjusting the activation function of the initial substation target detection model, thereby improving the model's expressive and learning capabilities. By identifying and determining the target reparameterization module to be compressed and its sparse parameters, and by performing sparse training on the model, the number of parameters and computational load in the model can be reduced. By merging the target reparameterization module to be compressed through structural reparameterization, the complexity of the model can be further reduced, resulting in a more streamlined substation target detection model. This reduces the demand for computational resources, improves the model's computational efficiency and accuracy, and enables the model to better adapt to the needs of substation target detection tasks, thereby improving the efficiency of online substation monitoring.

[0039] Sixthly, this application also provides a method for detecting defects in substations. The method includes:

[0040] Acquire monitoring images of the substation to be inspected;

[0041] Image preprocessing is performed on the substation monitoring images to obtain the target substation monitoring images;

[0042] Using the target substation monitoring image as input, a trained substation target detection model is invoked to perform defect detection, and the defect detection result is obtained; the substation target detection model is obtained by the substation target detection model determination method as described in any one of claims 1 to 5.

[0043] Seventhly, this application also provides a substation defect detection device. The device includes:

[0044] The image acquisition module is used to acquire monitoring images of the substation to be inspected.

[0045] The image processing module is used to preprocess the substation monitoring images to obtain the target substation monitoring image;

[0046] The defect detection module is used to take the target substation monitoring image as input, call the trained substation target detection model to perform defect detection, and obtain the defect detection result; the substation target detection model is obtained by adopting the steps in any of the above-mentioned substation target detection model determination method embodiments.

[0047] Eighthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps described in the above embodiments of the substation defect detection method.

[0048] Ninthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the above-described embodiments of the substation defect detection method.

[0049] Tenthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps described in the above embodiments of the substation defect detection method.

[0050] The aforementioned substation defect detection method, device, computer equipment, storage medium, and computer program product, after acquiring substation monitoring images, perform image preprocessing on the substation monitoring images to improve image quality. Then, through a compressed and simplified substation target detection model, defect detection is performed on the preprocessed target substation monitoring images. This can quickly and accurately identify defects in the substation monitoring images. Furthermore, since the substation target detection model is a simplified model, it can effectively reduce the consumption of computing resources when the model performs defect detection, improve system performance, and thus improve the efficiency of online substation monitoring. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating a method for determining a target detection model in a substation, as shown in one embodiment.

[0052] Figure 2 This is a flowchart illustrating the steps for determining the target reparameterization module and sparse parameters in one embodiment.

[0053] Figure 3 This is a flowchart illustrating the steps for determining the importance of a reparameterization module in one embodiment;

[0054] Figure 4 This is a flowchart illustrating the method for determining the target detection model in a substation in another embodiment;

[0055] Figure 5 This is a schematic diagram of the layer compression process in one embodiment;

[0056] Figure 6 This is a diagram illustrating the application environment of a substation defect detection method in one embodiment.

[0057] Figure 7 This is a flowchart illustrating a substation defect detection method in one embodiment;

[0058] Figure 8 This is a schematic diagram of a substation defect detection method in one embodiment;

[0059] Figure 9 This is a structural block diagram of a substation target detection model determination device in one embodiment;

[0060] Figure 10 This is a structural block diagram of a substation defect detection device in one embodiment;

[0061] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0063] In one embodiment, such as Figure 1 As shown, a method for determining a target detection model in a substation is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to a terminal, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0064] S100, Obtain the initial substation target detection model.

[0065] The initial substation target detection model (hereinafter referred to as the model) was trained using a substation defect image dataset. Target detection models include, but are not limited to, YOLOv5 (YouOnly Look Once version), YOLOX, and YOLOv6.

[0066] In this embodiment, the object detection model is an improved target YOLOv6 model (hereinafter referred to as YOLOv6). Specifically, the target YOLOv6 model in this embodiment has been innovated and improved in several aspects. These improvements include the following: In the backbone network, YOLOv6 uses the EfficientRep network for small models and the CSPBepBackbone network for large models. This design maintains model performance while optimizing computational efficiency. In the neck network, YOLOv6 uses the RepBiFPAN structure, introducing structural reparameterization into the neck network. Specifically, the EfficientRep network uses stacked RepVGG modules (Re-param VGG, also known as reparameterized modules), i.e., it contains multiple RepVGG modules. During training, the RepVGG modules have a multi-branch structure, which improves model fitting ability and thus training accuracy. During inference, the RepVGG modules can be equivalently converted into a 3×3 convolutional layer through structural reparameterization, thereby reducing computation and accelerating inference. The backbone network was eventually obtained , , Three feature maps are input into the RepBiFPAN neck network for multi-scale feature fusion.

[0067] Furthermore, YOLOv6 employs a decoupled head structure with a simplified design. Compared to the original YOLOv5 and YOLOX, YOLOv6 reduces latency while maintaining accuracy, mitigating the additional latency overhead caused by the 3×3 convolutions in the decoupled head. Additionally, YOLOv6 adopts an anchor-free paradigm, directly predicting the distance from the anchor point to the four sides of the bounding box through the box regression branch. This design reduces computation and accelerates inference. Regarding loss functions, YOLOv6 uses VariFocal Loss and SIOU (Scaled Inverse OU) activation functions, used for classification and localization tasks respectively, which help improve the model's detection accuracy. Furthermore, YOLOv6 introduces self-distillation technology to further improve model performance through knowledge distillation. Simultaneously, the model combines quantization, reparameterization optimizers, and gradient reparameterization techniques to achieve higher efficiency and performance.

[0068] In practice, the substation defect image dataset contains various visible light images of defects observed in actual substation operation. Specifically, it includes 17 categories of targets: abnormal meter readings, damaged meter casings, bird nests, abnormal door closures, faulty pressure plates, damaged cover plates, suspended objects, discolored silicone sealant, blurred meter dials, broken insulators, damaged meter dials, oil stains on the ground, not wearing safety helmets, not wearing work clothes, abnormal oil seal levels, damaged silicone seals, and smoking. The substation defect image dataset is randomly divided into training, validation, and test sets in an 8:1:1 ratio. Then, the training set is input into an improved YOLOv6 model for training to obtain the initial substation target detection model.

[0069] S300, adjust the activation function of the multi-layer reparameterization module in the initial substation target detection model.

[0070] In the initial substation target detection model, the RepVGG module uses the ReLU activation function. After normal training, the activation functions in all RepVGG modules of the model can be replaced with the α-ReLU activation function.

[0071] The α-ReLU activation function is shown below:

[0072] (1)

[0073] Here, α is a learnable parameter. Compared to the ReLU activation function, the α-ReLU activation function allows for an adjustable slope through the α parameter when the input is less than zero. Replacing the ReLU activation function with the α-ReLU activation function and initializing the α parameter to 1 makes them equivalent.

[0074] S500 determines the target reparameterization module to be compressed and the sparse parameters in the initial substation target detection model.

[0075] The target reparameterization module to be compressed refers to the RepVGG module that needs to be compressed. Sparse parameters are parameters in the model that have little or no impact on the final model prediction results. Sparse parameters play a regularization role in the model, helping to reduce model complexity and improve generalization ability.

[0076] Since the number of RepVGG modules in the model is relatively redundant, pruning can be performed to simplify the model structure. After replacing the activation functions of the RepVGG modules, the importance of each RepVGG module can be evaluated. Then, based on the importance, the target RepVGG modules in the model that need to be compressed are identified. Finally, based on the parameters of the target reparameterized modules to be compressed, the sparsity parameters of the model are determined.

[0077] S700 performs sparse training on the initial substation target detection model until the sparse parameters approach the target value, thus obtaining the sparsely trained initial substation target detection model.

[0078] Following the previous step, after determining the sparse parameters of the model, the initial substation target detection model can be sparsely trained until the sparse parameters approach a target value, such as 0, resulting in the sparsely trained initial substation target detection model. Specifically, this can be achieved by updating the values ​​of the sparse parameters using a stochastic gradient descent algorithm until they approach the target value of 0. It's understood that the target value can also be any other value close to 0. After sparse training, the multi-branch RepVGG module can be converted into a 1×1 convolutional layer, and the ReLU activation function can be converted into an identity mapping layer.

[0079] S900, through structural reparameterization, merges the target reparameterization module in the initial substation target detection model after compressed sparse training to obtain the substation target detection model.

[0080] Structural reparameterization refers to the process of reorganizing the model structure and parameters to improve model performance, reduce computational complexity, or meet specific requirements.

[0081] Since the initial substation target detection model has a complex structure and requires a large computational cost, pruning techniques can be used to remove unnecessary parameters from the model to reduce its complexity and computational cost.

[0082] The basic module of the YOLOv6 backbone model consists of three branches: a 3×3 convolutional branch, a 1×1 convolutional branch, and a direct-connection branch. Each branch contains a batch normalization (BN) layer. The outputs of the three branches are summed using an adder to serve as the output of the entire RepVGG module. In practice, structural reparameterization can be used to fuse the multiple branches of the RepVGG module, compressing two RepVGG layers into a single 3×3 convolutional layer. This layer compression reduces computational cost, accelerates detection speed, reduces model space requirements, makes the model more suitable for edge deployment, and enhances real-time detection performance.

[0083] The aforementioned method for determining the substation target detection model can alter the nonlinear characteristics of the model by adjusting the activation function of the initial substation detection model, thereby improving its expressive and learning capabilities. By identifying and determining the target reparameterization module to be compressed and its sparse parameters, and by performing sparse training on the model, the number of parameters and computational load in the model can be reduced. Furthermore, by merging the target reparameterization module to be compressed through structural reparameterization, the complexity of the model can be further reduced, resulting in a more streamlined substation target detection model. This reduces the demand for computational resources, improves the model's computational efficiency and accuracy, and allows the model to better adapt to the needs of substation target detection tasks, thus improving the efficiency of online substation monitoring.

[0084] like Figure 2 As shown, in one embodiment, S500 includes:

[0085] S520: For each reparameterization module, obtain the γ coefficients of the batch normalization layer and the α coefficients of the α-ReLU activation function in the reparameterization module, and obtain the importance of the reparameterization module based on the γ coefficients and α coefficients.

[0086] S540 sorts the multi-level reparameterization modules according to their importance and obtains the sorting results.

[0087] S560, based on the sorting results, determine the target reparameterization module to be compressed in the initial substation target detection model.

[0088] S580 defines the α and γ coefficients in the target reparameterization module as sparse parameters.

[0089] Batch normalization (BN) layers are used to select RepVGG modules based on their importance. Specifically, RepVGG modules can be sorted by importance, with lower-importance layers designated for compression. In practice, for each RepVGG module, the γ coefficient of the BN layer and the α coefficient of the α-ReLU activation function can be obtained. Based on these coefficients, the importance of each RepVGG module can be calculated to measure its contribution to model performance. Then, all RepVGG modules are sorted in ascending order of importance. The top N least important RepVGG modules are then selected as the target RepVGG modules for compression. However, the sorting method can also be descending or other methods, as long as the lowest-importance N target RepVGG modules are selected. Next, the γ coefficients of the BN layer and the α coefficients of the α-ReLU activation function in the target RepVGG module to be compressed are determined as sparse coefficients. That is, parameters with less impact on model performance are identified as sparse parameters, while parameters with greater impact on performance are retained. Then, the model is sparsely trained until the sparse parameters tend to 0, in order to reduce model complexity and computational resources.

[0090] The specific process of sparse training can be as follows: After gradient backpropagation, set the gradients of γ and α as follows:

[0091] (2)

[0092] (3)

[0093] in, and Let γ and α represent the gradients, respectively. These are the hyperparameters that can be set. It is a symbolic function.

[0094] According to the parameter update rules of the stochastic gradient descent (SGD) algorithm:

[0095] (4)

[0096] (5)

[0097] When γ or α is positive, the gradient is positive, and SGD decreases the value of the parameter γ or α; when γ or α is negative, the gradient is negative, and SGD increases the value of the parameter γ or α. Through iterative updates, the value of the coefficient of γ or α will gradually approach zero.

[0098] In this embodiment, by evaluating and ranking the importance of the RepVGG module, the parts of the model that contribute less to performance can be compressed in a refined manner, avoiding a significant impact on the overall performance, so as to maintain the model's performance as much as possible while reducing model complexity.

[0099] like Figure 3 As shown, in one embodiment, the importance of the reparameterization module is obtained based on the γ coefficient and the α coefficient, including:

[0100] S522, using the substation defect image data training set, performs forward and backward propagation on the initial substation target detection model to obtain the gradients of the γ coefficient and the α coefficient.

[0101] S524, determine the importance of the γ coefficient based on the gradient and weight of the γ coefficient.

[0102] S526. Determine the importance of the α coefficient based on the gradient and weight of the α coefficient.

[0103] S528, the average of the importance of the γ coefficient and the importance of the α coefficient is determined as the importance of the reparameterization module.

[0104] In this embodiment, determining the importance of the RepVGG module can be done as follows: First, a portion of the substation defect dataset is used as input, and forward propagation is performed on the model. Then, the total loss is calculated, and backpropagation is performed using the total loss function to obtain the gradients of the γ coefficient and α coefficient of each RepVGG module. Next, the Taylor importance of the γ and α coefficients in each layer is calculated, and the average Taylor value of the γ and α coefficients in each layer is taken as the importance evaluation criterion for that layer. The specific formula is as follows:

[0105] (6)

[0106] in, This indicates the importance of the layer. This represents the k-th γ coefficient in the BN layer of this layer. express The gradient is given by , where n represents the number of γ coefficients in the BN layer, and α represents the α coefficient in α-ReLU. This represents the gradient of α.

[0107] Then, the layers are sorted according to their importance, and the RepVGG modules with lower importance are identified as the target RepVGG modules, which are then subjected to layer compression.

[0108] In this embodiment, by considering the gradients of the γ and α coefficients, their impact on model performance can be evaluated more precisely, thereby determining their importance. The importance of the reparameterization module is determined by combining the importance of the γ and α coefficients through the average value, taking into account the combined impact of the two in the model, making the evaluation more comprehensive. The gradient and weight-based importance evaluation method can effectively guide model compression, improve the efficiency and performance of the model, and maintain high accuracy and interpretability.

[0109] like Figure 4 As shown, in one embodiment, S900 includes: S920, by means of structural reparameterization, multiple branches of the first target reparameterization module are fused into a 1×1 convolutional layer, multiple branches of the second target reparameterization module are equivalently converted into a 3×3 convolutional layer, and the 1×1 convolutional layer and the 3×3 convolutional layer are equivalently converted into a 3×3 convolutional layer to obtain the substation target detection model.

[0110] As described in the above embodiments, the RepVGG module consists of three branches: a 3×3 convolution branch, a 1×1 convolution branch, and a direct connection branch. Each of the three branches contains a BN layer, and the outputs of the three branches are added together by an adder to serve as the output of the entire RepVGG module.

[0111] Following the above embodiments, after sparse training is completed, the following can be set: ① γ=0, merge convolutional-BN layers:

[0112] (7)

[0113] in, These represent the mean, standard deviation, scaling factor, and offset factor of the BN layer, respectively. Indicates the weights of the convolutional layer. This represents the weights of the equivalent convolutional layer after merging convolutional and batch normalization (BN) layers. This represents the bias of the equivalent convolutional layer after merging the convolutional-BN layers. Therefore, the merging of a 3×3 convolutional-BN layer is converted into a constant β.

[0114] ②If α=0, then equation (1) becomes:

[0115] (8)

[0116] The activation function is then converted into an identity mapping layer.

[0117] Finally, by reparameterizing the structure, the multiple branches of the target RepVGG module are fused, compressing the two target RepVGG modules into a single 3×3 convolutional layer to achieve layer compression. Specifically, the two target RepVGG modules can be used as the compression unit; the three branches of the first target RepVGG module can be fused into a 1×1 convolutional layer, and the second target RepVGG module can be fused into a 3×3 convolutional layer. Finally, the concatenated 1×1 and 3×3 convolutional layers can be fused into a single 3×3 convolutional layer in the following way:

[0118] (9)

[0119] In the formula, , These represent the weights of a 1×1 convolutional layer and a 3×3 convolutional layer, respectively. This represents the transpose of the tensor along the 0th and 1st dimensions; This represents the weights of the reparameterized 3×3 convolutional layer. For details on the layer compression process, please refer to [link / reference needed]. Figure 5 .

[0120] After the above processing, the pruning of the initial substation target detection model is completed, resulting in a simplified substation target detection model.

[0121] In this embodiment, layer compression is achieved through structural reparameterization, which reduces the computational load of the model, speeds up the detection process, reduces the space occupied by the substation target detection model, makes the model more suitable for edge deployment, enhances the real-time performance of detection, and improves the efficiency of online monitoring of substation defects.

[0122] Furthermore, after obtaining the substation target detection model through the above embodiments, the substation target detection model can be deployed to the substation edge computing intelligent terminal to complete efficient substation defect detection.

[0123] To provide a clearer explanation of the substation target detection model determination method provided in this application, a specific embodiment is described below, which includes the following steps:

[0124] S1. The improved target YOLOv6 model is trained using the substation defect image dataset to obtain the initial substation target detection model.

[0125] S2, replace the ReLU function of all α-ReLU activation functions in the initial substation target detection model with the α-ReLU activation function.

[0126] S3. For each reparameterization module, obtain the γ coefficients of the BN layer and the α coefficients of the α-ReLU activation function in the RepVGG module.

[0127] S4. Using the substation defect image data training set, the initial substation target detection model is propagated forward and backward to obtain the gradients of the γ coefficient and the α coefficient.

[0128] S5. Determine the importance of the γ coefficient based on its gradient and weight, and determine the importance of the α coefficient based on its gradient and weight. The average of the importance of the γ coefficient and the importance of the α coefficient is then used as the importance of the RepVGG module.

[0129] S6. Sort the multi-layer reparameterization modules according to their importance and obtain the sorting results. Based on the sorting results, determine the target reparameterization modules to be compressed in the initial substation target detection model.

[0130] S7 determines the α and γ coefficients in the target reparameterization module as sparse parameters, and iteratively updates the α and γ coefficients using the stochastic gradient descent algorithm, as the value of either the γ or α coefficient gradually approaches zero.

[0131] S9, through structural reparameterization, merges multiple branches of the first target RepVGG module into a 1×1 convolutional layer, converts multiple branches of the second RepVGG module into a 3×3 convolutional layer, and converts the 1×1 convolutional layer and the 3×3 convolutional layer into a 3×3 convolutional layer, so as to achieve the effect of compressing two RepVGG modules into a 3×3 convolutional layer, thus obtaining the substation target detection model.

[0132] Based on the same inventive concept, this application also provides a substation defect detection method. This method involves obtaining a substation target detection model through the above-mentioned substation target detection model determination method, and then deploying the substation target detection model to the substation edge computing intelligent terminal for efficient substation defect detection.

[0133] The substation defect detection method provided in this application embodiment can be applied to, for example... Figure 6In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 is equipped with a substation target detection model obtained in the manner described in the above embodiment of the substation target detection model determination method. Specifically, terminal 102 can periodically or in real-time send substation monitoring images to server 104. After receiving the substation monitoring images, server 104 performs image preprocessing to obtain the target substation monitoring image. Then, using the target substation monitoring image as input, it calls the trained substation target detection model to perform defect detection and obtain the defect detection result.

[0134] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0135] In one embodiment, such as Figure 7 As shown, a method for determining a target detection model in a substation is provided, and this method is applied to... Figure 6 Taking server 104 as an example, the method for determining the target detection model of this substation includes the following steps:

[0136] S200: Acquire monitoring images of the substation to be inspected.

[0137] Substation monitoring images refer to images captured by monitoring equipment (such as surveillance cameras, infrared thermal imagers, etc.) inside or around a substation to monitor the status, operation, and potential problems of substation equipment. Substation monitoring images include information such as equipment status, temperature distribution, equipment location, environmental conditions, safety issues, and potential defects. Environmental conditions include, but are not limited to, weather conditions and light intensity, while potential defects include, but are not limited to, problems such as leakage, open circuits, and corrosion.

[0138] S400 performs image preprocessing on the substation monitoring images to obtain the target substation monitoring image.

[0139] After obtaining the substation monitoring images, since these images contain some useless information and may not meet the model's input requirements, image preprocessing can be performed to transform them into images that conform to the model's input requirements. Specifically, image preprocessing includes, but is not limited to, denoising, image enhancement, resizing, color space conversion, cropping, and normalization. Denoising includes using appropriate denoising algorithms (such as Gaussian filtering and median filtering) to remove noise from the image, improving the accuracy of subsequent processing. Image enhancement may include, but is not limited to, contrast enhancement and histogram equalization to improve image quality. Resizing involves adjusting the image to the input size required by the model, ensuring compatibility with the target detection model. After the above image preprocessing, the target substation monitoring image can be saved as a new file for use in subsequent target detection tasks.

[0140] S600 takes the target substation monitoring image as input, calls the trained substation target detection model to perform defect detection, and obtains the defect detection results.

[0141] In this embodiment, the substation target detection model is the model determined through the steps in the above-described substation target detection model determination method embodiment. For the specific model determination process, please refer to the above-described substation target detection model determination method embodiment, which will not be repeated here. The defect detection results include data such as defect category and defect coordinates.

[0142] The server loads a pre-trained substation target detection model. This model has learned the normal state and potential defects of substation equipment. After obtaining the target substation monitoring image, the image can be input into the trained substation target detection model. The model then fuses multi-scale features and outputs the result. , , Three feature maps of different sizes are used to detect small, medium, and large-sized targets, respectively. The classification and regression branches in the detection head are decoupled to obtain defect detection results. For detailed detection procedures, please refer to [link to relevant documentation]. Figure 8 In this embodiment, the defect detection results include at least the aforementioned 17 substation defect categories and the coordinates of the rectangular frame. The 17 substation defect categories specifically include: abnormal meter readings, damaged meter casing, bird nests (i.e., holes in the casing), abnormal door closure, faulty pressure plate, damaged cover plate, suspended debris, discolored silicone sealant, blurred meter dial, broken insulator, damaged meter dial, oil stains on the ground, not wearing a safety helmet, not wearing work clothes, abnormal oil seal level, damaged silicone seal, and smoking.

[0143] In the above-mentioned substation defect detection method, after acquiring the substation monitoring image, the image is preprocessed to improve the image quality. Then, the preprocessed target substation monitoring image is used by a compressed and simplified substation target detection model to detect defects. This method can quickly and accurately identify defects in the substation monitoring image. Furthermore, since the substation target detection model is a simplified model, it can effectively reduce the consumption of computing resources and improve system performance when the model performs defect detection, thereby improving the efficiency of online substation monitoring.

[0144] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0145] Based on the same inventive concept, this application also provides a substation target detection model determination device for implementing the substation target detection model determination method described above, as well as a substation defect detection method and a substation defect detection device. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of the one or more substation target detection model determination device embodiments provided below can be found in the limitations of the substation target detection model determination method above, and will not be repeated here.

[0146] In one embodiment, such as Figure 9 As shown, a substation target detection model determination device 800 is provided, including: a data acquisition module 810, a data adjustment module 820, a data determination module 830, a sparse training module 840, and a data merging and compression module 850, wherein:

[0147] The data acquisition module 810 is used to acquire the initial substation target detection model.

[0148] The data adjustment module 820 is used to adjust the activation function of the multi-layer reparameterization module in the initial substation target detection model.

[0149] The data determination module 830 is used to determine the target reparameterization module to be compressed and the sparse parameters in the initial substation target detection model.

[0150] The sparse training module 840 is used to perform sparse training on the initial substation target detection model until the sparse parameters tend to the target value, thus obtaining the sparsely trained initial substation target detection model.

[0151] The data merging and compression module 850 is used to merge the target reparameterization module in the initial substation target detection model after sparse training by means of structural reparameterization, so as to obtain the target substation target detection model.

[0152] In one embodiment, the data determination module 830 is further configured to, for each layer of reparameterization module, obtain the γ coefficients of the batch normalization layer and the α coefficients of the α-ReLU activation function in the reparameterization module, obtain the importance of the reparameterization module based on the γ coefficients and α coefficients, sort the multi-layer reparameterization modules according to the importance, obtain the sorting result, determine the target reparameterization module to be compressed in the initial substation target detection model according to the sorting result, and determine the α coefficients and γ coefficients in the target reparameterization module as sparse parameters.

[0153] In one embodiment, the data determination module 830 is further configured to perform forward and backward propagation on the substation target detection model using the substation defect image data training set to obtain the gradient of the γ coefficient and the gradient of the α coefficient, determine the importance of the γ coefficient based on the gradient of the γ coefficient and the weight of the γ coefficient, determine the importance of the α coefficient based on the gradient of the α coefficient and the weight of the α coefficient, and determine the average value of the importance of the γ coefficient and the importance of the α coefficient as the importance of the reparameterization module.

[0154] In one embodiment, the sparse training module 840 is further configured to update the weights of the sparse parameters by gradient descent until the weights of the sparse parameters tend to the target value.

[0155] In one embodiment, the data merging and compression module 850 is further configured to merge multiple branches of the first target reparameterization module into a 1×1 convolutional layer by means of structural reparameterization, convert multiple branches of the second target reparameterization module into a 3×3 convolutional layer, and convert the 1×1 convolutional layer and the 3×3 convolutional layer into a 3×3 convolutional layer.

[0156] In one embodiment, such as Figure 10 As shown, a substation defect detection device is provided, including: an image acquisition module 910, an image processing module 920, and a defect detection module 930, wherein:

[0157] The image acquisition module 910 is used to acquire monitoring images of the substation to be inspected.

[0158] The image processing module 920 is used to preprocess the substation monitoring images to obtain the target substation monitoring image.

[0159] The defect detection module 930 is used to take the target substation monitoring image as input, call the trained substation target detection model to perform defect detection, and obtain the defect detection result; the substation target detection model is obtained by adopting the steps in any of the above-mentioned substation target detection model determination method embodiments.

[0160] The modules in the aforementioned substation target detection model determination device and substation defect detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0161] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as substation target detection models, substation monitoring images, and defect detection results. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a substation target detection model determination method or a substation defect detection method.

[0162] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0163] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described embodiments of the substation target detection model determination method or the substation defect detection method.

[0164] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps in the above embodiments of the substation target detection model determination method or the substation defect detection method.

[0165] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described embodiment of the substation target detection model determination method or the steps in the substation defect detection method embodiment.

[0166] 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, data stored, data displayed, 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 related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0167] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0168] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 specification.

[0169] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining a target detection model in a substation, characterized in that, The method includes: Obtain the initial substation target detection model; The activation function of the multi-layer reparameterization module in the initial substation target detection model is adjusted, and the adjusted activation function includes the α-ReLU activation function; For each reparameterization module, the γ coefficient of the batch normalization layer and the α coefficient of the α-ReLU activation function are obtained. Based on the γ coefficient and the α coefficient, the importance of the reparameterization module is obtained. According to the importance, the multi-layer reparameterization modules are sorted to obtain the sorting result. According to the sorting result, the target reparameterization module to be compressed in the initial substation target detection model is determined, and the α coefficient and γ coefficient in the target reparameterization module are determined as sparse parameters. The initial substation target detection model is sparsely trained until the sparse parameters tend to the target value, thus obtaining the sparsely trained initial substation target detection model. By reparameterizing the structure, the target reparameterization module in the initial substation target detection model after sparse training is merged and compressed to obtain the substation target detection model.

2. The method according to claim 1, characterized in that, The process of obtaining the importance of the reparameterization module based on the γ coefficient and the α coefficient includes: Using the substation defect image data training set, the initial substation target detection model is propagated forward and backward to obtain the gradient of the γ coefficient and the gradient of the α coefficient. The importance of the γ coefficient is determined based on the gradient of the γ coefficient and the weight of the γ coefficient. The importance of the α coefficient is determined based on the gradient of the α coefficient and the weight of the α coefficient. The average of the importance of the γ coefficient and the importance of the α coefficient is determined as the importance of the reparameterization module.

3. The method according to claim 2, characterized in that, The initial substation target detection model is obtained by training the target YOLOv6 model on the substation defect image data training set. The target YOLOv6 model includes an EfficientRep backbone network and a CSPBepBackbone backbone network. The structural reparameterization is introduced into the neck network through the RepBiFPAN structure, and the distances of the four sides of the bounding box are predicted through the anchor-free paradigm.

4. The method according to any one of claims 1 to 3, characterized in that, The method of merging and compressing the target reparameterization module in the sparsely trained substation target detection model through structural reparameterization includes: By using structural reparameterization, multiple branches of the first target reparameterization module are merged into a 1×1 convolutional layer, and multiple branches of the second target reparameterization module are equivalently converted into a 3×3 convolutional layer. The 1×1 convolutional layer and the 3×3 convolutional layer are then equivalently converted into a single 3×3 convolutional layer.

5. A method for detecting defects in a substation, characterized in that, The method includes: Acquire monitoring images of the substation to be inspected; The substation monitoring images are preprocessed to obtain the target substation monitoring images; Using the target substation monitoring image as input, a trained substation target detection model is invoked to perform defect detection, and the defect detection result is obtained; the substation target detection model is obtained using the substation target detection model determination method as described in any one of claims 1 to 4.

6. A device for determining a target detection model in a substation, characterized in that, The device includes: The data acquisition module is used to acquire the initial substation target detection model; The data adjustment module is used to adjust the activation function of the multi-layer reparameterization module in the initial substation target detection model. The adjusted activation function includes the α-ReLU activation function. The data determination module is used to obtain the γ coefficient of the batch normalization layer and the α coefficient of the α-ReLU activation function in each reparameterization module, obtain the importance of the reparameterization module based on the γ coefficient and the α coefficient, sort the multi-layer reparameterization modules according to the importance, obtain the sorting result, determine the target reparameterization module to be compressed in the initial substation target detection model according to the sorting result, and determine the α coefficient and γ coefficient in the target reparameterization module as sparse parameters. The sparse training module is used to perform sparse training on the initial substation target detection model until the sparse parameters tend to the target value, thereby obtaining the sparsely trained initial substation target detection model. The data merging and compression module is used to merge and compress the target reparameterization module in the sparsely trained initial substation target detection model through structural reparameterization, so as to obtain the target substation target detection model.

7. The apparatus according to claim 6, characterized in that, The data determination module is further configured to perform forward and backward propagation on the initial substation target detection model using the substation defect image data training set, to obtain the gradient of the γ coefficient and the gradient of the α coefficient, determine the importance of the γ coefficient based on the gradient of the γ coefficient and the weight of the γ coefficient, determine the importance of the α coefficient based on the gradient of the α coefficient and the weight of the α coefficient, and determine the average value of the importance of the γ coefficient and the importance of the α coefficient as the importance of the reparameterization module.

8. A substation defect detection device, characterized in that, The device includes: The image acquisition module is used to acquire monitoring images of the substation to be inspected. The image processing module is used to preprocess the substation monitoring images to obtain the target substation monitoring images; The defect detection module is used to take the target substation monitoring image as input, call the trained substation target detection model to perform defect detection, and obtain the defect detection result; the substation target detection model is obtained by the substation target detection model determination method as described in any one of claims 1 to 4.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4 or 5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4 or 5.