Power grid inspection data analysis method and system based on artificial intelligence

By combining the regional convolution of the sliding window transformer with the Gray Wolf optimization algorithm, the problem of low detection accuracy and insufficient model robustness in the power grid patrol data analysis is solved, and higher detection accuracy and model adaptability are achieved.

CN119672568APending Publication Date: 2025-03-21ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID NINGXIA ELECTRIC POWER COMPANY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411715391.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

During the analysis of existing power grid patrol data, the background of the transmission line patrol image is complex, the target foreign objects are small, and it is prone to missed detection and missed detection, resulting in low detection accuracy; the traditional gray wolf optimization algorithm is weak in adapting to dynamic environments.

Method used

The regional convolutional proposal network combining sliding window transformer is adopted to build a transmission line detection model. By introducing enhanced local perception units and improved sliding window transformer blocks, local subtle features and multi-scale features are captured; model parameters are optimized with particle swarm optimization algorithm to improve the adaptability and robustness of the model.

Benefits of technology

In complex scenarios, the model's ability to capture small objects is improved and the detection accuracy is improved. By optimizing the generalization, robustness and adaptability of model parameters, the model can better adapt to multiple complex scenarios, and the practicality and effectiveness of the method are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672568A_ABST
    Figure CN119672568A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid inspection data analysis method and system based on artificial intelligence, and belongs to the technical field of smart power grids, and the method comprises the steps of power grid inspection, data preprocessing, power transmission line detection model construction, power transmission line detection model optimization and inspection report generation. According to the invention, a region convolution proposal network combined with a sliding window converter is adopted to construct a power transmission line detection model, so that local fine features are better captured, multi-scale features are processed, the model has stronger capturing capability for small objects in a complex scene, and the detection precision of the model is improved; a grey wolf optimization algorithm combined with particle swarm optimization is adopted to optimize model parameters, by introducing inertia weight, a particle swarm search mechanism and a self-adaptive disturbance and dynamic balance search mode, population diversity is increased, global search capability is improved, generalization, robustness and adaptability of the model parameters are further optimized, and the robustness of the model parameters is improved. The model can better adapt to various complex scenes, and the overall practicability and effectiveness of the method are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart grids, and specifically refers to a power grid inspection data analysis method and system based on artificial intelligence. Background Art

[0002] AI-based power grid inspection data analysis uses AI technology to automatically analyze power grid inspection image data to identify foreign objects on transmission lines and avoid power failures or interruptions caused by foreign objects. It aims to improve inspection efficiency, reduce the high costs and safety hazards caused by manual inspections, and ensure the safe operation of the power grid.

[0003] However, in the existing power grid inspection data analysis process, there is a technical problem that the background of the transmission line inspection image is complex, and when the target foreign object is small, false detection and missed detection are prone to occur, resulting in low transmission line detection accuracy; there is a technical problem that the ambient lighting and background complexity will change dynamically during the power grid inspection, and the transmission line detection model needs to adapt to different scenarios, while the traditional grey wolf optimization algorithm has weak robustness when adapting to dynamic environments. Summary of the invention

[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an artificial intelligence-based power grid inspection data analysis method and system. In view of the technical problem that in the existing power grid inspection data analysis process, the background of the transmission line inspection image is complex, and when the target foreign object is small, it is easy to make false detection and missed detection, resulting in low transmission line detection accuracy, this solution creatively adopts a regional convolution proposal network combined with a sliding window transformer to construct a transmission line detection model, introduces an enhanced local perception unit to better capture local subtle features, and performs multi-stage processing through an improved sliding window transformer block to better process multi-scale features, so that the model has stronger detection accuracy for small objects in complex scenes. The capture ability of the model is improved, and the model detection accuracy is improved; in the existing power grid inspection data analysis process, the ambient lighting and background complexity during the power grid inspection will change dynamically, and the transmission line detection model needs to adapt to different scenarios. The traditional gray wolf optimization algorithm has weak robustness when adapting to the dynamic environment. This solution creatively uses the gray wolf optimization algorithm combined with particle swarm optimization to optimize the model parameters. By introducing inertia weights, particle swarm search mechanism and adaptive perturbations, it dynamically balances the search mode, increases population diversity and improves the global search capability, thereby optimizing the generalization, robustness and adaptability of the model parameters, making the model better adaptable to a variety of complex scenarios, and improving the overall practicality and effectiveness of the method.

[0005] The technical solution adopted by the present invention is as follows: The power grid inspection data analysis method based on artificial intelligence provided by the present invention comprises the following steps:

[0006] Step S1: power grid inspection;

[0007] Step S2: data preprocessing;

[0008] Step S3: constructing a transmission line detection model;

[0009] Step S4: Optimizing the transmission line detection model;

[0010] Step S5: Grid inspection data analysis.

[0011] Furthermore, in step S1, the power grid inspection is used to collect image data during the power grid inspection process, specifically using a drone to perform power grid inspection, collect aerial images of transmission lines, and obtain transmission line image data.

[0012] Furthermore, in step S2, the data preprocessing includes the following steps:

[0013] Step S21: data cleaning, which is used to improve data quality, specifically, by removing blurred images in the power transmission line image data and using a filter to perform denoising on the remaining images in the power transmission line image data, thereby obtaining power transmission line image cleaning data;

[0014] Step S22: data enhancement, which is used to expand the data, specifically, by performing flipping, rotation and brightness adjustment operations on the image in the power line image cleaning data, expanding the power line image data, and obtaining the power line image expansion data;

[0015] Step S23: image standardization, specifically, adjusting the images in the extended power transmission line image data to the same size, and performing pixel normalization processing to obtain power transmission line image standard data.

[0016] Further, in step S3, the power transmission line detection model is constructed by using a regional convolutional proposal network combined with a sliding window transformer based on the power transmission line image standard data to obtain a power transmission line detection model;

[0017] The regional convolution proposal network combined with the transformer includes a sliding window transformer backbone network, an adaptive multi-scale fusion block, a regional convolution proposal subnet and a classification regression layer;

[0018] The sliding window transformer backbone network includes an input processing layer, an enhanced local perception unit and an improved sliding window transformer block;

[0019] The region convolution proposal subnet includes a region proposal network, a region alignment layer and a region convolution layer;

[0020] The transmission line detection model is constructed, comprising the following steps:

[0021] Step S31: constructing a sliding window transformer backbone network for capturing local details and hierarchical features in an image, specifically receiving an image in the power transmission line image standard data as an input image, setting an input processing layer, an enhanced local perception unit and an improved sliding window transformer block in the sliding window transformer backbone network, including the following steps:

[0022] Step S311: input processing layer, specifically, performing image slicing embedding operation on the input image through the input processing layer to obtain N transmission line image block features;

[0023] Step S312: constructing an enhanced local perception unit to expand the spatial feature receptive field, specifically, performing enhanced local perception processing on each power transmission line image block feature through the enhanced local perception unit to obtain a power transmission line perception enhanced feature map;

[0024] The enhanced local perception processing comprises the following steps:

[0025] Step S3121: Convert the transmission line image block features into a spatial feature map to obtain a transmission line image block feature map, use 3×3 dilated convolution with three dilation rates to extract features, and perform feature splicing to obtain a transmission line dilation feature map. The calculation formula is:

[0026]

[0027] Where Ig' is the transmission line expansion feature map, Concat(·) is the feature concatenation function, is a 3×3 dilated convolution with a dilation rate of r1, where r1 is the first dilation rate, Ig is the transmission line image block feature map, is a 3×3 dilated convolution with a dilation rate of r2, where r2 is the second dilation rate, It is a 3×3 dilated convolution with a dilation rate of r3, where r3 is the third dilation rate;

[0028] Step S3122: adjust the number of channels of the power transmission line expansion feature map through 1×1 convolution, perform residual connection, and use SILU activation function to activate the feature. The calculation formula is:

[0029] Ig″=SILU(Conv 1×1 (Ig′)+Ig);

[0030] Where Ig″ is the output feature map of enhanced local perception processing, SILU(·) is the SILU activation function, Conv 1×1 (·) is a 1×1 convolution;

[0031] Step S313: improving the sliding window transformer block, specifically introducing a lightweight multi-head self-attention mechanism into the sliding window transformer, and constructing a sliding window transformer block in which the window lightweight multi-head self-attention, multi-layer perceptron and shift window lightweight multi-head self-attention are improved;

[0032] The calculation formula of the lightweight multi-head self-attention mechanism is:

[0033]

[0034] Where Q is the query matrix, X is the transmission line perception enhanced feature map, and W Q is the query weight, K is the key matrix, Conv(·) is the depthwise separable convolution, W K is the key weight, V is the query matrix, W V is the value weight, LMSA(Q,K,V) is lightweight multi-head self-attention, LN(·) is layer normalization, Softmax(·) is the Softmax activation function, T is the transpose operation, d K is the key matrix dimension;

[0035] Step S314: multi-stage processing, specifically setting M sliding window transformer stages, each stage first performs image segmentation and embedding operations to downsample feature maps and increase the number of feature channels, each stage uses G improved sliding window transformer blocks to calculate the power line perception enhancement feature map, and after M sliding window transformer stages, M multi-scale feature maps of the power line are obtained;

[0036] Step S32: constructing an adaptive multi-scale fusion block, specifically, fusing the M multi-scale feature maps of the transmission lines through the adaptive multi-scale fusion block to obtain a context feature map of the transmission lines;

[0037] Step S33: constructing a regional convolution proposal subnet, specifically setting a regional proposal network, a regional alignment layer and a regional convolution layer in the regional convolution proposal subnet, processing the transmission line context feature map through the regional convolution proposal subnet, and obtaining a candidate regional feature map;

[0038] Step S34: constructing a classification and regression layer, specifically setting classification tasks and regression tasks in the classification and regression layer, processing the candidate region feature map through the classification and regression layer, and obtaining a model detection result;

[0039] Step S35: Model training, specifically, based on the standard data of the transmission line image, by constructing the sliding window transformer backbone network, constructing the adaptive multi-scale fusion block, constructing the regional convolution proposal subnet and constructing the classification regression layer, the model initial training is performed to obtain the transmission line detection model, and the transmission line detection model is used for transmission line foreign body detection.

[0040] Further, in step S4, the power transmission line detection model is optimized, specifically, based on the power transmission line image standard data, the model parameters are optimized by using the Grey Wolf Optimization Algorithm combined with the Particle Swarm Optimization to obtain the optimal power transmission line detection model, including the following steps:

[0041] Step S41: Initializing the gray wolf optimization algorithm, specifically, randomly initializing the gray wolf position and gray wolf speed, setting the gray wolf population size and the maximum number of iterations, and selecting the model accuracy as the fitness function;

[0042] Step S42: Evaluate the fitness value of the population, specifically, use the fitness function to calculate the fitness value of each gray wolf position, and select the gray wolf with the best, second best and third best fitness value as α wolf, β wolf and δ wolf respectively;

[0043] Step S43: improving the gray wolf position update mechanism, specifically introducing inertia weight and particle swarm search mechanism into the traditional gray wolf position update mechanism, and improving the gray wolf position update mechanism, including the following steps:

[0044] Step S431: Apply the particle swarm search mechanism to perform the initial update of the gray wolf position. The calculation formula is:

[0045]

[0046] Where v(k+1) is the speed of the gray wolf at the k+1th iteration, k is the iteration index, v(k) is the speed of the gray wolf at the kth iteration, γ is a random number in the range [0,1], and pos gb is the global optimal position, which is used to indicate the optimal position of the gray wolf population in the current iteration process. pos is the current position of the gray wolf. lb is the optimal position of the individual, which is used to indicate the optimal position of the gray wolf individual in the current iteration, and pos' is the current position of the gray wolf after the initial update;

[0047] Step S432: using the positions of α wolf, β wolf and δ wolf, introducing inertia weight, and further updating the position of the gray wolf, including the following steps:

[0048] Step S4321: Calculate the inertia weight, the calculation formula is:

[0049]

[0050] Where w is the inertia weight, w max is the maximum inertia weight, w min is the minimum inertia weight, k max is the maximum number of iterations;

[0051] Step S4322: Update the positions of wolf α, wolf β and wolf δ. The calculation formula is:

[0052]

[0053] Where pos1 is the updated wolf position, pos α is the α wolf position, A1 is the first step length coefficient, used to adjust the α wolf position, D α is the distance between the current gray wolf position and the α wolf position after the initial update, pos2 is the updated β wolf position, A2 is the second step length coefficient used to adjust the β wolf position, D β is the distance between the current gray wolf position and the β wolf position after the initial update, pos3 is the updated δ wolf position, pos δ is the δ wolf position, A3 is the third step coefficient, used to adjust the δ wolf position, D δ is the distance between the current gray wolf position and the δ wolf position after the initial update;

[0054] Step S4323: Based on the updated positions of α, β and δ wolves, the position of the gray wolf is updated. The calculation formula is:

[0055]

[0056] In the formula, pos(k+1) is the updated position of the gray wolf, specifically the position of the gray wolf at the k+1th iteration;

[0057] Step S44: adaptively perturb the gray wolf position, specifically, calculate the aggregation factor according to the population fitness value, and adjust the gray wolf position according to the aggregation factor. The calculation formula is:

[0058]

[0059] Where c is the aggregation factor, which is used to dynamically adjust the disturbance amplitude, e is the base of the natural logarithm, and f i is the fitness value of the updated gray wolf position, f avg is the average fitness value of the gray wolf population, θ is the control coefficient of the aggregation factor, and pos'(k+1) is the adjusted position of the gray wolf, specifically the adjusted position of the gray wolf at the k+1th iteration;

[0060] Step S45: iteratively updating the position of the gray wolf, specifically, repeatedly executing steps S42 to S44 to iteratively update the position of the gray wolf until the maximum number of iterations is reached, and selecting the gray wolf position with the best fitness value as the optimal parameter of the model;

[0061] Step S46: constructing a gray wolf optimization algorithm combined with particle swarm optimization, specifically, constructing a gray wolf optimization algorithm combined with particle swarm optimization through the gray wolf optimization algorithm initialization, the evaluation of population fitness value, the improved gray wolf position update mechanism, the adaptive perturbation adjustment of the gray wolf position, and the iterative update of the gray wolf position;

[0062] Step S47: Model optimization, specifically, tuning the parameters of the power transmission line detection model by using the Grey Wolf Optimization Algorithm combined with the particle swarm optimization based on the power transmission line image standard data to obtain the optimal power transmission line detection model.

[0063] Further, in step S5, the power grid inspection data analysis is specifically to perform transmission line foreign body detection through the optimal transmission line detection model to obtain the transmission line foreign body detection result, and generate an inspection report based on the transmission line foreign body detection result to assist the staff to clean and maintain the transmission line;

[0064] The transmission line foreign body detection result includes the foreign body location and foreign body type;

[0065] The inspection report includes the inspection time, inspection area, inspection equipment, transmission line foreign body detection results and cleaning and maintenance recommendations.

[0066] The power grid inspection data analysis system based on artificial intelligence provided by the present invention comprises: a power grid inspection module, a data preprocessing module, a transmission line detection model construction module, a transmission line detection model optimization module and a power grid inspection data analysis module;

[0067] The power grid inspection module is used for power grid inspection, obtains power transmission line image data through power grid inspection, and sends the power transmission line image data to the data preprocessing module;

[0068] The data preprocessing module is used for data preprocessing, and obtains the transmission line image standard data through data preprocessing, and sends the transmission line image standard data to the transmission line detection model building module and the transmission line detection model optimization module;

[0069] The transmission line detection model construction module is used for transmission line detection model construction, obtains a transmission line detection model through transmission line detection model construction, and sends the transmission line detection model to the transmission line detection model optimization module;

[0070] The transmission line detection model optimization module is used for optimizing the transmission line detection model, obtaining an optimal transmission line detection model through the optimization of the transmission line detection model, and sending the optimal transmission line detection model to the power grid inspection data analysis module;

[0071] The power grid inspection data analysis module is used for power grid inspection data analysis, performs transmission line foreign object detection through the optimal transmission line detection model, obtains transmission line foreign object detection results, and generates an inspection report based on the transmission line foreign object detection results.

[0072] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0073] (1) In view of the technical problem that the background of the transmission line inspection image is complex and the target foreign object is small, false detection and missed detection are prone to occur, resulting in low transmission line detection accuracy, this scheme creatively adopts the regional convolution proposal network combined with the sliding window transformer to construct the transmission line detection model. By introducing the enhanced local perception unit, it can better capture the local subtle features. Through the improved sliding window transformer block, multi-stage processing is performed to better handle multi-scale features, so that the model has a stronger capture ability for small objects in complex scenes, thereby improving the model detection accuracy.

[0074] (2) In view of the technical problem that the ambient lighting and background complexity during power grid inspection will change dynamically in the existing power grid inspection data analysis process, the transmission line detection model needs to adapt to different scenarios, and the traditional gray wolf optimization algorithm has weak robustness when adapting to dynamic environments, this scheme creatively uses the gray wolf optimization algorithm combined with particle swarm optimization to optimize the model parameters. By introducing inertia weight, particle swarm search mechanism and adaptive perturbation, it dynamically balances the search mode, increases population diversity and improves the global search capability, thereby optimizing the generalization, robustness and adaptability of the model parameters, making the model better adaptable to a variety of complex scenarios, and improving the overall practicality and effectiveness of the method. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 A schematic diagram of the process flow of the power grid inspection data analysis method based on artificial intelligence provided by the present invention;

[0076] Figure 2 A schematic diagram of an artificial intelligence-based power grid inspection data analysis system provided by the present invention;

[0077] Figure 3 is a schematic flow chart of step S2;

[0078] Figure 4 is a schematic flow chart of step S3;

[0079] Figure 5 It is a schematic diagram of the process of step S4.

[0080] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0081] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0082] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.

[0083] Example 1, see Figure 1 The present invention provides an artificial intelligence-based power grid inspection data analysis method, which comprises the following steps:

[0084] Step S1: power grid inspection;

[0085] Step S2: data preprocessing;

[0086] Step S3: constructing a transmission line detection model;

[0087] Step S4: Optimizing the transmission line detection model;

[0088] Step S5: Grid inspection data analysis.

[0089] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the power grid inspection is used to collect image data during the power grid inspection process, specifically using a drone to perform power grid inspection, collect aerial images of transmission lines, and obtain transmission line image data.

[0090] Example 3, see Figure 1 and Figure 3 This embodiment is based on the above embodiment. In step S2, the data preprocessing includes the following steps:

[0091] Step S21: data cleaning, which is used to improve data quality, specifically, by removing blurred images in the power transmission line image data and using a filter to perform denoising on the remaining images in the power transmission line image data, thereby obtaining power transmission line image cleaning data;

[0092] Step S22: data enhancement, which is used to expand the data, specifically, by performing flipping, rotation and brightness adjustment operations on the image in the power line image cleaning data, expanding the power line image data, and obtaining the power line image expansion data;

[0093] Step S23: image standardization, specifically, adjusting the images in the extended power transmission line image data to the same size, and performing pixel normalization processing to obtain power transmission line image standard data.

[0094] Example 4, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S3, the power transmission line detection model is constructed, specifically, based on the standard data of the power transmission line image, a regional convolution proposal network combined with a sliding window transformer is used to construct the power transmission line detection model to obtain the power transmission line detection model;

[0095] The regional convolution proposal network combined with the transformer includes a sliding window transformer backbone network, an adaptive multi-scale fusion block, a regional convolution proposal subnet and a classification regression layer;

[0096] The sliding window transformer backbone network includes an input processing layer, an enhanced local perception unit and an improved sliding window transformer block;

[0097] The region convolution proposal subnet includes a region proposal network, a region alignment layer and a region convolution layer;

[0098] The transmission line detection model is constructed, comprising the following steps:

[0099] Step S31: constructing a sliding window transformer backbone network for capturing local details and hierarchical features in an image, specifically receiving an image in the power transmission line image standard data as an input image, setting an input processing layer, an enhanced local perception unit and an improved sliding window transformer block in the sliding window transformer backbone network, including the following steps:

[0100] Step S311: input processing layer, specifically, performing image slicing embedding operation on the input image through the input processing layer to obtain N transmission line image block features;

[0101] Step S312: constructing an enhanced local perception unit to expand the spatial feature receptive field, specifically, performing enhanced local perception processing on each power transmission line image block feature through the enhanced local perception unit to obtain a power transmission line perception enhanced feature map;

[0102] The enhanced local perception processing comprises the following steps:

[0103] Step S3121: Convert the transmission line image block features into a spatial feature map to obtain a transmission line image block feature map, use 3×3 dilated convolution with three dilation rates to extract features, and perform feature splicing to obtain a transmission line dilation feature map. The calculation formula is:

[0104]

[0105] Where Ig' is the transmission line expansion feature map, Concat(·) is the feature concatenation function, is a 3×3 dilated convolution with a dilation rate of r1, where r1 is the first dilation rate, specifically 1, and Ig is the feature map of the power transmission line image block. It is a 3×3 dilated convolution with a dilation rate of r2. r2 is the second dilation rate, and its specific value is 2. It is a 3×3 dilated convolution with a dilation rate of r3, where r3 is the third dilation rate, and its specific value is 3;

[0106] Step S3122: adjust the number of channels of the power transmission line expansion feature map through 1×1 convolution, perform residual connection, and use SILU activation function to activate the feature. The calculation formula is:

[0107] Ig″=SILU(Conv 1×1 (Ig′)+Ig);

[0108] Where Ig″ is the output feature map of enhanced local perception processing, SILU(·) is the SILU activation function, Conv 1×1 (·) is a 1×1 convolution;

[0109] Step S313: improving the sliding window transformer block, specifically introducing a lightweight multi-head self-attention mechanism into the sliding window transformer, and constructing a sliding window transformer block in which the window lightweight multi-head self-attention, multi-layer perceptron and shift window lightweight multi-head self-attention are improved;

[0110] The lightweight multi-head self-attention mechanism simplifies the calculation of the key matrix and the value matrix through deep separable convolution. The calculation formula is:

[0111]

[0112] Where Q is the query matrix, X is the transmission line perception enhanced feature map, and W Q is the query weight, K is the key matrix, Conv(·) is the depthwise separable convolution, W K is the key weight, V is the query matrix, W Vis the value weight, LMSA(Q,K,V) is lightweight multi-head self-attention, LN(·) is layer normalization, Softmax(·) is the Softmax activation function, T is the transpose operation, d K is the key matrix dimension;

[0113] Step S314: multi-stage processing, specifically setting M sliding window transformer stages, each stage first performs image segmentation and embedding operations to downsample feature maps and increase the number of feature channels, each stage uses G improved sliding window transformer blocks to calculate the power line perception enhancement feature map, and after M sliding window transformer stages, M multi-scale feature maps of the power line are obtained;

[0114] Step S32: constructing an adaptive multi-scale fusion block, specifically, fusing the M multi-scale feature maps of the transmission lines through the adaptive multi-scale fusion block to obtain a context feature map of the transmission lines;

[0115] Step S33: constructing a regional convolution proposal subnet, specifically setting a regional proposal network, a regional alignment layer and a regional convolution layer in the regional convolution proposal subnet, processing the transmission line context feature map through the regional convolution proposal subnet, and obtaining a candidate regional feature map;

[0116] Step S34: constructing a classification and regression layer, specifically setting classification tasks and regression tasks in the classification and regression layer, processing the candidate region feature map through the classification and regression layer, and obtaining a model detection result;

[0117] The classification task uses a cross entropy loss function, and the regression task uses an L1 loss function;

[0118] Step S35: model training, specifically, based on the standard data of the power transmission line image, by constructing the sliding window transformer backbone network, constructing the adaptive multi-scale fusion block, constructing the regional convolution proposal subnet and constructing the classification regression layer, the model initial training is performed to obtain the power transmission line detection model, and the power transmission line detection model is used for foreign body detection of the power transmission line;

[0119] By performing the above operations, in order to solve the technical problem that in the existing power grid inspection data analysis process, the background of the transmission line inspection image is complex, and when the target foreign object is small, false detection and missed detection are prone to occur, resulting in low transmission line detection accuracy, this scheme creatively adopts the regional convolution proposal network combined with the sliding window transformer to construct the transmission line detection model, introduces the enhanced local perception unit to better capture local subtle features, and performs multi-stage processing through the improved sliding window transformer block to better handle multi-scale features, so that the model has a stronger capture ability for small objects in complex scenes, thereby improving the model detection accuracy.

[0120] Example 5, see Figure 1 and Figure 5 This embodiment is based on the above embodiment. In step S4, the power transmission line detection model is optimized, specifically, based on the transmission line image standard data, the gray wolf optimization algorithm combined with particle swarm optimization is used to optimize the model parameters to obtain the optimal transmission line detection model, including the following steps:

[0121] Step S41: Initializing the gray wolf optimization algorithm, specifically, randomly initializing the gray wolf position and gray wolf speed, setting the gray wolf population size and the maximum number of iterations, and selecting the model accuracy as the fitness function;

[0122] Step S42: Evaluate the fitness value of the population, specifically, use the fitness function to calculate the fitness value of each gray wolf position, and select the gray wolf with the best, second best and third best fitness value as α wolf, β wolf and δ wolf respectively;

[0123] Step S43: improving the gray wolf position update mechanism, specifically introducing inertia weight and particle swarm search mechanism into the traditional gray wolf position update mechanism, and improving the gray wolf position update mechanism, including the following steps:

[0124] Step S431: Apply the particle swarm search mechanism to perform the initial update of the gray wolf position. The calculation formula is:

[0125]

[0126] Where v(k+1) is the speed of the gray wolf at the k+1th iteration, k is the iteration index, v(k) is the speed of the gray wolf at the kth iteration, γ is a random number in the range [0,1], and pos gb is the global optimal position, which is used to indicate the optimal position of the gray wolf population in the current iteration process. pos is the current position of the gray wolf. lb is the optimal position of the individual, which is used to indicate the optimal position of the gray wolf individual in the current iteration, and pos' is the current position of the gray wolf after the initial update;

[0127] Step S432: using the positions of α wolf, β wolf and δ wolf, introducing inertia weight, and further updating the position of the gray wolf, including the following steps:

[0128] Step S4321: Calculate the inertia weight, the calculation formula is:

[0129]

[0130] Where w is the inertia weight, w max is the maximum inertia weight, which is set to 1.2. minis the minimum inertia weight, which is set to 0.4, k max is the maximum number of iterations;

[0131] Step S4322: Update the positions of wolf α, wolf β and wolf δ. The calculation formula is:

[0132]

[0133] Where pos1 is the updated wolf position, pos α is the α wolf position, A1 is the first step length coefficient, used to adjust the α wolf position, D α is the distance between the current gray wolf position and the α wolf position after the initial update, pos2 is the updated β wolf position, A2 is the second step length coefficient used to adjust the β wolf position, D β is the distance between the current gray wolf position and the β wolf position after the initial update, pos3 is the updated δ wolf position, pos δ is the δ wolf position, A3 is the third step coefficient, used to adjust the δ wolf position, D δ is the distance between the current gray wolf position and the δ wolf position after the initial update;

[0134] Step S4323: Based on the updated positions of α, β and δ wolves, the position of the gray wolf is updated. The calculation formula is:

[0135]

[0136] In the formula, pos(k+1) is the updated position of the gray wolf, specifically the position of the gray wolf at the k+1th iteration;

[0137] Step S44: adaptively perturb the gray wolf position, specifically, calculate the aggregation factor according to the population fitness value, and adjust the gray wolf position according to the aggregation factor. The calculation formula is:

[0138]

[0139] Where c is the aggregation factor, which is used to dynamically adjust the disturbance amplitude, e is the base of the natural logarithm, and f i is the fitness value of the updated gray wolf position, f avg is the average fitness value of the gray wolf population, θ is the control coefficient of the aggregation factor, and pos'(k+1) is the adjusted position of the gray wolf, specifically the adjusted position of the gray wolf at the k+1th iteration;

[0140] Step S45: iteratively updating the position of the gray wolf, specifically, repeatedly executing steps S42 to S44 to iteratively update the position of the gray wolf until the maximum number of iterations is reached, and selecting the gray wolf position with the best fitness value as the optimal parameter of the model;

[0141] Step S46: constructing a gray wolf optimization algorithm combined with particle swarm optimization, specifically, constructing a gray wolf optimization algorithm combined with particle swarm optimization through the gray wolf optimization algorithm initialization, the evaluation of population fitness value, the improved gray wolf position update mechanism, the adaptive perturbation adjustment of the gray wolf position, and the iterative update of the gray wolf position;

[0142] Step S47: model optimization, specifically, tuning the parameters of the power transmission line detection model by using the Grey Wolf Optimization Algorithm combined with the particle swarm optimization according to the power transmission line image standard data, so as to obtain the optimal power transmission line detection model;

[0143] By performing the above operations, in view of the technical problem that in the existing power grid inspection data analysis process, the ambient lighting and background complexity during power grid inspection will change dynamically, the transmission line detection model needs to adapt to different scenarios, and the traditional gray wolf optimization algorithm has weak robustness when adapting to dynamic environments, this scheme creatively adopts the gray wolf optimization algorithm combined with particle swarm optimization to optimize the model parameters. By introducing inertia weights, particle swarm search mechanism and adaptive perturbations, it dynamically balances the search mode, increases population diversity and improves the global search capability, thereby optimizing the generalization, robustness and adaptability of the model parameters, making the model better adaptable to a variety of complex scenarios, and improving the overall practicality and effectiveness of the method.

[0144] Example 6, see Figure 1 , this embodiment is based on the above embodiment. In step S5, the power grid inspection data analysis is specifically to perform transmission line foreign body detection through the optimal transmission line detection model to obtain the transmission line foreign body detection result, and generate an inspection report based on the transmission line foreign body detection result to assist the staff in cleaning and maintaining the transmission line;

[0145] The transmission line foreign body detection result includes the foreign body location and foreign body type;

[0146] The inspection report includes the inspection time, inspection area, inspection equipment, transmission line foreign body detection results and cleaning and maintenance recommendations.

[0147] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, and the power grid inspection data analysis system based on artificial intelligence provided by the present invention includes: a power grid inspection module, a data preprocessing module, a transmission line detection model construction module, a transmission line detection model optimization module and a power grid inspection data analysis module;

[0148] The power grid inspection module is used for power grid inspection, obtains power transmission line image data through power grid inspection, and sends the power transmission line image data to the data preprocessing module;

[0149] The data preprocessing module is used for data preprocessing, and obtains the transmission line image standard data through data preprocessing, and sends the transmission line image standard data to the transmission line detection model building module and the transmission line detection model optimization module;

[0150] The transmission line detection model construction module is used for transmission line detection model construction, obtains a transmission line detection model through transmission line detection model construction, and sends the transmission line detection model to the transmission line detection model optimization module;

[0151] The transmission line detection model optimization module is used for optimizing the transmission line detection model, obtaining an optimal transmission line detection model through the optimization of the transmission line detection model, and sending the optimal transmission line detection model to the power grid inspection data analysis module;

[0152] The power grid inspection data analysis module is used for power grid inspection data analysis, performs transmission line foreign object detection through the optimal transmission line detection model, obtains transmission line foreign object detection results, and generates an inspection report based on the transmission line foreign object detection results.

[0153] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0154] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.

[0155] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A power grid inspection data analysis method based on artificial intelligence, characterized by: The method comprises the following steps: Step S1: power grid inspection; Step S2: data preprocessing; Step S3: constructing a transmission line detection model, specifically, constructing a transmission line detection model based on standard transmission line image data and using a regional convolutional proposal network combined with a sliding window transformer to obtain a transmission line detection model; The regional convolution proposal network combined with the transformer includes a sliding window transformer backbone network, an adaptive multi-scale fusion block, a regional convolution proposal subnet and a classification regression layer; The sliding window transformer backbone network includes an input processing layer, an enhanced local perception unit and an improved sliding window transformer block; The region convolution proposal subnet includes a region proposal network, a region alignment layer and a region convolution layer; Step S4: optimizing the power transmission line detection model, specifically, optimizing the model parameters by using the Grey Wolf Optimization Algorithm combined with the Particle Swarm Optimization based on the power transmission line image standard data, so as to obtain the optimal power transmission line detection model; Step S5: Grid inspection data analysis.

2. The power grid inspection data analysis method based on artificial intelligence according to claim 1 is characterized by: In step S3, the transmission line detection model is constructed, including the following steps: Step S31: constructing a sliding window transformer backbone network for capturing local details and hierarchical features in an image, specifically receiving an image in the power transmission line image standard data as an input image, setting an input processing layer, an enhanced local perception unit and an improved sliding window transformer block in the sliding window transformer backbone network, including the following steps: Step S311: input processing layer, specifically, performing image slicing embedding operation on the input image through the input processing layer to obtain N transmission line image block features; Step S312: constructing an enhanced local perception unit to expand the spatial feature receptive field, specifically, performing enhanced local perception processing on each power transmission line image block feature through the enhanced local perception unit to obtain a power transmission line perception enhanced feature map; The enhanced local perception processing comprises the following steps: Step S3121: Convert the transmission line image block features into a spatial feature map to obtain a transmission line image block feature map, use 3×3 dilated convolution with three dilation rates to extract features, and perform feature splicing to obtain a transmission line dilation feature map. The calculation formula is: Where Ig' is the transmission line expansion feature map, Concat(·) is the feature concatenation function, is a 3×3 dilated convolution with a dilation rate of r1, where r1 is the first dilation rate, Ig is the transmission line image block feature map, is a 3×3 dilated convolution with a dilation rate of r2, where r2 is the second dilation rate, It is a 3×3 dilated convolution with a dilation rate of r3, where r3 is the third dilation rate; Step S3122: adjust the number of channels of the power transmission line expansion feature map through 1×1 convolution, perform residual connection, and use SILU activation function to activate the feature. The calculation formula is: Ig″=SILU(Conv 1×1 (Ig′)+Ig); Where Ig” is the output feature map of enhanced local perception processing, SILU(·) is the SILU activation function, Conv 1×1 (·) is a 1×1 convolution; Step S313: improving the sliding window transformer block, specifically introducing a lightweight multi-head self-attention mechanism into the sliding window transformer, and constructing a sliding window transformer block in which the window lightweight multi-head self-attention, multi-layer perceptron and shift window lightweight multi-head self-attention are improved; The calculation formula of the lightweight multi-head self-attention mechanism is: Where Q is the query matrix, X is the transmission line perception enhanced feature map, and W Q is the query weight, K is the key matrix, Conv(·) is the depthwise separable convolution, W K is the key weight, V is the query matrix, W V is the value weight, LMSA(Q,K,V) is lightweight multi-head self-attention, LN(·) is layer normalization, Softmax(·) is the Softmax activation function, T is the transpose operation, d K is the key matrix dimension; Step S314: multi-stage processing, specifically setting M sliding window transformer stages, each stage first performs image segmentation and embedding operations to downsample feature maps and increase the number of feature channels, each stage uses G improved sliding window transformer blocks to calculate the power line perception enhancement feature map, and after M sliding window transformer stages, M multi-scale feature maps of the power line are obtained; Step S32: constructing an adaptive multi-scale fusion block, specifically, fusing the M multi-scale feature maps of the transmission lines through the adaptive multi-scale fusion block to obtain a context feature map of the transmission lines; Step S33: constructing a regional convolution proposal subnet, specifically setting a regional proposal network, a regional alignment layer and a regional convolution layer in the regional convolution proposal subnet, processing the transmission line context feature map through the regional convolution proposal subnet, and obtaining a candidate regional feature map; Step S34: constructing a classification and regression layer, specifically setting classification tasks and regression tasks in the classification and regression layer, processing the candidate region feature map through the classification and regression layer, and obtaining a model detection result; Step S35: Model training, specifically, based on the standard data of the transmission line image, by constructing the sliding window transformer backbone network, constructing the adaptive multi-scale fusion block, constructing the regional convolution proposal subnet and constructing the classification regression layer, the model initial training is performed to obtain the transmission line detection model, and the transmission line detection model is used for transmission line foreign body detection.

3. The power grid inspection data analysis method based on artificial intelligence according to claim 2 is characterized by: In step S4, the power transmission line detection model is optimized, specifically, based on the transmission line image standard data, the model parameters are optimized by using the Grey Wolf Optimization Algorithm combined with the Particle Swarm Optimization to obtain the optimal power transmission line detection model, including the following steps: Step S41: Initializing the gray wolf optimization algorithm, specifically, randomly initializing the gray wolf position and gray wolf speed, setting the gray wolf population size and the maximum number of iterations, and selecting the model accuracy as the fitness function; Step S42: Evaluate the fitness value of the population, specifically, use the fitness function to calculate the fitness value of each gray wolf position, and select the gray wolves with the best, second best and third best fitness values ​​as α wolf, β wolf and δ wolf respectively; Step S43: improving the gray wolf position update mechanism, specifically introducing inertia weight and particle swarm search mechanism into the traditional gray wolf position update mechanism, and improving the gray wolf position update mechanism, including the following steps: Step S431: Apply the particle swarm search mechanism to perform the initial update of the gray wolf position. The calculation formula is: Where v(k+1) is the speed of the gray wolf at the k+1th iteration, k is the iteration index, v(k) is the speed of the gray wolf at the kth iteration, γ is a random number in the range [0,1], and pos gb is the global optimal position, which is used to indicate the optimal position of the gray wolf population in the current iteration process. pos is the current position of the gray wolf. lb is the optimal position of the individual, which is used to indicate the optimal position of the gray wolf individual in the current iteration, and pos' is the current position of the gray wolf after the initial update; Step S432: using the positions of α wolf, β wolf and δ wolf, introducing inertia weight, and further updating the position of the gray wolf, including the following steps: Step S4321: Calculate the inertia weight, the calculation formula is: Where w is the inertia weight, w max is the maximum inertia weight, w min is the minimum inertia weight, k max is the maximum number of iterations; Step S4322: Update the positions of wolf α, wolf β and wolf δ. The calculation formula is: Where pos1 is the updated wolf position, pos α is the α wolf position, A1 is the first step length coefficient, used to adjust the α wolf position, D α is the distance between the current gray wolf position and the α wolf position after the initial update, pos2 is the updated β wolf position, A2 is the second step length coefficient used to adjust the β wolf position, D β is the distance between the current gray wolf position and the β wolf position after the initial update, pos3 is the updated δ wolf position, pos δ is the δ wolf position, A3 is the third step coefficient, used to adjust the δ wolf position, D δ is the distance between the current gray wolf position and the δ wolf position after the initial update; Step S4323: Based on the updated positions of α, β and δ wolves, the position of the gray wolf is updated. The calculation formula is: In the formula, pos(k+1) is the updated position of the gray wolf, specifically the position of the gray wolf at the k+1th iteration; Step S44: adaptively perturb the gray wolf position, specifically, calculate the aggregation factor according to the population fitness value, and adjust the gray wolf position according to the aggregation factor. The calculation formula is: Where c is the aggregation factor, which is used to dynamically adjust the disturbance amplitude, e is the base of the natural logarithm, and f i is the fitness value of the updated gray wolf position, f avg is the average fitness value of the gray wolf population, θ is the control coefficient of the aggregation factor, and pos'(k+1) is the adjusted position of the gray wolf, specifically the adjusted position of the gray wolf at the k+1th iteration; Step S45: iteratively updating the position of the gray wolf, specifically, repeatedly executing steps S42 to S44 to iteratively update the position of the gray wolf until the maximum number of iterations is reached, and selecting the gray wolf position with the best fitness value as the optimal parameter of the model; Step S46: constructing a gray wolf optimization algorithm combined with particle swarm optimization, specifically, constructing a gray wolf optimization algorithm combined with particle swarm optimization through the gray wolf optimization algorithm initialization, the evaluation of population fitness value, the improved gray wolf position update mechanism, the adaptive perturbation adjustment of the gray wolf position, and the iterative update of the gray wolf position; Step S47: Model optimization, specifically, tuning the parameters of the power transmission line detection model by using the Grey Wolf Optimization Algorithm combined with the particle swarm optimization based on the power transmission line image standard data to obtain the optimal power transmission line detection model.

4. The power grid inspection data analysis method based on artificial intelligence according to claim 3 is characterized by: In step S2, the data preprocessing includes the following steps: Step S21: data cleaning, specifically, removing blurred images in the power transmission line image data and using a filter to perform denoising on the remaining images in the power transmission line image data to obtain power transmission line image cleaning data; Step S22: data enhancement, which is used to expand the data, specifically, by performing flipping, rotation and brightness adjustment operations on the image in the power line image cleaning data, expanding the power line image data, and obtaining the power line image expansion data; Step S23: image standardization, specifically, adjusting the images in the extended power line image data to the same size, and performing pixel normalization processing to obtain power line image standard data.

5. The power grid inspection data analysis method based on artificial intelligence according to claim 4 is characterized by: In step S1, the power grid inspection is used to collect image data during the power grid inspection process, specifically using a drone to perform power grid inspection, collect aerial images of transmission lines, and obtain transmission line image data.

6. The power grid inspection data analysis method based on artificial intelligence according to claim 5 is characterized by: In step S5, the power grid inspection data analysis is specifically to perform transmission line foreign object detection through the optimal transmission line detection model to obtain transmission line foreign object detection results, and generate an inspection report based on the transmission line foreign object detection results to assist staff in cleaning and maintaining the transmission lines.

7. An artificial intelligence-based power grid inspection data analysis system, used to implement the artificial intelligence-based power grid inspection data analysis method as described in any one of claims 1 to 6, characterized in that: It includes a power grid inspection module, a data preprocessing module, a transmission line detection model building module, a transmission line detection model optimization module and a power grid inspection data analysis module.

8. The power grid inspection data analysis system based on artificial intelligence according to claim 7 is characterized by: The power grid inspection module is used for power grid inspection, obtains power transmission line image data through power grid inspection, and sends the power transmission line image data to the data preprocessing module; The data preprocessing module is used for data preprocessing, and obtains the transmission line image standard data through data preprocessing, and sends the transmission line image standard data to the transmission line detection model building module and the transmission line detection model optimization module; The transmission line detection model construction module is used for transmission line detection model construction, obtains a transmission line detection model through transmission line detection model construction, and sends the transmission line detection model to the transmission line detection model optimization module; The transmission line detection model optimization module is used for optimizing the transmission line detection model, obtaining an optimal transmission line detection model through the optimization of the transmission line detection model, and sending the optimal transmission line detection model to the power grid inspection data analysis module; The power grid inspection data analysis module is used for power grid inspection data analysis, performs transmission line foreign object detection through the optimal transmission line detection model, obtains transmission line foreign object detection results, and generates an inspection report based on the transmission line foreign object detection results.

Citation Information

Cited By

  • Electrical equipment defect detection method and system

    CN120032193A