Foreign matter invasion distance measurement algorithm for power transmission line and related product
By integrating airborne and ground point cloud data with visible light images, combined with compressed YOLO model and multi-frame differential method, efficient identification and accurate ranging of foreign object intrusion on transmission lines is achieved, and the problem of insufficient accuracy and real-time in complex environments in the existing technology is solved, and the stability and low power consumption characteristics of the system are improved.
Patent Information
- Application Number
- CN202411634365.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing foreign object intrusion detection methods for power transmission lines cannot take into account high accuracy, real-time and low power consumption in complex outdoor environments, especially in severe weather conditions, it is difficult to stably detect invasive objects and accurately calculate their distance from the power transmission line.
By obtaining airborne and ground point cloud data in the target area, the refined point cloud data is generated after fusion, and fusing it with visible light images to generate three-dimensional model data. The compressed YOLO model is used to combine the CA attention mechanism to identify invasive objects, collect images in real time and assist detection through multi-frame differential method. After triggering the distance measurement mechanism, the distance between the invasive object and the wire is calculated through laser point cloud data processing.
It realizes efficient identification and accurate ranging of foreign object intrusions on transmission lines, improves the accuracy, real-time and stability of the detection system, and can work stably in bad weather conditions and reduce power consumption.
Smart Images

Figure CN119511233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system safety monitoring, and in particular to a transmission line foreign body intrusion ranging algorithm and related products. Background Art
[0002] With the rapid expansion of the power transmission network, the safety and reliability of transmission lines have received widespread attention. The operating environment of transmission lines is complex. They are usually located in the wild and are affected by many factors such as wind, rain, lightning, animals and plants. The intrusion of foreign objects in the line channel has become one of the important hidden dangers affecting power transmission. Traditional transmission line safety monitoring methods, such as regular inspections, are time-consuming and labor-intensive, and it is difficult to detect foreign objects in time. Therefore, the introduction of automated and intelligent monitoring methods has become an industry demand.
[0003] In the field of computer technology, ranging technologies include tape measurement, infrared measurement, laser measurement, millimeter wave radar measurement, binocular stereo vision measurement, etc. These methods have their own characteristics and are suitable for different application scenarios. For example, tape measures are suitable for simple physical measurements, infrared rangefinders and laser rangefinders are more convenient for short-distance measurements, but their accuracy is greatly affected by the on-site environment and weather; although millimeter wave radar is not affected by weather, its resolution is limited and it is difficult to accurately identify specific targets. Although binocular stereo vision ranging is low in cost, it is highly sensitive to ambient light and has high computational complexity, making it difficult to promote in outdoor applications. LiDAR technology has good application prospects in many occasions due to its high precision, fast response and strong anti-interference ability, but its penetration is limited to a certain extent under severe weather conditions such as dense fog, rain and snow.
[0004] The current intrusion detection system for power transmission lines mainly relies on independent operation of hardware and software, which has problems such as high power consumption, poor ranging accuracy and real-time performance, and low integration of software and hardware, making it difficult to meet the detection requirements in complex on-site environments. For example, the binocular stereo vision system is based on the principle of parallax and is easily affected by weather, which makes it difficult to extract feature points, and shows obvious deficiencies in grayscale distortion, geometric distortion, noise interference, and matching of occluded objects. In addition, in recent years, deep learning and 3D structured light technology have developed rapidly in target detection and ranging applications, but purely software- or hardware-based systems are still difficult to achieve efficient deployment in power transmission line intrusion detection scenarios. Summary of the invention
[0005] The technical problem to be solved by the present invention is that the existing transmission line foreign object intrusion detection method cannot take into account high precision, real-time and low power consumption in complex outdoor environments. In particular, the current technical means are difficult to stably detect intruding objects under severe weather conditions, and it is difficult to accurately calculate the distance between the intruding objects and the transmission line. The purpose is to provide a transmission line foreign object intrusion ranging algorithm and related products, which realize efficient identification and accurate ranging of foreign object intrusion, can calculate the distance between the intruding object and the wire in real time, and automatically trigger the alarm mechanism when the warning threshold is reached, effectively improving the accuracy, real-time and stability of the detection system.
[0006] The present invention is achieved through the following technical solutions:
[0007] A transmission line foreign body intrusion ranging algorithm, comprising:
[0008] Acquire the airborne point cloud data and ground point cloud data of the target area, fuse them to obtain refined point cloud data, and fuse the refined point cloud data with the visible light image to generate the three-dimensional model data of the target area;
[0009] Collect and construct a target detection dataset containing positive and negative samples, build a compressed YOLO model, and train it in combination with the CA attention mechanism to generate a target recognition model for intrusion object recognition;
[0010] The visible light image of the target area is collected in real time, and the intrusion object is identified through the target recognition model and multi-frame difference method. If any method detects an intrusion, the ranging mechanism is triggered;
[0011] Process the laser point cloud data and construct a point cloud model; calculate the center point of the intruding object and measure the preliminary distance between the center point of the intruding object and the wire;
[0012] The visible light image and the point cloud model are spliced to generate the final three-dimensional model and calculate the final distance between the center point of the intruding object and the wire. If the final distance is less than the set threshold, an alarm is triggered.
[0013] Specifically, the method for generating three-dimensional model data of the target area includes:
[0014] Scan the target area through airborne laser radar and ground laser radar to obtain airborne point cloud data and ground point cloud data;
[0015] Calculate point cloud data d i The local entropy Among them, p k is d i The probability density at different distance levels in the neighborhood of , K is the number of segments within the neighborhood;
[0016] Set the entropy threshold. If the local entropy is less than the entropy threshold, the corresponding point cloud data will be deleted; if the local entropy is not less than the entropy threshold, the corresponding point cloud data will be retained.
[0017] Obtain the airborne point cloud data after sparse sampling Q = {q1, q2, ..., q n}; The ground point cloud data after thinning P = {p1, p2, ..., p m};
[0018] Define the preliminary rotation matrix R and translation matrix t, and perform preliminary registration of the airborne point cloud data and the ground point cloud data through the registration error function. in, is the weighting factor, α is the adjustment parameter, For point p i The gradient of For point q i The gradient of , m is the number of points in the airborne point cloud data;
[0019] After the initial registration is completed, the point cloud data at different resolution levels are registered through the multi-level registration error function. Among them, β l is the hierarchical weight factor, R l is the rotation matrix of the lth layer, t l is the translation matrix of the lth layer, L is the number of multi-resolution levels;
[0020] After completing multiple registrations, the fused point cloud data is obtained, and the point cloud data is smoothed using the Gaussian kernel or neighborhood average method to obtain refined point cloud data;
[0021] By minimizing the error function Match the feature points in the visible light image with the feature points in the refined point cloud data to obtain the mapping of the point cloud data in the image space, and the error function Among them, (u i , v i ) is the pixel coordinate of the feature point detected in the image, (x i ,y i , z i ) is the 3D coordinate in the point cloud data, (f x , f y ) is the focal length of the camera, (c x , c y ) is the coordinate of the optical center of the image center;
[0022] The three-dimensional coordinates of the refined point cloud data and the color information of the visible light image are used to map the point cloud data to the image texture to generate the three-dimensional model data of the target area.
[0023] Specifically, the method for generating the target recognition model includes:
[0024] The sample images in the target detection dataset are labeled and enhanced through the data enhancement strategy, T(x) = {t1(x), t2(x), ..., t z (x)}, where T(x) is the enhanced sample set, t z (x) is the zth enhancement operation;
[0025] Construct a compressed YOLO network, use pruning or quantization methods to reduce the number of network parameters, input the enhanced sample set into the compressed YOLO network, and obtain the feature map F of the lth scale after convolution and pooling operations. l ;
[0026] Set the channel attention weight of the feature map to and Determine the output of the CA attention mechanism Among them, F l,c (i, j) is the input feature map F l The pixel value at position (i, j) of the cth channel, and are the attention weights in height and width directions respectively, and are the average values of the feature maps in height and width directions, respectively. Conv represents the convolutional layer.
[0027] After performing attention enhancement on all pixels, the enhanced feature map is obtained;
[0028] Complete the attention enhancement of feature maps of all scales, and obtain the fused feature map after fusion Among them, α s is the fusion weight of the s-th scale, F s is the feature map of the s-th scale after attention enhancement, and S is the number of scales;
[0029] Define the loss function in: is the position loss, is the classification loss, is the target loss, λ loc ,λ cls ,λ obj are the weight coefficients of each loss respectively;
[0030] The fused feature map is used as training data, and the compressed YOLO network is iteratively trained using the stochastic gradient descent or Adam optimization algorithm until the loss function converges to obtain the final target recognition model.
[0031] Specifically, the method of identifying intrusion objects through the target recognition model includes:
[0032] Collect visible light images of the target area in real time to obtain continuous frame image streams;
[0033] Perform data preprocessing on each frame in the continuous frame image stream and input it into the target recognition model. After feature extraction and attention mechanism processing inside the model, the detection result is generated.
[0034] If an intrusion object that matches a specific category is detected, the model returns the bounding box coordinates and category information of the intrusion object;
[0035] The center point position of the intruding object is calculated based on the bounding box information. If the distance between the center point and the wire is less than the trigger threshold, the ranging mechanism is triggered.
[0036] Specifically, the method of identifying intrusion objects by multi-frame difference method includes:
[0037] Collect visible light images of the target area in real time to obtain continuous frame image streams;
[0038] For each frame image I t Perform grayscale and denoising filtering to obtain the processed image I′ t , where t is the time frame index;
[0039] Perform weighted difference between the current frame and the previous frames to obtain a differential image The weighted difference formula is: in, is the weighted difference value of the pixel point (x, y) under the difference of the ath frame, w a is the differential weight coefficient of the a-th frame,
[0040] Accumulate all weighted difference images to obtain the cumulative difference image The formula for the cumulative difference is in, is the cumulative difference value of the pixel points, and A is the number of differential images;
[0041] Perform temporal smoothing on the cumulative difference image to obtain a smoothed difference image The smoothing formula is in, is the smoothed difference value of the pixel point (x, y) at time t, T win is the time smoothing window size;
[0042] Perform Gaussian filtering on the smoothed difference image to obtain the filtered difference image The filtering formula is: is the spatial filtered difference value of the pixel point (x, y), G(p, q) is the weight of the Gaussian kernel function, and r is the radius of the filter window;
[0043] Set the binarization threshold and binarize the filtered difference image to obtain the binary difference image B t ;
[0044] Set the connectivity threshold C min , and perform connected domain analysis on the binary difference image to obtain the connected domain C. If C>C min , it is determined that an intrusion object is detected and the centroid of the connected domain is obtained. The three-dimensional mapping of the centroid coordinates is performed using the internal parameter matrix and depth confidence to obtain the three-dimensional coordinates of the centroid. If the distance between the centroid and the wire is less than the trigger threshold, the ranging mechanism is triggered.
[0045] Specifically, the calculation method of the preliminary distance includes:
[0046] Obtain the real-time ground point cloud data of the target area, and perform denoising and downsampling on the real-time ground point cloud data to obtain the downsampled point cloud P filtered ;
[0047] If the intrusion object is identified by the target recognition model, the center point of the bounding box information is obtained; if the intrusion object is identified by the multi-frame difference method, the centroid of the connected domain is obtained;
[0048] Obtain the coordinates of the center point of the image area of the intruding object from the center point of the bounding box information or the centroid of the connected domain, convert them into a three-dimensional spatial position estimate, and use them as the estimated intruding object position;
[0049] Filter out the point cloud group P close to the intrusion object in the point cloud data obj , P obj ={p i ∈P filtered |||p i -p approx ||<d obj}, where p approx is the estimated position of the intruding object, d obj is the screening radius, p i is a point in the point cloud data;
[0050] Point cloud group P obj Perform cluster analysis to separate the connected intrusion object point group P ob , and calculate the center point of the intruding object (X c , Y c , Z c ), Among them, |P ob | is the number of points in the intrusion object point group, (X i, Y i , Z i ) is point p i The three-dimensional coordinates of
[0051] Get the position coordinates of the wire from the three-dimensional model of the target area (X line , Y line , Z line ), calculate the initial distance between the center point of the intruding object and the wire
[0052] Specifically, the method for obtaining the final distance includes:
[0053] The intrinsic and extrinsic matrix of the visible light camera is obtained through calibration, and the point cloud data is converted to the image coordinate system to align the visible light image and the point cloud data;
[0054] According to the preliminary distance, the possible location range of the intruding object is inferred, and the point group P whose distance wire is within the range of D±δ is retained. fil , P fil ={p i ∈P||||p i -p line ||-D|<δ}, where δ is the tolerance parameter, p i is a point in the point cloud data, p line is a point on the wire;
[0055] Extract visible light image and point group P fil The feature points in are matched and a matching pair set M is obtained;
[0056] Using the matching point set, the least squares error function is established, and the rotation matrix and translation vector are optimized through an iterative optimization algorithm to accurately match the visible light image and point cloud data;
[0057] Map the color information of the visible light image to the screened point group P fil , generate the final 3D model with texture, update the center point of the intruding object, and calculate the final distance;
[0058] The tolerance τ is set. If the difference between the final distance and the preliminary distance is greater than the tolerance, the point cloud data is matched and calculated again; if the difference between the final distance and the preliminary distance is not greater than the tolerance, the final distance is obtained.
[0059] A transmission line foreign object intrusion ranging terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a transmission line foreign object intrusion ranging method as described above is implemented.
[0060] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned transmission line foreign object intrusion ranging algorithm is implemented.
[0061] A computer program product includes a computer program / instruction, which, when executed by a processor, implements a transmission line foreign object intrusion ranging algorithm as described above.
[0062] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0063] The present invention realizes accurate detection and ranging of foreign objects in the transmission line channel by fusing laser point cloud data and visible light images. First, the target area is scanned by airborne laser radar and ground laser radar, and refined three-dimensional point cloud data is obtained and fused to generate a high-precision three-dimensional model containing the target area. At the same time, a compressed YOLO network is constructed in combination with the CA attention mechanism for target detection to identify potential foreign body intrusions. In actual monitoring, the system uses the real-time collected visible light images, the trained target recognition model and the multi-frame difference method to identify intrusion objects, and triggers the ranging mechanism once an intrusion is detected. Then, the preliminary distance between the intrusion object and the wire is calculated by processing the laser point cloud data, and the visible light image and the point cloud model are spliced to generate the final three-dimensional model to obtain a higher-precision final distance judgment.
[0064] By fusing laser point cloud and visible light image, the present invention realizes efficient detection and precise ranging of foreign objects intruding into power transmission lines, and solves the problems of insufficient ranging accuracy and real-time performance of traditional methods in complex environments. With the help of the target recognition capability of deep learning model and the assistance of multi-frame difference method, the system can effectively filter environmental noise, achieve higher recognition accuracy, and reduce the omission and false alarm rates. The bidirectional trigger mechanism and refined point cloud data processing are adopted to optimize the computing efficiency and power consumption of the system, so that the algorithm is improved in terms of real-time performance and low power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings illustrate exemplary embodiments of the present invention and, together with the description thereof, are used to explain the principles of the present invention. These drawings are included to provide a further understanding of the present invention, and the accompanying drawings are included in and constitute a part of this specification and do not constitute a limitation of the embodiments of the present invention.
[0066] Figure 1 It is a flow chart of a transmission line foreign body intrusion ranging algorithm according to the present invention. DETAILED DESCRIPTION
[0067] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and implementation methods. It is understood that the specific implementation methods described herein are only used to explain the relevant content, rather than to limit the present invention.
[0068] It should also be noted that, for the convenience of description, only the parts related to the present invention are shown in the drawings.
[0069] In the absence of conflict, the embodiments and features of the embodiments of the present invention may be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0070] Embodiment 1
[0071] like Figure 1 As shown, a transmission line foreign body intrusion ranging algorithm is provided, including:
[0072] The airborne point cloud data and ground point cloud data of the target area are acquired, and refined point cloud data are obtained after fusion. The refined point cloud data is then fused with the visible light image to generate the three-dimensional model data of the target area.
[0073] First, the target area is scanned by airborne laser radar and ground laser radar to collect airborne point cloud data and ground point cloud data of the area respectively. Point cloud data is a set of discrete points on the surface of an object in three-dimensional space, which can intuitively represent the spatial structure of the object. After the airborne and ground point cloud data are fused, refined three-dimensional point cloud data will be generated, reducing data noise and enhancing the accuracy of the model. These refined data are then fused with the visible light image to generate the three-dimensional model data of the area.
[0074] Collect and construct a target detection dataset containing positive and negative samples, build a compressed YOLO model, and train it in combination with the CA attention mechanism to generate a target recognition model for intrusion object identification.
[0075] The system annotates the collected intrusion sample images as positive and negative samples to construct a target detection dataset, and expands the sample size through data enhancement and other technologies. Based on this dataset, a compressed YOLO (You Only LookOnce) model is constructed and trained. YOLO is a real-time target detection algorithm that can quickly detect and identify specific objects. By introducing the CA (Coordinate Attention) attention mechanism, the model can weightedly process feature maps in the height and width directions to improve the detection accuracy of small objects. This target recognition model is used to identify intrusion objects in transmission lines.
[0076] Visible light images of the target area are collected in real time, and intrusion objects are identified through target recognition models and multi-frame difference methods. If an intrusion object is detected by any method, the ranging mechanism is triggered.
[0077] During operation, the system will collect visible light images of the target area in real time and input them into the target recognition model to identify potential intruders. At the same time, the multi-frame difference method is used for auxiliary detection, and moving objects are detected by differential calculation between consecutive image frames (that is, calculating the pixel difference at the same position in different time frames). When the target recognition model or the difference method detects an intruder, the subsequent ranging mechanism is triggered.
[0078] The laser point cloud data is processed to construct a point cloud model; the center point of the intruding object is calculated, and the preliminary distance between the center point of the intruding object and the wire is measured.
[0079] After detecting an intruder, the system further processes the laser point cloud data to construct a point cloud model. The system calculates the center point of the intruder through clustering methods and measures the preliminary distance between the center point and the transmission line. Clustering is used to identify and separate the point cloud of the intruder to ensure accurate positioning of its spatial position.
[0080] The visible light image and the point cloud model are spliced to generate the final three-dimensional model and calculate the final distance between the center point of the intruding object and the wire. If the final distance is less than the set threshold, an alarm is triggered.
[0081] After the visible light image is spliced with the processed point cloud model, a three-dimensional model containing texture information is generated, which improves the detail performance of the target surface. Based on this model, the system can recalculate the precise distance between the center point of the intruding object and the wire to obtain the final distance. If the distance is less than the preset threshold, the system will trigger an alarm mechanism to remind potential safety hazards.
[0082] Embodiment 2
[0083] In order to generate the 3D model data of the target area, it is necessary to involve the point cloud data processing, registration, multi-resolution alignment, smoothing and image fusion of airborne and ground-based laser radars. The following will provide a detailed method for generating the 3D model data of the target area, including:
[0084] The target area is scanned by airborne laser radar and ground laser radar to obtain airborne point cloud data and ground point cloud data; the target area is scanned by airborne and ground laser radar to obtain point cloud data respectively. The point cloud data records the spatial position of objects in the target area in the form of three-dimensional coordinate points, forming a preliminary three-dimensional spatial representation of the target area.
[0085] These point cloud data contain the 3D coordinate information of the target area, but may contain noise or redundant points. In order to reduce data redundancy and noise points and improve the quality of point cloud data, the point cloud data d i The local entropy Among them, p k is d i The local entropy is defined as the sum of the probability densities at different distance levels in the neighborhood of the point, K is the number of segments within the neighborhood, and the local entropy is defined as the sum of the probability densities at each distance level in the neighborhood of the point.
[0086] The lower the local entropy, the greater the data redundancy. Therefore, an entropy threshold is set. If the local entropy is less than the entropy threshold, the corresponding point cloud data is deleted; if the local entropy is not less than the entropy threshold, the corresponding point cloud data is retained. By setting the entropy value threshold, point cloud data less than the threshold will be deleted to reduce data redundancy and improve the accuracy of subsequent processing.
[0087] The system sets an entropy threshold and filters the points below the threshold, that is, deletes the corresponding point cloud data to retain important information and achieve data thinning. The obtained thinned point cloud data are the thinned airborne point cloud data Q = {q1, q2, ..., q n} and the thinned ground point cloud data P = {p1, p2, ..., p m}.
[0088] Define the preliminary rotation matrix R and translation matrix t, and perform preliminary registration of the airborne point cloud data and the ground point cloud data through the registration error function. in, is a weighting factor used to adjust the error impact weight; α is an adjustment parameter to ensure that the noise impact is minimized; For point p i The gradient of For point q i The gradient of , m is the number of points in the airborne point cloud data; by optimizing this function, the rough alignment of the airborne point cloud and the ground point cloud data is preliminarily completed.
[0089] After the initial registration is completed, the point cloud data at different resolution levels are registered through the multi-level registration error function. Among them, β l is the hierarchical weight factor, R l is the rotation matrix of the lth layer, t l is the translation matrix of the lth layer, and L is the number of multi-resolution levels; by optimizing the rotation and translation of point cloud data at different levels in turn, the airborne point cloud and the ground point cloud are gradually and accurately aligned at all resolutions to form more consistent fused point cloud data.
[0090] After completing multiple registrations, the fused point cloud data is obtained. After smoothing the point cloud data using the Gaussian kernel or neighborhood average method, the refined point cloud data is obtained. The registered point cloud data may contain a small amount of error or rough data, so the system smoothes it, usually using the Gaussian kernel or neighborhood average method. These methods smooth the point cloud data by considering the spatial position relationship of adjacent points to remove small noise and sharp changes, obtain refined point cloud data, and ensure the smoothness and stability of the final model.
[0091] By minimizing the error function Match the feature points in the visible light image with the feature points in the refined point cloud data to obtain the mapping of the point cloud data in the image space, and the error function Among them, (u i , v i ) is the pixel coordinate of the feature point detected in the image, (x i ,y i , z i ) is the 3D coordinate in the point cloud data, (f x , f y ) is the focal length of the camera, (c x , c y ) is the coordinate of the optical center of the image center; by optimizing the error function, the image feature points can be accurately mapped to the three-dimensional point cloud data to achieve high-precision alignment.
[0092] Using the three-dimensional coordinates of the refined point cloud data and the color information of the visible light image, the point cloud data is mapped to the image texture to generate the three-dimensional model data of the target area. The three-dimensional coordinates of the refined point cloud data are mapped to the color information of the visible light image, and the image texture is superimposed on the point cloud data to generate a three-dimensional model containing geometric and texture information. This model not only provides the spatial structure of the target area, but also contains real color and texture information, making the target area more intuitive in the three-dimensional space and more conducive to subsequent intrusion object detection and distance calculation.
[0093] Embodiment 3
[0094] The generation method of the target recognition model is divided into several steps: data set annotation and enhancement, construction and optimization of compressed YOLO network, application of CA attention mechanism, feature fusion, definition of loss function and model training, including:
[0095] The sample images in the target detection dataset are labeled, and the labeled content includes the specific location and category information of the target object. In order to increase the generalization ability of the model, it is enhanced through data enhancement strategy, T(x) = {t1(x), t2(x), ..., t z (x)}, where T(x) is the enhanced sample set, t z(x) is the z Enhancement operations usually include rotation, flipping, scaling, and color adjustment methods.
[0096] In order to improve the detection efficiency of the model, a compressed YOLO network is constructed, and pruning or quantization methods are used to reduce the number of network parameters. Compressed YOLO reduces the number of network parameters through pruning or quantization technology. Pruning reduces the amount of calculation by removing unimportant connections or neurons, and quantization reduces the storage requirements by reducing numerical precision, thereby improving the running speed and resource efficiency of the model. The enhanced sample set is input into the compressed YOLO network, and after convolution and pooling operations, the feature map F of the lth scale is obtained. l ;
[0097] In order to enhance the model's feature attention ability in target detection, the CA attention mechanism is introduced. The CA mechanism generates channel attention weights of height and width for each feature map, that is, the channel attention weight of the feature map is set to and Different weights are assigned to the height and width of the feature map to make the model more discriminative of the features.
[0098] Determine the output of the CA attention mechanism Among them, F l,c (i, j) is the input feature map F l The pixel value at position (i, j) of the cth channel, and are the attention weights in height and width directions respectively, and are the average values of the feature maps in height and width directions, respectively. Conv represents the convolutional layer.
[0099] After performing attention enhancement on all pixels, the enhanced feature map is obtained;
[0100] Complete the attention enhancement of feature maps of all scales. The system merges the enhanced feature maps of each scale according to the weights, and obtains the fused feature map after fusion. Among them, α s is the fusion weight of the th scale, F s is the feature map of the sth scale after attention enhancement, and S is the number of scales. By fusing feature maps of different scales, the model can take into account the characteristics of target objects at all scales.
[0101] Defining the loss function in: It is the position loss, which measures the difference between the predicted box and the actual box; It is the classification loss, which is used to correctly identify the object category; is the target loss, used to confirm the existence of the target. loc ,λ cls ,λ obj are the weight coefficients of each loss respectively;
[0102] The fused feature map is used as training data, and the compressed YOLO network is iteratively trained using the stochastic gradient descent or Adam optimization algorithm until the loss function converges to obtain the final target recognition model.
[0103] Embodiment 4
[0104] After the target recognition model is established, the method of identifying intrusion objects through the target recognition model includes:
[0105] The visible light image of the target area is collected in real time to obtain a continuous frame image stream; the continuous frame data can effectively record the dynamic changes of objects in the target area and provide a reliable image data basis for identifying potential intruders.
[0106] Data preprocessing is performed on each frame in the continuous frame image stream. The data preprocessing steps usually include image normalization, denoising, resizing, etc. to ensure that the brightness, contrast and size of the image meet the input requirements of the model.
[0107] It is input into the target recognition model, and the detection results are generated through feature extraction and attention mechanism processing inside the model. Inside the model, the input image frame is processed by the feature extraction layer and the CA (Coordinate Attention) attention mechanism. Feature extraction is used to identify key features in the image, and the CA attention mechanism helps the model to enhance the focus on the features of the intruding object in the height and width directions, making the detection process more accurate. Through these processing steps, the model generates the target detection results for the frame.
[0108] If an intrusion object that meets a specific category (such as a specific foreign object shape or material) is detected, the model returns the bounding box coordinates and category information of the intrusion object; the bounding box is used to identify the specific location of the intrusion object in the image, and the category information describes the properties of the object to help distinguish different types of intrusion objects.
[0109] The center point of the intruding object is calculated based on the bounding box information. If the distance between the center point and the wire is less than the trigger threshold, the distance measurement mechanism is triggered. If the distance between the center point and the wire is less than the preset trigger threshold, the system will immediately activate the distance measurement mechanism to further accurately calculate the distance from the intruding object to the wire and confirm its potential threat to line safety.
[0110] Embodiment 5
[0111] The process of identifying intrusion objects by multi-frame difference method includes image acquisition, difference processing, smoothing and filtering, binarization processing, connected domain analysis and three-dimensional mapping. The specific methods include:
[0112] Collect visible light images of the target area in real time to obtain continuous frame image streams;
[0113] For each frame image I t Perform grayscale and denoising filtering to obtain the processed image I′ t , where t is the time frame index; grayscale simplifies calculations and reduces color interference. De-noising filtering can eliminate environmental noise and enhance the visibility of the target object.
[0114] Perform weighted difference between the current frame and the previous frames to obtain a differential image The weighted difference formula is: in, For the a The weighted difference value of the pixel point (x, y) under frame difference, w a is the differential weight coefficient of the ath frame, which is used to adjust the impact of the differences between different frames.
[0115] Accumulate all weighted difference images to obtain the cumulative difference image The formula for the cumulative difference is in, is the cumulative difference value of the pixel points, and A is the number of differential images. The difference information in different time frames can be integrated through cumulative differences to further enhance the characteristics of moving objects, making it easier to distinguish between static background and target objects.
[0116] In order to reduce the burst noise in the image, the accumulated difference image is temporally smoothed to obtain a smooth difference image. The smoothing formula is in, is a pixel point (x, y ) The smoothed difference at time t, T win is the time smoothing window size;
[0117] Perform Gaussian filtering on the smoothed difference image to obtain the filtered difference image The filtering formula is: is the difference value of the pixel point (x, y) after spatial filtering, G(p, q) is the weight of the Gaussian kernel function, and r is the radius of the filter window; Gaussian filtering helps to further smooth out tiny noises in space and ensure that the edges of moving objects are clearer.
[0118] Set the binarization threshold and binarize the filtered difference image to obtain the binary difference image B t; Set the threshold so that pixels above the threshold are identified as potential target areas.
[0119] Set the connectivity threshold C min , and perform connected domain analysis on the binary difference image to obtain the connected domain C. If C> Cmin , it is determined that an intrusion object is detected and the centroid of the connected domain is obtained. The centroid represents the center position of the moving object. Then the three-dimensional mapping of the centroid coordinates is performed using the internal parameter matrix and the depth confidence to obtain the three-dimensional coordinates of the centroid. If the distance between the centroid and the conductor is less than the trigger threshold, the ranging mechanism is triggered to further accurately measure the distance between the intrusion object and the transmission line conductor to determine whether it poses a threat to the line safety.
[0120] Embodiment 6
[0121] Before the final distance measurement, a preliminary distance calculation is performed, including the following methods:
[0122] The real-time ground point cloud data of the target area is obtained by laser radar in real time. In order to ensure the accuracy and calculation efficiency of the data, the point cloud data is denoised and downsampled to remove noise points and redundant points, that is, the real-time ground point cloud data is denoised and downsampled to obtain the downsampled point cloud P. filtered ; Downsampling reduces the amount of data while retaining key structural information.
[0123] If the intruding object is identified by the target recognition model, the center point of the bounding box information is obtained; if the intruding object is identified by the multi-frame difference method, the centroid of the connected domain is obtained; that is, if any of the above methods detects an intruding object, the ranging mechanism is triggered.
[0124] Obtain the coordinates of the center point of the image area of the intruding object from the center point of the bounding box information or the centroid of the connected domain, convert them into a three-dimensional spatial position estimate, and use them as the estimated intruding object position;
[0125] Filter out the point cloud group P close to the intrusion object in the point cloud data obj , P obj ={p i ∈P filtered |||p i -p approx ||<d obj}, where p approx is the estimated position of the intruding object, d obj is the screening radius, which indicates the spatial range of the point cloud group around the location of the intruding object. i is a point in the point cloud data;
[0126] Point cloud group P obj Perform cluster analysis to separate the connected intrusion object point group Pob , remove other points that are not related to the intruding object, and then calculate the center point of the intruding object (X c , Y c , Z c ), Among them, |P ob | is the number of points in the intrusion object point group, (X i , Y i , Z i ) is point p i The three-dimensional coordinates of the center point obtained in this way can accurately represent the position of the intruding object in the three-dimensional space.
[0127] Get the position coordinates of the wire from the three-dimensional model of the target area (X line , Y line , Z line ), calculate the initial distance between the center point of the intruding object and the wire The distance represents the straight-line distance between the intruding object and the conductor. It is a key indicator for preliminarily determining whether the intruding object is close to the conductor. If it is less than the set safety threshold, the system will trigger further precise distance measurement or alarm mechanism to ensure the safety of the transmission line.
[0128] Embodiment 7
[0129] This embodiment gradually describes how to accurately calculate the distance between the intruding object and the wire through processes such as camera calibration, point cloud screening, feature matching and optimization. The method for obtaining the final distance includes:
[0130] The intrinsic and extrinsic matrix of the visible light camera is obtained through calibration, and the point cloud data is converted to the image coordinate system to align the visible light image and point cloud data; the intrinsic matrix is used to describe the internal characteristics of the camera (such as focal length and optical center position), and the extrinsic matrix is used to describe the position and orientation of the camera in three-dimensional space. Through these parameters, the laser point cloud data is converted to the image coordinate system to achieve the coordinate alignment of the point cloud and the visible light image, laying the foundation for subsequent feature matching.
[0131] According to the preliminary distance, the possible position range of the intruding object in three-dimensional space is inferred, and the point group P whose distance wire is within the range of D±δ is retained. fil , P fil ={p i ∈P||||p i -p line ||-D|<δ}, where δ is the tolerance parameter used to define the distance range for screening. i is a point in the point cloud data, p line are points on the wire; thus, points irrelevant to the intruding objects are filtered out, and only point cloud data within a reasonable range is retained.
[0132] Extract visible light image and point group P fil The feature points in the image are found and feature matching is performed. The feature matching process obtains the matching pair set M by finding the correspondence between the pixel points in the image and the 3D points in the point cloud.
[0133] Using the set of matching points, a least squares error function is established to solve the optimal transformation between image coordinates and point cloud coordinates. The difference function aims to minimize the distance difference between corresponding points. The rotation matrix and translation vector are optimized through an iterative optimization algorithm to accurately match the visible light image and point cloud data; a common error function is provided In this function, p i Represents the feature point in the image coordinate system; q i Represents the feature points in the point cloud coordinate system; R is the rotation matrix, which is used to rotate the point cloud; t is the translation vector, which is used to translate the point cloud coordinates; N is the number of matching point pairs. This error function calculates the sum of squared Euclidean distances between each corresponding point. The purpose of minimizing this sum is to find the optimal R and t to achieve accurate registration of the point cloud and the image feature points.
[0134] In order to optimize the error function, commonly used iterative optimization algorithms such as the Levenberg-Marquardt algorithm are an optimization technique that combines gradient descent and Gauss-Newton methods. It can effectively converge to a local optimal solution and is particularly suitable for nonlinear least squares problems. By gradually adjusting R and t to minimize the error, the Levenberg-Marquardt algorithm can accurately adjust the registration of the point cloud and the image.
[0135] After alignment is completed, the color information of the visible light image is mapped to the screened point group P fil , generate the final 3D model with texture, update the center point of the intruding object, and calculate the final distance;
[0136] To ensure the accuracy of the final distance, a tolerance τ is set. If the difference between the final distance and the preliminary distance is greater than the tolerance, the point cloud data is matched and calculated again; if the difference between the final distance and the preliminary distance is not greater than the tolerance, the final distance is obtained.
[0137] Embodiment 8
[0138] A transmission line foreign object intrusion ranging terminal comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a transmission line foreign object intrusion ranging method as described above is implemented.
[0139] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing of the terminal by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an execution program required for at least one function, etc.
[0140] The data storage area can store data created according to the use of the terminal, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0141] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned transmission line foreign object intrusion ranging algorithm is implemented.
[0142] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instruction data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technology, CD-ROM, DVD or other optical storage, cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory and mass storage devices can be collectively referred to as memory.
[0143] A computer program product includes a computer program / instruction, which, when executed by a processor, implements a transmission line foreign object intrusion ranging algorithm as described above.
[0144] A computer program product includes a computer program or set of instructions for performing specific tasks or implementing specific functions. These programs or instructions are designed to be executed by a processor to implement a series of predefined steps or operations. The program product may be stored in various forms of computer storage media, such as memory, hard disk, solid-state drive, optical disk or other forms of digital storage devices. It may exist in the form of compiled binary code or in the form of scripts or bytecodes that can be executed by an interpreter. The program product uses carefully designed algorithms and logical instructions to enable the processor to process data in a specific order and manner to complete various functions such as data analysis, user interaction, device control, etc.
[0145] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.
[0146] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0147] It should be understood by those skilled in the art that the above embodiments are only for the purpose of clearly illustrating the present invention, and are not intended to limit the scope of the present invention. For those skilled in the art, other changes or modifications may be made based on the above invention, and these changes or modifications are still within the scope of the present invention.
Claims
1. A transmission line foreign body intrusion ranging algorithm, characterized in that: include: Acquire the airborne point cloud data and ground point cloud data of the target area, fuse them to obtain refined point cloud data, and fuse the refined point cloud data with the visible light image to generate the three-dimensional model data of the target area; Collect and construct a target detection dataset containing positive and negative samples, build a compressed YOLO model, and train it in combination with the CA attention mechanism to generate a target recognition model for intrusion object recognition; The visible light image of the target area is collected in real time, and the intrusion object is identified through the target recognition model and multi-frame difference method. If any method detects an intrusion, the ranging mechanism is triggered; Process the laser point cloud data and construct a point cloud model; Calculate the center point of the intruding object and measure the preliminary distance between the center point of the intruding object and the wire; The visible light image and the point cloud model are spliced to generate the final three-dimensional model and calculate the final distance between the center point of the intruding object and the wire. If the final distance is less than the set threshold, an alarm is triggered.
2. A transmission line foreign body intrusion ranging algorithm according to claim 1, characterized in that: The method for generating three-dimensional model data of a target area includes: Scan the target area through airborne laser radar and ground laser radar to obtain airborne point cloud data and ground point cloud data; Calculate point cloud data d i The local entropy Among them, p k is d i The probability density at different distance levels in the neighborhood of , K is the number of segments within the neighborhood; Set the entropy threshold. If the local entropy is less than the entropy threshold, the corresponding point cloud data will be deleted; if the local entropy is not less than the entropy threshold, the corresponding point cloud data will be retained. Obtain the airborne point cloud data after sparse sampling Q = {q1, q2, ..., q n }; The ground point cloud data after thinning P = {p1, p2, ..., p m }; Define the preliminary rotation matrix R and translation matrix t, and perform preliminary registration of the airborne point cloud data and the ground point cloud data through the registration error function. in, is the weighting factor, α is the adjustment parameter, For point p i The gradient of For point q i The gradient of , m is the number of points in the airborne point cloud data; After the initial registration is completed, the point cloud data at different resolution levels are registered through the multi-level registration error function. Among them, β l is the hierarchical weight factor, R l is the rotation matrix of the lth layer, t l is the translation matrix of the lth layer, L is the number of multi-resolution levels; After completing multiple registrations, the fused point cloud data is obtained, and the point cloud data is smoothed using the Gaussian kernel or neighborhood average method to obtain refined point cloud data; By minimizing the error function Match the feature points in the visible light image with the feature points in the refined point cloud data to obtain the mapping of the point cloud data in the image space, and the error function Among them, (u i , v i ) is the pixel coordinate of the feature point detected in the image, (x i ,y i , z i ) is the 3D coordinate in the point cloud data, (f x , f y ) is the focal length of the camera, (c x , c y ) is the coordinate of the optical center of the image center; The three-dimensional coordinates of the refined point cloud data and the color information of the visible light image are used to map the point cloud data to the image texture to generate the three-dimensional model data of the target area.
3. A transmission line foreign body intrusion ranging algorithm according to claim 1, characterized in that: The generation method of the target recognition model includes: The sample images in the target detection dataset are labeled and enhanced through the data enhancement strategy, T(x) = {t1(x), t2(x), ..., t z (x)}, where T(x) is the enhanced sample set, t z (x) is the zth enhancement operation; Construct a compressed YOLO network, use pruning or quantization methods to reduce the number of network parameters, input the enhanced sample set into the compressed YOLO network, and obtain the feature map F of the lth scale after convolution and pooling operations. l ; Set the channel attention weight of the feature map to and Determine the output of the CA attention mechanism Among them, F l,c (i, j) is the input feature map F l The pixel value at position (i, j) of the cth channel, and are the attention weights in height and width directions respectively, and are the average values of the feature maps in height and width directions, respectively. Conv represents the convolutional layer. After performing attention enhancement on all pixels, the enhanced feature map is obtained; Complete the attention enhancement of feature maps of all scales, and obtain the fused feature map after fusion Among them, α s is the fusion weight of the s-th scale, F s is the feature map of the s-th scale after attention enhancement, and S is the number of scales; Defining the loss function in: is the position loss, is the classification loss, is the target loss, λ loc ,λ cls ,λ obj are the weight coefficients of each loss respectively; The fused feature map is used as training data, and the compressed YOLO network is iteratively trained using the stochastic gradient descent or Adam optimization algorithm until the loss function converges to obtain the final target recognition model.
4. A transmission line foreign body intrusion ranging algorithm according to claim 1, characterized in that: Methods for identifying intrusion objects through target recognition models include: Collect visible light images of the target area in real time to obtain continuous frame image streams; Perform data preprocessing on each frame in the continuous frame image stream and input it into the target recognition model. After feature extraction and attention mechanism processing inside the model, the detection result is generated. If an intrusion object that matches a specific category is detected, the model returns the bounding box coordinates and category information of the intrusion object; The center point position of the intruding object is calculated based on the bounding box information. If the distance between the center point and the wire is less than the trigger threshold, the ranging mechanism is triggered.
5. A transmission line foreign body intrusion ranging algorithm according to claim 4, characterized in that: Methods for identifying intrusion objects by multi-frame difference method include: Collect visible light images of the target area in real time to obtain continuous frame image streams; For each frame image I t Perform grayscale and denoising filtering to obtain the processed image I′ t , where t is the time frame index; Perform weighted difference between the current frame and the previous frames to obtain a differential image The weighted difference formula is: in, For the a The weighted difference value of the pixel point (x, y) under frame difference, w a is the differential weight coefficient of the a-th frame, Accumulate all weighted difference images to obtain the cumulative difference image The formula for the cumulative difference is in, is the cumulative difference value of the pixel points, and A is the number of differential images; Perform temporal smoothing on the accumulated difference image to obtain a smoothed difference image The smoothing formula is in, is the smoothed difference value of the pixel point (x, y) at time t, T win is the time smoothing window size; Perform Gaussian filtering on the smoothed difference image to obtain the filtered difference image The filtering formula is: is the spatial filtered difference value of the pixel point (x, y), G(p, q) is the weight of the Gaussian kernel function, and r is the radius of the filter window; Set the binarization threshold and binarize the filtered difference image to obtain the binary difference image B t ; Set the connectivity threshold C min , and perform connected domain analysis on the binary difference image to obtain the connected domain C. If C>C min , it is determined that an intrusion object is detected and the centroid of the connected domain is obtained. The three-dimensional mapping of the centroid coordinates is performed using the internal parameter matrix and depth confidence to obtain the three-dimensional coordinates of the centroid. If the distance between the centroid and the wire is less than the trigger threshold, the ranging mechanism is triggered.
6. A transmission line foreign body intrusion ranging algorithm according to claim 5, characterized in that: The calculation method of preliminary distance includes: Obtain the real-time ground point cloud data of the target area, and perform denoising and downsampling on the real-time ground point cloud data to obtain the downsampled point cloud P filtered ; If the intrusion object is identified by the target recognition model, the center point of the bounding box information is obtained; if the intrusion object is identified by the multi-frame difference method, the centroid of the connected domain is obtained; Obtain the coordinates of the center point of the image area of the intruding object from the center point of the bounding box information or the centroid of the connected domain, convert them into a three-dimensional spatial position estimate, and use them as the estimated intruding object position; Filter out the point cloud group P close to the intrusion object in the point cloud data obj , P obj ={p i ∈P filtered |||p i -p approx || <d obj }, where p approx is the estimated position of the intruding object, d obj is the screening radius, p i is a point in the point cloud data; Point cloud group P obj Perform cluster analysis to separate the connected intrusion object point group P ob , and calculate the center point of the intruding object (X c , Y c , Z c ), Among them, |P ob | is the number of points in the intrusion object point group, (X i , Y i , Z i ) is point p i The three-dimensional coordinates of Get the position coordinates of the wire from the three-dimensional model of the target area (X line , Y line , Z line ), calculate the initial distance between the center point of the intruding object and the wire 7. The transmission line foreign body intrusion ranging algorithm according to claim 1, characterized in that: The final distance is obtained by: The intrinsic and extrinsic matrix of the visible light camera is obtained through calibration, and the point cloud data is converted to the image coordinate system to align the visible light image and the point cloud data; According to the preliminary distance, the possible location range of the intruding object is inferred, and the point group P whose distance wire is within the range of D±δ is retained. fil , P fil ={p i ∈P||||p i -p line ||-D|<δ}, where δ is the tolerance parameter, p i is a point in the point cloud data, p line is a point on the wire; Extract visible light image and point group P fil The feature points in are matched and a matching pair set M is obtained; Using the matching point set, the least squares error function is established, and the rotation matrix and translation vector are optimized through an iterative optimization algorithm to accurately match the visible light image and point cloud data; Map the color information of the visible light image to the screened point group P fil , generate the final 3D model with texture, update the center point of the intruding object, and calculate the final distance; The tolerance τ is set. If the difference between the final distance and the preliminary distance is greater than the tolerance, the point cloud data is matched and calculated again; if the difference between the final distance and the preliminary distance is not greater than the tolerance, the final distance is obtained.
8. A transmission line foreign body intrusion ranging terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, a method for measuring the distance between foreign objects intruding into a power transmission line according to any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a transmission line foreign object intrusion ranging algorithm as described in any one of claims 1-7 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, a transmission line foreign object intrusion ranging algorithm as described in any one of claims 1 to 7 is implemented.