A method for analyzing the spatial location of power grids by combining GIS services and artificial intelligence technology

By combining the improved RT-DETR model and shape enhancement module with GIS services, the problem of low efficiency and accuracy in power grid line anomaly detection has been solved, achieving efficient and accurate power grid line anomaly detection and location, and providing comprehensive information support.

CN118818222BActive Publication Date: 2024-11-15STATE GRID LOCATION BASED SERVICE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411308350.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-11-15
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

Existing AI-based methods for detecting power grid line anomalies have limitations in terms of operational efficiency and detection accuracy, which affect the rapid response and effective handling of power grid line anomalies.

Method used

An improved RT-DETR model combined with a shape enhancement module is used to construct a power grid line anomaly detection model. Image data is acquired through UAV inspections, and features are extracted and fused. Combined with GIS services, the associated information of abnormal line segments is obtained, achieving efficient and accurate anomaly detection and location.

Benefits of technology

It improves the efficiency and accuracy of power grid line anomaly detection, enhances the model's ability to detect and identify power grid line anomalies, and provides more comprehensive information support for power grid line anomaly analysis and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118818222B_ABST
    Figure CN118818222B_ABST
Patent Text Reader

Abstract

This application proposes a method for analyzing the spatial position of a power grid by combining GIS services and artificial intelligence technology. The method comprises: receiving images of power grid lines to be detected taken by drone inspections, and power grid line identifiers associated with the images to be detected, performing anomaly detection on the images to be detected through a power grid line anomaly detection model, and obtaining associated information of the abnormal line segments through a power grid GIS platform based on the abnormal line segments. On the one hand, this scheme adopts an RT-DETR model fused with a shape enhancement module to construct a power grid line anomaly detection model, which has higher adaptability, robustness and accuracy for anomaly detection based on line images. On the other hand, by combining GIS services with artificial intelligence technology, accurate positioning of abnormal line segments can be obtained, and rapid matching of associated information of abnormal line segments can be achieved, providing more comprehensive information support for power grid line anomaly analysis and decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of power grid line detection, and in particular, relates to a power grid spatial position analysis method based on artificial intelligence technology. Background Art

[0002] The power system is one of the basic infrastructures of modern society. However, with the continuous expansion of the scale of the power grid, the wide range of power grid areas, and the complex and changeable operating environment, the power grid faces many potential safety hazards and failure risks during operation. Power grid lines, especially overhead lines located in the wild, have been in unstable climates for many years, experiencing severe weather such as sun exposure and rain, snow, hail, etc., and usually experience equipment material aging, corrosion, ice coating, lightning strikes, etc. If these faults of transmission lines and equipment are not repaired and handled in time, it will bring great power supply risks.

[0003] In recent years, the rapid development of artificial intelligence technology has provided new solutions for power grid line anomaly detection. Artificial intelligence technology, especially machine learning, deep learning and neural networks, can discover potential laws and abnormal patterns in the power grid through training and analysis of a large amount of historical data, thereby achieving efficient detection of power grid line anomalies. Despite this, existing artificial intelligence-based detection methods still have limitations in terms of operating efficiency and detection accuracy, which limits their effectiveness in practical applications and affects the rapid response and effective handling of power grid line anomalies. Summary of the invention

[0004] This application proposes a power grid spatial position analysis method based on artificial intelligence technology to improve the efficiency and accuracy of power grid line anomaly detection.

[0005] In a first aspect, the present application provides a method for analyzing the spatial location of a power grid based on artificial intelligence technology, comprising:

[0006] Step S1: receiving an image of a power line to be inspected taken by a drone inspection, and a power line identifier associated with the image to be inspected;

[0007] Step S2: Perform anomaly detection on the image to be detected through the power grid line anomaly detection model.

[0008] The step S2 comprises:

[0009] Step S21: Acquire historical image sample data of power grid lines collected by drone inspection to construct a data set, and mark targets with abnormal lines contained in the image samples in the data set;

[0010] Step S22: constructing a power grid line anomaly detection model based on the improved RT-DETR model;

[0011] Step S23: training the power grid line anomaly detection model based on the data set to obtain a trained power grid line anomaly detection model;

[0012] Step S24: inputting the power line image to be detected taken by the drone inspection into the trained power line anomaly detection model to obtain a power line anomaly detection result; the power line anomaly detection result includes a line anomaly category and a line anomaly positioning frame;

[0013] Step S25: If an abnormality in the power grid line is detected, the specific abnormal line segment is determined.

[0014] Optionally, the step S22 includes:

[0015] Step S22.1: Use a backbone network to extract features of the input image and output three feature maps {S3, S4, S5} of different dimensions as input to the hybrid encoder;

[0016] Step S22.2: The AIFI inside the hybrid encoder extracts the attention feature of the S5 feature map based on the internal scale feature interaction module of the attention mechanism to obtain the output F5, and performs feature fusion of different scales on {S3, S4, F5} based on the CCFM cross-scale feature fusion module to output a multi-scale feature sequence;

[0017] Step S22.3: construct a shape enhancement module, perform grayscale processing on the input image to obtain a grayscale image, input the grayscale image into the shape enhancement module to extract the shape features of the image to obtain a target shape feature sequence, and perform concat splicing on the channel dimension with the multi-scale feature sequence output by CCFM to obtain a fused feature sequence, and use the fused feature sequence as the image feature sequence output by the hybrid encoder;

[0018] Step S22.4: Using the IoU-aware query selection module, based on the image feature sequence output by the hybrid encoder, during model training, features with both high classification scores and high IoU scores are selected to initialize the object query of the decoder. The Transformer decoder structure is used to generate the final object query through iterative optimization based on the image feature sequence from the hybrid encoder and the initialized object query. The output of the decoder is sent to the prediction head, which includes a classification prediction head and a bounding box regression prediction head, which are used for target classification prediction and bounding box coordinate prediction, respectively.

[0019] In some embodiments, the shape enhancement module includes an edge feature extraction unit and a shape feature extraction unit, and the shape feature extraction unit includes a parallel first convolution layer, a second dilated convolution layer, and a third dilated convolution layer;

[0020] The edge feature extraction unit is used to extract the edge features of the grayscale image using a gradient transformation algorithm to obtain an edge feature image F e ;

[0021] The shape feature extraction unit is used to extract the edge feature map F e Shape features are extracted through the parallel first convolution layer, the second atrous convolution layer and the third atrous convolution layer respectively to obtain the first shape feature map, the second shape feature map and the third shape feature map, which are flattened respectively and then concat-joined in the spatial dimension to obtain the target shape feature sequence.

[0022] In the first convolutional layer, Convolution kernel For the edge feature map F e Convolution is performed to obtain The first shape feature matrix, The first shape feature matrices are stacked to obtain the first shape feature map; where the convolution step length stride= , that is, the convolution step size and convolution kernel of the first convolution layer Same size;

[0023] In the second atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain The second shape feature matrix, The second shape feature matrices are stacked to obtain a second shape feature map, wherein the expansion rate of the second hole convolution layer is ;

[0024] In the third atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain A third shape feature matrix, The third shape feature matrices are stacked to obtain a third shape feature map, wherein the expansion rate of the third hole convolution layer is , > ;

[0025] Flatten the first shape feature map, the second shape feature map, and the third shape feature map respectively, and then concat them in spatial dimension to obtain a target shape feature sequence;

[0026] Among them, the convolution kernel The calculation formula is:

[0027]

[0028]

[0029] in, 1< ≤ , is an integer, Indicates Convolution kernel Middle Line The elements of the column, middle The value range of , Represents the convolution kernel size.

[0030] The edge feature extraction unit uses a gradient transformation algorithm to extract edge features of the grayscale image, and the gradient transformation algorithm is a sobel operator.

[0031] Optionally, in the first convolution layer, the second atrous convolution layer or the third atrous convolution layer, edge padding is performed on the edge feature map before convolution.

[0032] In the second aspect, the present application provides a method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology. Based on the first embodiment, the present application further includes the following steps:

[0033] Step S3: Based on the abnormal line segment, the associated information of the abnormal line segment is obtained through the power grid GIS platform.

[0034] In addition, the present application also provides a power grid spatial position analysis system based on artificial intelligence technology, including: a data receiving module, an image detection module and a spatial position analysis module;

[0035] A data receiving module, used to receive the power line to be detected image taken by the drone inspection, and the power line identifier associated with the image to be detected;

[0036] An image detection module is used to identify anomalies of an image to be detected through a power grid line anomaly detection model;

[0037] Further optionally, the system also includes a spatial position analysis module, which is used to obtain the associated information of the abnormal line segment through the power grid GIS platform based on the abnormal line segment.

[0038] The beneficial effect of the present application is that, compared with the prior art, the present invention has the following advantages:

[0039] This application proposes a power grid spatial position analysis method based on artificial intelligence technology, and constructs a power grid line anomaly detection model based on an improved RT-DETR model. On the one hand, the RT-DETR model can capture multi-scale features from low-level to high-level while maintaining computational efficiency, thereby improving detection performance; on the other hand, in the actual scenario of power grid line anomaly detection, considering the unique shape characteristics of power grid lines, in order to improve the accuracy and efficiency of target detection, the shape features of the power grid line detection image are extracted through a shape enhancement module, and fused with the multi-scale features extracted by RT-DETR, so as to strengthen the shape information of the power grid line detection image and enhance the model's ability to detect and identify power grid line anomalies. Therefore, this scheme adopts the RT-DETR model fused with the shape enhancement module to construct a power grid line anomaly detection model, which has higher adaptability, robustness and accuracy for anomaly detection based on line images than the general RT-DETR model.

[0040] In addition, the present application also provides a method for analyzing the spatial position of a power grid by combining GIS services and artificial intelligence technology. By combining GIS services with artificial intelligence technology, accurate positioning of abnormal line segments can be obtained, and rapid matching of associated information of abnormal line segments can be achieved, providing more comprehensive information support for power grid line anomaly analysis and decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] Figure 1 It is a flow chart of a method for analyzing the spatial location of a power grid based on artificial intelligence technology provided in an embodiment of the present application.

[0043] Figure 2 It is a schematic diagram of the improved RT-DETR model structure provided in the embodiment of the present application.

[0044] Figure 3 It is a flow chart of a method for performing anomaly detection on an image to be detected by using a power grid line anomaly detection model provided in an embodiment of the present application.

[0045] Figure 4 It is a flow chart of a method for constructing a power grid line anomaly detection model based on an improved RT-DETR model provided in an embodiment of the present application.

[0046] Figure 5 It is a flowchart of a power grid spatial location analysis method that combines GIS services and artificial intelligence technology provided in an embodiment of the present application.

[0047] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0048] The present application is further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present application.

[0049] Terminology explanation:

[0050] Power grid GIS platform: The power grid GIS system integrates and manages various resource information of power companies, including power equipment, poles and towers, transmission and distribution networks, etc., with natural environment information such as mountains, terrain, towns, roads, meteorology, hydrology, geology, and resources through geographic information system technology (GIS), forming a unified information production management platform.

[0051] RT-DETR (Real-Time DEtection TRansformer) model: In 2023, Baidu's R&D team proposed the RT-DETR model in the paper "DETRs Beat YOLOs on Real-time Object Detection" published at a top international conference. As a real-time end-to-end detector based on the DETR architecture, this model has achieved SOTA (State-Of-The-Art) performance in speed and accuracy.

[0052] The architecture of the RT-DETR model includes ResNet or HGNetv2 as the backbone network, a hybrid encoder, and a transformer decoder with an auxiliary prediction head. The model processes multi-scale features through a hybrid encoder and optimizes the initial object query through IoU-aware query selection technology to improve model performance.

[0053] like Figure 1 As shown, the first embodiment of the present application provides a method for analyzing the spatial location of a power grid based on artificial intelligence technology, including:

[0054] Step S1: receiving an image of a power line to be inspected taken by a drone inspection, and a power line identifier associated with the image to be inspected;

[0055] It is understandable that the drone usually performs flight inspections along a planned route and hovers over a pre-planned line segment to be inspected to take photos. Therefore, each image to be inspected acquired by the drone is associated with a corresponding line segment identifier to be inspected.

[0056] Preferably, during the inspection process, the drone is positioned above the power grid line for aerial photography, and the tilt angle can be set within the range of 0-30°.

[0057] Step S2: Perform anomaly detection on the image to be detected through the power grid line anomaly detection model.

[0058] like Figure 3 As shown, step S2 includes:

[0059] Step S21: Acquire historical image sample data of power grid lines collected by drone inspection to construct a data set, and mark targets with abnormal lines contained in the image samples in the data set.

[0060] Among them, the power grid line historical image samples include power grid line images collected from different line sections during drone inspections.

[0061] The line abnormality targets contained in the image samples in the data set are annotated to generate an annotation file corresponding to the image samples. The line abnormality category can be set according to the common fault types of the power grid line. For example, the power grid line abnormality category includes line damage, line cracks, line ice, tree obstacles, etc.

[0062] The LabelImg annotation tool is used to annotate the line anomaly targets contained in the image samples in the data set to generate an annotation file corresponding to the image samples; the annotation file includes the line anomaly category label and the fault point boundary box coordinate information. Specifically, the annotation tool LabelImg is used to annotate the fault point instances for each image in the data set, accurately marking the locations of all fault point instances in each image, and generating the annotation information of the corresponding image in the form of a txt file, which includes the line anomaly category label and the fault point boundary box coordinates.

[0063] Further optionally, in order to improve the robustness of the model and prevent overfitting of the results, data enhancement technology can be used to process image samples to expand the data set. Data enhancement technology includes random cropping, random flipping, random size change and other methods.

[0064] Step S22: constructing a power grid line anomaly detection model based on the improved RT-DETR model.

[0065] As an optional implementation, a RT-DETR model fused with a shape enhancement module is used to construct a power line anomaly detection model. On the one hand, as an end-to-end target detection model, the RT-DETR model is superior to the existing target detection model in terms of calculation speed and detection accuracy. Therefore, this embodiment selects the RT-DETR model as the basic model. On the other hand, in the actual scenario of power line anomaly detection, considering the unique shape characteristics of the power line, in order to improve the accuracy and efficiency of target detection, the shape features of the power line detection image are extracted by the shape enhancement module, and the shape features are fused with the multi-scale features extracted by RT-DETR to enhance the shape information of the power line detection image, thereby enhancing the model's detection and recognition capabilities for power line anomalies. Therefore, this solution optimizes the RT-DETR model by introducing a shape enhancement module, and uses the RT-DETR model fused with a shape enhancement module to construct a power line anomaly detection model. Compared with the general RT-DETR model, this scheme has higher adaptability, robustness and accuracy for anomaly detection based on power line detection images.

[0066] Specifically, Figure 2 , 4 As shown, the step S22 includes:

[0067] Step S22.1: Use a backbone network to extract features of the input image and output three feature maps of different dimensions {S3, S4, S5} as input to the hybrid encoder.

[0068] The input image is an RGB feature map, and the backbone network may be, for example, a ResNet or HGNetv2 network.

[0069] The backbone network is used to receive input images and perform feature extraction to generate feature maps of different scales, from low dimension to high dimension, they are {S3, S4, S5}. The highest dimension feature map S5 contains the richest global semantic information and is suitable for large target detection, while the other dimension feature maps S3 and S4 contain detailed information and their high resolution characteristics make them suitable for small target detection.

[0070] Step S22.2: AIFI (internal scale feature interaction module based on attention mechanism) inside the hybrid encoder extracts the attention feature of S5 feature map to obtain the output F5 feature map, and performs feature fusion of different scales on {S3, S4, F5} based on CCFM (cross-scale feature fusion module of CNN) to output a multi-scale feature sequence;

[0071] Step S22.3: Construct a shape enhancement module, perform grayscale processing on the input image to obtain a grayscale image, input the grayscale image into the shape enhancement module to extract the shape features of the image to obtain a target shape feature sequence, and concat it with the multi-scale feature sequence output by CCFM (CNN's cross-scale feature fusion module) in the channel dimension to obtain a fused feature sequence, and use the fused feature sequence as the image feature sequence output by the encoder.

[0072] In some embodiments, the shape enhancement module includes: an edge feature extraction unit and a shape feature extraction unit, wherein the shape feature extraction unit includes a first convolution layer, a second hole convolution layer, and a third hole convolution layer in parallel; the edge feature extraction unit is used to extract the edge features of the grayscale image using a gradient transformation algorithm to obtain an edge feature image F e The shape feature extraction unit is used to extract the edge feature map F e Shape features are extracted through the parallel first convolution layer, the second atrous convolution layer and the third atrous convolution layer respectively to obtain the first shape feature map, the second shape feature map and the third shape feature map, which are flattened respectively and then concat-joined in the spatial dimension to obtain the target shape feature sequence.

[0073] First, when the edge feature extraction unit extracts the edge features of the grayscale image, a gradient transformation algorithm is used to obtain the initial edge feature matrix , where the gradient transformation algorithm is the Sobel operator, and the convolution kernel constructed by the Sobel operator is as follows:

[0074]

[0075] Among them, a is the convolution kernel for calculating G(x), and b is the convolution kernel for calculating G(y).

[0076] Initial edge feature matrix The gray value of each element in The calculation formula is:

[0077]

[0078] Among them, G(x) is the grayscale value of the grayscale image after gradient transformation in the x direction, that is, the result value of convolving the grayscale image with convolution kernel a, and G(y) is the grayscale value of the grayscale image after gradient transformation in the y direction, that is, the result value of convolving the grayscale image with convolution kernel b.

[0079] For the initial edge feature matrix Normalization and binarization are performed to obtain the target edge feature matrix G. It can be understood that the target edge feature matrix G is used to characterize the edge feature map F.e .

[0080] Secondly, in order to extract multi-scale shape feature information, the shape feature extraction unit is used to extract shape features from the edge feature map Fe through a first convolution layer, a second hole convolution layer and a third hole convolution layer in parallel;

[0081] In the first convolutional layer, Convolution kernel For the edge feature map F e Convolution is performed to obtain The first shape feature matrix, The first shape feature matrices are stacked to obtain the first shape feature map; where the convolution step length stride= ;

[0082] In the second atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain The second shape feature matrix, The second shape feature matrices are stacked to obtain a second shape feature map, wherein the expansion rate of the second hole convolution layer is ;

[0083] In the third atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain A third shape feature matrix, The third shape feature matrices are stacked to obtain a third shape feature map, wherein the expansion rate of the third hole convolution layer is , > ;

[0084] The first shape feature map, the second shape feature map and the third shape feature map are flattened respectively and then concat-joined in spatial dimension to obtain a target shape feature sequence.

[0085] In order to maintain the consistency of features of different scales and facilitate the subsequent channel dimension concat operation, the width and height dimensions of the first shape feature map, the second shape feature map, and the third shape feature map correspond to the sizes of the feature maps S3, S4, and F5, respectively.

[0086] Among them, the convolution kernel The calculation formula is:

[0087]

[0088]

[0089] Among them, 1< ≤ , is an integer, Indicates Convolution kernel Middle Line The elements of the column, middle The value range of , Represents the convolution kernel size.

[0090] Optionally, in the first convolution layer, the second atrous convolution layer or the third atrous convolution layer, in order to facilitate the subsequent concat splicing operation, the edge feature map may be edge-filled before the convolution. This edge filling usually uses zero-value filling, that is, adding a circle of zero-valued pixels around the boundary of the image.

[0091] Among them, the size of the convolution kernel and expansion rate , It can be adjusted according to different application scenarios. For example, the convolution kernel size Can be set to, for example, 3x3 or 8×8, the dilated convolution rate Less than , , It can take values ​​of 2, 3, or 6 to meet different image processing requirements.

[0092] Understandably, Included A straight line function is as follows:

[0093]

[0094] therefore, Essentially, it is to convert the linear function This parameter takes values ​​at equal intervals. Among them, The value range is , ≥16.

[0095] For the first convolutional layer, the first shape feature matrix is ​​calculated by convolution As shown below:

[0096]

[0097] in, Represents the first shape feature matrix Middle Line The elements of the column, Represents the edge feature map F e In the edge feature matrix G Line The elements of the column, is the convolution kernel size.

[0098] As an example, in step S22.1, the size H×W×C of the input image is 576×576×3. After the backbone network extracts the features of the input image, three feature maps S3, S4, and S5 of different dimensions are output. The feature map sizes H×W×C are 72×72×256, 36×36×256, and 18×18×256, respectively. In step S22.2, CCFM is used to perform feature fusion of different scales to output a multi-scale feature sequence with a size of 6804×256.

[0099] In step S22.3, the input image is gray-scaled and edge features are extracted in sequence, and the size of the edge feature map obtained is H×W×C, which is 576×576×1. The size is set to 8×8, Take 32. In the first convolutional layer, the convolution step size Stride = 8, then the size of the first feature map obtained is H×W×C is 72×72×32;

[0100] In the second atrous convolution layer, the dilation rate is 3 and the convolution step length is Stride=16. In order to make the size of the second feature map correspond to the width and height of the feature map S4, first, the edge feature map is padded with padding=3, that is, 3 circles of zero pixels are added around the boundary of the edge feature map. After the atrous convolution is performed on the edge feature map after the edge padding, the size of the second feature map is 36×36×32.

[0101] In the third atrous convolution layer, the dilation rate is 6 and the convolution step length is Stride=32. In order to make the size of the second feature map correspond to the width and height of the feature map S4, first, the edge feature map is edge-filled. 5 columns and 6 columns of zero pixels are added to the left and right boundaries of the edge feature map, and 5 rows and 6 rows of zero pixels are added to the left and right boundaries, respectively. After performing atrous convolution on the edge-filled edge feature map, the size of the second feature map is 18×18×32.

[0102] The first shape feature map, the second shape feature map and the third shape feature map are flattened respectively and concat-joined in the spatial dimension to obtain a target shape feature sequence with a size of 6804×32, and concat-joined with the multi-scale feature sequence output by CCFM in the channel dimension to obtain a fused feature sequence with a size of 6804×288.

[0103] It can be understood that the target shape feature sequence actually represents the shape features composed of different straight lines in the grayscale image. In this step, multiple convolution kernels are generated through straight line functions with different inclination angles. The shape features composed of different straight lines in the edge feature map are identified and extracted according to different convolution kernels. The feature information of the image at multiple scales is captured by adding a hole convolution layer, so that the model can handle objects of different sizes and broaden the receptive field of the model. Obviously, the number of convolution kernels in the shape feature extraction process is large. The larger the value, the richer the shape feature information captured, but the slower the training time.

[0104] Step S22.4: Using the IoU-aware query selection module, based on the image feature sequence output by the encoder, during model training, features with both high classification scores and high IoU scores are selected to initialize the object query of the decoder. The Transformer decoder structure is used to generate the final object query through iterative optimization based on the image feature sequence from the encoder and the initialized object query. The output of the decoder is sent to the prediction head, which includes a classification prediction head and a bounding box regression prediction head, which are used for target classification prediction and bounding box coordinate prediction, respectively.

[0105] Step S23: training the power grid line anomaly detection model based on the data set to obtain a trained power grid line anomaly detection model.

[0106] Adjust the input image to a uniform resolution of H×W×C to ensure the consistency of the model input. For example, the input image resolution is unified to 576×576×3, and the number of training epochs can be set to 200 during training, using the Adam optimizer, the learning rate is set to 0.001, and the batch size is 8.

[0107] Step S24: input the power line to-be-detected images taken by the drone inspection into the trained power line anomaly detection model to obtain the power line anomaly detection results.

[0108] The power grid line anomaly detection result includes a line anomaly category and a line anomaly location frame.

[0109] Step S25: If an abnormality in the power grid line is detected, the specific abnormal line segment is determined.

[0110] Specifically, when an abnormality in a power grid line is detected, the specific abnormal line segment is determined based on the association between the image of the power grid line to be detected taken by the drone inspection and the power grid line identifier.

[0111] In the embodiment of the present application, a power line anomaly detection model is constructed by adopting an RT-DETR model fused with a shape enhancement module. On the one hand, the RT-DETR model can capture multi-scale features from low-level to high-level while maintaining computational efficiency, thereby improving detection performance. On the other hand, in the actual scenario of power line anomaly detection, considering the unique shape features of power lines, in order to improve the accuracy and efficiency of target detection, the shape features of the power line detection image are extracted by the shape enhancement module, and the shape features are fused with the multi-scale features extracted by RT-DETR to strengthen the shape information of the power line detection image, thereby enhancing the model's ability to detect and identify power line anomalies. Therefore, this solution adopts an RT-DETR model fused with a shape enhancement module to construct a power line anomaly detection model. Compared with the general RT-DETR model, this solution has higher adaptability, robustness and accuracy for anomaly detection based on line images.

[0112] The second embodiment of the present application provides a method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology, such as Figure 5 As shown, in the second embodiment, based on the first embodiment, the present application further includes the following steps:

[0113] Step S3: Based on the abnormal line segment, the associated information of the abnormal line segment is obtained through the power grid GIS platform.

[0114] Among them, the associated information at least includes the spatial positioning information, ledger information and environmental information of the abnormal line segment.

[0115] Typically, the power grid GIS platform data includes inventory information of power equipment, poles and towers, and transmission and distribution networks, spatial positioning information, as well as environmental information such as mountains, terrain, towns, roads, and meteorology, hydrology, geology, and resources.

[0116] Therefore, when an abnormality in a power grid line is detected through drone inspection images, the associated information of the abnormal line segment can be obtained through the power grid GIS platform, such as the spatial positioning information of the abnormal line segment, nearby weather, trees, terrain and other environmental information, as well as line tower model, voltage level, historical maintenance records and other ledger information, providing more comprehensive information support for power grid line abnormality analysis and decision-making.

[0117] The third embodiment of the present application provides a power grid spatial position analysis system based on artificial intelligence technology, which is used to run the power grid spatial position analysis method based on artificial intelligence technology provided in the first embodiment of the present application, and the system includes: a data receiving module, an image detection module;

[0118] A data receiving module, used to receive the power line to be detected image taken by the drone inspection, and the power line identifier associated with the image to be detected;

[0119] An image detection module, used for performing anomaly detection on an image to be detected by using a power grid line anomaly detection model;

[0120] Further optionally, the system also includes a spatial position analysis module, which is used to obtain the associated information of the abnormal line segment through the power grid GIS platform based on the abnormal line segment.

[0121] The embodiment of the present application also provides an electronic device, which may include one or more processors of processing cores, one or more computer-readable storage media memories, communication components, etc. The processor, memory, and communication components are connected via a bus.

[0122] In a specific implementation process, at least one processor executes computer-executable instructions stored in a memory, so that at least one processor executes a prediction method as described above.

[0123] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0124] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0125] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0126] The embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When these computer program instructions are read and executed by a processor, the power grid spatial location analysis method provided by the embodiment of the present application is executed.

[0127] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0128] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not 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.

[0129] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0130] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology, characterized in that: The method comprises: Step S1: receiving an image of a power line to be inspected taken by a drone inspection, and a power line identifier associated with the image to be inspected; Step S2: performing anomaly detection on the image to be detected by using a power grid line anomaly detection model; The step S2 comprises: Step S21: Acquire historical image sample data of power grid lines collected by drone inspection to construct a data set, and mark targets with abnormal lines contained in the image samples in the data set; Step S22: constructing a power grid line anomaly detection model based on the improved RT-DETR model; Step S23: training the power grid line anomaly detection model based on the data set to obtain a trained power grid line anomaly detection model; Step S24: inputting the power line image to be detected taken by the drone inspection into the trained power line anomaly detection model to obtain a power line anomaly detection result; the power line anomaly detection result includes a line anomaly category and a line anomaly positioning frame; Step S25: If an abnormality is detected in the power grid line, the specific abnormal line segment is determined; Wherein, the step S22 comprises: Step S22.1: Use a backbone network to extract features of the input image and output three feature maps {S3, S4, S5} of different dimensions as input to the hybrid encoder; Step S22.2: The AIFI inside the hybrid encoder extracts the attention feature of the S5 feature map based on the internal scale feature interaction module of the attention mechanism to obtain the output F5 feature map, and performs feature fusion of different scales on {S3, S4, F5} based on the CCFM cross-scale feature fusion module to output a multi-scale feature sequence; Step S22.3: construct a shape enhancement module, perform grayscale processing on the input image to obtain a grayscale image, input the grayscale image into the shape enhancement module to extract the shape features of the image to obtain a target shape feature sequence, and perform concat splicing on the channel dimension with the multi-scale feature sequence output by CCFM to obtain a fused feature sequence, and use the fused feature sequence as the image feature sequence output by the hybrid encoder; Step S22.4: Using the IoU-aware query selection module, based on the image feature sequence output by the hybrid encoder, during model training, features with both high classification scores and high IoU scores are selected to initialize the object query of the decoder. The Transformer decoder structure is used to generate the final object query through iterative optimization based on the image feature sequence from the hybrid encoder and the initialized object query. The output of the decoder is sent to the prediction head, which includes a classification prediction head and a bounding box regression prediction head, which are used for target classification prediction and bounding box coordinate prediction, respectively.

2. A method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology according to claim 1, characterized in that: The shape enhancement module includes an edge feature extraction unit and a shape feature extraction unit, and the shape feature extraction unit includes a parallel first convolution layer, a second hole convolution layer and a third hole convolution layer; The edge feature extraction unit is used to extract the edge features of the grayscale image using a gradient transformation algorithm to obtain an edge feature image F e ; The shape feature extraction unit is used to extract the edge feature map F e Shape features are extracted through the parallel first convolution layer, the second atrous convolution layer and the third atrous convolution layer respectively to obtain the first shape feature map, the second shape feature map and the third shape feature map, which are flattened respectively and then concat-joined in the spatial dimension to obtain the target shape feature sequence.

3. The method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology according to claim 2, characterized in that: In the first convolutional layer, Convolution kernel For the edge feature map F e Convolution is performed to obtain The first shape feature matrix, The first shape feature matrices are stacked to obtain a first shape feature map; In the second atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain The second shape feature matrix, The second shape feature matrices are stacked to obtain a second shape feature map, wherein the expansion rate of the second hole convolution layer is ; In the third atrous convolutional layer, Convolution kernel For the edge feature map F e Perform dilated convolution to obtain A third shape feature matrix, The third shape feature matrices are stacked to obtain a third shape feature map, wherein the expansion rate of the third hole convolution layer is , > ; Flatten the first shape feature map, the second shape feature map, and the third shape feature map respectively, and then concat them in spatial dimension to obtain a target shape feature sequence; Among them, the convolution kernel The calculation formula is: in, 1< ≤ , is an integer, Indicates Convolution kernel Middle Line The elements of the column, middle The value range of , Represents the convolution kernel size.

4. The method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology according to claim 2, characterized in that: The edge feature extraction unit uses a gradient transformation algorithm to extract edge features of the grayscale image, and the gradient transformation algorithm uses a sobel algorithm.

5. The method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology according to claim 3 is characterized in that: In the first convolution layer, the second atrous convolution layer or the third atrous convolution layer, edge padding is performed on the edge feature map before convolution.

6. The method for analyzing the spatial location of a power grid by combining GIS services and artificial intelligence technology according to claim 1, characterized in that: The method further includes step S3: based on the abnormal line segment, obtaining associated information of the abnormal line segment through a power grid GIS platform, wherein the associated information at least includes spatial positioning information, ledger information and environmental information of the abnormal line segment.

7. A power grid spatial location analysis system combining GIS service and artificial intelligence technology, used to run the power grid spatial location analysis method combining GIS service and artificial intelligence technology as claimed in claim 1, characterized in that: include: Data receiving module, image detection module; A data receiving module, used to receive the power line to be detected image taken by the drone inspection, and the power line identifier associated with the image to be detected; The image detection module is used to perform anomaly detection on the image to be detected through the power grid line anomaly detection model.

8. The power grid spatial location analysis system combining GIS service and artificial intelligence technology according to claim 7 is characterized in that: Also includes: The spatial position analysis module is used to obtain the associated information of the abnormal line segment through the power grid GIS platform based on the abnormal line segment.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are read and executed by the processor, the method according to any one of claims 1 to 6 is executed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 6 is executed.