Power transmission line suspended foreign matter self-adaptive detection method, system, equipment and medium

By preprocessing image data of transmission lines and improving the foreign object detection model, combined with topological constraints and attention mechanisms, the problem of low accuracy in detecting foreign objects suspended on transmission lines was solved, achieving efficient and accurate foreign object identification and ensuring the safety of power facilities.

CN120997557APending Publication Date: 2025-11-21GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510912267.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing target detection technologies suffer from low detection accuracy and insufficient robustness in power transmission line scenarios, especially for detecting suspended foreign objects. This is mainly due to the neglect of the spatial relative position information between targets in power transmission lines and the influence of complex backgrounds.

Method used

By acquiring historical image data of the transmission line under test and preprocessing it, including target labeling and spatial topology information labeling, an improved foreign object detection model is established. Topological relationship constraints and loss function improvements are introduced. By combining dynamic receptive field, local sparse attention and bidirectional attention mechanisms, the model training process is optimized to improve detection accuracy and adaptability.

Benefits of technology

It significantly improves the accuracy and efficiency of suspended foreign object detection, enabling accurate identification of foreign objects on power transmission lines in complex backgrounds and ensuring the safe operation of power facilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997557A_ABST
    Figure CN120997557A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power transmission line detection, and discloses a power transmission line suspended foreign matter self-adaptive detection method, system and device and a medium, and the method comprises the steps: obtaining first historical image data of a to-be-detected power transmission line, and carrying out the preprocessing, so as to remarkably improve the quality and accuracy of the image data; and a solid foundation is laid for subsequent detection work. An improved foreign matter detection model is established, and topological relation constraint improvement and loss function improvement are introduced, so that the model can identify the foreign matter on the power transmission line more accurately, and the detection precision and efficiency are improved. In the model training stage, the preprocessed first historical image data is used for training, and the generalization ability and adaptability of the model can be further improved. In the real-time detection stage, the first real-time image data are combined to carry out adaptive detection on the suspended foreign matter of the to-be-detected power transmission line, so that rapid and accurate foreign matter detection can be realized, and a powerful guarantee is provided for safe operation of the power transmission line.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power transmission line detection, and in particular to a power transmission line hanging foreign object adaptive detection method, system, device and medium. BACKGROUND

[0002] In the operation and maintenance process of the power system, the rapid and accurate identification of power hazards is of great significance to ensure the safe operation of power facilities. With the continuous development of artificial intelligence technology, target detection methods based on deep learning, such as the YOLO (You Only Look Once) algorithm, have achieved remarkable application results in multiple fields, especially in general image recognition tasks. However, although the YOLO algorithm performs well in conventional image recognition tasks, its target detection accuracy is still low in the specific scenario of power transmission lines, which cannot meet the demand for accurate identification of hidden dangers in power inspection.

[0003] The existing technology mainly relies on deep learning algorithms such as YOLO for target identification. However, the existing technology usually ignores the experience mechanism and spatial relative position information in the field of power inspection. The position relationship between targets in the power transmission line, such as power equipment, hanging objects, and inspection personnel, has unique characteristics. For example, the distance between the power transmission line and the hanging object should be very close or extremely short, and the safety helmet of the inspection worker should be in close contact with the worker's head. The spatial relationship between these targets is not effectively modeled in the traditional YOLO algorithm. The spatial relative position information between targets can be used as important prior knowledge to further optimize the target detection results, thereby improving the detection accuracy and robustness.

[0004] In addition, the YOLO algorithm in the existing technology mainly relies on large-scale general data sets for training, and does not fully consider the special hidden danger types and target relationships in the power transmission line scenario. Although YOLO is very efficient in handling general image recognition tasks, its recognition effect may be limited in specific scenarios, such as the complex background of power transmission lines and the subtle spatial relationship between different targets.

[0005] Therefore, the existing target detection technology cannot fully solve the problem of hidden danger detection in the specific scenario of power transmission lines. Therefore, it is urgently needed to improve the accuracy and robustness of target detection by combining the experience mechanism in the field of power inspection, especially by fully utilizing the spatial relative position information between targets, based on the YOLO algorithm, to better meet the actual needs of power facility hidden danger identification. SUMMARY

[0006] In view of the above existing problems, the present application is proposed.

[0007] Therefore, the application provides a power transmission line suspension foreign object adaptive detection method, system, device and medium, which can solve the hidden danger detection problem in specific scenarios of the power transmission line, especially for the detection of suspension foreign objects.

[0008] To solve the above technical problems, the application provides the following technical solutions.

[0009] In a first aspect, the application provides a power transmission line suspension foreign object adaptive detection method, comprising:

[0010] Obtain first historical image data of a to-be-detected power transmission line, and pre-process the first historical image data;

[0011] The pre-processing includes target labeling and spatial topology information labeling of the first historical image data;

[0012] The target labeling is used to label target positions and categories, and the spatial topology information labeling is used to label spatial topology relationships between targets;

[0013] An improved foreign object detection model is established, and the improved foreign object detection model includes topology relationship constraint improvement and loss function improvement;

[0014] The improved foreign object detection model is trained according to the pre-processed first historical image data;

[0015] According to the trained improved foreign object detection model, first real-time image data are combined to perform adaptive detection of suspension foreign objects of the to-be-detected power transmission line.

[0016] As a preferred scheme of the power transmission line suspension foreign object adaptive detection method, the topology relationship constraint improvement includes:

[0017] An original topology relationship is obtained, and the original topology relationship is a topology relationship obtained through relative distances, relative positions and relative sizes between suspension foreign objects in the to-be-detected power transmission line;

[0018] A spatial constraint network is introduced into the original topology relationship, and the spatial constraint network calculates distances and size ratios between targets through a convolution layer;

[0019] Data calculated by the spatial constraint network are subjected to information encoding operation;

[0020] The topology relationship constraint improvement is completed according to the information encoding operation.

[0021] As a preferred scheme of the power transmission line suspension foreign object adaptive detection method, the loss function improvement includes:

[0022] An original loss function for the original topology relationship is obtained;

[0023] According to the improved result of the topological relationship constraint, a spatial topological constraint loss function is established;

[0024] The original loss function and the spatial topological constraint loss function are integrated to obtain an improved loss function.

[0025] The preferred scheme can more accurately reflect the actual spatial relationship of the suspended foreign matter in the to-be-detected power transmission line, and improve the accuracy and robustness of foreign matter detection. By integrating the original loss function and the spatial topological constraint loss function, the relative distance, position and size of foreign matters and other factors can be considered comprehensively, so as to realize adaptive detection of the suspended foreign matter of the power transmission line and improve the detection efficiency and accuracy.

[0026] As a preferred scheme of the adaptive detection method of the suspended foreign matter of the power transmission line, the preprocessing further comprises:

[0027] A target set is preset, and target labeling is performed on the first historical image data according to the target set;

[0028] According to the result of target labeling, spatial topological information labeling is performed, a rectangular frame is labeled for each target, the category of the target is recorded, and the relative position between the targets is labeled according to the actual structure of the power transmission line.

[0029] As a preferred scheme of the adaptive detection method of the suspended foreign matter of the power transmission line, the improved foreign matter detection model further comprises a dynamic receptive field mechanism, a local sparse attention mechanism and a bidirectional attention mechanism.

[0030] As a preferred scheme of the adaptive detection method of the suspended foreign matter of the power transmission line, the improved loss function comprises:

[0031] The spatial constraint between each predicted frame and the real labeled frame is calculated by penalty value calculation;

[0032] And the model is optimized according to the penalty value calculation result.

[0033] As a preferred scheme of the adaptive detection method of the suspended foreign matter of the power transmission line, the spatial topological constraint loss function further comprises a relative position loss function and a relative size loss function.

[0034] In a second aspect, the present application provides a power transmission line suspended foreign matter adaptive detection system, comprising:

[0035] A data acquisition and processing module is configured to acquire first historical image data of a to-be-detected power transmission line and preprocess the first historical image data;

[0036] The preprocessing comprises target labeling and spatial topology information labeling on the first historical image data;

[0037] The target labeling is used for labeling target positions and categories, and the spatial topology information labeling is used for labeling spatial topology relationships between targets;

[0038] A model establishing module is configured to establish an improved foreign matter detection model, wherein the improved foreign matter detection model comprises topology relationship constraint improvement and loss function improvement;

[0039] A model training module is configured to train the improved foreign matter detection model according to the preprocessed first historical image data;

[0040] A detection module is configured to perform adaptive detection on the foreign matter suspended on the to-be-detected power transmission line in combination with the first real-time image data according to the trained improved foreign matter detection model.

[0041] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when executing the computer program.

[0042] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method described above when executed by a processor.

[0043] Compared with the prior art, the present application has the following beneficial effects: the present application proposes a power transmission line suspended foreign matter adaptive detection method, first, by obtaining the first historical image data of the to-be-detected power transmission line and preprocessing, the quality and accuracy of the image data can be significantly improved, laying a solid foundation for subsequent detection work. Secondly, an improved foreign matter detection model is established, and topology relationship constraint improvement and loss function improvement are introduced, so that the model can more accurately identify the foreign matter on the power transmission line, and improve the detection precision and efficiency. In the model training stage, the preprocessed first historical image data is used for training, which can further improve the generalization ability and adaptability of the model. Finally, in the real-time detection stage, the first real-time image data is combined to perform adaptive detection on the foreign matter suspended on the to-be-detected power transmission line, which can realize fast and accurate foreign matter detection, and provide strong guarantee for the safe operation of the power transmission line. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0045] Figure 1 A method flow chart of a power transmission line suspension foreign object adaptive detection method is provided for an embodiment of the present application.

[0046] Figure 2 An internal structure diagram of an electronic device of a power transmission line suspension foreign object adaptive detection method is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0047] To make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.

[0048] Embodiment 1, with reference to Figure 1 For the first embodiment of the present application, the embodiment provides a power transmission line suspension foreign object adaptive detection method, comprising:

[0049] In the prior art, there are some problems, for example, the target detection accuracy is insufficient, especially in the complex background of the power transmission line scene. Traditional methods, such as YOLO algorithm, perform well in processing general image recognition tasks, but in this specific environment of power transmission line, its target detection effect is limited. This is mainly because the power transmission line scene has unique spatial relationship and target type, and the traditional algorithm fails to effectively model these characteristics. Especially in the spatial relative position information between targets, the traditional algorithm often ignores this important prior knowledge, resulting in insufficient detection accuracy and robustness.

[0050] The present application provides a method that can effectively solve the above-mentioned problems, and next will be combined with multiple embodiments to elaborate in detail how to realize the power transmission line suspension foreign object adaptive detection method;

[0051] Figure 1 A method flow chart of a power transmission line suspension foreign object adaptive detection method is shown, comprising:

[0052] S101, acquiring first historical image data of the power transmission line to be tested, and pre-processing the first historical image data;

[0053] It should be noted that current technologies for power transmission line inspection or anomaly detection often directly perform target detection on captured images, but this approach needs improvement in target detection accuracy. Existing technologies typically neglect empirical mechanisms and spatial relative position information in the power line inspection field. Targets within power transmission lines, such as electrical equipment, hanging objects, and inspection personnel, have unique spatial relationships. For example, the distance between the transmission line and hanging objects should be very close or extremely short, and the safety helmet of the inspection worker should maintain close contact with the worker's head. These spatial relationships between targets are not effectively modeled in traditional algorithms.

[0054] Therefore, a completely new method for detecting foreign objects suspended on power transmission lines is needed, preferably one that can be adaptively adjusted according to specific circumstances.

[0055] In this embodiment of the invention, subsequent foreign object detection operations on the transmission line are performed by acquiring first historical image data of the transmission line under test. The first historical image data can be acquired by using a high-resolution drone or high-definition camera to capture images of the transmission line. The drone should be equipped with devices that have long endurance, stable flight capabilities, and high-precision sensors. The selection of image acquisition equipment should take into account the usage requirements under different climate and weather conditions.

[0056] In some specific implementations, the first historical image data may include overall images of the transmission line, local detail images, and images from different time periods. Overall images are used to obtain global information about the transmission line, local detail images focus on key areas where foreign objects may be suspended, and images from different time periods help analyze how foreign objects change over time, thereby more accurately determining the presence or absence of foreign objects and their potential risks. This diverse image data provides a rich and comprehensive information foundation for subsequent suspended foreign object detection.

[0057] In this embodiment of the invention, preprocessing includes target annotation and spatial topology information annotation of the first historical image data;

[0058] In this embodiment of the invention, target annotation is used to annotate the target location and category, and spatial topology information annotation is used to annotate the spatial topology relationship between targets;

[0059] In this embodiment of the invention, preprocessing further includes using filters or denoising algorithms to remove noise from the image and improve image quality; expanding the training dataset through rotation, flipping, scaling, cropping, brightness adjustment, etc., to enable the model to generalize better. Standardization and normalization: Image pixels are normalized to adapt to the model's input requirements (usually floating values ​​between 0 and 1). This invention uses an improved YOLO model.

[0060] In this embodiment of the invention, the preprocessing further includes:

[0061] A target set is preset, and the first historical image data is labeled with targets based on the target set;

[0062] Spatial topology information is labeled based on the target labeling results. Each target is labeled with a rectangular box and the target category is recorded. The relative positions between targets are labeled according to the actual structure of the transmission line.

[0063] Specifically, for the preset target set, firstly, a target set is pre-defined based on the actual application scenario of the transmission line. This set includes all important objects or abnormal situations that may appear on the transmission line, such as electrical equipment, hanging objects (such as plastic bags, kites, etc.), and inspection personnel. Each object or abnormal situation has its specific characteristics and category.

[0064] For target annotation, based on the aforementioned preset target set, detailed target annotation is performed on the acquired first historical image data. This means that for each target in each image, its features must be matched with the definitions in the preset target set, and then it must be annotated. This step ensures that the model can identify and distinguish different targets.

[0065] For spatial topology annotation, after completing the target annotation, further annotation of spatial topology information is performed based on these annotation results. Specific operations include:

[0066] Each labeled target is assigned a bounding box to precisely locate its position in the image.

[0067] Recording the specific category information for each target is crucial for subsequent analysis.

[0068] Based on the actual structural characteristics of the transmission line, the relative positional relationships between different targets can be marked. For example, it can be used to mark whether the distance between a suspended foreign object and the transmission line is abnormally close, or to assess whether the relative layout of a certain piece of equipment and other components is reasonable.

[0069] For example, in the dataset annotation stage, in addition to the regular object detection annotations (such as the object's location and category), it is also necessary to manually annotate the spatial topological relationships between objects. This includes annotating the relative position of each object to other objects, whether objects are closely connected, and their size ratios. Each object (such as a bird's nest or a hanging object) is labeled with a bounding box, and its category is recorded. Based on the actual structure of the power transmission line, the relative positions between objects are also annotated; for example, a bird's nest must be closely connected to the transmission tower, and a hanging object must be in contact with the power transmission line.

[0070] It should be noted that acquiring the first historical image data of the transmission line under test and preprocessing this data can improve image quality, reduce noise interference, and enhance the features of the target object, making subsequent target detection, classification, and spatial topological relationship annotation more accurate and efficient. Preprocessing steps may include image enhancement, denoising, grayscale conversion, binarization, etc., aiming to optimize the image data and provide a clearer and more easily identifiable image foundation for subsequent processing. This is of great significance for improving the accuracy and stability of the entire detection method.

[0071] S102, Establish an improved foreign object detection model, which includes improvements to topological constraints and loss functions;

[0072] It should be noted that the foreign object detection model is designed to identify and locate suspended foreign objects on transmission lines. In the complex and ever-changing scenarios of transmission lines, traditional target detection methods often struggle to accurately capture the features of foreign objects, especially when the foreign object is similar to the background or is small in size. Therefore, this invention proposes an improved foreign object detection model, aiming to enhance the model's ability to detect suspended foreign objects by introducing topological constraints and improving the loss function.

[0073] In some specific implementations, foreign object detection models can be built using deep learning frameworks such as TensorFlow or PyTorch. These frameworks provide rich neural network layers, optimization algorithms, and data processing tools, which help to efficiently implement and improve the model.

[0074] In some specific implementations, foreign object detection models can also be combined with transfer learning techniques. This utilizes models pre-trained on similar scenarios or tasks as a starting point to accelerate the convergence speed of new models and improve their performance on specific power transmission line foreign object detection tasks. Transfer learning effectively leverages existing knowledge and reduces reliance on new data, a strategy particularly important when labeled data is scarce.

[0075] In some specific implementations, the foreign object detection model can use the YOLO algorithm, such as YOLOv5 or YOLOv7 (or higher). This invention selects an improved YOLO model based on the YOLO algorithm. Specific improvements include: adding a topological relationship constraint module to the YOLO model. This module processes spatial information between targets using a convolutional neural network, assisting the model in judging the relationships between targets and correcting the spatial constraints on the output target positions; designing a topological loss function: a new loss function is designed, adding a loss term for spatial topological relationships between targets to the original YOLO target position, category, and confidence losses. This loss function calculates a penalty for the spatial constraints between each predicted bounding box and the ground truth bounding box, optimizing model training; and introducing the dynamic receptive field and local sparse attention of the BiFormer module, achieving a better balance between computational efficiency and feature capture capability.

[0076] In this embodiment of the invention, the improvement of topological relationship constraints includes:

[0077] The original topology is obtained by measuring the relative distances, relative positions, and relative dimensions of foreign objects suspended in the transmission line under test.

[0078] A spatial constraint network is introduced into the original topological relationship. The spatial constraint network calculates the distance and size ratio between targets through convolutional layers.

[0079] The data obtained from spatial constraint network calculations are then encoded.

[0080] The topological relationship constraint improvement is completed based on the information encoding operation.

[0081] Specifically, firstly, obtaining the original topology requires acquiring information such as the relative distances, relative positions, and relative dimensions of suspended foreign objects in the transmission line under test, thereby constructing the original topology. This information can be obtained by analyzing foreign object annotations in historical image data, specifically including:

[0082] Relative distance: The distance between different suspended foreign objects.

[0083] Relative position: The position of each foreign object relative to other targets (such as power lines or towers).

[0084] Relative size: The size ratio between different foreign objects.

[0085] Secondly, a spatial constraint network is introduced to better capture and utilize these topological relationships, building upon the original topological relationships. This network primarily operates in the following ways:

[0086] The input image is used to extract features using convolutional layers in a convolutional neural network (CNN) and to calculate the distances and size ratios between objects. This step helps to accurately capture the spatial layout of foreign objects and their surrounding environment.

[0087] Based on the output of the convolutional layer, a spatial constraint model is further established, which can effectively express the relative distance and size ratio between targets.

[0088] Next, the information encoding operation involves encoding the data obtained from the spatial constraint network. This process typically includes the following steps:

[0089] The features extracted by the convolutional layers are mapped to a higher-level representation space to facilitate subsequent processing.

[0090] Design an encoder to transform spatial constraint information into a form that can be understood and learned by the model. The encoder can employ various architectures, such as fully connected layers, recurrent neural networks (RNNs), or transformers; choose the most suitable one based on the specific requirements.

[0091] Finally, topological constraint improvement was performed based on the results of the information encoding operation. The encoded spatial topological information was integrated into the original foreign object detection model, enabling the model not only to identify the presence and category of targets but also to understand the spatial relationships between them. This approach significantly improves the model's robustness and accuracy in complex environments, particularly effective when dealing with scenarios with unique spatial structures such as power transmission lines.

[0092] It's important to note that, specifically in the YOLO model, after multiple convolutional layers, the resulting feature maps are multi-scale. These feature maps contain the location, category information, and probabilities of each object in the input image. The input to the topological constraint module is the intermediate feature maps of the YOLO model. In object detection tasks, the topological information between objects refers to their relative spatial positions. For each pair of objects, the topological relationship can be obtained by calculating their relative distance, relative position, and relative size. A spatial constraint network is introduced, which uses convolutional layers to calculate and encode the distances, size ratios, and other relationships between objects.

[0093] In this embodiment of the invention, the loss function improvement includes:

[0094] Obtain the original loss function for the original topological relationships;

[0095] Establish a spatial topological constraint loss function based on the improvement results of topological relationship constraints;

[0096] The original loss function is integrated with the spatial topology constraint loss function to obtain the improved loss function.

[0097] In this embodiment of the invention, the improved loss function includes:

[0098] Calculate the penalty value for the spatial constraint between each predicted bounding box and the ground truth bounding box;

[0099] The model is then optimized based on the penalty calculation results.

[0100] In this embodiment of the invention, the spatial topology constraint loss function further includes a relative position loss function and a relative size loss function.

[0101] It should be noted that the original loss function includes, for example, location loss, classification loss, and confidence loss.

[0102] Specifically, the spatial topology constraint loss function includes:

[0103] The relative position loss function measures the relative positional error between targets, specifically the distance error between targets that should be adjacent in space. Assuming targets i and j are adjacent targets, we calculate the difference in their relative distances:

[0104]

[0105] Where P is the set of target pairs whose relative positions need to be considered. and These are the predicted center positions of targets i and j, respectively, p i and p j That is their actual location.

[0106] The relative size loss function is used to constrain the size ratio differences between targets, especially ensuring that the target sizes meet the requirements of the actual scenario. Calculate the size ratio error of targets i and j:

[0107]

[0108] Where S is the set of target pairs whose size relationships need to be considered. These are the width and height of the prediction box, w j and h j These are the width and height of the actual frame.

[0109] The final spatial topology constraint loss function obtained in this part is:

[0110]

[0111] Where λ1 and λ2 are weighting coefficients used to balance the influence between different loss terms.

[0112] Furthermore, the comprehensive loss function is a weighted sum of all loss terms, and its final form is as follows:

[0113]

[0114] This integrated loss function optimizes target detection and spatial topology by jointly optimizing the position error loss function, the category error loss function, and the topology error.

[0115] It is worth noting that improvements to topological constraints and the loss function significantly enhance the accuracy and robustness of object detection. In complex transmission line environments, the spatial relationships between foreign objects and transmission lines are often intricate, and traditional detection methods are prone to false positives or false negatives due to neglecting these topological relationships. By introducing topological constraints, the relative positional relationship between foreign objects and transmission lines can be described more accurately, thereby improving detection accuracy. Simultaneously, the improved loss function allows the model to focus more on learning topological relationships during training, further enhancing its robustness. This improvement is of great significance for enhancing the performance of adaptive detection methods for foreign objects suspended on transmission lines.

[0116] In this embodiment of the invention, the improved foreign object detection model also includes a dynamic receptive field mechanism, a local sparse attention mechanism, and a bidirectional attention mechanism.

[0117] In this embodiment of the invention, the final model attention improvement is achieved by introducing the BiFormer module into the improved foreign object detection model.

[0118] It's worth noting that BiFormer introduces a dynamic receptive field mechanism, enabling the model to adjust the receptive field size based on the input image content. This mechanism dynamically adapts to the scale and shape of different targets: for small targets, the model focuses on local regions to extract detailed features; for large targets, the model expands the receptive field to capture global information. The dynamic receptive field is implemented through a learnable parameterization method, allowing it to automatically adjust its size during training.

[0119] It's important to note that traditional self-attention mechanisms require computation at all pixel positions, resulting in a complexity of O(N²) (where N is the number of pixels). BiFormer, by introducing a local sparse attention mechanism, performs attention calculations only on adjacent regions or regions with high correlation, thereby reducing the computational complexity to O(N) or near-linear complexity. This mechanism utilizes: first, dividing the image into blocks, performing self-attention calculations only within local blocks, and then interacting with neighboring blocks through sparse connections to ensure effective capture of global information.

[0120] It's worth noting that BiFormer introduces a bidirectional interaction mechanism in its attention mechanism: Forward Attention, which extracts global features layer by layer from local to global; and Backward Attention, which refines features and enhances the ability to capture small targets from global to local. This bidirectional attention design allows the model to focus on both the overall structure and local details simultaneously, improving its adaptability in complex scenes.

[0121] Specifically, the BiFormer module is inserted into different layers of the backbone network of the improved foreign object detection model (which has undergone topological constraint and loss function improvements) to enhance the feature extraction capability of each layer. The specific insertion steps are as follows:

[0122] A. After standardization, scaling, and other operations, the image is fed into the backbone network for feature extraction.

[0123] B. Before entering the BiFormer module, the input feature map is divided into multiple local regions (patches), each containing pixels of a certain size (e.g., 7×7).

[0124] This block-based mechanism facilitates subsequent local sparse attention computation.

[0125] C. Perform local attention calculations within each local block;

[0126] Use sparse connection mechanism to exchange information with neighboring blocks;

[0127] A dynamic receptive field mechanism is introduced to automatically adjust the area of ​​focus based on the current block content;

[0128] By applying a bidirectional attention mechanism, we first perform forward propagation to obtain global information, and then refine local details through backward propagation.

[0129] D. The output of BiFormer is the feature map after attention weighting and receptive field adjustment;

[0130] These feature maps are then fed into a subsequent target detection head for classification and localization prediction.

[0131] E. The entire network is trained end-to-end, and the parameters in BiFormer (such as dynamic receptive field parameters and sparse connection weights) are continuously optimized during backpropagation.

[0132] It is worth noting that establishing an improved foreign object detection model can significantly improve the accuracy and efficiency of detecting suspended foreign objects on transmission lines. Traditional detection methods often rely on manual feature extraction and fixed algorithmic processes, making them difficult to adapt to complex and ever-changing real-world scenarios. However, by introducing deep learning frameworks, transfer learning techniques, or advanced neural network algorithms (such as the YOLO algorithm and its improved versions), the improved foreign object detection model can automatically learn deep features in images and effectively address various challenges, such as changes in lighting, occlusion, and diverse foreign object shapes. Furthermore, through improvements in topological constraints and optimization of the loss function, the model can more accurately understand the spatial relationships between targets, further enhancing the robustness and accuracy of detection. In practical applications, this improved detection method helps to promptly detect and handle suspended foreign objects on transmission lines, ensuring the safe and stable operation of the power grid.

[0133] S103, Train and improve the foreign object detection model based on the preprocessed first historical image data;

[0134] S104, Based on the trained improved foreign object detection model, adaptive detection of suspended foreign objects on the transmission line under test is performed in combination with the first real-time image data.

[0135] It should be noted that the process of adaptive detection of suspended foreign objects on the transmission line under test, based on the improved foreign object detection model after training and combined with the first real-time image data, can be explained in detail in the following steps:

[0136] Step 1: Real-time data acquisition. Use high-resolution drones or HD cameras to acquire images of the power transmission lines in real time. Ensure the equipment has long battery life, stable flight capabilities, and high-precision sensors to meet the needs of use under different climate and weather conditions.

[0137] The first real-time image data acquired in real time is preprocessed as necessary, such as denoising, grayscale conversion, and normalization, to provide a clear and easily identifiable image basis for subsequent detection.

[0138] Step Two: Real-time image analysis. Based on a pre-defined target set (e.g., power equipment, hanging objects, inspection personnel, etc.), the location and category of each target in the real-time image are labeled. This step can be completed automatically by a previously trained model. After completing the target labeling, the spatial topological relationships between targets are further labeled. For example, recording whether the distance between a hanging object and a power line is abnormally close, and evaluating whether the relative layout of a certain device and other components is reasonable, etc.

[0139] Step 3: Apply the improved foreign object detection model. Based on the real-time image content, utilize the dynamic receptive field mechanism in the BiFormer module to automatically adjust the model's receptive field range. For small targets, the model focuses on extracting detailed features in local regions; for large targets, it expands the receptive field to capture global information. Through a local sparse attention mechanism, attention calculations are performed only on adjacent regions or regions with high correlation, reducing computational complexity while ensuring efficient information capture. A bidirectional attention mechanism is applied, first acquiring global features from forward propagation, and then refining local details through backward propagation, thereby improving the model's adaptability in complex scenes.

[0140] Step 4: Perform detection and output results. Input the pre-processed and labeled real-time image into the trained improved foreign object detection model and perform forward propagation to obtain the prediction results. The model will output the location coordinates and classification labels of each type of target. The detection results are visualized on the user interface, allowing maintenance personnel to quickly understand the status of the transmission line. For example, all detected foreign objects can be marked in the image, and corresponding warning messages can be given.

[0141] When a potentially dangerous suspended foreign object is detected, the system should be able to automatically issue an alarm and generate a detailed detection report, including the specific location, type, size, and other relevant information of the foreign object, for reference in subsequent maintenance.

[0142] The above steps enable rapid and accurate detection of foreign objects suspended on power transmission lines, improving work efficiency and ensuring the safe operation of power facilities. This method fully leverages the advantages of modern deep learning technology and combines it with the characteristics of specific application scenarios to effectively solve specific problems.

[0143] In summary, this invention proposes an adaptive detection method for foreign objects suspended on transmission lines. First, by acquiring and preprocessing the first historical image data of the transmission line under test, the quality and accuracy of the image data can be significantly improved, laying a solid foundation for subsequent detection work. Second, an improved foreign object detection model is established, and improvements in topological constraints and loss functions are introduced, enabling the model to more accurately identify foreign objects on the transmission line, thus improving detection accuracy and efficiency. During the model training phase, training using the preprocessed first historical image data can further enhance the model's generalization ability and adaptability. Finally, in the real-time detection phase, adaptive detection of foreign objects suspended on the transmission line under test is performed using the first real-time image data, achieving fast and accurate foreign object detection and providing strong protection for the safe operation of transmission lines.

[0144] Example 2, in a preferred embodiment, the steps of training the improved foreign object detection model based on the preprocessed first historical image data can be as follows:

[0145] 1) Inspect the preprocessed first historical image data to ensure data quality. Expand the dataset by means of rotation, flipping, scaling, cropping, etc., so that the model can generalize better, and perform standardization and normalization operations on the image pixel values ​​to adjust them to a suitable range for the model input (usually floating-point numbers between 0 and 1).

[0146] 2) Select a YOLOv5 or YOLOv7 algorithm (or other applicable object detection framework) as the base model, and introduce improvement mechanisms on it, including but not limited to dynamic receptive field mechanism, local sparse attention mechanism and bidirectional attention mechanism, to improve the model's performance in specific scenarios.

[0147] 3) Divide the data into training, validation, and test sets, with common ratios being 7:2:1 or 8:1:1. Determine hyperparameters such as learning rate, batch size, and number of epochs, as the choice of these parameters will affect the model's convergence speed and final performance.

[0148] 4) Input the image into the model and perform forward propagation to obtain the prediction result. Use a predefined loss function (such as class error loss, location error loss, spatial topological constraint loss, etc.) to measure the difference between the prediction result and the true label. Based on the calculated loss, update the model weights using the backpropagation algorithm. This process is usually accomplished using gradient descent and its variants (such as Adam, SGD, etc.).

[0149] 5) At the end of each epoch, evaluate the model performance using the validation set, monitoring metrics such as precision, recall, and F1 score. If overfitting or underfitting is found, optimization can be achieved by adjusting the network structure, adding regularization terms, or changing the learning rate.

[0150] 6) Evaluate the overall performance of the model using independent test sets to ensure it performs well on unseen data. Once the model is fully validated and deemed reliable, it can be deployed in a real-world environment for real-time monitoring of suspended foreign objects in transmission lines. This step ensures the model's practical effectiveness and reliability.

[0151] It should be noted that training the improved foreign object detection model using preprocessed first historical image data allows for optimization tailored to the specific environment and scenarios of transmission lines, enhancing the accuracy and robustness of foreign object detection. Through training, the model learns information such as the shape, size, and location of various possible foreign objects in the transmission line, thus enabling more accurate identification of suspended foreign objects in practical applications. Furthermore, training with historical image data allows the model to adapt to different lighting conditions, weather conditions, and other factors, further improving its generalization ability. The application of this adaptive detection method helps reduce false alarms and false negatives, improving the safety and reliability of transmission lines.

[0152] Example 3, referring to Figure 2 This embodiment also provides an adaptive detection system for foreign objects suspended on transmission lines, including:

[0153] The data acquisition and processing module is used to acquire the first historical image data of the transmission line under test and to preprocess the first historical image data.

[0154] Preprocessing includes target annotation and spatial topology annotation of the first historical image data;

[0155] Target annotation is used to label the location and category of targets, while spatial topology information annotation is used to label the spatial topological relationships between targets;

[0156] The model building module is used to build an improved foreign object detection model, which includes improvements to topological constraints and loss functions.

[0157] The model training module is used to train and improve the foreign object detection model based on the preprocessed first historical image data.

[0158] The detection module is used to adaptively detect suspended foreign objects on the transmission line under test based on the trained improved foreign object detection model and the first real-time image data.

[0159] The above-mentioned unit modules can be embedded in the processor of the electronic device in hardware form or independent of it, or they can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of the above modules.

[0160] This embodiment also provides an electronic device, which can be a terminal, and its internal structure diagram can be as follows: Figure 2 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an adaptive detection method for foreign objects suspended on power transmission lines. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0161] This embodiment also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:

[0162] Acquire the first historical image data of the transmission line under test, and preprocess the first historical image data;

[0163] Preprocessing includes target annotation and spatial topology annotation of the first historical image data;

[0164] Target annotation is used to label the location and category of targets, while spatial topology information annotation is used to label the spatial topological relationships between targets;

[0165] An improved foreign object detection model is established, which includes improvements to topological constraints and loss functions.

[0166] The foreign object detection model was trained and improved based on the preprocessed first historical image data.

[0167] Based on the improved foreign object detection model after training, adaptive detection of suspended foreign objects on the transmission line under test is performed in combination with the first real-time image data.

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

[0169] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0170] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An adaptive detection method for foreign objects suspended on transmission lines, characterized in that, include: Acquire the first historical image data of the transmission line under test, and preprocess the first historical image data; The preprocessing includes target annotation and spatial topology information annotation of the first historical image data; The target annotation is used to annotate the target location and category, and the spatial topology information annotation is used to annotate the spatial topology relationship between targets; An improved foreign object detection model is established, which includes improvements to topological constraints and loss functions. The improved foreign object detection model is trained based on the preprocessed first historical image data; Based on the improved foreign object detection model after training, adaptive detection of suspended foreign objects on the transmission line under test is performed in combination with the first real-time image data.

2. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 1, characterized in that, The improvement of topological relation constraints includes: The original topology is obtained by measuring the relative distances, relative positions, and relative dimensions of foreign objects suspended in the transmission line under test. A spatial constraint network is introduced into the original topological relationship. The spatial constraint network calculates the distance and size ratio between targets through convolutional layers. The data obtained from spatial constraint network calculations are then encoded. The topological relationship constraint improvement is completed based on the information encoding operation.

3. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 2, characterized in that, The loss function improvement includes: Obtain the original loss function for the original topological relationships; A spatial topology constraint loss function is established based on the improved topology relationship constraint results. The original loss function is integrated with the spatial topology constraint loss function to obtain the improved loss function.

4. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 3, characterized in that, The preprocessing also includes: A preset target set is used to annotate the first historical image data according to the target set; Spatial topology information is labeled based on the target labeling results. Each target is labeled with a rectangular box and the target category is recorded. The relative positions between targets are labeled according to the actual structure of the transmission line.

5. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 4, characterized in that, The improved foreign object detection model also includes a dynamic receptive field mechanism, a local sparse attention mechanism, and a bidirectional attention mechanism.

6. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 5, characterized in that, The improved loss function includes: Calculate the penalty value for the spatial constraint between each predicted bounding box and the ground truth bounding box; The model is then optimized based on the penalty calculation results.

7. The adaptive detection method for foreign objects suspended on transmission lines as described in claim 6, characterized in that, The spatial topology constraint loss function also includes a relative position loss function and a relative size loss function.

8. An adaptive detection system for foreign objects suspended on transmission lines, using the method described in any one of claims 1 to 7, characterized in that, include: The data acquisition and processing module is used to acquire the first historical image data of the transmission line under test and to preprocess the first historical image data. The preprocessing includes target annotation and spatial topology information annotation of the first historical image data; The target annotation is used to annotate the target location and category, and the spatial topology information annotation is used to annotate the spatial topology relationship between targets; The model building module is used to build an improved foreign object detection model, which includes improvements to topological constraints and improvements to the loss function. The model training module is used to train the improved foreign object detection model based on the preprocessed first historical image data; The detection module is used to adaptively detect suspended foreign objects on the transmission line under test based on the trained improved foreign object detection model and the first real-time image data.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the adaptive detection method for foreign objects suspended on a transmission line according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the adaptive detection method for foreign objects suspended on a transmission line according to any one of claims 1 to 7.