External damage prevention methods, devices and systems for power transmission lines

By preprocessing and training models on images of external damage risks to transmission lines, a dataset is constructed and a detection model is developed. This solves the problems of accuracy and speed in identifying external damage risk sources in existing technologies, and achieves automated, fast and accurate risk identification.

CN115457530BActive Publication Date: 2026-05-26SHENHUA ZHUNGER ENERGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENHUA ZHUNGER ENERGY
Filing Date
2022-09-20
Publication Date
2026-05-26

Smart Images

  • Figure CN115457530B_ABST
    Figure CN115457530B_ABST
Patent Text Reader

Abstract

This application provides a method, device, and system for preventing external damage to transmission lines. The method includes: preprocessing multiple acquired external damage risk images to obtain multiple target risk images; constructing an external damage risk dataset based on the multiple target risk images and their corresponding label information; training a preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets preset conditions to obtain a target detection model, which is used to detect external damage risk sources in the target risk images; and using the target detection model to detect acquired real-time risk images to determine whether external damage risk sources exist in the real-time risk images, thereby solving the problem in the prior art of accurately and quickly identifying external damage risk sources of transmission lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power transmission lines, and more specifically, to a method, device, computer-readable storage medium, processor, and system for preventing external damage to power transmission lines. Background Technology

[0002] Overhead transmission lines are currently the most important and widely used method of power transmission, and their stable operation plays a decisive role in the power supply status for users. However, damage caused by external objects is the primary reason for transmission line damage; therefore, researching methods to prevent external damage to transmission lines is of great significance.

[0003] Currently, the main methods for dealing with external damage to overhead transmission lines include regular manual inspections and monitoring and alarm systems using sensors such as infrared sensors. Manual inspections require significant manpower and time, and various sensors are susceptible to interference from external factors, resulting in low accuracy. In addition to the above methods, video and image monitoring are increasingly being used to monitor potential external damage to transmission lines, but these methods still rely on manual identification and perform poorly in complex scenarios.

[0004] Therefore, there is an urgent need for a more accurate and rapid method to identify external damage risk sources of transmission lines.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background art of the art described herein. Therefore, the background art may contain information that does not constitute prior art known to those skilled in the art in this country. Summary of the Invention

[0006] The main objective of this application is to provide a method, device, computer-readable storage medium, processor, and system for preventing external damage to transmission lines, in order to solve the problem in the prior art that it is difficult to accurately and quickly identify the sources of external damage to transmission lines.

[0007] According to one aspect of the present invention, a method for preventing external damage to transmission lines is provided, comprising: preprocessing multiple acquired external damage risk images to obtain multiple target risk images, and constructing an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image; training a preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets a preset condition to obtain a target detection model, wherein the preset detection model is used to detect external damage risk sources in the target risk images; and using the target detection model to detect acquired real-time risk images to determine whether the external damage risk source exists in the real-time risk images.

[0008] Optionally, when the real-time risk image is a risk image of the target warning area, and the target detection model is used to detect the acquired real-time risk image to determine whether the external damage risk source exists in the real-time risk image, the external damage prevention method includes: if the external damage risk source exists in the real-time risk image, calculating the target distance between the external damage risk source and the target warning area; if the target distance is less than or equal to a preset threshold, issuing a level one warning message; if the target distance is greater than the preset threshold, continuing to calculate the target distance between the external damage risk source and the target warning area.

[0009] Optionally, image preprocessing is performed on the acquired multiple external damage risk images to obtain multiple target risk images, including: using a Gaussian filtering method to filter each of the external damage risk images to obtain multiple filtered risk images; using a histogram equalization method to perform contrast processing on each of the filtered risk images to obtain multiple preset risk images; and performing image enhancement processing on each of the preset risk images to obtain multiple target risk images.

[0010] Optionally, the real-time risk image is acquired by an image acquisition device. When the external damage risk source exists in the real-time risk image, calculating the target distance between the external damage risk source and the target warning area includes: calculating a first slope of a first straight line, where the first straight line is a straight line between the target perpendicular and the center point of the target anchor frame, the target perpendicular is the perpendicular of the image acquisition device in the world coordinate system, and the target anchor frame is the smallest graphic frame in the real-time risk image that surrounds the external damage risk source; calculating a second slope of a second straight line, where the second straight line is a straight line between the target perpendicular and the center point of the target warning area; and calculating the target distance between the external damage risk source and the target warning area based at least on the first slope and the second slope.

[0011] Optionally, calculating the target distance between the external damage risk source and the target warning area based at least on the first slope and the second slope includes: calculating a first included angle based on the first slope and calculating a second included angle based on the second slope, wherein the first included angle is the angle between a first straight line and a third straight line, the third straight line is a straight line in the horizontal direction where the perpendicular foot of the target is located, and the second included angle is the angle between the third straight line and the second straight line; calculating the sum of the angle corresponding to the first included angle and the angle corresponding to the second included angle to obtain the target angle; and calculating the target distance between the external damage risk source and the target warning area based on the length of the first straight line, the length of the second straight line, and the target angle.

[0012] Optionally, the process of calculating the length of the first straight line or the length of the second straight line includes: calculating a first length between the target perpendicular and a first target point, and calculating a second length between the target perpendicular and a second target point, wherein the first target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the horizontal direction, or the first target point is the projection point of the center point of the target warning area in the world coordinate system and in the horizontal direction, and the second target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the vertical direction, or the second target point is the projection point of the center point of the target warning area in the world coordinate system and in the vertical direction; calculating the length of the first straight line based on the first length and the second length, or calculating the length of the second straight line based on the first length and the second length.

[0013] Optionally, if the target distance is greater than the preset threshold, after continuing to calculate the target distance between the external damage risk source and the target warning area, the external damage prevention method further includes: issuing a secondary warning message if the target distance calculated in the later calculation is less than the target distance calculated in the previous calculation.

[0014] Optionally, the preset detection model is built based on YOLOv5.

[0015] Optionally, the external damage risk sources include at least one of the following: damage from heavy machinery, damage from foreign objects causing short circuits, damage from human activities, and damage from illegal soil dumping.

[0016] According to another aspect of the present invention, a device for preventing external damage to transmission lines is also provided, comprising: a construction unit, configured to perform image preprocessing on multiple acquired external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image; a training unit, configured to train a preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets a preset condition to obtain a target detection model, wherein the preset detection model is used to detect external damage risk sources in the target risk images; and a detection unit, configured to use the target detection model to detect acquired real-time risk images to determine whether the external damage risk source exists in the real-time risk images.

[0017] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes any of the described anti-tampering methods.

[0018] According to another aspect of the present invention, a processor is also provided, the processor being configured to run a program, wherein the program, when running, executes any of the described anti-external damage methods.

[0019] According to one aspect of the present invention, an external damage prevention system is also provided, comprising: an external damage prevention device for transmission lines, the external damage prevention device being used to perform any of the external damage prevention methods described above; and an image acquisition device for acquiring real-time risk images of the target warning area.

[0020] In this embodiment of the invention, the method for preventing external damage firstly involves preprocessing multiple acquired images of external damage risks to obtain multiple target risk images. These target risk images, along with their corresponding label information, constitute an external damage risk dataset. Then, the external damage risk dataset is used to train a preset detection model until the mAP parameter value of the preset detection model meets preset conditions, thus obtaining a target detection model. Finally, real-time risk images are input into the target detection model to detect whether external damage risk sources exist in the real-time risk images. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model, and then the trained target detection model is used to detect whether external damage risk sources exist in the real-time risk images. This scheme achieves automatic identification of external damage risk sources for transmission lines. It eliminates the need for manual inspections to identify external damage risk sources for transmission lines, saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies. Attached Figure Description

[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 A flowchart of a method for preventing external damage to a transmission line according to an embodiment of this application is shown;

[0023] Figures 2(a), 2(b), and 2(c) illustrate schematic diagrams of mosaic data enhancement according to one embodiment of this application;

[0024] Figure 3 A schematic diagram illustrating the calculation of target distance according to an embodiment of this application is shown;

[0025] Figure 4 A schematic diagram illustrating the calculation of the length of a first straight line according to an embodiment of this application is shown;

[0026] Figure 5 A schematic diagram of the network structure of a preset detection model according to an embodiment of this application is shown;

[0027] Figure 6 A schematic diagram of the structure of an anti-external damage device for a transmission line according to an embodiment of this application is shown;

[0028] Figure 7 A flowchart of a method for preventing external damage to a transmission line according to another embodiment of this application is shown. Detailed Implementation

[0029] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] As mentioned in the background section, the existing technology has the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines. In order to solve the above problem, in a typical embodiment of this application, a method, device, computer-readable storage medium, processor and system for preventing external damage to transmission lines are provided.

[0033] According to an embodiment of this application, a method for preventing external damage to power transmission lines is provided.

[0034] Figure 1 This is a flowchart of a method for preventing external damage to transmission lines according to an embodiment of this application. Figure 1 As shown, this method for preventing external damage includes the following steps:

[0035] Step S101: Perform image preprocessing on the collected multiple external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image.

[0036] Step S102: Using the aforementioned external damage risk dataset, train the preset detection model until the mAP (Mean Average Precision, abbreviated as mAP) parameter value of the preset detection model meets the preset conditions to obtain the target detection model. The preset detection model is used to detect external damage risk sources in the aforementioned target risk image.

[0037] Step S103: Using the above-mentioned target detection model, the acquired real-time risk image is detected to determine whether the above-mentioned external damage risk source exists in the real-time risk image.

[0038] In the aforementioned method for preventing external damage, firstly, multiple acquired images of external damage risks are preprocessed to obtain multiple target risk images. These target risk images, along with their corresponding label information, constitute an external damage risk dataset. Then, a pre-defined detection model is trained using this dataset until its mAP parameter value meets a pre-defined condition, resulting in a target detection model. Finally, real-time risk images are input into the target detection model to detect the presence of external damage risk sources in the real-time risk images. In this scheme, the external damage risk dataset is first used to train the pre-defined detection model to obtain the target detection model. Then, the trained target detection model is used to detect the presence of external damage risk sources in the real-time risk images. This scheme achieves automatic identification of external damage risk sources for transmission lines. It eliminates the need for manual inspections to identify external damage risk sources, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0039] In one specific embodiment of this application, the aforementioned external damage risk images can be acquired by image acquisition devices installed in areas with high incidence of potential hazards. Of course, in practical applications, to enrich the external damage risk dataset, in addition to acquiring images of naturally occurring external damage risks under real-world conditions, some external damage risk sources can be artificially introduced, provided safety is ensured. For example, different types of heavy vehicles can be driven near the railway line to acquire images.

[0040] Specifically, the aforementioned image acquisition device can be a camera, and the installation of the camera should meet the following requirements: the camera should be installed in a relatively fixed position relative to the power transmission line, and the camera's viewing angle should also remain fixed.

[0041] In another specific embodiment of this application, the tag information corresponding to the multiple external damage risk images can be automatically extracted using a pre-designed algorithm. Alternatively, the tag information corresponding to the multiple external damage risk images can be manually labeled.

[0042] In another specific embodiment of this application, the above-mentioned target detection model is used to detect the acquired real-time risk image. Before determining whether the real-time risk image contains the aforementioned external risk source, image enhancement processing can also be performed on the acquired real-time risk image to further ensure that the detection result is more accurate.

[0043] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0044] In one embodiment of this application, when the real-time risk image is a risk image of a target warning area, the target detection model is used to detect the acquired real-time risk image to determine whether the external damage risk source exists in the real-time risk image. The external damage prevention method includes: if the external damage risk source exists in the real-time risk image, calculating the target distance between the external damage risk source and the target warning area; if the target distance is less than or equal to a preset threshold, issuing a Level 1 warning message; if the target distance is greater than the preset threshold, continuing to calculate the target distance between the external damage risk source and the target warning area. In this embodiment, if the target distance is less than or equal to the preset threshold, it can be considered that the external damage risk source has entered the target warning area. At this time, issuing a Level 1 warning message can increase the attention of relevant personnel, prompting timely implementation of corresponding solutions and further preventing significant danger to the transmission line; if the target distance is greater than the preset threshold, continuing to calculate the target distance between the external damage risk source and the target warning area allows for further monitoring, further ensuring the safety of the transmission line.

[0045] Specifically, the aforementioned preset threshold can be flexibly adjusted according to the actual situation, and this application does not limit the size of the aforementioned preset threshold.

[0046] Specifically, the aforementioned target warning areas can be divided according to the "Regulations on the Protection of Power Facilities" and the voltage level of the transmission lines to be monitored, or they can be divided based on actual needs. After the warning areas for the transmission lines are delineated and the target warning areas are obtained, cameras can be installed in the target warning areas to capture images and record the pixel coordinates of the target warning areas in the real-time risk image. Subsequently, the real-time risk images captured by the cameras in the target warning areas are sent back to the target detection model to determine whether there are external damage risk sources in the real-time risk image.

[0047] To further ensure the high accuracy of the subsequent target detection model, in another embodiment of this application, image preprocessing is performed on the acquired multiple external damage risk images to obtain multiple target risk images, including: using a Gaussian filtering method to filter each of the aforementioned external damage risk images to obtain multiple filtered risk images; using a histogram equalization method to perform contrast processing on each of the aforementioned filtered risk images to obtain multiple preset risk images; and performing image enhancement processing on each of the aforementioned preset risk images to obtain multiple target risk images.

[0048] In one specific embodiment of this application, a Gaussian filtering method is used to filter each of the aforementioned external damage risk images, resulting in multiple filtered risk images. This removes noise from each external damage risk image, further improving the accuracy of the target detection model. The specific process is as follows: Assuming the external damage risk image can be represented as a two-dimensional image f(u,v), the filtered risk image obtained after filtering can be represented as g(u,v). A Gaussian kernel matrix H(u,v) with dimensions (2k+1)×(2k+1) is used, which is...

[0049]

[0050] Then there is

[0051]

[0052] Where σ is the variance of the external failure risk image; A Gaussian kernel matrix is ​​convolved with the external damage risk image to achieve filtering of the external damage risk image.

[0053] In another specific embodiment of this application, a histogram equalization method is used to perform contrast processing on each of the above-mentioned filtered risk images to obtain multiple preset risk images. This can enhance the contrast of each of the obtained filtered risk images and strengthen the characteristics of external damage risk sources in the filtered risk images. The specific process is as follows:

[0054] Assume the gray level range of the filtered risk image is [0, L-1], and the probability of the f-th gray level appearing is p(f), n f Let f represent the number of pixels occupied by the f-th gray level, and n represent the total number of pixels in all filtered risk images. If the preset risk image obtained after contrast processing is g, then:

[0055]

[0056]

[0057] In another specific embodiment of this application, the image enhancement processing method described above can be geometric rotation, scaling, mosaic data augmentation, etc. However, it is not limited to the image enhancement processing methods listed above, and can also be any feasible image enhancement processing method in the prior art.

[0058] Specifically, the image enhancement processing method described above can be used to process images with external damage risk sources. This can expand the number of defect samples, thereby increasing the amount of data in the external damage risk dataset and preventing the preset detection model from overfitting due to insufficient data.

[0059] In another specific embodiment of this application, as shown in Figures 2(a), 2(b), and 2(c), the specific processing procedure for mosaic data augmentation is as follows:

[0060] Step 1: Assuming the size of the input preset risk image is s×s, generate a rectangular box with a size of 2s×2s as shown in Figure 2(a);

[0061] Step 2: Within the 2s×2s rectangle, randomly select a point within the s×s rectangle at its center as the splicing point M;

[0062] Step 3: Randomly select four images from the sample set and stitch them together in a 2×2 pattern to obtain a large image as shown in Figure (b);

[0063] Step 4: Place the center of the large image shown in Figure (b) coinciding with point M, and select the overlapping area C of the large image shown in Figure (b) and the rectangle A shown in Figure 2 (a) (as shown in Figure 2 (c)). This is the target risk image after mosaic data augmentation.

[0064] To simplify the calculation of the target distance between the external damage risk source and the target warning area, and to further ensure a low computational load for the target detection model, in another embodiment of this application, such as... Figure 3 As shown, the aforementioned real-time risk image is acquired by an image acquisition device. When the aforementioned external damage risk source exists in the aforementioned real-time risk image, the target distance between the external damage risk source and the aforementioned target warning area is calculated, including: calculating the first slope of a first straight line HB, wherein the first straight line HB is a straight line between the target perpendicular H and the center point B of the target anchor frame, the target perpendicular H is the perpendicular of the image acquisition device in the world coordinate system, and the target anchor frame is the smallest graphic frame in the aforementioned real-time risk image that encloses the aforementioned external damage risk source; calculating the second slope of a second straight line, wherein the second straight line is a straight line between the target perpendicular and the center point of the aforementioned target warning area; and calculating the target distance between the aforementioned external damage risk source and the aforementioned target warning area based at least on the aforementioned first slope and the aforementioned second slope.

[0065] In another embodiment of this application, such as Figure 3As shown, the target distance between the external damage risk source and the target warning area is calculated based on at least the first slope and the second slope, including: calculating a first included angle θ1 based on the first slope k1, and calculating a second included angle θ2 based on the second slope k2, wherein the first included angle θ1 is the angle between the first straight line HB and the third straight line HC, the third straight line HC is a straight line in the horizontal direction where the vertical foot of the target is located, and the second included angle θ2 is the angle between the third straight line HC and the second straight line HA; calculating the sum of the angles corresponding to the first included angle θ1 and the second included angle θ2 to obtain the target angle AHB; and calculating the target distance between the external damage risk source and the target warning area based on the length of the first straight line HB, the length of the second straight line HA, and the target angle AHB, thus further simplifying the calculation of the target distance between the external damage risk source and the target warning area.

[0066] In one specific embodiment of this application, such as Figure 3 As shown, the center point of the smallest bounding box surrounding the external risk source in the real-time risk image is B, which is also the center point of the target anchor frame; the perpendicular foot of the image acquisition device in the world coordinate system is H; and the center point of the target warning area is A. Since the coordinates of points A, B, and H in the image coordinate system are known, the slopes of the lines containing HB and HA can be derived as k1 and k2, respectively. Therefore, we can obtain:

[0067] θ1=arctank1,θ2=arctank2,

[0068] The target angle AHB is θ.

[0069] θ = |θ1| + |θ2|.

[0070] Based on geometric relationships, the distance AB between the center point of the target warning area and the center point of the target anchor frame is:

[0071]

[0072] In one embodiment of this application, the process of calculating the length of the first straight line or the length of the second straight line includes: calculating a first length between the target perpendicular foot and the first target point, and calculating a second length between the target perpendicular foot and the second target point, wherein the first target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the horizontal direction, or the first target point is the projection point of the center point of the target warning area in the world coordinate system and in the horizontal direction, and the second target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the vertical direction, or the second target point is the projection point of the center point of the target warning area in the world coordinate system and in the vertical direction; and calculating the length of the first straight line based on the first length and the second length, or calculating the length of the second straight line based on the first length and the second length.

[0073] In one specific embodiment of this application, such as Figure 4 As shown, calculate the length of the first straight line, which is the distance between the target's perpendicular H and the center point B of the target anchor frame (i.e., Figure 4 The process of the straight line between p) shown is as follows: the world coordinate system is O w (X w ,Y w The camera coordinate system is O. c (X c ,Y c The image coordinate system is O1(x,y). Assume the installation height of the image acquisition device is h, and its projection in the world coordinate system is point H (i.e., the perpendicular point of the image acquisition device in the world coordinate system); the projection point of the target anchor frame in the world coordinate system is P, and its projection in the world coordinate system X... w and Y w The projections on the axes are respectively P x and P y ; and the projected coordinates of the center point p of the target anchor frame in the image coordinate system are (p x ,p y The camera's pitch angle is α, its focal length is f, and P... y p y With O1O w The included angle is β, P x p x With O1O w The included angle is γ. Based on geometric relationships, the horizontal distance HP between point P and the projection point H of the image acquisition device along the y-axis is... y HP y = h×tan(α+β), where, thereby Similarly, the horizontal distance HP between point P and the projection point of the image acquisition device in the x-axis direction is... x for: in, thereby Therefore, the distance from the center P of the target anchor frame where any external failure risk source is located to the perpendicular foot H of the camera is: In the above formula, the camera's installation height h and pitch angle α can be obtained from actual measurements, and the camera's focal length f can be obtained by consulting the lens parameters; the coordinates of the center point p of the target anchor frame on the image coordinate system (p x ,p y It can be obtained through the following methods:

[0074]

[0075] Where (u0,v0) are the coordinates of the origin O1 of the imaging plane coordinate system in the pixel coordinate system, (u,v) are the pixel coordinates of the center point of the target anchor box after distortion correction, and d x and d y The physical dimensions of each pixel in the x and y directions of the image coordinate system. Distortion parameters, d x and d y All of these can be obtained by calibrating the parameters of the image acquisition device.

[0076] Specifically, the length of the second straight line, that is, the length of the straight line between the target's vertical foot and the center point of the target's warning area, is calculated in the same way as the length of the first straight line, and will not be repeated here.

[0077] Specifically, the method for calibrating the parameters of an image acquisition device can be the Zhang Zhengyou planar calibration method. Specifically, this involves making an image acquisition device calibration board, acquiring images to be calibrated from different angles, and obtaining the intrinsic parameter matrix, extrinsic parameter matrix, and distortion correction parameters of the image acquisition device based on the calibration.

[0078] In another embodiment of this application, if the target distance is greater than the preset threshold, after continuing to calculate the target distance between the external damage risk source and the target warning area, the external damage prevention method further includes: issuing a secondary warning message if the target distance calculated in a later calculation is less than the target distance calculated in a previous calculation. In this embodiment, if the target distance calculated in a later calculation is less than the target distance calculated in a previous calculation, it indicates that the external damage risk source is gradually approaching the target warning area. Issuing a secondary warning message at this time can prompt relevant personnel to check in a timely manner, further preventing damage to the transmission line and further ensuring the safety of the transmission line.

[0079] In one specific embodiment of this application, if the target distance calculated in the later calculation is the same as the target distance calculated in the previous calculation or the difference between the two is small, post-processing can be omitted and observation can continue.

[0080] In another embodiment of this application, the aforementioned preset detection model is built based on YOLOv5.

[0081] Specifically, the specific network structure of the aforementioned preset detection model is as follows: Figure 5 As shown, the entire detection model can be divided into two parts: the backbone, consisting of layers 0-9, and the head, consisting of layers 10-23. Both the backbone and head have six modules: Focus, Conv, C3, SPP, Concat, and Upsample. Figure 5 As shown, the parentheses after each module indicate the parameters used by that module, with the following specific meanings: Focus and Conv modules: (C_in, C_out, kernel_size, stride); C3 module: (C_in, C_out) × the number of times the module is stacked; SPP module: (C_in, C_out, [kernal_size1, kernel_size2, kernel_size3]); Concat module: axis = 1, which concatenates the input matrix along the channels; Upsample module: scale_fator = 2, which means the output is twice the input, using the nearest upsampling algorithm; where c_in represents the number of input channels, c_out represents the number of output channels, kernel_size represents the size of the convolution kernel, and stride represents the stride of the convolution.

[0082] In one specific embodiment of this application, the aforementioned external damage risk sources include at least one of the following: damage from heavy machinery, damage from foreign objects causing short circuits, damage from human activities, and damage from illegal soil dumping.

[0083] Specifically, the external damage risk sources mentioned above are not limited to those listed above, and can be expanded according to the actual situation.

[0084] This application also provides a device for preventing external damage to transmission lines. It should be noted that this device can be used to execute the method for preventing external damage to transmission lines provided in this application. The following describes the device for preventing external damage to transmission lines provided in this application.

[0085] Figure 6 This is a structural schematic diagram of an anti-external damage device for transmission lines according to an embodiment of this application. Figure 6As shown, the device for preventing external damage includes:

[0086] The construction unit 10 is used to perform image preprocessing on multiple acquired external damage risk images to obtain multiple target risk images, and to construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image.

[0087] Training unit 20 is used to train the preset detection model using the aforementioned external damage risk dataset until the mAP parameter value of the preset detection model meets the preset conditions, thereby obtaining the target detection model. The preset detection model is used to detect external damage risk sources in the aforementioned target risk image.

[0088] The detection unit 30 is used to detect the acquired real-time risk image using the above-mentioned target detection model in order to determine whether the above-mentioned real-time risk image contains the above-mentioned external damage risk source.

[0089] In the aforementioned external damage prevention device, the construction unit is used to preprocess multiple acquired external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and their corresponding label information. The training unit is used to train a preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets preset conditions, thus obtaining a target detection model. The preset detection model is used to detect external damage risk sources in the target risk images. The detection unit is used to use the target detection model to detect the acquired real-time risk images to determine whether the real-time risk images contain the external damage risk sources. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model, and then the trained target detection model is used to detect whether there are external damage risk sources in the real-time risk images. That is, this scheme realizes automatic identification of external damage risk sources of transmission lines. It eliminates the need for manual inspections to identify external damage risk sources of transmission lines, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0090] In one specific embodiment of this application, the aforementioned external damage risk images can be acquired by image acquisition devices installed in areas with high incidence of potential hazards. Of course, in practical applications, to enrich the external damage risk dataset, in addition to acquiring images of naturally occurring external damage risks under real-world conditions, some external damage risk sources can be artificially introduced, provided safety is ensured. For example, different types of heavy vehicles can be driven near the railway line to acquire images.

[0091] Specifically, the aforementioned image acquisition device can be a camera, and the installation of the camera should meet the following requirements: the camera should be installed in a relatively fixed position relative to the power transmission line, and the camera's viewing angle should also remain fixed.

[0092] In another specific embodiment of this application, the tag information corresponding to the multiple external damage risk images can be automatically extracted using a pre-designed algorithm. Alternatively, the tag information corresponding to the multiple external damage risk images can be manually labeled.

[0093] In another specific embodiment of this application, the above-mentioned target detection model is used to detect the acquired real-time risk image. Before determining whether the real-time risk image contains the aforementioned external risk source, image enhancement processing can also be performed on the acquired real-time risk image to further ensure that the detection result is more accurate.

[0094] In one embodiment of this application, the aforementioned external damage prevention device includes a first calculation unit, a first early warning unit, and a second calculation unit. The first calculation unit, when the real-time risk image is a risk image representing a target early warning area, uses the aforementioned target detection model to detect the acquired real-time risk image to determine whether the external damage risk source exists in the real-time risk image. If the external damage risk source exists in the real-time risk image, the first early warning unit calculates the target distance between the external damage risk source and the target early warning area. The first early warning unit issues a level one early warning message when the target distance is less than or equal to a preset threshold. The second calculation unit continues to calculate the target distance between the external damage risk source and the target early warning area when the target distance is greater than the preset threshold. In this embodiment, if the target distance is less than or equal to a preset threshold, it can be considered that the external damage risk source has entered the target warning area. At this time, issuing a level one warning message can increase the attention of relevant personnel and take corresponding measures in a timely manner to further avoid the transmission line from being in danger. If the target distance is greater than the preset threshold, the target distance between the external damage risk source and the target warning area will continue to be calculated for further monitoring, which further ensures the safety of the transmission line.

[0095] Specifically, the aforementioned preset threshold can be flexibly adjusted according to the actual situation, and this application does not limit the size of the aforementioned preset threshold.

[0096] Specifically, the aforementioned target warning areas can be divided according to the "Regulations on the Protection of Power Facilities" and the voltage level of the transmission lines to be monitored, or they can be divided based on actual needs. After the warning areas for the transmission lines are delineated and the target warning areas are obtained, cameras can be installed in the target warning areas to capture images and record the pixel coordinates of the target warning areas in the real-time risk image. Subsequently, the real-time risk images captured by the cameras in the target warning areas are sent back to the target detection model to determine whether there are external damage risk sources in the real-time risk image.

[0097] To further ensure the high accuracy of the subsequent target detection model, in another embodiment of this application, the above-mentioned construction unit includes a filtering module, a processing module, and an image enhancement module. The filtering module is used to perform Gaussian filtering on each of the above-mentioned external damage risk images to obtain multiple filtered risk images. The processing module is used to perform contrast processing on each of the above-mentioned filtered risk images using histogram equalization to obtain multiple preset risk images. The image enhancement module is used to perform image enhancement processing on each of the above-mentioned preset risk images to obtain multiple target risk images.

[0098] In one specific embodiment of this application, a Gaussian filtering method is used to filter each of the aforementioned external damage risk images, resulting in multiple filtered risk images. This removes noise from each external damage risk image, further improving the accuracy of the target detection model. The specific process is as follows: Assuming the external damage risk image can be represented as a two-dimensional image f(u,v), the filtered risk image obtained after filtering can be represented as g(u,v). A Gaussian kernel matrix H(u,v) with dimensions (2k+1)×(2k+1) is used, which is...

[0099]

[0100] Then there is

[0101]

[0102] Where σ is the variance of the external failure risk image; A Gaussian kernel matrix is ​​convolved with the external damage risk image to achieve filtering of the external damage risk image.

[0103] In another specific embodiment of this application, a histogram equalization method is used to perform contrast processing on each of the above-mentioned filtered risk images to obtain multiple preset risk images. This can enhance the contrast of each of the obtained filtered risk images and strengthen the characteristics of external damage risk sources in the filtered risk images. The specific process is as follows:

[0104] Assume the gray level range of the filtered risk image is [0, L-1], and the probability of the f-th gray level appearing is p(f), n f Let f represent the number of pixels occupied by the f-th gray level, and n represent the total number of pixels in all filtered risk images. If the preset risk image obtained after contrast processing is g, then:

[0105]

[0106]

[0107] In another specific embodiment of this application, the image enhancement processing method described above can be geometric rotation, scaling, mosaic data augmentation, etc. However, it is not limited to the image enhancement processing methods listed above, and can also be any feasible image enhancement processing method in the prior art.

[0108] Specifically, the image enhancement processing method described above can be used to process images with external damage risk sources. This can expand the number of defect samples, thereby increasing the amount of data in the external damage risk dataset and preventing the preset detection model from overfitting due to insufficient data.

[0109] In another specific embodiment of this application, as shown in Figures 2(a), 2(b), and 2(c), the specific processing procedure for mosaic data augmentation is as follows:

[0110] Step 1: Assuming the size of the input preset risk image is s×s, generate a rectangular box with a size of 2s×2s as shown in Figure 2(a);

[0111] Step 2: Within the 2s×2s rectangle, randomly select a point within the s×s rectangle at its center as the splicing point M;

[0112] Step 3: Randomly select four images from the sample set and stitch them together in a 2×2 pattern to obtain a large image as shown in Figure (b);

[0113] Step 4: Place the center of the large image shown in Figure (b) coinciding with point M, and select the overlapping area C of the large image shown in Figure (b) and the rectangle A shown in Figure 2 (a) (as shown in Figure 2 (c)). This is the target risk image after mosaic data augmentation.

[0114] To simplify the calculation of the target distance between the external damage risk source and the target warning area, and to further ensure a low computational load for the target detection model, in another embodiment of this application, such as... Figure 3 As shown, the aforementioned real-time risk image is acquired by an image acquisition device. The aforementioned first calculation module includes a first calculation submodule, a second calculation submodule, and a third calculation submodule. The aforementioned first calculation submodule is used to calculate the first slope of the first straight line HB, wherein the aforementioned first straight line HB is a straight line between the target perpendicular foot H and the center point B of the target anchor frame, the aforementioned target perpendicular foot H is the perpendicular foot of the aforementioned image acquisition device in the world coordinate system, and the aforementioned target anchor frame is the smallest graphic frame in the aforementioned real-time risk image that surrounds the aforementioned external damage risk source. The aforementioned second calculation submodule is used to calculate the second slope of the second straight line, wherein the aforementioned second straight line is a straight line between the aforementioned target perpendicular foot and the center point of the aforementioned target warning area. The aforementioned third calculation submodule is used to calculate the aforementioned target distance between the aforementioned external damage risk source and the aforementioned target warning area, based at least on the aforementioned first slope and the aforementioned second slope.

[0115] In another embodiment of this application, such as Figure 3 As shown, the third calculation submodule includes a fourth calculation submodule, a fifth calculation submodule, and a sixth calculation submodule. The fourth calculation submodule calculates a first included angle θ1 based on the first slope k1 and a second included angle θ2 based on the second slope k2. The first included angle θ1 is the angle between the first straight line HB and the third straight line HC, the third straight line HC is a straight line in the horizontal direction where the target's perpendicular foot is located, and the second included angle θ2 is the angle between the third straight line HC and the second straight line HA. The fifth calculation submodule calculates the sum of the angles corresponding to the first included angle θ1 and the second included angle θ2 to obtain the target angle AHB. The sixth calculation submodule calculates the target distance between the external damage risk source and the target warning area based on the length of the first straight line HB, the length of the second straight line HA, and the target angle AHB, thus further simplifying the calculation of the target distance between the external damage risk source and the target warning area.

[0116] In one specific embodiment of this application, such as Figure 3 As shown, the center point of the smallest bounding box surrounding the external risk source in the real-time risk image is B, which is also the center point of the target anchor frame; the perpendicular foot of the image acquisition device in the world coordinate system is H; and the center point of the target warning area is A. Since the coordinates of points A, B, and H in the image coordinate system are known, the slopes of the lines containing HB and HA can be derived as k1 and k2, respectively. Therefore, we can obtain:

[0117] θ1=arctank1,θ2=arctank2,

[0118] The target angle AHB is θ.

[0119] θ = |θ1| + |θ2|.

[0120] Based on geometric relationships, the distance AB between the center point of the target warning area and the center point of the target anchor frame is:

[0121]

[0122] In one embodiment of this application, the third calculation submodule further includes a seventh calculation submodule and an eighth calculation submodule. The seventh calculation submodule is used to calculate a first length between the target perpendicular and the first target point, and to calculate a second length between the target perpendicular and the second target point. The first target point is either the projection of the center point of the target anchor frame in the world coordinate system and in the horizontal direction, or the projection of the center point of the target warning area in the world coordinate system and in the horizontal direction. The second target point is either the projection of the center point of the target anchor frame in the world coordinate system and in the vertical direction, or the projection of the center point of the target warning area in the world coordinate system and in the vertical direction. The eighth calculation submodule is used to calculate the length of the first straight line based on the first length and the second length, or to calculate the length of the second straight line based on the first length and the second length.

[0123] In one specific embodiment of this application, such as Figure 4 As shown, calculate the length of the first straight line, which is the distance between the target's perpendicular H and the center point B of the target anchor frame (i.e., Figure 4 The process of the straight line between p) shown is as follows: the world coordinate system is O w (X w ,Y w The camera coordinate system is O. c (X c ,Y c The image coordinate system is O1(x,y). Assume the installation height of the image acquisition device is h, and its projection in the world coordinate system is point H (i.e., the perpendicular point of the image acquisition device in the world coordinate system); the projection point of the target anchor frame in the world coordinate system is P, and its projection in the world coordinate system X... w and Y w The projections on the axes are respectively P x and P y ; and the projected coordinates of the center point p of the target anchor frame in the image coordinate system are (p x ,p y The camera's pitch angle is α, its focal length is f, and P...y p y With O1O w The included angle is β, P x p x With O1O w The included angle is γ. Based on geometric relationships, the horizontal distance HP between point P and the projection point H of the image acquisition device along the y-axis is... y HP y = h×tan(α+β), where, thereby Similarly, the horizontal distance HP between point P and the projection point of the image acquisition device in the x-axis direction is... x for: in, thereby Therefore, the distance from the center P of the anchor frame where any external breaking source is located to the vertical foot H of the camera is: In the above formula, the camera's installation height h and pitch angle α can be obtained from actual measurements, and the camera's focal length f can be obtained by consulting the lens parameters; the coordinates of the center point p of the target anchor frame on the image coordinate system (p x ,p y It can be obtained through the following methods:

[0124]

[0125] Where (u0,v0) are the coordinates of the origin O1 of the imaging plane coordinate system in the pixel coordinate system, (u,v) are the pixel coordinates of the center point of the target anchor box after distortion correction, and d x and d y The physical dimensions of each pixel in the x and y directions of the image coordinate system. Distortion parameters, d x and d y All of these can be obtained by calibrating the parameters of the image acquisition device.

[0126] Specifically, the length of the second straight line, that is, the length of the straight line between the target's vertical foot and the center point of the target's warning area, is calculated in the same way as the length of the first straight line, and will not be repeated here.

[0127] Specifically, the method for calibrating the parameters of an image acquisition device can be the Zhang Zhengyou planar calibration method. Specifically, this involves making an image acquisition device calibration board, acquiring images to be calibrated from different angles, and obtaining the intrinsic parameter matrix, extrinsic parameter matrix, and distortion correction parameters of the image acquisition device based on the calibration.

[0128] In another embodiment of this application, the aforementioned external damage prevention device further includes a second early warning unit, configured to, when the target distance is greater than the preset threshold, continue calculating the target distance between the external damage risk source and the target early warning area, and when the target distance in the later calculation is less than the target distance in the previous calculation, issue a secondary early warning message. In this embodiment, when the target distance obtained in the later calculation is less than the target distance in the previous calculation, it indicates that the external damage risk source is gradually approaching the target early warning area. Issuing a secondary early warning message at this time can prompt relevant personnel to check in a timely manner, further preventing damage to the transmission line and further ensuring the safety of the transmission line.

[0129] In one specific embodiment of this application, if the target distance calculated in the later calculation is the same as the target distance calculated in the previous calculation or the difference between the two is small, post-processing can be omitted and observation can continue.

[0130] In another embodiment of this application, the aforementioned preset detection model is built based on YOLOv5.

[0131] Specifically, the specific network structure of the aforementioned preset detection model is as follows: Figure 5 As shown, the entire detection model can be divided into two parts: the backbone, consisting of layers 0-9, and the head, consisting of layers 10-23. Both the backbone and head have six modules: Focus, Conv, C3, SPP, Concat, and Upsample. Figure 5 As shown, the parentheses after each module indicate the parameters used by that module, with the following specific meanings: Focus and Conv modules: (C_in, C_out, kernel_size, stride); C3 module: (C_in, C_out) × the number of times the module is stacked; SPP module: (C_in, C_out, [kernal_size1, kernel_size2, kernel_size3]); Concat module: axis = 1, which concatenates the input matrix along the channels; Upsample module: scale_fator = 2, which means the output is twice the input, using the nearest upsampling algorithm; where c_in represents the number of input channels, c_out represents the number of output channels, kernel_size represents the size of the convolution kernel, and stride represents the stride of the convolution.

[0132] In one specific embodiment of this application, the aforementioned external damage risk sources include at least one of the following: damage from heavy machinery, damage from foreign objects causing short circuits, damage from human activities, and damage from illegal soil dumping.

[0133] Specifically, the external damage risk sources mentioned above are not limited to those listed above, and can be expanded according to the actual situation.

[0134] The aforementioned transmission line protection device includes a processor and a memory. The aforementioned construction unit, training unit, and detection unit are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0135] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the difficulty in accurately and quickly identifying external damage risks to transmission lines, a problem that is currently difficult to solve in existing technologies.

[0136] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0137] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the aforementioned method for preventing external damage to transmission lines.

[0138] This invention provides a processor for running a program, wherein the program executes the method for preventing external damage to the transmission line.

[0139] In a typical embodiment of this application, an external damage prevention system is also provided, which includes an external damage prevention device for power transmission lines and an image acquisition device. The external damage prevention device is used to execute any of the aforementioned external damage prevention methods; the image acquisition device is used to acquire real-time risk images of the target warning area.

[0140] The aforementioned external damage prevention system includes an external damage prevention device for transmission lines and an image acquisition device. The external damage prevention device is used to execute any of the aforementioned external damage prevention methods. In the aforementioned external damage prevention method, firstly, multiple acquired external damage risk images are preprocessed to obtain multiple target risk images. These target risk images and their corresponding label information constitute an external damage risk dataset. Then, the external damage risk dataset is used to train a preset detection model until the mAP parameter value of the preset detection model meets preset conditions, thus obtaining a target detection model. Finally, real-time risk images are input into the target detection model to detect whether an external damage risk source exists in the real-time risk images. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model. Then, the trained target detection model is used to detect whether an external damage risk source exists in the real-time risk images. This scheme achieves automatic identification of external damage risk sources for transmission lines. It eliminates the need for manual inspections to identify external damage risk sources for transmission lines, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0141] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:

[0142] Step S101: Perform image preprocessing on the collected multiple external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image.

[0143] Step S102: Using the aforementioned external damage risk dataset, train the preset detection model until the mAP (Mean Average Precision, abbreviated as mAP) parameter value of the preset detection model meets the preset conditions to obtain the target detection model. The preset detection model is used to detect external damage risk sources in the aforementioned target risk image.

[0144] Step S103: Using the above-mentioned target detection model, the acquired real-time risk image is detected to determine whether the above-mentioned external damage risk source exists in the real-time risk image.

[0145] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0146] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:

[0147] Step S101: Perform image preprocessing on the collected multiple external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image.

[0148] Step S102: Using the aforementioned external damage risk dataset, train the preset detection model until the mAP (Mean Average Precision, abbreviated as mAP) parameter value of the preset detection model meets the preset conditions to obtain the target detection model. The preset detection model is used to detect external damage risk sources in the aforementioned target risk image.

[0149] Step S103: Using the above-mentioned target detection model, the acquired real-time risk image is detected to determine whether the above-mentioned external damage risk source exists in the real-time risk image.

[0150] To enable those skilled in the art to better understand the technical solution of this application, the technical solution and technical effects of this application will be described below in conjunction with specific embodiments.

[0151] Example

[0152] like Figure 7 The diagram shown is a flowchart of a method for preventing external damage to transmission lines according to this application. The specific process is as follows:

[0153] S1. Collect multiple images of external damage risks by installing cameras in high-risk areas. Of course, the above-mentioned multiple images of external damage risks can also include some external damage risk sources that are artificially introduced under the premise of ensuring safety.

[0154] S2. Perform image preprocessing on the collected images of external damage risks and manually label each image of external damage risk to construct an external damage risk dataset;

[0155] S3. Using the external damage risk dataset, the preset detection model is trained until the mAP parameter value of the preset detection model meets the preset conditions, thus obtaining the target detection model. The preset detection model is built based on YOLOv5.

[0156] S4. Divide the area where the transmission line is located to obtain the target warning area, and calibrate the parameters of the monitoring cameras in each target warning area;

[0157] S5. Perform image enhancement processing on the real-time risk image of the target warning area obtained, and use a target detection model to detect the real-time risk image of the target warning area after image enhancement processing, so as to determine whether there is an external risk source in the above real-time risk image.

[0158] S6. If an external damage risk source is detected in the real-time risk image, the distance between the external damage risk source and the target warning area is calculated (i.e., to determine whether the external damage risk source has entered the target warning area), and the target distance is obtained. If the target distance is less than or equal to a preset threshold (i.e., the external damage risk source has entered the target warning area), a Level 1 warning message is issued; if the target distance is greater than the preset threshold, the distance between the external damage risk source and the target warning area is calculated again, and the target distance is obtained again. If the target distance calculated later is less than the target distance calculated earlier, it indicates that the external damage risk source is approaching the target warning area, and a Level 2 warning message is issued to alert relevant personnel to pay attention. If no external damage risk source is detected in the risk image, no action is taken (i.e., Figure 7 (The inaction shown).

[0159] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0160] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0161] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0162] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0163] If the aforementioned integrated units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0164] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0165] 1) In the method for preventing external damage to transmission lines according to this application, firstly, multiple acquired images of external damage risks are preprocessed to obtain multiple target risk images. These target risk images and their corresponding label information constitute an external damage risk dataset. Then, the external damage risk dataset is used to train a preset detection model until the mAP parameter value of the preset detection model meets preset conditions, thus obtaining a target detection model. Finally, real-time risk images are input into the target detection model to detect whether external damage risk sources exist in the real-time risk images. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model, and then the trained target detection model is used to detect whether external damage risk sources exist in the real-time risk images. This scheme achieves automatic identification of external damage risk sources for transmission lines. It eliminates the need for manual inspections to identify external damage risk sources for transmission lines, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0166] 2) In the transmission line external damage prevention device of this application, the construction unit is used to preprocess multiple acquired external damage risk images to obtain multiple target risk images, and construct an external damage risk dataset based on the multiple target risk images and the corresponding label information of each target risk image; the training unit is used to train a preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets the preset conditions to obtain a target detection model, which is used to detect external damage risk sources in the target risk images; the detection unit is used to use the target detection model to detect the acquired real-time risk images to determine whether the real-time risk images contain the external damage risk sources. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model, and then the trained target detection model is used to detect whether there are external damage risk sources in the real-time risk images. That is, this scheme realizes automatic identification of external damage risk sources of transmission lines. This eliminates the need for manual inspection to identify external damage risk sources of transmission lines, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0167] 3) The external damage prevention system of this application includes an external damage prevention device for transmission lines and an image acquisition device. The external damage prevention device is used to execute any of the aforementioned external damage prevention methods. In the aforementioned external damage prevention method, firstly, multiple external damage risk images are preprocessed to obtain multiple target risk images, and the multiple target risk images and their corresponding label information constitute an external damage risk dataset; then, the external damage risk dataset is used to train a preset detection model until the mAP parameter value of the preset detection model meets preset conditions, thus obtaining a target detection model; finally, the real-time risk image is input into the target detection model to detect whether an external damage risk source exists in the real-time risk image. In this scheme, the external damage risk dataset is first used to train the preset detection model to obtain the target detection model, and then the trained target detection model is used to detect whether an external damage risk source exists in the real-time risk image. That is, this scheme realizes automatic identification of external damage risk sources for transmission lines. This eliminates the need for manual inspections to identify external damage risk sources for transmission lines, thus saving manpower and time costs. Furthermore, it eliminates the need for monitoring with sensors to identify external damage risk sources of transmission lines, thus avoiding the influence of the external environment on the identification results. This solution achieves relatively accurate and rapid identification of external damage risk sources of transmission lines, thereby solving the problem of difficulty in accurately and quickly identifying external damage risk sources of transmission lines in existing technologies.

[0168] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method of protecting a power transmission line from external damage, characterized by include: Multiple external damage risk images are preprocessed to obtain multiple target risk images, and an external damage risk dataset is constructed based on the multiple target risk images and the label information corresponding to each target risk image. Using the aforementioned external damage risk dataset, a preset detection model is trained until the mAP parameter value of the preset detection model meets a preset condition, thereby obtaining a target detection model. The preset detection model is used to detect external damage risk sources in the target risk image. The target detection model is used to detect the acquired real-time risk image to determine whether the external damage risk source exists in the real-time risk image; After determining whether the external damage risk source exists in the real-time risk image, which is a risk image of a target warning area, the method for preventing external damage includes: If the external damage risk source exists in the real-time risk image, calculate the target distance between the external damage risk source and the target warning area; If the target distance is less than or equal to a preset threshold, a Level 1 warning message will be issued; If the target distance is greater than the preset threshold, then the target distance between the external damage risk source and the target early warning area continues to be calculated; The real-time risk image is acquired by an image acquisition device. When the external damage risk source exists in the real-time risk image, the target distance between the external damage risk source and the target warning area is calculated, including: Calculate the first slope of the first straight line, wherein the first straight line is the straight line between the target foot and the center point of the target anchor frame, the target foot is the foot of the image acquisition device in the world coordinate system, and the target anchor frame is the smallest graphic frame in the real-time risk image that surrounds the external damage risk source. Calculate the second slope of the second straight line, wherein the second straight line is a straight line between the foot of the target and the center point of the target warning area; The target distance between the external risk source and the target early warning area is calculated based at least on the first slope and the second slope. If the target distance is greater than the preset threshold, and the target distance between the external damage risk source and the target warning area is calculated again, the external damage prevention method further includes: If the target distance calculated in a later iteration is less than the target distance calculated in a previous iteration, a level-two warning message is issued.

2. The method for preventing external damage according to claim 1, characterized in that, Multiple external damage risk images were preprocessed to obtain multiple target risk images, including: A Gaussian filtering method is used to filter each of the external damage risk images to obtain multiple filtered risk images. The histogram equalization method is used to perform contrast processing on each of the filtered risk images to obtain multiple preset risk images; Image enhancement processing is performed on each of the preset risk images to obtain multiple target risk images.

3. The method for preventing external damage according to claim 1, characterized in that, Calculating the target distance between the external damage risk source and the target early warning area based at least on the first slope and the second slope, including: Calculate the first included angle based on the first slope, and calculate the second included angle based on the second slope, wherein the first included angle is the angle between the first straight line and the third straight line, the third straight line is the straight line in the horizontal direction where the target perpendicular foot is located, and the second included angle is the angle between the third straight line and the second straight line; Calculate the sum of the angles corresponding to the first included angle and the second included angle to obtain the target angle; The target distance between the external damage risk source and the target early warning area is calculated based on the length of the first straight line, the length of the second straight line, and the target angle.

4. The method for preventing external damage according to claim 3, characterized in that, The process of calculating the length of the first line or the length of the second line includes: Calculate the first length between the target's vertical foot and the first target point, and calculate the second length between the target's vertical foot and the second target point, wherein the first target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the horizontal direction, or the first target point is the projection point of the center point of the target warning area in the world coordinate system and in the horizontal direction, and the second target point is the projection point of the center point of the target anchor frame in the world coordinate system and in the vertical direction, or the second target point is the projection point of the center point of the target warning area in the world coordinate system and in the vertical direction; Calculate the length of the first line based on the first length and the second length, or calculate the length of the second line based on the first length and the second length.

5. The method for preventing external damage according to any one of claims 1 to 4, characterized in that, The preset detection model is built based on YOLOv5.

6. The method for preventing external damage according to any one of claims 1 to 4, characterized in that, The external damage risk sources include at least one of the following: damage from heavy machinery, damage from foreign objects causing short circuits, damage from human activities, and damage from illegal soil dumping.

7. A device for preventing external damage to transmission lines, characterized in that, include: The construction unit is used to perform image preprocessing on multiple acquired external damage risk images to obtain multiple target risk images, and to construct an external damage risk dataset based on the multiple target risk images and the label information corresponding to each target risk image; The training unit is used to train the preset detection model using the external damage risk dataset until the mAP parameter value of the preset detection model meets the preset conditions, thereby obtaining the target detection model. The preset detection model is used to detect external damage risk sources in the target risk image. The detection unit is used to detect the acquired real-time risk image using the target detection model to determine whether the external damage risk source exists in the real-time risk image; The device includes: The first calculation unit is used to detect the acquired real-time risk image, which is a risk image of the target warning area, using the target detection model to determine whether the external damage risk source exists in the real-time risk image. If the external damage risk source exists in the real-time risk image, the unit calculates the target distance between the external damage risk source and the target warning area. The first early warning unit is used to issue a first-level early warning message when the target distance is less than or equal to a preset threshold. The second calculation unit is used to continue calculating the target distance between the external damage risk source and the target warning area if the target distance is greater than the preset threshold. The first computing module includes: The first calculation submodule is used to calculate the first slope of the first straight line, wherein the first straight line is the straight line between the target foot and the center point of the target anchor frame, the target foot is the foot of the image acquisition device in the world coordinate system, and the target anchor frame is the smallest graphic frame surrounding the external damage risk source in the real-time risk image. The second calculation submodule is used to calculate the second slope of the second straight line, wherein the second straight line is a straight line between the foot of the target and the center point of the target warning area; The third calculation submodule is used to calculate the target distance between the external risk source and the target early warning area based at least on the first slope and the second slope; The device further includes: The second early warning unit is used to, when the target distance is greater than the preset threshold, continue to calculate the target distance between the external risk source and the target early warning area, and when the target distance calculated in the next calculation is less than the target distance calculated in the previous calculation, issue a secondary early warning message.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program executes the external damage prevention method according to any one of claims 1 to 6.

9. A processor, characterized in that, The processor is used to run a program, wherein the program executes the external damage prevention method according to any one of claims 1 to 6 when it runs.

10. A system for preventing external damage, characterized in that, include: An external damage prevention device for transmission lines, wherein the external damage prevention device is used to perform the external damage prevention method according to any one of claims 1 to 6; Image acquisition equipment is used to acquire real-time risk images of the target warning area.